ATLAS Offline Software
MCTruthSteppingActionTool.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 
7 
8 namespace G4UA
9 {
10 
11  //---------------------------------------------------------------------------
12  // Constructor
13  //---------------------------------------------------------------------------
15  MCTruthSteppingActionTool(const std::string& type, const std::string& name,
16  const IInterface* parent)
18  {
19  declareProperty("VolumeCollectionMap", m_volumeCollectionMap,
20  "Map of volume name to output collection name");
21  }
22 
23  //---------------------------------------------------------------------------
24  // Initialize the tool
25  //---------------------------------------------------------------------------
27  {
28  ATH_MSG_DEBUG( "Initializing " << name() );
29  return StatusCode::SUCCESS;
30  }
31 
32  //---------------------------------------------------------------------------
33  // Create an MCTruthSteppingAction
34  //---------------------------------------------------------------------------
35  std::unique_ptr<MCTruthSteppingAction>
37  {
38  ATH_MSG_DEBUG("Constructing an MCTruthSteppingAction");
39  auto action = std::make_unique<MCTruthSteppingAction> (
41  actionLists.eventActions.push_back( action.get() );
42  actionLists.steppingActions.push_back( action.get() );
43  return action;
44  }
45 
46 } // namespace G4UA
G4UA::G4AtlasUserActions
Struct for passing around user actions.
Definition: IUserActionTool.h:32
G4UA
for nSW
Definition: CalibrationDefaultProcessing.h:19
G4UA::MCTruthSteppingActionTool::initialize
virtual StatusCode initialize() override final
Initialize the tool.
Definition: MCTruthSteppingActionTool.cxx:26
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
G4UA::MCTruthSteppingActionTool::MCTruthSteppingActionTool
MCTruthSteppingActionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition: MCTruthSteppingActionTool.cxx:15
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
G4UA::MCTruthSteppingActionTool::m_volumeCollectionMap
std::map< std::string, std::string > m_volumeCollectionMap
Map of volume name to output collection name.
Definition: MCTruthSteppingActionTool.h:47
G4UA::MCTruthSteppingAction
User action which handles recording-envelope truth tracks.
Definition: MCTruthSteppingAction.h:37
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
G4UA::MCTruthSteppingActionTool::makeAndFillAction
virtual std::unique_ptr< MCTruthSteppingAction > makeAndFillAction(G4AtlasUserActions &) override final
Setup the user action for current thread.
Definition: MCTruthSteppingActionTool.cxx:36
G4UA::UserActionToolBase
abstract template utility base-class for G4 user-action tools.
Definition: UserActionToolBase.h:33
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
G4UA::G4AtlasUserActions::eventActions
std::vector< G4UserEventAction * > eventActions
Definition: IUserActionTool.h:34
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
MCTruthSteppingActionTool.h
G4UA::G4AtlasUserActions::steppingActions
std::vector< G4UserSteppingAction * > steppingActions
Definition: IUserActionTool.h:36
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7