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;
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  inline void addTrack(TrackWithHistory* iTrack, bool inHistory, bool withAncestor) {
36  m_trackManager->addTrack(iTrack, inHistory, withAncestor);
37  }
38 
39  bool trackExists(unsigned int id) const { return m_trackManager->trackExists(id); }
40  TrackWithHistory* getTrackByID(unsigned int id) const { return m_trackManager->getTrackByID(id); }
41 
42  void addTkCaloStateInfo(uint32_t t, const std::pair<math::XYZVectorD, math::XYZTLorentzVectorD>& p);
43 
45 
48 
49 private:
55  bool m_debug;
56 };
57 
58 #endif
SimTrackManager
Definition: SimTrackManager.h:35
EventAction::~EventAction
~EventAction() override
Definition: EventAction.cc:27
EventAction::trackContainer
const TrackContainer * trackContainer() const
Definition: EventAction.h:33
EventAction
Definition: EventAction.h:23
EventAction::m_beginOfEventSignal
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:46
EventAction::m_endOfEventSignal
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:47
SimTrackManager::trackExists
bool trackExists(unsigned int i) const
Definition: SimTrackManager.h:94
EventAction::BeginOfEventAction
void BeginOfEventAction(const G4Event *evt) override
Definition: EventAction.cc:29
TrackWithHistory
Definition: TrackWithHistory.h:16
EventAction::prepareForNewPrimary
void prepareForNewPrimary()
Definition: EventAction.h:44
EventAction::m_runInterface
SimRunInterface * m_runInterface
Definition: EventAction.h:50
CMSSteppingVerbose
Definition: CMSSteppingVerbose.h:25
SimActivityRegistry.h
EventAction::m_printRandom
bool m_printRandom
Definition: EventAction.h:54
EndOfEvent
Definition: EndOfEvent.h:6
sim_act::Signaler< BeginOfEvent >
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EventAction::m_SteppingVerbose
CMSSteppingVerbose * m_SteppingVerbose
Definition: EventAction.h:52
SimTrackManager::addTrack
void addTrack(TrackWithHistory *iTrack, bool inHistory, bool withAncestor)
Definition: SimTrackManager.h:63
SimTrackManager::getTrackByID
TrackWithHistory * getTrackByID(unsigned int trackID, bool strict=false) const
Definition: SimTrackManager.h:104
G4SimEvent.h
SimTrackManager::cleanTracksWithHistory
void cleanTracksWithHistory()
Definition: SimTrackManager.cc:293
BeginOfEvent
Definition: BeginOfEvent.h:6
EventAction::abortEvent
void abortEvent()
Definition: EventAction.cc:76
EventAction::m_debug
bool m_debug
Definition: EventAction.h:55
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EventAction::EndOfEventAction
void EndOfEventAction(const G4Event *evt) override
Definition: EventAction.cc:45
TrackContainer
std::vector< TrackWithHistory * > TrackContainer
Definition: TrackContainer.h:8
EventAction::m_trackManager
SimTrackManager * m_trackManager
Definition: EventAction.h:51
EventAction::addTkCaloStateInfo
void addTkCaloStateInfo(uint32_t t, const std::pair< math::XYZVectorD, math::XYZTLorentzVectorD > &p)
Definition: EventAction.cc:72
EventAction::getTrackByID
TrackWithHistory * getTrackByID(unsigned int id) const
Definition: EventAction.h:40
SimTrackManager.h
EventAction::EventAction
EventAction(const edm::ParameterSet &ps, SimRunInterface *, SimTrackManager *, CMSSteppingVerbose *)
Definition: EventAction.cc:14
EventAction::trackExists
bool trackExists(unsigned int id) const
Definition: EventAction.h:39
EventAction::m_stopFile
std::string m_stopFile
Definition: EventAction.h:53
ParameterSet.h
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
TrackContainer.h
EventAction::addTrack
void addTrack(TrackWithHistory *iTrack, bool inHistory, bool withAncestor)
Definition: EventAction.h:35
SimTrackManager::trackContainer
const TrackContainer * trackContainer() const
Definition: SimTrackManager.h:52
TrackWithHistory.h
SimRunInterface
Definition: SimRunInterface.h:17