#include <EventAction.hh>
Public Member Functions | |
EventAction (RunAction *) | |
~EventAction () | |
void | BeginOfEventAction (const G4Event *) |
void | EndOfEventAction (const G4Event *) |
void | AddEdep (G4double edep) |
Private Attributes | |
RunAction * | m_runAction |
G4double | m_edepPerEvent |
G4int | m_printModulo |
Definition at line 16 of file EventAction.hh.
EventAction::EventAction | ( | RunAction * | run | ) |
Definition at line 19 of file EventAction.cc.
00020 :m_runAction(run), m_printModulo(10000) 00021 {}
EventAction::~EventAction | ( | ) |
void EventAction::BeginOfEventAction | ( | const G4Event * | evt | ) |
Definition at line 30 of file EventAction.cc.
00031 { 00032 G4int evtNb = evt->GetEventID(); 00033 00034 //printing survey 00035 if (evtNb%m_printModulo == 0) 00036 G4cout << "\n---> Begin of Event: " << evtNb << G4endl; 00037 00038 //energy deposited per event 00039 m_edepPerEvent = 0.; 00040 }
void EventAction::EndOfEventAction | ( | const G4Event * | ) |
Definition at line 44 of file EventAction.cc.
00045 { 00046 //energy deposited per event 00047 // 00048 if (m_edepPerEvent > 0.) { 00049 m_runAction->SumEvents(m_edepPerEvent); 00050 #ifdef G4ANALYSIS_USE 00051 G4double weight = 1.; 00052 m_runAction->GetHisto(0)->fill(m_edepPerEvent/MeV, weight); 00053 #endif 00054 } 00055 }
void EventAction::AddEdep | ( | G4double | edep | ) | [inline] |
Definition at line 26 of file EventAction.hh.
Referenced by SteppingAction::UserSteppingAction().
00026 {m_edepPerEvent += edep;};
RunAction* EventAction::m_runAction [private] |
G4double EventAction::m_edepPerEvent [private] |
Definition at line 30 of file EventAction.hh.
Referenced by BeginOfEventAction(), and EndOfEventAction().
G4int EventAction::m_printModulo [private] |