ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
7namespace G4UA
8{
9
10 namespace iGeant4
11 {
12
14 const std::string& name,
15 const IInterface* 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>
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
#define ATH_MSG_DEBUG(x)
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)
virtual std::unique_ptr< MCTruthUserAction > makeAndFillAction(G4AtlasUserActions &) override final
Create an action for this thread.
MCTruthUserAction::Config m_config
Configuration parameters.
MCTruthUserActionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Struct for passing around user actions.
std::vector< G4UserTrackingAction * > trackingActions