diff --git a/CODE/EventAction.hh b/CODE/EventAction.hh new file mode 100644 index 0000000000000000000000000000000000000000..0d798eea0e9eb615de56cfe9d27eef864680e551 --- /dev/null +++ b/CODE/EventAction.hh @@ -0,0 +1,30 @@ +#ifndef EventAction_h +#define EventAction_h 1 + + +// Geant libraries + +#include "G4UserEventAction.hh" +#include "globals.hh" + +class RunAction; + +class EventAction : public G4UserEventAction +{ + public: + EventAction(RunAction* runAction); + virtual ~EventAction(); + + virtual void BeginOfEventAction(const G4Event* event); + virtual void EndOfEventAction(const G4Event* event); + + void AddEdep(G4double edep) + { + fEdep += edep; + } + + private: + RunAction* fRunAction; + G4double fEdep; +}; +#endif