CMS 3D CMS Logo

CMSSimEventManager.h
Go to the documentation of this file.
1 //
2 // CMSSimEventManager is designed on top of G4EventManager
3 //
4 // 13.03.2023 V.Ivanchenko
5 //
6 
7 // --------------------------------------------------------------------
8 #ifndef SimG4Core_Application_CMSSimEventManager_hh
9 #define SimG4Core_Application_CMSSimEventManager_hh 1
10 
11 #include <vector>
12 #include "globals.hh"
13 #include "G4Track.hh"
14 #include "G4TrackVector.hh"
15 
16 namespace edm {
17  class ParameterSet;
18 }
19 
20 class G4Event;
21 class EventAction;
22 class StackingAction;
23 class TrackingAction;
24 class G4UserSteppingAction;
25 class G4SDManager;
26 class G4StateManager;
27 class G4PrimaryTransformer;
28 class G4TrackingManager;
29 class G4Navigator;
30 
32 public:
33  CMSSimEventManager(const edm::ParameterSet& iConfig);
35 
36  void InitialiseWorker();
37 
38  // This method is the main entry to this class for simulating an event.
39  void ProcessOneEvent(G4Event* anEvent);
40 
41  // This method aborts the processing of the current event.
42  void AbortCurrentEvent();
43 
44  void SetUserAction(EventAction* ptr);
45  void SetUserAction(StackingAction* ptr);
46  void SetUserAction(TrackingAction* ptr);
47  void SetUserAction(G4UserSteppingAction* ptr);
48 
49  CMSSimEventManager(const CMSSimEventManager& right) = delete;
50  CMSSimEventManager& operator=(const CMSSimEventManager& right) = delete;
51 
52 private:
53  void StackTracks(G4TrackVector*, bool IDisSet);
54 
55  G4StateManager* m_stateManager;
56  G4TrackingManager* m_defTrackManager;
57  G4SDManager* m_sdManager;
58  G4PrimaryTransformer* m_primaryTransformer;
59  G4Navigator* m_navigator;
60 
64 
65  G4int trackID_{0};
66  G4int verbose_;
67 
68  std::vector<G4Track*> m_tracks;
69 };
70 
71 #endif
G4PrimaryTransformer * m_primaryTransformer
G4TrackingManager * m_defTrackManager
TrackingAction * m_trackingAction
CMSSimEventManager & operator=(const CMSSimEventManager &right)=delete
void ProcessOneEvent(G4Event *anEvent)
G4Navigator * m_navigator
void StackTracks(G4TrackVector *, bool IDisSet)
void SetUserAction(EventAction *ptr)
G4StateManager * m_stateManager
HLT enums.
EventAction * m_eventAction
G4SDManager * m_sdManager
std::vector< G4Track * > m_tracks
StackingAction * m_stackingAction
CMSSimEventManager(const edm::ParameterSet &iConfig)