ATLAS Offline Software
Loading...
Searching...
No Matches
G4UA::AthenaStackingActionTool Class Reference

Tool which manages the AthenaStackingAction. More...

#include <AthenaStackingActionTool.h>

Inheritance diagram for G4UA::AthenaStackingActionTool:
Collaboration diagram for G4UA::AthenaStackingActionTool:

Public Member Functions

 AthenaStackingActionTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor.
virtual StatusCode initialize () override final
 Initialize the tool.
virtual StatusCode fillUserAction (G4AtlasUserActions &actionLists) override final
 Fill the user action lists.
StatusCode BeginOfAthenaEvent (HitCollectionMap &) override
 Calls BeginOfAthenaEvent.
StatusCode EndOfAthenaEvent (HitCollectionMap &) override
 Calls EndOfAthenaEvent.

Protected Member Functions

virtual std::unique_ptr< AthenaStackingActionmakeAndFillAction (G4AtlasUserActions &actionLists) override final
 Make the action and push onto the lists.

Protected Attributes

ThreadSpecificUserAction< AthenaStackingActionm_actions
 Thread-specific storage of the user action.

Private Attributes

AthenaStackingAction::Config m_config
 Configuration parameters.
bool m_useDebugAction
 Use the debug version of the stacking action.

Detailed Description

Tool which manages the AthenaStackingAction.

Author
Steve Farrell Steve.nosp@m.n.Fa.nosp@m.rrell.nosp@m.@cer.nosp@m.n.ch

Definition at line 27 of file AthenaStackingActionTool.h.

Constructor & Destructor Documentation

◆ AthenaStackingActionTool()

G4UA::AthenaStackingActionTool::AthenaStackingActionTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Standard constructor.

Definition at line 14 of file AthenaStackingActionTool.cxx.

17 : UserActionToolBase<AthenaStackingAction>(type, name, parent),
18 m_config { /*killAllNeutrinos*/ false,
19 /*photonEnergyCut*/ -1.,
20 /*applyNRR*/ false,
21 /*russianRouletteNeutronThreshold*/ -1.,
22 /*russianRouletteNeutronWeight*/ -1.,
23 /*applyPRR*/ false,
24 /*russianRoulettePhotonThreshold*/ -1.,
25 /*russianRoulettePhotonWeight*/ -1.,
26 /*isISFJob*/ false
27 },
28 m_useDebugAction(false)
29 {
30 declareProperty("KillAllNeutrinos", m_config.killAllNeutrinos,
31 "Toggle killing of all neutrinos");
32 declareProperty("PhotonEnergyCut", m_config.photonEnergyCut,
33 "Energy threshold for tracking photons");
34 declareProperty("ApplyNRR", m_config.applyNRR,
35 "Apply the Neutron Russian Roulette");
36 declareProperty("NRRThreshold", m_config.russianRouletteNeutronThreshold,
37 "Energy threshold for the Neutron Russian Roulette");
38 declareProperty("NRRWeight", m_config.russianRouletteNeutronWeight,
39 "Weight for the Neutron Russian Roulette");
40 declareProperty("ApplyPRR", m_config.applyPRR,
41 "Apply the Photon Russian Roulette");
42 declareProperty("PRRThreshold", m_config.russianRoulettePhotonThreshold,
43 "Energy threshold for the Photon Russian Roulette");
44 declareProperty("PRRWeight", m_config.russianRoulettePhotonWeight,
45 "Weight for the Photon Russian Roulette");
46 declareProperty("IsISFJob", m_config.isISFJob, "");
47 declareProperty("UseDebugAction", m_useDebugAction);
48 }
AthenaStackingAction::Config m_config
Configuration parameters.
bool m_useDebugAction
Use the debug version of the stacking action.
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)

Member Function Documentation

◆ BeginOfAthenaEvent()

StatusCode G4UA::UserActionToolBase< AthenaStackingAction >::BeginOfAthenaEvent ( HitCollectionMap & )
inlineoverrideinherited

Calls BeginOfAthenaEvent.

Definition at line 59 of file UserActionToolBase.h.

59{return StatusCode::SUCCESS;};
abstract template utility base-class for G4 user-action tools.

◆ EndOfAthenaEvent()

StatusCode G4UA::UserActionToolBase< AthenaStackingAction >::EndOfAthenaEvent ( HitCollectionMap & )
inlineoverrideinherited

Calls EndOfAthenaEvent.

Definition at line 61 of file UserActionToolBase.h.

61{return StatusCode::SUCCESS;};

◆ fillUserAction()

virtual StatusCode G4UA::UserActionToolBase< AthenaStackingAction >::fillUserAction ( G4AtlasUserActions & actionLists)
inlinefinaloverridevirtualinherited

Fill the user action lists.

Definition at line 47 of file UserActionToolBase.h.

48 {
50 if(myAction == nullptr) {
51 ATH_MSG_ERROR( "Failed to construct user action in " << name() );
53 }
56 }
#define ATH_MSG_ERROR(x)
virtual std::unique_ptr< AthenaStackingAction > makeAndFillAction(G4AtlasUserActions &actionLists)=0

◆ initialize()

StatusCode G4UA::AthenaStackingActionTool::initialize ( )
finaloverridevirtual

Initialize the tool.

Definition at line 53 of file AthenaStackingActionTool.cxx.

54 {
55 ATH_MSG_DEBUG( "Initializing " << name() );
56 ATH_MSG_DEBUG( "KillAllNeutrinos: " << m_config.killAllNeutrinos );
57 ATH_MSG_DEBUG( "PhotonEnergyCut: " << m_config.photonEnergyCut );
58 ATH_MSG_DEBUG( "RussianRouletteNeutronThreshold: " << m_config.russianRouletteNeutronThreshold );
59 ATH_MSG_DEBUG( "RussianRouletteNeutronWeight: " << m_config.russianRouletteNeutronWeight );
60 ATH_MSG_DEBUG( "RussianRoulettePhotonThreshold: " << m_config.russianRoulettePhotonThreshold );
61 ATH_MSG_DEBUG( "RussianRoulettePhotonWeight: " << m_config.russianRoulettePhotonWeight );
62 return StatusCode::SUCCESS;
63 }
#define ATH_MSG_DEBUG(x)

◆ makeAndFillAction()

std::unique_ptr< AthenaStackingAction > G4UA::AthenaStackingActionTool::makeAndFillAction ( G4AtlasUserActions & actionLists)
finaloverrideprotectedvirtual

Make the action and push onto the lists.

Implements G4UA::UserActionToolBase< AthenaStackingAction >.

Definition at line 69 of file AthenaStackingActionTool.cxx.

70 {
71 ATH_MSG_DEBUG("Creating an AthenaStackingAction");
72 // Create and configure the action plugin.
73 std::unique_ptr<AthenaStackingAction> action{nullptr};
74 if (m_useDebugAction) {
75 action = std::make_unique<AthenaDebugStackingAction>(m_config);
76 } else {
77 action = std::make_unique<AthenaStackingAction>(m_config);
78 }
79 actionLists.stackingActions.push_back( action.get() );
80 return action;
81 }

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 70 of file UserActionToolBase.h.

◆ m_config

AthenaStackingAction::Config G4UA::AthenaStackingActionTool::m_config
private

Configuration parameters.

Definition at line 48 of file AthenaStackingActionTool.h.

◆ m_useDebugAction

bool G4UA::AthenaStackingActionTool::m_useDebugAction
private

Use the debug version of the stacking action.

Definition at line 51 of file AthenaStackingActionTool.h.


The documentation for this class was generated from the following files: