ATLAS Offline Software
MCTruthSteppingAction.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MCTruthBase_MCTruthSteppingAction_H
6 #define MCTruthBase_MCTruthSteppingAction_H
7 
8 // System includes
9 #include <map>
10 #include <string>
11 #include <vector>
12 
13 // Framework includes
14 #include "GaudiKernel/ToolHandle.h"
16 
17 // Geant4 includes
18 #include "G4UserEventAction.hh"
19 #include "G4UserSteppingAction.hh"
20 
21 // Local includes
22 #include "RecordingEnvelope.h"
23 
24 
25 namespace G4UA
26 {
27 
34  class MCTruthSteppingAction : public G4UserEventAction,
35  public G4UserSteppingAction,
36  public AthMessaging
37  {
38 
39  public:
40 
42  using VolumeCollectionMap_t = std::map<std::string, std::string>;
43 
48  IMessageSvc* msgSvc, MSG::Level level);
49 
52  virtual void BeginOfEventAction(const G4Event*) override final;
53 
57  virtual void UserSteppingAction(const G4Step*) override final;
58 
59  private:
60 
62  void setupRecEnvelopes();
63 
66 
69 
71  std::vector<RecordingEnvelope> m_recordingEnvelopes;
72 
73  }; // class MCTruthSteppingAction
74 
75 } // namespace G4UA
76 
77 #endif
G4UA
for nSW
Definition: CalibrationDefaultProcessing.h:19
G4UA::MCTruthSteppingAction::m_recordingEnvelopes
std::vector< RecordingEnvelope > m_recordingEnvelopes
List of RecordingEnvelope helpers to invoke.
Definition: MCTruthSteppingAction.h:71
G4UA::MCTruthSteppingAction::MCTruthSteppingAction
MCTruthSteppingAction(const VolumeCollectionMap_t &collMap, IMessageSvc *msgSvc, MSG::Level level)
Construct the action with specified volumes and output collections.
Definition: MCTruthSteppingAction.cxx:20
G4UA::MCTruthSteppingAction::VolumeCollectionMap_t
std::map< std::string, std::string > VolumeCollectionMap_t
Map of volume name to output TrackRecordCollection name.
Definition: MCTruthSteppingAction.h:42
G4UA::MCTruthSteppingAction::UserSteppingAction
virtual void UserSteppingAction(const G4Step *) override final
Process one particle step.
Definition: MCTruthSteppingAction.cxx:83
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
G4UA::MCTruthSteppingAction::m_volumeCollectionMap
VolumeCollectionMap_t m_volumeCollectionMap
Map of volume name to output collection name.
Definition: MCTruthSteppingAction.h:68
G4UA::MCTruthSteppingAction::setupRecEnvelopes
void setupRecEnvelopes()
Setup the list of RecordingEnvelope helpers.
Definition: MCTruthSteppingAction.cxx:32
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
G4UA::MCTruthSteppingAction::BeginOfEventAction
virtual void BeginOfEventAction(const G4Event *) override final
Called at the start of each G4 event.
Definition: MCTruthSteppingAction.cxx:64
G4UA::MCTruthSteppingAction
User action which handles recording-envelope truth tracks.
Definition: MCTruthSteppingAction.h:37
AthMessaging.h
RecordingEnvelope.h
G4UA::MCTruthSteppingAction::m_isInitialized
bool m_isInitialized
Used to delay initialization until the event loop, after geo is ready.
Definition: MCTruthSteppingAction.h:65