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 "CLHEP/Vector/LorentzVector.h"
15 #include "CLHEP/Vector/ThreeVector.h"
16 
17 #include <vector>
18 #include <map>
19 #include <string>
20 
21 class SimRunInterface;
22 class BeginOfEvent;
23 class EndOfEvent;
24 class CMSSteppingVerbose;
25 
26 class EventAction: public G4UserEventAction
27 {
28 public:
29 
30  explicit EventAction(const edm::ParameterSet& ps,
33  virtual ~EventAction();
34 
35  virtual void BeginOfEventAction(const G4Event * evt);
36  virtual void EndOfEventAction(const G4Event * evt);
37 
38  void abortEvent();
39 
40  inline const TrackContainer * trackContainer() const {
42  }
43 
44  inline void addTrack(TrackWithHistory* iTrack, bool inHistory, bool withAncestor) {
45  m_trackManager->addTrack(iTrack, inHistory, withAncestor);
46  }
47 
48  void addTkCaloStateInfo(uint32_t t,
49  const std::pair<math::XYZVectorD,math::XYZTLorentzVectorD>& p);
50 
52 
55 
56 private:
57 
63  bool m_debug;
64 };
65 
66 #endif
67 
68 
69 
void addTrack(TrackWithHistory *iTrack, bool inHistory, bool withAncestor)
std::string m_stopFile
Definition: EventAction.h:61
SimRunInterface * m_runInterface
Definition: EventAction.h:58
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:54
virtual void EndOfEventAction(const G4Event *evt)
Definition: EventAction.cc:40
bool m_printRandom
Definition: EventAction.h:62
void prepareForNewPrimary()
Definition: EventAction.h:51
virtual void BeginOfEventAction(const G4Event *evt)
Definition: EventAction.cc:30
const TrackContainer * trackContainer() const
std::vector< TrackWithHistory * > TrackContainer
Definition: TrackContainer.h:8
CMSSteppingVerbose * m_SteppingVerbose
Definition: EventAction.h:60
void cleanTracksWithHistory()
const TrackContainer * trackContainer() const
Definition: EventAction.h:40
SimTrackManager * m_trackManager
Definition: EventAction.h:59
EventAction(const edm::ParameterSet &ps, SimRunInterface *, SimTrackManager *, CMSSteppingVerbose *)
Definition: EventAction.cc:14
bool m_debug
Definition: EventAction.h:63
void addTkCaloStateInfo(uint32_t t, const std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > &p)
Definition: EventAction.cc:74
void abortEvent()
Definition: EventAction.cc:80
void addTrack(TrackWithHistory *iTrack, bool inHistory, bool withAncestor)
Definition: EventAction.h:44
virtual ~EventAction()
Definition: EventAction.cc:28
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:53