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 {
25 public:
26 
27  explicit EventAction(const edm::ParameterSet& ps,
30  ~EventAction() override;
31 
32  void BeginOfEventAction(const G4Event * evt) override;
33  void EndOfEventAction(const G4Event * evt) override;
34 
35  void abortEvent();
36 
37  inline const TrackContainer * trackContainer() const {
39  }
40 
41  inline void addTrack(TrackWithHistory* iTrack, bool inHistory, bool withAncestor) {
42  m_trackManager->addTrack(iTrack, inHistory, withAncestor);
43  }
44 
45  void addTkCaloStateInfo(uint32_t t,
46  const std::pair<math::XYZVectorD,math::XYZTLorentzVectorD>& p);
47 
49 
52 
53 private:
54 
60  bool m_debug;
61 };
62 
63 #endif
64 
65 
66 
void addTrack(TrackWithHistory *iTrack, bool inHistory, bool withAncestor)
std::string m_stopFile
Definition: EventAction.h:58
SimRunInterface * m_runInterface
Definition: EventAction.h:55
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:51
bool m_printRandom
Definition: EventAction.h:59
void BeginOfEventAction(const G4Event *evt) override
Definition: EventAction.cc:30
void prepareForNewPrimary()
Definition: EventAction.h:48
const TrackContainer * trackContainer() const
std::vector< TrackWithHistory * > TrackContainer
Definition: TrackContainer.h:8
CMSSteppingVerbose * m_SteppingVerbose
Definition: EventAction.h:57
void cleanTracksWithHistory()
const TrackContainer * trackContainer() const
Definition: EventAction.h:37
void EndOfEventAction(const G4Event *evt) override
Definition: EventAction.cc:47
SimTrackManager * m_trackManager
Definition: EventAction.h:56
EventAction(const edm::ParameterSet &ps, SimRunInterface *, SimTrackManager *, CMSSteppingVerbose *)
Definition: EventAction.cc:14
bool m_debug
Definition: EventAction.h:60
void addTkCaloStateInfo(uint32_t t, const std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > &p)
Definition: EventAction.cc:81
void abortEvent()
Definition: EventAction.cc:87
void addTrack(TrackWithHistory *iTrack, bool inHistory, bool withAncestor)
Definition: EventAction.h:41
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:50
~EventAction() override
Definition: EventAction.cc:28