ATLAS Offline Software
Loading...
Searching...
No Matches
G4AtlasAlg Class Reference

Primary Athena algorithm for ATLAS simulation. More...

#include <G4AtlasAlg.h>

Inheritance diagram for G4AtlasAlg:

Public Member Functions

 G4AtlasAlg (const std::string &name, ISvcLocator *pSvcLocator)
 Standard algorithm constructor.
virtual ~G4AtlasAlg ()
 Virtual destructor.
bool isClonable () const override
 this Alg is Clonable (for AthenaMT)
StatusCode initialize ATLAS_NOT_THREAD_SAFE () override
 Initialize the algorithm.
StatusCode finalize () override
 Finalize the algorithm and invoke G4 run termination.
StatusCode execute (const EventContext &ctx) override
 Simulate one Athena event.
void initializeG4 ()
 Poorly named possibly unused method which sets some verbosities.
void initializeOnce ()
 G4 initialization called only by the first alg instance.
void finalizeOnce ()
 G4 finalization called only by the first alg instance.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_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.
void releaseGeoModel ()
 Releases the GeoModel geometry from memory once it has been used to build the G4 geometry and is no-longer required.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

PublicToolHandleArray< G4UA::IUserActionToolm_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
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
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< McEventCollectionm_inputTruthCollectionKey {this, "InputTruthCollection", "BeamTruthEvent", "Input hard scatter collection"}
 input hard scatter collection
SG::WriteHandleKey< McEventCollectionm_outputTruthCollectionKey {this, "OutputTruthCollection", "TruthEvent", "Output hard scatter truth collection"}
 output hard scatter truth collection
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey {this, "EventInfo", "EventInfo", "EventInfo key"}
ServiceHandle< ISF::ITruthSvcm_truthRecordSvc {this, "TruthRecordService", "ISF_TruthRecordSvc", ""}
 Central Truth Service.
ServiceHandle< ISF::IGeoIDSvcm_geoIDSvc {this, "GeoIDSvc", "ISF_GeoIDSvc", ""}
 Geo ID Service.
std::map< std::string, std::string > m_verbosities
 Verbosity settings for Geant4.
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.
Gaudi::Property< bool > m_useMT {this,"MultiThreading", false, "Multi-threading specific settings"}
 Activate multi-threading configuration.
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< IAthRNGSvcm_rndmGenSvc {this, "AtRndmGenSvc", "AthRNGSvc", ""}
 Random number service.
Gaudi::Property< std::string > m_randomStreamName {this, "RandomStreamName", "Geant4", ""}
 Random Stream Name.
ServiceHandle< IUserLimitsSvcm_userLimitsSvc {this, "UserLimitsSvc", "UserLimitsSvc", ""}
ServiceHandle< G4UA::IUserActionSvcm_userActionSvc {this, "UserActionSvc", "G4UA::UserActionSvc", ""}
 User Action Service.
PublicToolHandle< IDetectorConstructionToolm_detConstruction {this, "DetectorConstruction", "", "Tool handle of the DetectorConstruction"}
PublicToolHandleArray< IPhysicsInitializationToolm_physicsInitializationTools {this, "PhysicsInitializationTools", {}, "Physics initialization happening after Geant4 initialization"}
ServiceHandle< Simulation::IZeroLifetimePatcherm_qspatcher {this, "QuasiStablePatcher", "", "Quasi-Stable Particle Simulation Patcher"}
 Quasi-Stable Particle Simulation Patcher.
ToolHandle< ISF::IGenEventFilterm_truthPreselectionTool {this, "TruthPreselectionTool", "", "Tool for filtering out quasi-stable particle daughters"}
ServiceHandle< ISF::IInputConverterm_inputConverter {this, "InputConverter", "ISF_InputConverter", ""}
 Service to convert ISF_Particles into a G4Event.
ServiceHandle< IPhysicsListSvcm_physListSvc {this, "PhysicsListSvc", "PhysicsListSvc", ""}
 Physics List Tool.
PublicToolHandle< ISensitiveDetectorMasterToolm_senDetTool {this, "SenDetMasterTool", "SensitiveDetectorMasterTool", ""}
 Sensitive Detector Master Tool.
PublicToolHandle< IFastSimulationMasterToolm_fastSimTool {this, "FastSimMasterTool", "FastSimulationMasterTool", ""}
 Fast Simulation Master Tool.

Detailed Description

Primary Athena algorithm for ATLAS simulation.

During initialization, this class sets up several things, including:

  • the ATLAS (master) run manager
  • physics list assignment to G4
  • detector construction (currently FADS::FadsDetectorConstruction)

During the event loop, it handles processing of the event by invoking the (worker) run manager.

Definition at line 53 of file G4AtlasAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ G4AtlasAlg()

G4AtlasAlg::G4AtlasAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Standard algorithm constructor.

Definition at line 61 of file G4AtlasAlg.cxx.

62 : AthAlgorithm(name, pSvcLocator)
63{
64 // Verbosities
65 declareProperty("Verbosities", m_verbosities);
66}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::map< std::string, std::string > m_verbosities
Verbosity settings for Geant4.
Definition G4AtlasAlg.h:115

