Event action class.
More...
#include <Doxymodules_basic.h>
|
void | PrintEventStatistics (G4double absoEdep, G4double absoTrackLength, G4double gapEdep, G4double gapTrackLength) const |
|
Event action class.
In EndOfEventAction(), it prints the accumulated quantities of the energy deposit and track lengths of charged particles in Absober and Gap layers stored in RunData object.
Definition at line 141 of file Doxymodules_basic.h.
◆ EventAction()
B4b::EventAction::EventAction |
( |
| ) |
|
|
default |
◆ ~EventAction()
B4b::EventAction::~EventAction |
( |
| ) |
|
|
overridedefault |
◆ BeginOfEventAction()
void B4b::EventAction::BeginOfEventAction |
( |
const G4Event * |
event | ) |
|
|
override |
Definition at line 65 of file EventAction.cc.
66{
67 auto runData
68 = static_cast<RunData*>(
69 G4RunManager::GetRunManager()->GetNonConstCurrentRun());
70 runData->Reset();
71}
◆ EndOfEventAction()
void B4b::EventAction::EndOfEventAction |
( |
const G4Event * |
event | ) |
|
|
override |
Definition at line 75 of file EventAction.cc.
76{
77 auto runData
78 = static_cast<RunData*>(
79 G4RunManager::GetRunManager()->GetNonConstCurrentRun());
80 runData->FillPerEvent();
81
82
83
84 auto eventID = event->GetEventID();
85 auto printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
86 if ( ( printModulo > 0 ) && ( eventID % printModulo == 0 ) ) {
88 runData->GetEdep(
kAbs),
89 runData->GetTrackLength(
kAbs),
90 runData->GetEdep(
kGap),
91 runData->GetTrackLength(
kGap));
92 G4cout << "--> End of event " << eventID << "\n" << G4endl;
93 }
94}
void PrintEventStatistics(G4double absoEdep, G4double absoTrackLength, G4double gapEdep, G4double gapTrackLength) const
◆ PrintEventStatistics()
void B4b::EventAction::PrintEventStatistics |
( |
G4double |
absoEdep, |
|
|
G4double |
absoTrackLength, |
|
|
G4double |
gapEdep, |
|
|
G4double |
gapTrackLength |
|
) |
| const |
|
private |
Definition at line 45 of file EventAction.cc.
48{
49
50 G4cout
51 << " Absorber: total energy: "
52 << std::setw(7) <<
G4BestUnit(absoEdep,
"Energy")
53 << " total track length: "
54 << std::setw(7) <<
G4BestUnit(absoTrackLength,
"Length")
55 << G4endl
56 << " Gap: total energy: "
57 << std::setw(7) <<
G4BestUnit(gapEdep,
"Energy")
58 << " total track length: "
59 << std::setw(7) <<
G4BestUnit(gapTrackLength,
"Length")
60 << G4endl;
61}
The documentation for this class was generated from the following files: