ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
G4UA::iGeant4::TrackProcessorUserActionPassBackTool Class Reference

Tool which manages the TrackProcessorUserActionPassBack. More...

#include <TrackProcessorUserActionPassBackTool.h>

Inheritance diagram for G4UA::iGeant4::TrackProcessorUserActionPassBackTool:
Collaboration diagram for G4UA::iGeant4::TrackProcessorUserActionPassBackTool:

Public Member Functions

 TrackProcessorUserActionPassBackTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
virtual StatusCode fillUserAction (G4AtlasUserActions &actionLists) override final
 Fill the user action lists. More...
 

Protected Member Functions

virtual std::unique_ptr< TrackProcessorUserActionPassBackmakeAndFillAction (G4AtlasUserActions &) override final
 Create an action for this thread. More...
 

Protected Attributes

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

Private Attributes

TrackProcessorUserActionPassBack::Config m_config
 Configuration parameters. More...
 

Detailed Description

Tool which manages the TrackProcessorUserActionPassBack.

Author
Andrea Di Simone

Definition at line 22 of file TrackProcessorUserActionPassBackTool.h.

Constructor & Destructor Documentation

◆ TrackProcessorUserActionPassBackTool()

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

Standard constructor.

Definition at line 14 of file TrackProcessorUserActionPassBackTool.cxx.

18  : UserActionToolBase<TrackProcessorUserActionPassBack>(type, name, parent)
19  {
20  declareProperty("ParticleBroker", m_config.particleBroker, "ISF Particle Broker Svc");
21  declareProperty("GeoIDSvc" , m_config.geoIDSvc , "ISF GeoID Svc" );
22 
23  declareProperty("PassBackEkinThreshold",
24  m_config.passBackEkinThreshold=0.05, //TODO: should we add units here (MeV)?
25  "Ekin cut-off for particles returned to ISF");
26  declareProperty("KillBoundaryParticlesBelowThreshold",
28  "Kill particles at boundary which are below Ekin cut-off rather than continue their simulation in G4");
29  }

Member Function Documentation

◆ fillUserAction()

virtual StatusCode G4UA::UserActionToolBase< TrackProcessorUserActionPassBack >::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  }

◆ makeAndFillAction()

std::unique_ptr< TrackProcessorUserActionPassBack > G4UA::iGeant4::TrackProcessorUserActionPassBackTool::makeAndFillAction ( G4AtlasUserActions actionList)
finaloverrideprotectedvirtual

Create an action for this thread.

Implements G4UA::UserActionToolBase< TrackProcessorUserActionPassBack >.

Definition at line 32 of file TrackProcessorUserActionPassBackTool.cxx.

34  {
35  ATH_MSG_DEBUG("Constructing a TrackProcessorUserActionPassBack");
36  if(msgLvl(MSG::VERBOSE)) { m_config.verboseLevel = 10; }
37  else if(msgLvl(MSG::DEBUG)) { m_config.verboseLevel = 5; }
38  auto action = std::make_unique<TrackProcessorUserActionPassBack>(m_config);
39  actionList.eventActions.push_back( action.get() );
40  actionList.trackingActions.push_back( action.get() );
41  actionList.steppingActions.push_back( action.get() );
42  return action;
43  }

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 63 of file UserActionToolBase.h.

◆ m_config

TrackProcessorUserActionPassBack::Config G4UA::iGeant4::TrackProcessorUserActionPassBackTool::m_config
private

Configuration parameters.

Definition at line 37 of file TrackProcessorUserActionPassBackTool.h.


The documentation for this class was generated from the following files:
G4UA::iGeant4::TrackProcessorUserActionPassBackTool::m_config
TrackProcessorUserActionPassBack::Config m_config
Configuration parameters.
Definition: TrackProcessorUserActionPassBackTool.h:37
G4UA::ThreadSpecificUserAction::set
void set(std::unique_ptr< ActionType > action)
Assign the object of the current thread.
Definition: ThreadSpecificUserAction.h:61
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config::geoIDSvc
ServiceHandle< ISF::IGeoIDSvc > geoIDSvc
Definition: TrackProcessorUserActionPassBack.h:42
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config::passBackEkinThreshold
double passBackEkinThreshold
properties to define which particles are returned to ISF
Definition: TrackProcessorUserActionPassBack.h:44
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< TrackProcessorUserActionPassBack >::m_actions
ThreadSpecificUserAction< TrackProcessorUserActionPassBack > 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:221
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config::particleBroker
ServiceHandle< ISF::IParticleBroker > particleBroker
Definition: TrackProcessorUserActionPassBack.h:41
G4UA::UserActionToolBase< TrackProcessorUserActionPassBack >::makeAndFillAction
virtual std::unique_ptr< TrackProcessorUserActionPassBack > 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
DEBUG
#define DEBUG
Definition: page_access.h:11
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config::killBoundaryParticlesBelowThreshold
bool killBoundaryParticlesBelowThreshold
Definition: TrackProcessorUserActionPassBack.h:45
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config::verboseLevel
unsigned int verboseLevel
Definition: TrackProcessorUserActionPassBack.h:46