◆ ~G4AtlasAlg()

virtual G4AtlasAlg::~G4AtlasAlg ( )
inlinevirtual

Virtual destructor.

Definition at line 62 of file G4AtlasAlg.h.

62{ };

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

StatusCode initialize G4AtlasAlg::ATLAS_NOT_THREAD_SAFE ( )
override

Initialize the algorithm.

Here we setup several things for simulation, including:

  • force intialization of the UserActionSvc
  • apply custom G4 UI commands (like custom physics list)
  • configure the particle generator and random generator svc

◆ commandLog()

void G4AtlasAlg::commandLog ( int returnCode,
const std::string & commandString ) const
private

This command prints a message about a G4Command depending on its returnCode.

Definition at line 497 of file G4AtlasAlg.cxx.

498{
499 switch(returnCode) {
500 case 0: { ATH_MSG_DEBUG("G4 Command: " << commandString << " - Command Succeeded"); } break;
501 case 100: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Command Not Found!"); } break;
502 case 200: {
503 auto* stateManager = G4StateManager::GetStateManager();
504 ATH_MSG_DEBUG("G4 Command: " << commandString << " - Illegal Application State (" <<
505 stateManager->GetStateString(stateManager->GetCurrentState()) << ")!");
506 } break;
507 case 300: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Range!"); } break;
508 case 400: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Unreadable!"); } break;
509 case 500: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Candidates!"); } break;
510 case 600: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Alias Not Found!"); } break;
511 default: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Unknown Status!"); } break;
512 }
513
514}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode G4AtlasAlg::execute ( const EventContext & ctx)
overridevirtual

Simulate one Athena event.

Implements AthAlgorithm.

Definition at line 329 of file G4AtlasAlg.cxx.

