CMS 3D CMS Logo

EventAction.h
Go to the documentation of this file.
1 #ifndef SimG4Core_EventAction_H
2 #define SimG4Core_EventAction_H
3 
5 
10 
11 #include "G4UserEventAction.hh"
12 
13 #include <vector>
14 #include <map>
15 #include <string>
16 
17 class SimRunInterface;
18 class BeginOfEvent;
19 class EndOfEvent;
20 class CMSSteppingVerbose;
21 
22 class EventAction : public G4UserEventAction {
23 public:
25  ~EventAction() override = default;
26 
27  void BeginOfEventAction(const G4Event* evt) override;
28  void EndOfEventAction(const G4Event* evt) override;
29 
30  void abortEvent();
31 
32  inline const TrackContainer* trackContainer() const { return m_trackManager->trackContainer(); }
33 
34  TrackWithHistory* getTrackByID(unsigned int id) const { return m_trackManager->getTrackByID(id); }
35 
38 
39 private:
45  bool m_debug;
46 };
47 
48 #endif
const TrackContainer * trackContainer() const
Definition: EventAction.h:32
std::string m_stopFile
Definition: EventAction.h:43
~EventAction() override=default
SimRunInterface * m_runInterface
Definition: EventAction.h:40
TrackWithHistory * getTrackByID(int trackID, bool strict=false) const
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:37
bool m_printRandom
Definition: EventAction.h:44
void BeginOfEventAction(const G4Event *evt) override
Definition: EventAction.cc:24
std::vector< TrackWithHistory * > TrackContainer
Definition: TrackContainer.h:8
CMSSteppingVerbose * m_SteppingVerbose
Definition: EventAction.h:42
TrackWithHistory * getTrackByID(unsigned int id) const
Definition: EventAction.h:34
void EndOfEventAction(const G4Event *evt) override
Definition: EventAction.cc:38
SimTrackManager * m_trackManager
Definition: EventAction.h:41
EventAction(const edm::ParameterSet &ps, SimRunInterface *, SimTrackManager *, CMSSteppingVerbose *)
Definition: EventAction.cc:13
bool m_debug
Definition: EventAction.h:45
const std::vector< TrackWithHistory * > * trackContainer() const
void abortEvent()
Definition: EventAction.cc:65
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:36