ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
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. More...
 
virtual StatusCode initialize () override final
 Initialize the tool. More...
 
virtual StatusCode fillUserAction (G4AtlasUserActions &actionLists) override final
 Fill the user action lists. More...
 

Protected Member Functions

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

Protected Attributes

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

Private Attributes

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

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");
37  "Energy threshold for the Neutron Russian Roulette");
39  "Weight for the Neutron Russian Roulette");
40  declareProperty("ApplyPRR", m_config.applyPRR,
41  "Apply the Photon Russian Roulette");
43  "Energy threshold for the Photon Russian Roulette");
45  "Weight for the Photon Russian Roulette");
46  declareProperty("IsISFJob", m_config.isISFJob, "");
47  declareProperty("UseDebugAction", m_useDebugAction);
48  }

Member Function Documentation

◆ fillUserAction()

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

Fill the user action lists.

Definition at line 45 of file UserActionToolBase.h.

46  {
47  auto myAction = makeAndFillAction(actionLists);
48  if(myAction == nullptr) {
49  ATH_MSG_ERROR( "Failed to construct user action in " << name() );
50  return StatusCode::FAILURE;
51  }
52  m_actions.set( std::move(myAction) );
53  return StatusCode::SUCCESS;
54  }

◆ 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  }

◆ 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 63 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:
G4UA::AthenaStackingAction::Config::isISFJob
bool isISFJob
Is this an ISF job.
Definition: AthenaStackingAction.h:47
G4UA::AthenaStackingAction::Config::photonEnergyCut
double photonEnergyCut
Photon energy cut.
Definition: AthenaStackingAction.h:33
G4UA::ThreadSpecificUserAction::set
void set(std::unique_ptr< ActionType > action)
Assign the object of the current thread.
Definition: ThreadSpecificUserAction.h:61
G4UA::AthenaStackingAction::Config::russianRouletteNeutronThreshold
double russianRouletteNeutronThreshold
Energy threshold for the Neutron Russian Roulette.
Definition: AthenaStackingAction.h:37
G4UA::AthenaStackingAction::Config::russianRoulettePhotonThreshold
double russianRoulettePhotonThreshold
Energy threshold for the Photon Russian Roulette.
Definition: AthenaStackingAction.h:43
G4UA::AthenaStackingAction::Config::killAllNeutrinos
bool killAllNeutrinos
Flag to toggle killing neutrinos at tracking stage.
Definition: AthenaStackingAction.h:31
G4UA::AthenaStackingAction::Config::applyPRR
bool applyPRR
Apply the Photon Russian Roulette.
Definition: AthenaStackingAction.h:41
G4UA::AthenaStackingAction::Config::russianRoulettePhotonWeight
double russianRoulettePhotonWeight
Weight for the Photon Russian Roulette.
Definition: AthenaStackingAction.h:45
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
G4UA::UserActionToolBase< AthenaStackingAction >::m_actions
ThreadSpecificUserAction< AthenaStackingAction > m_actions
Thread-specific storage of the user action.
Definition: UserActionToolBase.h:63
test_pyathena.parent
parent
Definition: test_pyathena.py:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
G4UA::UserActionToolBase< AthenaStackingAction >::makeAndFillAction
virtual std::unique_ptr< AthenaStackingAction > makeAndFillAction(G4AtlasUserActions &actionLists)=0
Make the action and push onto the lists.
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
G4UA::AthenaStackingAction::Config::russianRouletteNeutronWeight
double russianRouletteNeutronWeight
Weight for the Neutron Russian Roulette.
Definition: AthenaStackingAction.h:39
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
G4UA::AthenaStackingActionTool::m_config
AthenaStackingAction::Config m_config
Configuration parameters.
Definition: AthenaStackingActionTool.h:48
G4UA::AthenaStackingAction::Config::applyNRR
bool applyNRR
Apply the Neutron Russian Roulette.
Definition: AthenaStackingAction.h:35
G4UA::AthenaStackingActionTool::m_useDebugAction
bool m_useDebugAction
Use the debug version of the stacking action.
Definition: AthenaStackingActionTool.h:51