ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Sim
MCTruthBase
src
MCTruthSteppingActionTool.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_MCTruthSteppingActionTool_h
6
#define MCTruthBase_MCTruthSteppingActionTool_h
7
8
// Local includes
9
#include "
MCTruthSteppingAction.h
"
10
11
// Infrastructure includes
12
#include "
G4AtlasTools/UserActionToolBase.h
"
13
#include "Gaudi/Property.h"
14
#include "GaudiKernel/ServiceHandle.h"
15
16
// ISF includes
17
#include "
ISF_Interfaces/IGeoIDSvc.h
"
18
#include "
ISF_Interfaces/ITruthSvc.h
"
19
20
// STL includes
21
#include <string>
22
23
namespace
G4UA
24
{
25
31
class
MCTruthSteppingActionTool
:
public
UserActionToolBase
<MCTruthSteppingAction>
32
{
33
34
public
:
35
37
MCTruthSteppingActionTool
(
const
std::string&
type
,
const
std::string& name,
38
const
IInterface* parent);
39
41
virtual
StatusCode
initialize
()
override
final
;
42
43
protected
:
44
46
virtual
std::unique_ptr<MCTruthSteppingAction>
47
makeAndFillAction
(
G4AtlasUserActions
&)
override
final
;
48
50
StatusCode
BeginOfAthenaEvent
(
HitCollectionMap
&)
override
;
52
StatusCode
EndOfAthenaEvent
(
HitCollectionMap
&)
override
;
53
54
private
:
55
57
Gaudi::Property<MCTruthSteppingAction::VolumeCollectionMap_t>
58
m_volumeCollectionMap
{
this
,
"VolumeCollectionMap"
, {},
59
"Map of volume name to output collection name"
};
60
62
Gaudi::Property<int>
m_secondarySavingLevel
{
63
this
,
"SecondarySavingLevel"
, 2,
64
"Three valid options: 1 - Primaries; 2 - StoredSecondaries(default); 3 - All"
};
65
67
Gaudi::Property<int>
m_subDetVolLevel
{
68
this
,
"SubDetVolumeLevel"
, 1,
69
"The level in the G4 volume hierarchy at which we find the sub-detector name"
};
70
72
ServiceHandle<ISF::ITruthSvc>
m_truthRecordSvc
{
73
this
,
"TruthRecordSvc"
,
"ISF_TruthRecordSvc"
,
"ISF Particle Truth Service"
};
74
76
ServiceHandle<ISF::IGeoIDSvc>
m_geoIDSvc
{
77
this
,
"GeoIDSvc"
,
"ISF_GeoIDSvc"
,
"ISF GeoID Service"
};
78
79
};
// class MCTruthSteppingActionTool
80
81
}
// namespace G4UA
82
83
#endif
IGeoIDSvc.h
ITruthSvc.h
MCTruthSteppingAction.h
UserActionToolBase.h
G4UA::MCTruthSteppingActionTool::makeAndFillAction
virtual std::unique_ptr< MCTruthSteppingAction > makeAndFillAction(G4AtlasUserActions &) override final
Setup the user action for current thread.
Definition
MCTruthSteppingActionTool.cxx:35
G4UA::MCTruthSteppingActionTool::m_geoIDSvc
ServiceHandle< ISF::IGeoIDSvc > m_geoIDSvc
Geo ID Service.
Definition
MCTruthSteppingActionTool.h:76
G4UA::MCTruthSteppingActionTool::m_truthRecordSvc
ServiceHandle< ISF::ITruthSvc > m_truthRecordSvc
Central Truth Service.
Definition
MCTruthSteppingActionTool.h:72
G4UA::MCTruthSteppingActionTool::m_volumeCollectionMap
Gaudi::Property< MCTruthSteppingAction::VolumeCollectionMap_t > m_volumeCollectionMap
Map of volume name to output collection name.
Definition
MCTruthSteppingActionTool.h:58
G4UA::MCTruthSteppingActionTool::MCTruthSteppingActionTool
MCTruthSteppingActionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition
MCTruthSteppingActionTool.cxx:15
G4UA::MCTruthSteppingActionTool::m_subDetVolLevel
Gaudi::Property< int > m_subDetVolLevel
The level in the G4 volume hierarchy at which we find the sub-detector.
Definition
MCTruthSteppingActionTool.h:67
G4UA::MCTruthSteppingActionTool::initialize
virtual StatusCode initialize() override final
Initialize the tool.
Definition
MCTruthSteppingActionTool.cxx:23
G4UA::MCTruthSteppingActionTool::EndOfAthenaEvent
StatusCode EndOfAthenaEvent(HitCollectionMap &) override
Calls EndOfAthenaEvent.
Definition
MCTruthSteppingActionTool.cxx:57
G4UA::MCTruthSteppingActionTool::BeginOfAthenaEvent
StatusCode BeginOfAthenaEvent(HitCollectionMap &) override
Calls BeginOfAthenaEvent.
Definition
MCTruthSteppingActionTool.cxx:49
G4UA::MCTruthSteppingActionTool::m_secondarySavingLevel
Gaudi::Property< int > m_secondarySavingLevel
The saving level for secondaries.
Definition
MCTruthSteppingActionTool.h:62
G4UA::UserActionToolBase< MCTruthSteppingAction >::UserActionToolBase
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition
UserActionToolBase.h:40
HitCollectionMap
Small wrapper around hit collection map to facilitate accessing the hit collection.
Definition
HitCollectionMap.h:23
ServiceHandle
Definition
ClusterMakerTool.h:36
G4UA
for nSW
Definition
CalibrationDefaultProcessing.h:19
G4UA::G4AtlasUserActions
Struct for passing around user actions.
Definition
IUserActionTool.h:35
type
Generated on
for ATLAS Offline Software by
1.17.0