ATLAS Offline Software
Loading...
Searching...
No Matches
TrackProcessorUserActionPassBackTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8namespace G4UA
9{
10
11 namespace iGeant4
12 {
13
16 const std::string& name,
17 const IInterface* 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",
27 m_config.killBoundaryParticlesBelowThreshold=false,
28 "Kill particles at boundary which are below Ekin cut-off rather than continue their simulation in G4");
29 }
30
31 std::unique_ptr<TrackProcessorUserActionPassBack>
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 }
44
45 } // iGeant4
46
47} // namespace G4UA
#define ATH_MSG_DEBUG(x)
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)
virtual std::unique_ptr< TrackProcessorUserActionPassBack > makeAndFillAction(G4AtlasUserActions &) override final
Create an action for this thread.
TrackProcessorUserActionPassBack::Config m_config
Configuration parameters.
TrackProcessorUserActionPassBackTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Struct for passing around user actions.
std::vector< G4UserTrackingAction * > trackingActions
std::vector< G4UserSteppingAction * > steppingActions
std::vector< G4UserEventAction * > eventActions