25 lines
479 B
C
25 lines
479 B
C
|
#ifndef B0EventAction_h
|
||
|
#define B0EventAction_h
|
||
|
|
||
|
#include "G4UserEventAction.hh"
|
||
|
#include "globals.hh"
|
||
|
|
||
|
class RunAction;
|
||
|
|
||
|
class EventAction : public G4UserEventAction {
|
||
|
public:
|
||
|
EventAction(RunAction* r);
|
||
|
~EventAction() override;
|
||
|
|
||
|
void BeginOfEventAction(const G4Event*) override;
|
||
|
void EndOfEventAction(const G4Event*) override;
|
||
|
|
||
|
void AddEdep(G4double edep) { fEdep += edep; }
|
||
|
|
||
|
private:
|
||
|
RunAction* fRunAction = nullptr;
|
||
|
G4double fEdep = 0.;
|
||
|
};
|
||
|
|
||
|
#endif
|