330{
331 static std::atomic<unsigned int> n_Event=0;
332 ATH_MSG_DEBUG("++++++++++++ G4AtlasAlg execute ++++++++++++");
333
334 n_Event += 1;
335
336 if (n_Event<=10 || (n_Event%100) == 0) {
337 ATH_MSG_ALWAYS("G4AtlasAlg: Event num. " << n_Event << " start processing");
338 }
339
340 // Release GeoModel Geometry if necessary
341 if (m_releaseGeoModel) {
342 try {
344 }
345 catch(const std::exception& e) {
346 ATH_MSG_ERROR("Failure in G4AtlasAlg::releaseGeoModel: " << e.what());
347 return StatusCode::FAILURE;
348 }
349 }
350
351 // Set the RNG to use for this event. We need to reset it for MT jobs
352 // because of the mismatch between Gaudi slot-local and G4 thread-local RNG.
353 ATHRNG::RNGWrapper* rngWrapper = m_rndmGenSvc->getEngine(this, m_randomStreamName);
354 rngWrapper->setSeed( m_randomStreamName, ctx);
355 G4Random::setTheEngine(rngWrapper->getEngine(ctx));
356
357 ATH_MSG_DEBUG("Calling SimulateG4Event");
358
359 auto eventInfo = std::make_unique<AtlasG4EventUserInfo>(ctx);
360 // get a shared pointer to the hit collection map because we will need it after the G4Event is destroyed
361 std::shared_ptr<HitCollectionMap> hitCollections = eventInfo->GetHitCollectionMap();
362
363 ATH_CHECK(m_senDetTool->BeginOfAthenaEvent(*hitCollections));
364 ATH_CHECK(m_userActionSvc->BeginOfAthenaEvent(*hitCollections));
365 ATH_CHECK(m_fastSimTool->BeginOfAthenaEvent(*hitCollections));
366
367 SG::ReadHandle<McEventCollection> inputTruthCollection(m_inputTruthCollectionKey, ctx);
368 if (!inputTruthCollection.isValid()) {
369 ATH_MSG_FATAL("Unable to read input GenEvent collection " << inputTruthCollection.name() << " in store " << inputTruthCollection.store());
370 return StatusCode::FAILURE;
371 }
372 ATH_MSG_DEBUG("Found input GenEvent collection " << inputTruthCollection.name() << " in store " << inputTruthCollection.store());
373 // create the output Truth collection
374 SG::WriteHandle<McEventCollection> outputTruthCollection(m_outputTruthCollectionKey, ctx);
375 std::unique_ptr<McEventCollection> shadowTruth{};
376 if (m_useShadowEvent) {
377 outputTruthCollection = std::make_unique<McEventCollection>();
378 // copy input Evgen collection to shadow Truth collection
379 shadowTruth = std::make_unique<McEventCollection>(*inputTruthCollection);
380 for (HepMC::GenEvent* currentGenEvent : *shadowTruth ) {
381 // Apply QS patch if required
382 if ( not m_qspatcher.empty() ) {
383 ATH_CHECK(m_qspatcher->applyWorkaround(*currentGenEvent));
384 }
385 // Copy GenEvent and remove daughters of quasi-stable particles to be simulated
386 std::unique_ptr<HepMC::GenEvent> outputEvent = m_truthPreselectionTool->filterGenEvent(*currentGenEvent);
387 outputTruthCollection->push_back(outputEvent.release());
388 }
389 }
390 else {
391 // copy input Evgen collection to output Truth collection
392 outputTruthCollection = std::make_unique<McEventCollection>(*inputTruthCollection);
393 // empty shadow Truth collection
394 shadowTruth = std::make_unique<McEventCollection>();
395 // Apply QS patch if required
396 if ( not m_qspatcher.empty() ) {
397 for (HepMC::GenEvent* currentGenEvent : *outputTruthCollection ) {
398 ATH_CHECK(m_qspatcher->applyWorkaround(*currentGenEvent));
399 }
400 }
401 }
402
403 ATH_MSG_DEBUG("Recorded output GenEvent collection " << outputTruthCollection.name() << " in store " << outputTruthCollection.store());
404
405 const int largestGeneratedParticleBC = (outputTruthCollection->empty()) ? HepMC::UNDEFINED_ID
406 : HepMC::maxGeneratedParticleBarcode(outputTruthCollection->at(0)); // TODO make this more robust
407 const int largestGeneratedVertexBC = (outputTruthCollection->empty()) ? HepMC::UNDEFINED_ID
408 : HepMC::maxGeneratedVertexBarcode(outputTruthCollection->at(0)); // TODO make this more robust
409 // tell TruthService we're starting a new event
410 ATH_CHECK( m_truthRecordSvc->initializeTruthCollection(largestGeneratedParticleBC, largestGeneratedVertexBC) );
411
412 bool abort = false;
413
414 {
415
416 auto inputEvent = std::make_unique<G4Event>(ctx.eventID().event_number());
417 inputEvent->SetUserInformation(eventInfo.release());
418
419 ATH_CHECK(m_inputConverter->convertHepMCToG4Event(
420 *outputTruthCollection, *inputEvent, *shadowTruth));
421 // Worker run manager
422 // Custom class has custom method call: ProcessEvent.
423 // So, grab custom singleton class directly, rather than base.
424 // Maybe that should be changed! Then we can use a base pointer.
425 if (m_useMT) {
426#ifdef G4MULTITHREADED
427 auto* workerRM = G4AtlasWorkerRunManager::GetG4AtlasWorkerRunManager();
428 abort = workerRM->ProcessEvent(inputEvent.release());
429#else
430 ATH_MSG_ERROR("Trying to use multi-threading in non-MT build!");
431 return StatusCode::FAILURE;
432#endif
433 } else {
434 auto* workerRM ATLAS_THREAD_SAFE = // single-threaded case
435 G4AtlasRunManager::GetG4AtlasRunManager();
436 abort = workerRM->ProcessEvent(inputEvent.release());
437 }
438
439 if (abort) {
440 ATH_MSG_WARNING("Event was aborted !! ");
441 ATH_MSG_WARNING("Simulation will now go on to the next event ");
443 ATH_MSG_WARNING("setFilterPassed is now False");
444 setFilterPassed(false, ctx);
445 }
447 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey, ctx);
448 if (!eventInfo.isValid()) {
450 "Failed to retrieve xAOD::EventInfo while trying to update the "
451 "error state!");
452 return StatusCode::FAILURE;
453 } else {
454 eventInfo->updateErrorState(xAOD::EventInfo::Core,
456 ATH_MSG_WARNING("Set error state in xAOD::EventInfo!");
457 }
458 }
459 }
460
461 ATH_CHECK(m_senDetTool->EndOfAthenaEvent(*hitCollections));
462 ATH_CHECK(m_userActionSvc->EndOfAthenaEvent(*hitCollections));
463 ATH_CHECK(m_fastSimTool->EndOfAthenaEvent(*hitCollections));
464
465 ATH_CHECK(m_truthRecordSvc->releaseEvent());
466 }
467 // Remove QS patch if required
468 if(!m_qspatcher.empty()) {
469 for (HepMC::GenEvent* currentGenEvent : *outputTruthCollection ) {
470 ATH_CHECK(m_qspatcher->removeWorkaround(*currentGenEvent));
471 }
472 }
473
474 return StatusCode::SUCCESS;
475}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_ALWAYS(x)
#define ATH_MSG_WARNING(x)
static std::once_flag releaseGeoModelOnceFlag
#define ATLAS_THREAD_SAFE
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition RNGWrapper.h:154
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition RNGWrapper.h:108
virtual void setFilterPassed(bool state, const EventContext &ctx) const
ServiceHandle< ISF::IInputConverter > m_inputConverter
Service to convert ISF_Particles into a G4Event.
Definition G4AtlasAlg.h:151
ServiceHandle< ISF::ITruthSvc > m_truthRecordSvc
Central Truth Service.
Definition G4AtlasAlg.h:110
ServiceHandle< Simulation::IZeroLifetimePatcher > m_qspatcher
Quasi-Stable Particle Simulation Patcher.
Definition G4AtlasAlg.h:146
PublicToolHandle< ISensitiveDetectorMasterTool > m_senDetTool
Sensitive Detector Master Tool.
Definition G4AtlasAlg.h:155
Gaudi::Property< bool > m_useMT
Activate multi-threading configuration.
Definition G4AtlasAlg.h:130
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
Random number service.
Definition G4AtlasAlg.h:134
BooleanProperty m_useShadowEvent
Definition G4AtlasAlg.h:132
ToolHandle< ISF::IGenEventFilter > m_truthPreselectionTool
Definition G4AtlasAlg.h:148
Gaudi::Property< std::string > m_randomStreamName
Random Stream Name.
Definition G4AtlasAlg.h:136
PublicToolHandle< IFastSimulationMasterTool > m_fastSimTool
Fast Simulation Master Tool.
Definition G4AtlasAlg.h:157
Gaudi::Property< bool > m_killAbortedEvents
Definition G4AtlasAlg.h:103
SG::ReadHandleKey< McEventCollection > m_inputTruthCollectionKey
input hard scatter collection
Definition G4AtlasAlg.h:105
ServiceHandle< G4UA::IUserActionSvc > m_userActionSvc
User Action Service.
Definition G4AtlasAlg.h:140
SG::WriteHandleKey< McEventCollection > m_outputTruthCollectionKey
output hard scatter truth collection
Definition G4AtlasAlg.h:106
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition G4AtlasAlg.h:107
Gaudi::Property< bool > m_releaseGeoModel
Definition G4AtlasAlg.h:124
Gaudi::Property< bool > m_flagAbortedEvents
Definition G4AtlasAlg.h:104
void releaseGeoModel()
Releases the GeoModel geometry from memory once it has been used to build the G4 geometry and is no-l...
@ Core
Core flags describing the event.
@ Error
The sub-detector issued an error.
int maxGeneratedVertexBarcode(const HepMC::GenEvent *genEvent)
Get the maximal absolute value of barcode of vertex present in the event. Returns a negative number.
constexpr int UNDEFINED_ID
int maxGeneratedParticleBarcode(const HepMC::GenEvent *genEvent)
Get the maximal value of barcode of particle present in the event.
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode G4AtlasAlg::finalize ( )
override

