ATLAS Offline Software
AthenaTrackingActionTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace G4UA
8 {
9 
10  //---------------------------------------------------------------------------
11  // Constructor
12  //---------------------------------------------------------------------------
14  AthenaTrackingActionTool(const std::string& type, const std::string& name,
15  const IInterface* parent)
17  , m_secondarySavingLevel(2)
18  , m_subDetVolLevel(1)
19  {
20  declareProperty("SecondarySavingLevel", m_secondarySavingLevel,
21  "Three valid options: 1 - Primaries; 2 - StoredSecondaries(default); 3 - All");
22  declareProperty("SubDetVolumeLevel", m_subDetVolLevel,
23  "The level in the G4 volume hierarchy at which can we find the sub-detector name");
24  }
25 
26  //---------------------------------------------------------------------------
27  // Initialize - temporarily here for debugging
28  //---------------------------------------------------------------------------
30  {
31  ATH_MSG_DEBUG( "Initializing " << name() );
32  return StatusCode::SUCCESS;
33  }
34 
35  //---------------------------------------------------------------------------
36  // Create the action on request
37  //---------------------------------------------------------------------------
38  std::unique_ptr<AthenaTrackingAction>
40  {
41  ATH_MSG_DEBUG("Constructing an AthenaTrackingAction");
42  // Create and configure the action plugin.
43  auto action = std::make_unique<AthenaTrackingAction>(
45  actionLists.trackingActions.push_back( action.get() );
46  return action;
47  }
48 
49 }
G4UA::G4AtlasUserActions
Struct for passing around user actions.
Definition: IUserActionTool.h:32
G4UA
for nSW
Definition: CalibrationDefaultProcessing.h:19
G4UA::AthenaTrackingActionTool::m_subDetVolLevel
int m_subDetVolLevel
The level in the G4 volume hierarchy at which can we find the sub-detector name.
Definition: AthenaTrackingActionTool.h:46
G4UA::G4AtlasUserActions::trackingActions
std::vector< G4UserTrackingAction * > trackingActions
Definition: IUserActionTool.h:35
G4UA::AthenaTrackingActionTool::initialize
virtual StatusCode initialize() override
Initialize the tool (just for debugging printout)
Definition: AthenaTrackingActionTool.cxx:29
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
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
AthenaTrackingActionTool.h
G4UA::AthenaTrackingAction
User action for pre/post tracking truth handling.
Definition: AthenaTrackingAction.h:19
G4UA::AthenaTrackingActionTool::m_secondarySavingLevel
int m_secondarySavingLevel
The saving level for secondaries.
Definition: AthenaTrackingActionTool.h:44
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
G4UA::UserActionToolBase
abstract template utility base-class for G4 user-action tools.
Definition: UserActionToolBase.h:33
G4UA::AthenaTrackingActionTool::AthenaTrackingActionTool
AthenaTrackingActionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition: AthenaTrackingActionTool.cxx:14
G4UA::AthenaTrackingActionTool::makeAndFillAction
virtual std::unique_ptr< AthenaTrackingAction > makeAndFillAction(G4AtlasUserActions &actionLists) override final
Setup the user action for current thread.
Definition: AthenaTrackingActionTool.cxx:39
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7