Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
B4bEventAction Class Reference

#include <B4bEventAction.hh>

Inheritance diagram for B4bEventAction:
Collaboration diagram for B4bEventAction:

Public Member Functions

 B4bEventAction ()
 
virtual ~B4bEventAction ()
 
virtual void BeginOfEventAction (const G4Event *event)
 
virtual void EndOfEventAction (const G4Event *event)
 
- Public Member Functions inherited from G4UserEventAction
 G4UserEventAction ()
 
virtual ~G4UserEventAction ()
 
virtual void SetEventManager (G4EventManager *value)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserEventAction
G4EventManagerfpEventManager
 

Detailed Description

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 B4bRunData object.

Definition at line 43 of file B4bEventAction.hh.

Constructor & Destructor Documentation

B4bEventAction::B4bEventAction ( )

Definition at line 43 of file B4bEventAction.cc.

B4bEventAction::~B4bEventAction ( )
virtual

Definition at line 49 of file B4bEventAction.cc.

50 {}

Member Function Documentation

void B4bEventAction::BeginOfEventAction ( const G4Event event)
virtual

Reimplemented from G4UserEventAction.

Definition at line 74 of file B4bEventAction.cc.

75 {
76  auto runData
77  = static_cast<B4bRunData*>(
79  runData->Reset();
80 }
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
void Reset()
G4Run * GetNonConstCurrentRun() const

Here is the call graph for this function:

void B4bEventAction::EndOfEventAction ( const G4Event event)
virtual

Reimplemented from G4UserEventAction.

Definition at line 84 of file B4bEventAction.cc.

85 {
86  auto runData
87  = static_cast<B4bRunData*>(
89  runData->FillPerEvent();
90 
91  //print per event (modulo n)
92  //
93  auto eventID = event->GetEventID();
94  auto printModulo = G4RunManager::GetRunManager()->GetPrintProgress();
95  if ( ( printModulo > 0 ) && ( eventID % printModulo == 0 ) ) {
96  G4cout << "---> End of event: " << eventID << G4endl;
97 
98  PrintEventStatistics(
99  runData->GetEdep(kAbs),
100  runData->GetTrackLength(kAbs),
101  runData->GetEdep(kGap),
102  runData->GetTrackLength(kGap));
103  }
104 }
G4int GetPrintProgress()
void FillPerEvent()
G4GLOB_DLL std::ostream G4cout
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61
const G4int kGap
Definition: B4bRunData.hh:42
G4Run * GetNonConstCurrentRun() const
const G4int kAbs
Definition: B4bRunData.hh:41

Here is the call graph for this function:


The documentation for this class was generated from the following files: