#include "EventAction.hh" // Statistical event by event accumulation of energy deposition #include "RunAction.hh" // Sums the event energy deposition #include "G4Event.hh" #include "G4RunManager.hh" // controls the flow of the program //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... EventAction::EventAction(RunAction* runAction) : G4UserEventAction(), fRunAction(runAction), fEdep(0.) {} EventAction::~EventAction() {} void EventAction::BeginOfEventAction(const G4Event*) { fEdep = 0.; } void EventAction::EndOfEventAction(const G4Event*) { // accumulate statistics in run action fRunAction->AddEdep(fEdep); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......