ATLAS Offline Software
Loading...
Searching...
No Matches
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
7namespace G4UA
8{
9
10 //---------------------------------------------------------------------------
11 // Constructor
12 //---------------------------------------------------------------------------
14 AthenaTrackingActionTool(const std::string& type, const std::string& name,
15 const IInterface* parent)
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}
#define ATH_MSG_DEBUG(x)
virtual std::unique_ptr< AthenaTrackingAction > makeAndFillAction(G4AtlasUserActions &actionLists) override final
Setup the user action for current thread.
AthenaTrackingActionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
int m_secondarySavingLevel
The saving level for secondaries.
int m_subDetVolLevel
The level in the G4 volume hierarchy at which can we find the sub-detector name.
virtual StatusCode initialize() override
Initialize the tool (just for debugging printout)
User action for pre/post tracking truth handling.
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Struct for passing around user actions.
std::vector< G4UserTrackingAction * > trackingActions
MsgStream & msg
Definition testRead.cxx:32