Finalize the algorithm and invoke G4 run termination.

Definition at line 302 of file G4AtlasAlg.cxx.

303{
304 ATH_MSG_DEBUG(std::endl<<std::endl<<std::endl);
305 ATH_MSG_DEBUG("++++++++++++ G4AtlasAlg finalized ++++++++++++" <<std::endl<<std::endl);
306
307 // One time finalization
308 try {
309 std::call_once(finalizeOnceFlag, &G4AtlasAlg::finalizeOnce, this);
310 }
311 catch(const std::exception& e) {
312 ATH_MSG_ERROR("Failure in G4AtlasAlg::finalizeOnce: " << e.what());
313 return StatusCode::FAILURE;
314 }
315
316 return StatusCode::SUCCESS;
317}
static std::once_flag finalizeOnceFlag
void finalizeOnce()
G4 finalization called only by the first alg instance.

◆ finalizeOnce()

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 320 of file G4AtlasAlg.cxx.

321{
322 ATH_MSG_DEBUG("\t terminating the current G4 run");
323 auto runMgr = G4RunManager::GetRunManager();
324 runMgr->RunTermination();
325}

◆ initializeG4()

void G4AtlasAlg::initializeG4 ( )

Poorly named possibly unused method which sets some verbosities.

Definition at line 269 of file G4AtlasAlg.cxx.

270{
271 if (m_verbosities.size()>0) {
272 G4TransportationManager *tm = G4TransportationManager::GetTransportationManager();
273 G4RunManagerKernel *rmk = G4RunManagerKernel::GetRunManagerKernel();
274 G4EventManager *em = G4EventManager::GetEventManager();
275
276 auto itr = m_verbosities.end();
277 if ((itr = m_verbosities.find("Navigator")) != m_verbosities.end()) {
278 tm->GetNavigatorForTracking()->SetVerboseLevel( atof(itr->second.data()) );
279 }
280 if ((itr = m_verbosities.find("Propagator")) != m_verbosities.end()) {
281 tm->GetPropagatorInField()->SetVerboseLevel( atof(itr->second.data()) );
282 }
283 if ((itr = m_verbosities.find("Tracking")) != m_verbosities.end()) {
284 rmk->GetTrackingManager()->SetVerboseLevel( atof(itr->second.data()) );
285 }
286 if ((itr = m_verbosities.find("Stepping")) != m_verbosities.end()) {
287 rmk->GetTrackingManager()->GetSteppingManager()->
288 SetVerboseLevel( atof(itr->second.data()) );
289 }
290 if ((itr = m_verbosities.find("Stacking")) != m_verbosities.end()) {
291 rmk->GetStackManager()->SetVerboseLevel( atof(itr->second.data()) );
292 }
293 if ((itr = m_verbosities.find("Event")) != m_verbosities.end()) {
294 em->SetVerboseLevel( atof(itr->second.data()) );
295 }
296 } // End of the setting of verbosities
297
298}
double atof(std::string_view str)
Converts a string into a double / float.

