ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Sim
MCTruthBase
src
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 "
AthenaBaseComps/AthMessaging.h
"
15
16
// Geant4 includes
17
#include "G4UserEventAction.hh"
18
#include "G4UserSteppingAction.hh"
19
20
// Local includes
21
#include "
RecordingEnvelope.h
"
22
23
namespace
ISF
24
{
25
class
IGeoIDSvc
;
26
class
ITruthSvc
;
27
}
28
29
namespace
G4UA
30
{
31
38
class
MCTruthSteppingAction
:
public
G4UserEventAction,
39
public
G4UserSteppingAction,
40
public
AthMessaging
41
{
42
43
public
:
44
46
using
VolumeCollectionMap_t
= std::map<std::string, std::string>;
47
51
MCTruthSteppingAction
(
const
VolumeCollectionMap_t
& collMap,
52
int
secondarySavingLevel,
53
int
subDetVolLevel,
54
ISF::ITruthSvc
& truthRecordSvc,
55
ISF::IGeoIDSvc
& geoIDSvc,
56
IMessageSvc* msgSvc, MSG::Level level);
57
60
virtual
void
BeginOfEventAction
(
const
G4Event*)
override
final
;
61
65
virtual
void
UserSteppingAction
(
const
G4Step*)
override
final
;
66
67
private
:
68
70
void
setupRecEnvelopes
();
71
73
void
propagatePrimaryInfoToSecondaries
(
const
G4Step*)
const
;
74
76
void
createTruthIncident
(
const
G4Step*)
const
;
77
79
bool
m_isInitialized
;
80
82
int
m_secondarySavingLevel
;
83
85
int
m_subDetVolLevel
;
86
88
ISF::ITruthSvc
&
m_truthRecordSvc
;
89
91
ISF::IGeoIDSvc
&
m_geoIDSvc
;
92
94
VolumeCollectionMap_t
m_volumeCollectionMap
;
95
97
std::vector<RecordingEnvelope>
m_recordingEnvelopes
;
98
99
};
// class MCTruthSteppingAction
100
101
}
// namespace G4UA
102
103
#endif
AthMessaging.h
RecordingEnvelope.h
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
G4UA::MCTruthSteppingAction::VolumeCollectionMap_t
std::map< std::string, std::string > VolumeCollectionMap_t
Map of volume name to output TrackRecordCollection name.
Definition
MCTruthSteppingAction.h:46
G4UA::MCTruthSteppingAction::m_isInitialized
bool m_isInitialized
Used to delay initialization until the event loop, after geo is ready.
Definition
MCTruthSteppingAction.h:79
G4UA::MCTruthSteppingAction::m_subDetVolLevel
int m_subDetVolLevel
The level in the G4 volume hierarchy at which we find the sub-detector.
Definition
MCTruthSteppingAction.h:85
G4UA::MCTruthSteppingAction::m_secondarySavingLevel
int m_secondarySavingLevel
The saving level for secondaries.
Definition
MCTruthSteppingAction.h:82
G4UA::MCTruthSteppingAction::setupRecEnvelopes
void setupRecEnvelopes()
Setup the list of RecordingEnvelope helpers.
Definition
MCTruthSteppingAction.cxx:49
G4UA::MCTruthSteppingAction::m_recordingEnvelopes
std::vector< RecordingEnvelope > m_recordingEnvelopes
List of RecordingEnvelope helpers to invoke.
Definition
MCTruthSteppingAction.h:97
G4UA::MCTruthSteppingAction::m_geoIDSvc
ISF::IGeoIDSvc & m_geoIDSvc
ISF GeoID Service used to identify the next detector region.
Definition
MCTruthSteppingAction.h:91
G4UA::MCTruthSteppingAction::m_volumeCollectionMap
VolumeCollectionMap_t m_volumeCollectionMap
Map of volume name to output collection name.
Definition
MCTruthSteppingAction.h:94
G4UA::MCTruthSteppingAction::propagatePrimaryInfoToSecondaries
void propagatePrimaryInfoToSecondaries(const G4Step *) const
Propagate parent primary truth attribution to ordinary secondaries.
Definition
MCTruthSteppingAction.cxx:170
G4UA::MCTruthSteppingAction::BeginOfEventAction
virtual void BeginOfEventAction(const G4Event *) override final
Called at the start of each G4 event.
Definition
MCTruthSteppingAction.cxx:81
G4UA::MCTruthSteppingAction::m_truthRecordSvc
ISF::ITruthSvc & m_truthRecordSvc
ISF Truth Service used to register truth incidents.
Definition
MCTruthSteppingAction.h:88
G4UA::MCTruthSteppingAction::createTruthIncident
void createTruthIncident(const G4Step *) const
Create and register a truth incident for the current step.
Definition
MCTruthSteppingAction.cxx:162
G4UA::MCTruthSteppingAction::UserSteppingAction
virtual void UserSteppingAction(const G4Step *) override final
Process one particle step.
Definition
MCTruthSteppingAction.cxx:102
G4UA::MCTruthSteppingAction::MCTruthSteppingAction
MCTruthSteppingAction(const VolumeCollectionMap_t &collMap, int secondarySavingLevel, int subDetVolLevel, ISF::ITruthSvc &truthRecordSvc, ISF::IGeoIDSvc &geoIDSvc, IMessageSvc *msgSvc, MSG::Level level)
Construct the action with specified volumes and output collections.
Definition
MCTruthSteppingAction.cxx:29
ISF::IGeoIDSvc
The interface to chose between the sub geometry services, realized as an AlgTool since it does not ha...
Definition
IGeoIDSvc.h:41
ISF::ITruthSvc
@ class ITruthSvc
Definition
ITruthSvc.h:29
G4UA
for nSW
Definition
CalibrationDefaultProcessing.h:19
ISF
ISFParticleOrderedQueue.
Definition
PrimaryParticleInformation.h:13
Generated on
for ATLAS Offline Software by
1.17.0