Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
B4bEventAction Class Reference

#include <B4bEventAction.hh>

Inheritance diagram for B4bEventAction:
G4UserEventAction

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 ()
 
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.

References G4RunManager::GetNonConstCurrentRun(), G4RunManager::GetRunManager(), and B4bRunData::Reset().

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

Reimplemented from G4UserEventAction.

Definition at line 84 of file B4bEventAction.cc.

References B4bRunData::FillPerEvent(), G4cout, G4endl, B4bRunData::GetEdep(), G4RunManager::GetNonConstCurrentRun(), G4RunManager::GetPrintProgress(), G4RunManager::GetRunManager(), B4bRunData::GetTrackLength(), kAbs, and kGap.

85 {
86  B4bRunData* runData
87  = static_cast<B4bRunData*>(
89  runData->FillPerEvent();
90 
91  //print per event (modulo n)
92  //
93  G4int eventID = event->GetEventID();
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 }
G4double GetEdep(G4int id) const
Definition: B4bRunData.hh:91
G4int GetPrintProgress()
int G4int
Definition: G4Types.hh:78
void FillPerEvent()
Definition: B4bRunData.cc:57
G4GLOB_DLL std::ostream G4cout
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
#define G4endl
Definition: G4ios.hh:61
G4Run * GetNonConstCurrentRun() const
G4double GetTrackLength(G4int id) const
Definition: B4bRunData.hh:95

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