◆ initializeOnce()

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 136 of file G4AtlasAlg.cxx.

137{
138 // Needed to ensure Geant4 knows it's in MT mode as we use a custom run manager
139 // Nominally the custom managers should do this, but was needed before for Celeritas integration
140 // We put it back in here for now in case
141 // TODO: Review if still needed!
142 G4Threading::SetMultithreadedApplication(m_useMT);
143 ATH_MSG_INFO("Multi-threading is " << (G4Threading::IsMultithreadedApplication() ? "enabled" : "disabled")
144 << "WorkerThread" << G4Threading::IsWorkerThread());
145
146 // Assign physics list
147 if(m_physListSvc.retrieve().isFailure()) {
148 throw std::runtime_error("Could not initialize ATLAS PhysicsListSvc!");
149 }
150 for (const auto& action_tool : m_actionTools) {
151 if (m_userActionSvc->addActionTool(action_tool).isFailure()) {
152 throw std::runtime_error("Failed to add action tool "+action_tool.name());
153 }
154 }
155
156 ATH_MSG_INFO( "retrieving the Detector Construction tool" );
157 if(m_detConstruction.retrieve().isFailure()) {
158 throw std::runtime_error("Could not initialize ATLAS DetectorConstruction!");
159 }
160
161 // Create the (master) run manager
162 if(m_useMT) {
163#ifdef G4MULTITHREADED
164 auto* runMgr ATLAS_THREAD_SAFE = // protected by std::call_once above
165 G4AtlasMTRunManager::GetG4AtlasMTRunManager();
166 ATH_MSG_INFO("Configuring G4AtlasMTRunManager with " << cardinality() << " threads");
167
168 runMgr->SetNumberOfThreads(cardinality());
169 m_physListSvc->SetPhysicsList();
170 runMgr->SetDetConstructionTool( m_detConstruction.get() );
171 runMgr->SetPhysListSvc( m_physListSvc.typeAndName() );
172 runMgr->SetQuietMode( m_quietMode );
173 // Worker Thread initialization used to create worker run manager on demand.
174 std::unique_ptr<G4AtlasUserWorkerThreadInitialization> workerInit =
175 std::make_unique<G4AtlasUserWorkerThreadInitialization>();
176 workerInit->SetQuietMode( m_quietMode );
177 runMgr->SetUserInitialization( workerInit.release() );
178 std::unique_ptr<G4AtlasActionInitialization> actionInitialization =
179 std::make_unique<G4AtlasActionInitialization>(m_userActionSvc.get());
180 runMgr->SetUserInitialization(actionInitialization.release());
181#else
182 throw std::runtime_error("Trying to use multi-threading in non-MT build!");
183#endif
184 }
185 // Single-threaded run manager
186 else {
187 auto* runMgr ATLAS_THREAD_SAFE = // safe because single-threaded
188 G4AtlasRunManager::GetG4AtlasRunManager();
189 m_physListSvc->SetPhysicsList();
190 runMgr->SetRecordFlux( m_recordFlux, std::make_unique<G4AtlasFluxRecorder>() );
191 runMgr->SetLogLevel( int(msg().level()) ); // Synch log levels
192 runMgr->SetDetConstructionTool( m_detConstruction.get() );
193 runMgr->SetPhysListSvc(m_physListSvc.typeAndName() );
194 runMgr->SetQuietMode( m_quietMode );
195 std::unique_ptr<G4AtlasActionInitialization> actionInitialization =
196 std::make_unique<G4AtlasActionInitialization>(m_userActionSvc.get());
197 runMgr->SetUserInitialization(actionInitialization.release());
198 }
199
200 // G4 user interface commands
201 G4UImanager *ui = G4UImanager::GetUIpointer();
202
203 // Load custom libraries
204 if (!m_libList.empty()) {
205 ATH_MSG_INFO("G4AtlasAlg specific libraries requested ");
206 std::string temp="/load "+m_libList;
207 ui->ApplyCommand(temp);
208 }
209 // Load custom physics
210 if (!m_physList.empty()) {
211 ATH_MSG_INFO("requesting a specific physics list "<< m_physList);
212 std::string temp="/Physics/GetPhysicsList "+m_physList;
213 ui->ApplyCommand(temp);
214 }
215 // Load custom magnetic field
216 if (!m_fieldMap.empty()) {
217 ATH_MSG_INFO("requesting a specific field map "<< m_fieldMap);
218 ATH_MSG_INFO("the field is initialized straight away");
219 std::string temp="/MagneticField/Select "+m_fieldMap;
220 ui->ApplyCommand(temp);
221 ui->ApplyCommand("/MagneticField/Initialize");
222 }
223
224 // Send UI commands
225 ATH_MSG_DEBUG("G4 Command: Trying at the end of initializeOnce()");
226 for (const auto& g4command : m_g4commands) {
227 int returnCode = ui->ApplyCommand( g4command );
228 commandLog(returnCode, g4command);
229 }
230
231 // Code from G4AtlasSvc
232 auto* rm = G4RunManager::GetRunManager();
233 if(!rm) {
234 throw std::runtime_error("Run manager retrieval has failed");
235 }
236 rm->Initialize(); // Initialization differs slightly in multi-threading.
237 // TODO: add more details about why this is here.
238 if(!m_useMT && rm->ConfirmBeamOnCondition()) {
239 rm->RunInitialization();
240 }
241
242 ATH_MSG_INFO("Initializing " << m_physicsInitializationTools.size() << " physics initialization tools");
243 for(auto& physicsTool : m_physicsInitializationTools) {
244 if (physicsTool->initializePhysics().isFailure()) {
245 throw std::runtime_error("Failed to initialize physics with tool " + physicsTool.name());
246 }
247 }
248
249 if(m_userLimitsSvc.retrieve().isFailure()) {
250 throw std::runtime_error("Could not initialize ATLAS UserLimitsSvc!");
251 }
252
254 G4VModularPhysicsList* thePhysicsList=dynamic_cast<G4VModularPhysicsList*>(m_physListSvc->GetPhysicsList());
255 if (!thePhysicsList) {
256 throw std::runtime_error("Failed dynamic_cast!! this is not a G4VModularPhysicsList!");
257 }
258#if G4VERSION_NUMBER >= 1010
259 std::vector<std::string>& parallelWorldNames=m_detConstruction->GetParallelWorldNames();
260 for (auto& it: parallelWorldNames) {
261 thePhysicsList->RegisterPhysics(new G4ParallelWorldPhysics(it,true));
262 }
263#endif
264 }
265
266 return;
267}
#define ATH_MSG_INFO(x)
Gaudi::Property< std::string > m_fieldMap
Definition G4AtlasAlg.h:122
void commandLog(int returnCode, const std::string &commandString) const
This command prints a message about a G4Command depending on its returnCode.
Gaudi::Property< std::string > m_physList
Definition G4AtlasAlg.h:121
Gaudi::Property< bool > m_quietMode
Definition G4AtlasAlg.h:126
PublicToolHandleArray< IPhysicsInitializationTool > m_physicsInitializationTools
Definition G4AtlasAlg.h:143
Gaudi::Property< std::vector< std::string > > m_g4commands
Commands to send to the G4 UI.
Definition G4AtlasAlg.h:128
PublicToolHandleArray< G4UA::IUserActionTool > m_actionTools
Definition G4AtlasAlg.h:159
PublicToolHandle< IDetectorConstructionTool > m_detConstruction
Definition G4AtlasAlg.h:142
Gaudi::Property< bool > m_activateParallelGeometries
Definition G4AtlasAlg.h:131
ServiceHandle< IUserLimitsSvc > m_userLimitsSvc
Definition G4AtlasAlg.h:138
Gaudi::Property< std::string > m_libList
Definition G4AtlasAlg.h:120
Gaudi::Property< bool > m_recordFlux
Definition G4AtlasAlg.h:125
ServiceHandle< IPhysicsListSvc > m_physListSvc
Physics List Tool.
Definition G4AtlasAlg.h:153

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
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.

