ATLAS Offline Software
Simulation
ISF
ISF_Geant4
ISF_Geant4Tools
src
MCTruthUserActionTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MCTruthUserActionTool.h
"
6
7
namespace
G4UA
8
{
9
10
namespace
iGeant4
11
{
12
13
MCTruthUserActionTool::MCTruthUserActionTool
(
const
std::string&
type
,
14
const
std::string&
name
,
15
const
IInterface*
parent
)
16
:
UserActionToolBase
<
MCTruthUserAction
>(
type
,
name
,
parent
)
17
{
18
declareProperty(
"TruthRecordSvc"
,
m_config
.
truthRecordSvc
,
19
"ISF Particle Truth Svc"
);
20
declareProperty(
"SecondarySavingLevel"
,
m_config
.
ilevel
=2);
21
}
22
23
std::unique_ptr<MCTruthUserAction>
24
MCTruthUserActionTool::makeAndFillAction
(
G4AtlasUserActions
& actionList)
25
{
26
ATH_MSG_DEBUG
(
"Constructing an MCTruthUserAction"
);
27
if
(msgLvl(
MSG::VERBOSE
)) {
m_config
.
verboseLevel
= 10; }
28
else
if
(msgLvl(
MSG::DEBUG
)) {
m_config
.
verboseLevel
= 5; }
29
auto
action
= std::make_unique<MCTruthUserAction>(
m_config
);
30
actionList.
trackingActions
.push_back(
action
.get() );
31
return
action
;
32
}
33
34
}
// iGeant4
35
36
}
// namespace G4UA
G4UA::G4AtlasUserActions
Struct for passing around user actions.
Definition:
IUserActionTool.h:32
G4UA
for nSW
Definition:
CalibrationDefaultProcessing.h:19
G4UA::G4AtlasUserActions::trackingActions
std::vector< G4UserTrackingAction * > trackingActions
Definition:
IUserActionTool.h:35
G4UA::iGeant4::MCTruthUserActionTool::m_config
MCTruthUserAction::Config m_config
Configuration parameters.
Definition:
MCTruthUserActionTool.h:36
G4UA::iGeant4::MCTruthUserActionTool::MCTruthUserActionTool
MCTruthUserActionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition:
MCTruthUserActionTool.cxx:13
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition:
AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:221
G4UA::iGeant4::MCTruthUserAction
Definition:
MCTruthUserAction.h:37
G4UA::UserActionToolBase
abstract template utility base-class for G4 user-action tools.
Definition:
UserActionToolBase.h:33
MCTruthUserActionTool.h
python.CaloScaleNoiseConfig.action
action
Definition:
CaloScaleNoiseConfig.py:77
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition:
page_access.h:11
G4UA::iGeant4::MCTruthUserAction::Config::ilevel
int ilevel
Definition:
MCTruthUserAction.h:46
G4UA::iGeant4::MCTruthUserAction::Config::truthRecordSvc
ServiceHandle< ISF::ITruthSvc > truthRecordSvc
Definition:
MCTruthUserAction.h:43
G4UA::iGeant4::MCTruthUserActionTool::makeAndFillAction
virtual std::unique_ptr< MCTruthUserAction > makeAndFillAction(G4AtlasUserActions &) override final
Create an action for this thread.
Definition:
MCTruthUserActionTool.cxx:24
python.Constants.VERBOSE
int VERBOSE
Definition:
Control/AthenaCommon/python/Constants.py:14
iGeant4
Definition:
Geant4TruthIncident.h:35
G4UA::iGeant4::MCTruthUserAction::Config::verboseLevel
unsigned int verboseLevel
Definition:
MCTruthUserAction.h:47
Generated on Thu Nov 7 2024 21:20:34 for ATLAS Offline Software by
1.8.18