SciFiMatG4_1layer1mm/SciFiSim/include/EventAction.hh

41 lines
609 B
C++
Raw Permalink Normal View History

2021-12-01 16:25:41 +01:00
// Written by Peter Stromberger
// based on work of Mirco Deckenhoff
#ifndef EventAction_h
#define EventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class G4Event;
class EventAction : public G4UserEventAction
{
public:
EventAction();
~EventAction();
public:
void BeginOfEventAction(const G4Event* anEvent);
void EndOfEventAction(const G4Event*);
void AddCore(G4double de, G4double dl);
private:
G4double fEnergy;
G4double fTrackL;
};
inline void EventAction::AddCore(G4double de, G4double dl)
{
fEnergy += de;
fTrackL += dl;
}
#endif