◆ isClonable()

bool G4AtlasAlg::isClonable ( ) const
inlineoverridevirtual

this Alg is Clonable (for AthenaMT)

Reimplemented from AthCommonAlgorithm< Gaudi::Algorithm >.

Definition at line 65 of file G4AtlasAlg.h.

65{ return true; }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
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.

◆ releaseGeoModel()

void G4AtlasAlg::releaseGeoModel ( )
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 479 of file G4AtlasAlg.cxx.

480{
481 SmartIF<IGeoModelSvc> geoModel{Gaudi::svcLocator()->service("GeoModelSvc")};
482 if (!geoModel) {
483 ATH_MSG_WARNING( " ----> Unable to retrieve GeoModelSvc" );
484 }
485 else {
486 if (geoModel->clear().isFailure()) {
487 ATH_MSG_WARNING( " ----> GeoModelSvc::clear() failed" );
488 }
489 else {
490 ATH_MSG_INFO( " ----> GeoModelSvc::clear() succeeded " );
491 }
492 }
493 m_releaseGeoModel=false; // Don't do that again...
494 return;
495}

◆ renounce()

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 > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
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< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_actionTools

PublicToolHandleArray<G4UA::IUserActionTool> G4AtlasAlg::m_actionTools {this, "UserActionTools", {}, "User action tools to be added to the G4 Action service."}
private

Definition at line 159 of file G4AtlasAlg.h.

159{this, "UserActionTools", {}, "User action tools to be added to the G4 Action service."};

◆ m_activateParallelGeometries

