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