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 "GaudiKernel/ToolHandle.h"
15
#include "
AthenaBaseComps/AthMessaging.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
47
MCTruthSteppingAction
(
const
VolumeCollectionMap_t
& collMap,
48
int
secondarySavingLevel,
49
int
subDetVolLevel,
50
IMessageSvc* msgSvc, MSG::Level level);
51
54
virtual
void
BeginOfEventAction
(
const
G4Event*)
override
final
;
55
59
virtual
void
UserSteppingAction
(
const
G4Step*)
override
final
;
60
61
private
:
62
64
void
setupRecEnvelopes
();
65
67
void
propagatePrimaryInfoToSecondaries
(
const
G4Step*)
const
;
68
70
bool
m_isInitialized
;
71
73
int
m_secondarySavingLevel
;
74
76
int
m_subDetVolLevel
;
77
79
VolumeCollectionMap_t
m_volumeCollectionMap
;
80
82
std::vector<RecordingEnvelope>
m_recordingEnvelopes
;
83
84
};
// class MCTruthSteppingAction
85
86
}
// namespace G4UA
87
88
#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:42
G4UA::MCTruthSteppingAction::m_isInitialized
bool m_isInitialized
Used to delay initialization until the event loop, after geo is ready.
Definition
MCTruthSteppingAction.h:70
G4UA::MCTruthSteppingAction::m_subDetVolLevel
int m_subDetVolLevel
The level in the G4 volume hierarchy at which we find the sub-detector.
Definition
MCTruthSteppingAction.h:76
G4UA::MCTruthSteppingAction::m_secondarySavingLevel
int m_secondarySavingLevel
The saving level for secondaries.
Definition
MCTruthSteppingAction.h:73
G4UA::MCTruthSteppingAction::setupRecEnvelopes
void setupRecEnvelopes()
Setup the list of RecordingEnvelope helpers.
Definition
MCTruthSteppingAction.cxx:42
G4UA::MCTruthSteppingAction::m_recordingEnvelopes
std::vector< RecordingEnvelope > m_recordingEnvelopes
List of RecordingEnvelope helpers to invoke.
Definition
MCTruthSteppingAction.h:82
G4UA::MCTruthSteppingAction::m_volumeCollectionMap
VolumeCollectionMap_t m_volumeCollectionMap
Map of volume name to output collection name.
Definition
MCTruthSteppingAction.h:79
G4UA::MCTruthSteppingAction::propagatePrimaryInfoToSecondaries
void propagatePrimaryInfoToSecondaries(const G4Step *) const
Propagate parent primary truth attribution to ordinary secondaries.
Definition
MCTruthSteppingAction.cxx:157
G4UA::MCTruthSteppingAction::MCTruthSteppingAction
MCTruthSteppingAction(const VolumeCollectionMap_t &collMap, int secondarySavingLevel, int subDetVolLevel, IMessageSvc *msgSvc, MSG::Level level)
Construct the action with specified volumes and output collections.
Definition
MCTruthSteppingAction.cxx:26
G4UA::MCTruthSteppingAction::BeginOfEventAction
virtual void BeginOfEventAction(const G4Event *) override final
Called at the start of each G4 event.
Definition
MCTruthSteppingAction.cxx:74
G4UA::MCTruthSteppingAction::UserSteppingAction
virtual void UserSteppingAction(const G4Step *) override final
Process one particle step.
Definition
MCTruthSteppingAction.cxx:95
G4UA
for nSW
Definition
CalibrationDefaultProcessing.h:19
Generated on
for ATLAS Offline Software by
1.17.0