Gaudi::Property<bool> G4AtlasAlg::m_activateParallelGeometries {this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"}
private

Definition at line 131 of file G4AtlasAlg.h.

131{this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"};

◆ m_detConstruction

PublicToolHandle<IDetectorConstructionTool> G4AtlasAlg::m_detConstruction {this, "DetectorConstruction", "", "Tool handle of the DetectorConstruction"}
private

Definition at line 142 of file G4AtlasAlg.h.

142{this, "DetectorConstruction", "", "Tool handle of the DetectorConstruction"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> G4AtlasAlg::m_eventInfoKey {this, "EventInfo", "EventInfo", "EventInfo key"}
private

Definition at line 107 of file G4AtlasAlg.h.

107{this, "EventInfo", "EventInfo", "EventInfo key"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_fastSimTool

PublicToolHandle<IFastSimulationMasterTool> G4AtlasAlg::m_fastSimTool {this, "FastSimMasterTool", "FastSimulationMasterTool", ""}
private

Fast Simulation Master Tool.

Definition at line 157 of file G4AtlasAlg.h.

157{this, "FastSimMasterTool", "FastSimulationMasterTool", ""};

◆ m_fieldMap

Gaudi::Property<std::string> G4AtlasAlg::m_fieldMap {this, "FieldMap", "", ""}
private

Definition at line 122 of file G4AtlasAlg.h.

122{this, "FieldMap", "", ""};

◆ m_flagAbortedEvents

Gaudi::Property<bool> G4AtlasAlg::m_flagAbortedEvents {this, "FlagAbortedEvents", false, ""}
private

Definition at line 104 of file G4AtlasAlg.h.

104{this, "FlagAbortedEvents", false, ""};

◆ m_g4commands

Gaudi::Property<std::vector<std::string> > G4AtlasAlg::m_g4commands {this, "G4Commands", {}, "Commands to send to the G4UI"}
private

Commands to send to the G4 UI.

Definition at line 128 of file G4AtlasAlg.h.

128{this, "G4Commands", {}, "Commands to send to the G4UI"};

◆ m_geoIDSvc

ServiceHandle<ISF::IGeoIDSvc> G4AtlasAlg::m_geoIDSvc {this, "GeoIDSvc", "ISF_GeoIDSvc", ""}
private

Geo ID Service.

Definition at line 112 of file G4AtlasAlg.h.

112{this, "GeoIDSvc", "ISF_GeoIDSvc", ""};

◆ m_inputConverter

ServiceHandle<ISF::IInputConverter> G4AtlasAlg::m_inputConverter {this, "InputConverter", "ISF_InputConverter", ""}
private

Service to convert ISF_Particles into a G4Event.

Definition at line 151 of file G4AtlasAlg.h.

151{this, "InputConverter", "ISF_InputConverter", ""};

◆ m_inputTruthCollectionKey

SG::ReadHandleKey<McEventCollection> G4AtlasAlg::m_inputTruthCollectionKey {this, "InputTruthCollection", "BeamTruthEvent", "Input hard scatter collection"}
private

input hard scatter collection

Definition at line 105 of file G4AtlasAlg.h.

105{this, "InputTruthCollection", "BeamTruthEvent", "Input hard scatter collection"};

◆ m_killAbortedEvents

Gaudi::Property<bool> G4AtlasAlg::m_killAbortedEvents {this, "KillAbortedEvents", false, ""}
private

Definition at line 103 of file G4AtlasAlg.h.

103{this, "KillAbortedEvents", false, ""};

◆ m_libList

Gaudi::Property<std::string> G4AtlasAlg::m_libList {this, "Dll", "", ""}
private

Definition at line 120 of file G4AtlasAlg.h.

120{this, "Dll", "", ""};

◆ m_outputTruthCollectionKey

SG::WriteHandleKey<McEventCollection> G4AtlasAlg::m_outputTruthCollectionKey {this, "OutputTruthCollection", "TruthEvent", "Output hard scatter truth collection"}
private

output hard scatter truth collection

Definition at line 106 of file G4AtlasAlg.h.

106{this, "OutputTruthCollection", "TruthEvent", "Output hard scatter truth collection"};

◆ m_physicsInitializationTools

PublicToolHandleArray<IPhysicsInitializationTool> G4AtlasAlg::m_physicsInitializationTools {this, "PhysicsInitializationTools", {}, "Physics initialization happening after Geant4 initialization"}
private

Definition at line 143 of file G4AtlasAlg.h.

143{this, "PhysicsInitializationTools", {}, "Physics initialization happening after Geant4 initialization"};

◆ m_physList

Gaudi::Property<std::string> G4AtlasAlg::m_physList {this, "Physics", "", ""}
private

Definition at line 121 of file G4AtlasAlg.h.

121{this, "Physics", "", ""};

◆ m_physListSvc

ServiceHandle<IPhysicsListSvc> G4AtlasAlg::m_physListSvc {this, "PhysicsListSvc", "PhysicsListSvc", ""}
private

Physics List Tool.

Definition at line 153 of file G4AtlasAlg.h.

153{this, "PhysicsListSvc", "PhysicsListSvc", ""};

◆ m_qspatcher

ServiceHandle<Simulation::IZeroLifetimePatcher> G4AtlasAlg::m_qspatcher {this, "QuasiStablePatcher", "", "Quasi-Stable Particle Simulation Patcher"}
private

Quasi-Stable Particle Simulation Patcher.

Definition at line 146 of file G4AtlasAlg.h.

146{this, "QuasiStablePatcher", "", "Quasi-Stable Particle Simulation Patcher"};

◆ m_quietMode

Gaudi::Property<bool> G4AtlasAlg::m_quietMode {this, "QuietMode", false, ""}
private

Definition at line 126 of file G4AtlasAlg.h.

126{this, "QuietMode", false, ""};

◆ m_randomStreamName

Gaudi::Property<std::string> G4AtlasAlg::m_randomStreamName {this, "RandomStreamName", "Geant4", ""}
private

Random Stream Name.

Definition at line 136 of file G4AtlasAlg.h.

136{this, "RandomStreamName", "Geant4", ""};

◆ m_recordFlux

Gaudi::Property<bool> G4AtlasAlg::m_recordFlux {this, "RecordFlux", false, ""}
private

Definition at line 125 of file G4AtlasAlg.h.

125{this, "RecordFlux", false, ""};

◆ m_releaseGeoModel

Gaudi::Property<bool> G4AtlasAlg::m_releaseGeoModel {this, "ReleaseGeoModel", true, ""}
private

Definition at line 124 of file G4AtlasAlg.h.

124{this, "ReleaseGeoModel", true, ""};

◆ m_rndmGen

Gaudi::Property<std::string> G4AtlasAlg::m_rndmGen {this, "RandomGenerator", "athena", ""}
private

Definition at line 123 of file G4AtlasAlg.h.

123{this, "RandomGenerator", "athena", ""};

◆ m_rndmGenSvc

ServiceHandle<IAthRNGSvc> G4AtlasAlg::m_rndmGenSvc {this, "AtRndmGenSvc", "AthRNGSvc", ""}
private

Random number service.

Definition at line 134 of file G4AtlasAlg.h.

134{this, "AtRndmGenSvc", "AthRNGSvc", ""}; // TODO rename property

◆ m_senDetTool

PublicToolHandle<ISensitiveDetectorMasterTool> G4AtlasAlg::m_senDetTool {this, "SenDetMasterTool", "SensitiveDetectorMasterTool", ""}
private

Sensitive Detector Master Tool.

Definition at line 155 of file G4AtlasAlg.h.

155{this, "SenDetMasterTool", "SensitiveDetectorMasterTool", ""};

◆ m_simplifiedGeoPath

Gaudi::Property<std::string> G4AtlasAlg::m_simplifiedGeoPath {this, "SimplifiedGeoPath", "", "Path to the simplified geometry file used to transport particles"}
private

Definition at line 161 of file G4AtlasAlg.h.

161{this, "SimplifiedGeoPath", "", "Path to the simplified geometry file used to transport particles"};

◆ m_truthPreselectionTool

ToolHandle<ISF::IGenEventFilter> G4AtlasAlg::m_truthPreselectionTool {this, "TruthPreselectionTool", "", "Tool for filtering out quasi-stable particle daughters"}
private

Definition at line 148 of file G4AtlasAlg.h.

148{this, "TruthPreselectionTool", "", "Tool for filtering out quasi-stable particle daughters"};

◆ m_truthRecordSvc

ServiceHandle<ISF::ITruthSvc> G4AtlasAlg::m_truthRecordSvc {this, "TruthRecordService", "ISF_TruthRecordSvc", ""}
private

Central Truth Service.

Definition at line 110 of file G4AtlasAlg.h.

110{this, "TruthRecordService", "ISF_TruthRecordSvc", ""};

◆ m_useMT

Gaudi::Property<bool> G4AtlasAlg::m_useMT {this,"MultiThreading", false, "Multi-threading specific settings"}
private

Activate multi-threading configuration.

Definition at line 130 of file G4AtlasAlg.h.

130{this,"MultiThreading", false, "Multi-threading specific settings"};

◆ m_userActionSvc

ServiceHandle<G4UA::IUserActionSvc> G4AtlasAlg::m_userActionSvc {this, "UserActionSvc", "G4UA::UserActionSvc", ""}
private

User Action Service.

Definition at line 140 of file G4AtlasAlg.h.

140{this, "UserActionSvc", "G4UA::UserActionSvc", ""};

◆ m_userLimitsSvc

ServiceHandle<IUserLimitsSvc> G4AtlasAlg::m_userLimitsSvc {this, "UserLimitsSvc", "UserLimitsSvc", ""}
private

Definition at line 138 of file G4AtlasAlg.h.

138{this, "UserLimitsSvc", "UserLimitsSvc", ""};

◆ m_useShadowEvent

BooleanProperty G4AtlasAlg::m_useShadowEvent {this, "UseShadowEvent", false, "New approach to selecting particles for simulation" }
private

Definition at line 132 of file G4AtlasAlg.h.

132{this, "UseShadowEvent", false, "New approach to selecting particles for simulation" };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_verbosities

std::map<std::string,std::string> G4AtlasAlg::m_verbosities
private

Verbosity settings for Geant4.

Definition at line 115 of file G4AtlasAlg.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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