ATLAS Offline Software
|
Primary Athena algorithm for ATLAS simulation. More...
#include <G4AtlasAlg.h>
Public Member Functions | |
G4AtlasAlg (const std::string &name, ISvcLocator *pSvcLocator) | |
Standard algorithm constructor. More... | |
virtual | ~G4AtlasAlg () |
Virtual destructor. More... | |
bool | isClonable () const override |
this Alg is Clonable (for AthenaMT) More... | |
StatusCode initialize | ATLAS_NOT_THREAD_SAFE () override |
Initialize the algorithm. More... | |
StatusCode | finalize () override |
Finalize the algorithm and invoke G4 run termination. More... | |
StatusCode | execute () override |
Simulate one Athena event. More... | |
void | initializeG4 () |
Poorly named possibly unused method which sets some verbosities. More... | |
void | initializeOnce () |
G4 initialization called only by the first alg instance. More... | |
void | finalizeOnce () |
G4 finalization called only by the first alg instance. More... | |
virtual StatusCode | sysInitialize () override |
Override sysInitialize. More... | |
virtual const DataObjIDColl & | extraOutputDeps () const override |
Return the list of extra output dependencies. More... | |
ServiceHandle< StoreGateSvc > & | evtStore () |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More... | |
const ServiceHandle< StoreGateSvc > & | evtStore () const |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More... | |
const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More... | |
virtual StatusCode | sysStart () override |
Handle START transition. More... | |
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
Return this algorithm's input handles. More... | |
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
Return this algorithm's output handles. More... | |
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
Declare a new Gaudi property. More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
Declare a new Gaudi property. More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
Declare a new Gaudi property. More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
Declare a new Gaudi property. More... | |
void | updateVHKA (Gaudi::Details::PropertyBase &) |
MsgStream & | msg () const |
MsgStream & | msg (const MSG::Level lvl) const |
bool | msgLvl (const MSG::Level lvl) const |
Protected Member Functions | |
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
remove all handles from I/O resolution More... | |
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
Add StoreName to extra input/output deps as needed. More... | |
Private Types | |
typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
void | commandLog (int returnCode, const std::string &commandString) const |
This command prints a message about a G4Command depending on its returnCode. More... | |
void | releaseGeoModel () |
Releases the GeoModel geometry from memory once it has been used to build the G4 geometry and is no-longer required. More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
specialization for handling Gaudi::Property<SG::VarHandleKey> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
specialization for handling Gaudi::Property<SG::VarHandleBase> More... | |
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More... | |
Private Attributes | |
PublicToolHandleArray< G4UA::IUserActionTool > | m_actionTools {this, "UserActionTools", {}, "User action tools to be added to the G4 Action service."} |
Gaudi::Property< std::string > | m_simplifiedGeoPath {this, "SimplifiedGeoPath", "", "Path to the simplified geometry file used to transport particles"} |
DataObjIDColl | m_extendedExtraObjects |
StoreGateSvc_t | m_evtStore |
Pointer to StoreGate (event store by default) More... | |
StoreGateSvc_t | m_detStore |
Pointer to StoreGate (detector store by default) More... | |
std::vector< SG::VarHandleKeyArray * > | m_vhka |
bool | m_varHandleArraysDeclared |
Configurable Properties | |
Gaudi::Property< bool > | m_killAbortedEvents {this, "KillAbortedEvents", false, ""} |
Gaudi::Property< bool > | m_flagAbortedEvents {this, "FlagAbortedEvents", false, ""} |
SG::ReadHandleKey< McEventCollection > | m_inputTruthCollectionKey {this, "InputTruthCollection", "BeamTruthEvent", "Input hard scatter collection"} |
input hard scatter collection More... | |
SG::WriteHandleKey< McEventCollection > | m_outputTruthCollectionKey {this, "OutputTruthCollection", "TruthEvent", "Output hard scatter truth collection"} |
output hard scatter truth collection More... | |
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfoKey {this, "EventInfo", "EventInfo", "EventInfo key"} |
ServiceHandle< ISF::ITruthSvc > | m_truthRecordSvc {this, "TruthRecordService", "ISF_TruthRecordSvc", ""} |
Central Truth Service. More... | |
ServiceHandle< ISF::IGeoIDSvc > | m_geoIDSvc {this, "GeoIDSvc", "ISF_GeoIDSvc", ""} |
Geo ID Service. More... | |
std::map< std::string, std::string > | m_verbosities |
Verbosity settings for Geant4. More... | |
Configurable Properties (common with TransportTool) | |
Gaudi::Property< std::string > | m_libList {this, "Dll", "", ""} |
Gaudi::Property< std::string > | m_physList {this, "Physics", "", ""} |
Gaudi::Property< std::string > | m_fieldMap {this, "FieldMap", "", ""} |
Gaudi::Property< std::string > | m_rndmGen {this, "RandomGenerator", "athena", ""} |
Gaudi::Property< bool > | m_releaseGeoModel {this, "ReleaseGeoModel", true, ""} |
Gaudi::Property< bool > | m_recordFlux {this, "RecordFlux", false, ""} |
Gaudi::Property< bool > | m_quietMode {this, "QuietMode", false, ""} |
Gaudi::Property< std::vector< std::string > > | m_g4commands {this, "G4Commands", {}, "Commands to send to the G4UI"} |
Commands to send to the G4 UI. More... | |
Gaudi::Property< bool > | m_useMT {this,"MultiThreading", false, "Multi-threading specific settings"} |
Activate multi-threading configuration. More... | |
Gaudi::Property< bool > | m_activateParallelGeometries {this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"} |
BooleanProperty | m_useShadowEvent {this, "UseShadowEvent", false, "New approach to selecting particles for simulation" } |
ServiceHandle< IAthRNGSvc > | m_rndmGenSvc {this, "AtRndmGenSvc", "AthRNGSvc", ""} |
Random number service. More... | |
Gaudi::Property< std::string > | m_randomStreamName {this, "RandomStreamName", "Geant4", ""} |
Random Stream Name. More... | |
ServiceHandle< IUserLimitsSvc > | m_userLimitsSvc {this, "UserLimitsSvc", "UserLimitsSvc", ""} |
ServiceHandle< G4UA::IUserActionSvc > | m_userActionSvc {this, "UserActionSvc", "G4UA::UserActionSvc", ""} |
User Action Service. More... | |
ServiceHandle< IDetectorGeometrySvc > | m_detGeoSvc {this, "DetGeoSvc", "DetectorGeometrySvc", ""} |
Detector Geometry Service (builds G4 Geometry) More... | |
ServiceHandle< Simulation::IZeroLifetimePatcher > | m_qspatcher {this, "QuasiStablePatcher", "", "Quasi-Stable Particle Simulation Patcher"} |
Quasi-Stable Particle Simulation Patcher. More... | |
ToolHandle< ISF::IGenEventFilter > | m_truthPreselectionTool {this, "TruthPreselectionTool", "", "Tool for filtering out quasi-stable particle daughters"} |
ServiceHandle< ISF::IInputConverter > | m_inputConverter {this, "InputConverter", "ISF_InputConverter", ""} |
Service to convert ISF_Particles into a G4Event. More... | |
ServiceHandle< IPhysicsListSvc > | m_physListSvc {this, "PhysicsListSvc", "PhysicsListSvc", ""} |
Physics List Tool. More... | |
PublicToolHandle< ISensitiveDetectorMasterTool > | m_senDetTool {this, "SenDetMasterTool", "SensitiveDetectorMasterTool", ""} |
Sensitive Detector Master Tool. More... | |
PublicToolHandle< IFastSimulationMasterTool > | m_fastSimTool {this, "FastSimMasterTool", "FastSimulationMasterTool", ""} |
Fast Simulation Master Tool. More... | |
Primary Athena algorithm for ATLAS simulation.
During initialization, this class sets up several things, including:
During the event loop, it handles processing of the event by invoking the (worker) run manager.
Definition at line 52 of file G4AtlasAlg.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
G4AtlasAlg::G4AtlasAlg | ( | const std::string & | name, |
ISvcLocator * | pSvcLocator | ||
) |
|
inlinevirtual |
|
override |
Initialize the algorithm.
Here we setup several things for simulation, including:
|
private |
This command prints a message about a G4Command depending on its returnCode.
Definition at line 483 of file G4AtlasAlg.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
|
inlineprivateinherited |
specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>
Definition at line 199 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 259 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
|
inlineinherited |
Declare a new Gaudi property.
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore
Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 95 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc
(event store) Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 85 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc
(event store) Returns (kind of) a pointer to the StoreGateSvc
.
Definition at line 90 of file AthCommonDataStore.h.
|
override |
Simulate one Athena event.
Definition at line 312 of file G4AtlasAlg.cxx.
|
protectedinherited |
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
|
override |
Finalize the algorithm and invoke G4 run termination.
Definition at line 285 of file G4AtlasAlg.cxx.
void G4AtlasAlg::finalizeOnce | ( | ) |
G4 finalization called only by the first alg instance.
This is done (for now) because we get multiple alg instances in hive.
Definition at line 303 of file G4AtlasAlg.cxx.
void G4AtlasAlg::initializeG4 | ( | ) |
Poorly named possibly unused method which sets some verbosities.
Definition at line 252 of file G4AtlasAlg.cxx.
void G4AtlasAlg::initializeOnce | ( | ) |
G4 initialization called only by the first alg instance.
This is done (for now) because we get multiple alg instances in hive.
Definition at line 133 of file G4AtlasAlg.cxx.
|
overridevirtualinherited |
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
inlineoverride |
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 27 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
overridevirtualinherited |
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
private |
Releases the GeoModel geometry from memory once it has been used to build the G4 geometry and is no-longer required.
Definition at line 465 of file G4AtlasAlg.cxx.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.
Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.
Definition at line 66 of file AthAlgorithm.cxx.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
private |
Definition at line 157 of file G4AtlasAlg.h.
|
private |
Definition at line 130 of file G4AtlasAlg.h.
|
private |
Detector Geometry Service (builds G4 Geometry)
Definition at line 141 of file G4AtlasAlg.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
private |
Definition at line 106 of file G4AtlasAlg.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 79 of file AthAlgorithm.h.
|
private |
Fast Simulation Master Tool.
Definition at line 155 of file G4AtlasAlg.h.
|
private |
Definition at line 121 of file G4AtlasAlg.h.
|
private |
Definition at line 103 of file G4AtlasAlg.h.
|
private |
Commands to send to the G4 UI.
Definition at line 127 of file G4AtlasAlg.h.
|
private |
Geo ID Service.
Definition at line 111 of file G4AtlasAlg.h.
|
private |
Service to convert ISF_Particles into a G4Event.
Definition at line 149 of file G4AtlasAlg.h.
|
private |
input hard scatter collection
Definition at line 104 of file G4AtlasAlg.h.
|
private |
Definition at line 102 of file G4AtlasAlg.h.
|
private |
Definition at line 119 of file G4AtlasAlg.h.
|
private |
output hard scatter truth collection
Definition at line 105 of file G4AtlasAlg.h.
|
private |
Definition at line 120 of file G4AtlasAlg.h.
|
private |
Physics List Tool.
Definition at line 151 of file G4AtlasAlg.h.
|
private |
Quasi-Stable Particle Simulation Patcher.
Definition at line 144 of file G4AtlasAlg.h.
|
private |
Definition at line 125 of file G4AtlasAlg.h.
|
private |
Random Stream Name.
Definition at line 135 of file G4AtlasAlg.h.
|
private |
Definition at line 124 of file G4AtlasAlg.h.
|
private |
Definition at line 123 of file G4AtlasAlg.h.
|
private |
Definition at line 122 of file G4AtlasAlg.h.
|
private |
Random number service.
Definition at line 133 of file G4AtlasAlg.h.
|
private |
Sensitive Detector Master Tool.
Definition at line 153 of file G4AtlasAlg.h.
|
private |
Definition at line 159 of file G4AtlasAlg.h.
|
private |
Definition at line 146 of file G4AtlasAlg.h.
|
private |
Central Truth Service.
Definition at line 109 of file G4AtlasAlg.h.
|
private |
Activate multi-threading configuration.
Definition at line 129 of file G4AtlasAlg.h.
|
private |
User Action Service.
Definition at line 139 of file G4AtlasAlg.h.
|
private |
Definition at line 137 of file G4AtlasAlg.h.
|
private |
Definition at line 131 of file G4AtlasAlg.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
private |
Verbosity settings for Geant4.
Definition at line 114 of file G4AtlasAlg.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.