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

#include <G4LegacyTransportTool.h>

Inheritance diagram for iGeant4::G4LegacyTransportTool:
Collaboration diagram for iGeant4::G4LegacyTransportTool:

Classes

struct  Slot
 

Public Member Functions

 G4LegacyTransportTool (const std::string &, const std::string &, const IInterface *)
 Constructor. More...
 
virtual ~G4LegacyTransportTool ()=default
 Destructor. More...
 
virtual StatusCode initialize () override final
 AlgTool initialize method. More...
 
void initializeOnce ATLAS_NOT_THREAD_SAFE ()
 G4 initialization called only by the first tool instance. More...
 
virtual StatusCode finalize () override final
 AlgTool finalize method. More...
 
void finalizeOnce ()
 G4 finalization called only by the first tool instance. More...
 
virtual StatusCode simulate (ISF::ISFParticle &isp, ISF::ISFParticleContainer &secondaries, McEventCollection *mcEventCollection) override
 
virtual StatusCode simulateVector (const ISF::ISFParticleVector &particles, ISF::ISFParticleContainer &secondaries, McEventCollection *mcEventCollection, McEventCollection *shadowTruth=nullptr) override
 Simulation call for vectors of particles. More...
 
virtual StatusCode setupEvent (const EventContext &) override
 Setup Event chain - in case of a begin-of event action is needed. More...
 
virtual StatusCode releaseEvent (const EventContext &) override
 Release Event chain - in case of an end-of event action is needed. More...
 
virtual ISF::SimulationFlavor simFlavor () const override
 
virtual StatusCode sysInitialize () override
 Gaudi sysInitialize() methods. More...
 
virtual StatusCode setupEventST () override
 Setup Event chain - in case of a begin-of event action is needed (called by ISimulationSvc) More...
 
virtual StatusCode releaseEventST () override
 Release Event chain - in case of an end-of event action is needed (called by ISimulationSvc) More...
 
const ChronoEntity * chronoStart (const IChronoSvc::ChronoTag &tag)
 wrapper call to start chrono with given tag More...
 
const ChronoEntity * chronoStop (const IChronoSvc::ChronoTag &tag)
 wrapper call to stop chrono with given tag More...
 

Protected Attributes

std::string m_chronoSvcName {"ChronoStatSvc"}
 Name of the timing service - can be set by declareProperty() More...
 
IChronoStatSvc * m_chrono {}
 The timing service for general usage. More...
 

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...
 
HepMC::GenEvent * genEvent (McEventCollection *mcEventCollection) const
 

Private Attributes

Configurable Properties
Gaudi::Property< bool > m_doTiming {this, "PrintTimingInfo", true, ""}
 
float m_accumulatedEventTime {0.}
 
float m_accumulatedEventTimeSq {0.}
 
unsigned int m_nrOfEntries {0}
 
G4Timer * m_runTimer {nullptr}
 
G4Timer * m_eventTimer {nullptr}
 
SG::SlotSpecificObj< Slot > m_slots ATLAS_THREAD_SAFE
 
Gaudi::Property< std::string > m_mcEventCollectionName {this, "McEventCollection", "TruthEvent", ""}
 
PublicToolHandle< ISF::IG4RunManagerHelperm_g4RunManagerHelper {this, "G4RunManagerHelper", "iGeant4::G4RunManagerHelper/G4RunManagerHelper", ""}
 Helper Tool to provide G4RunManager. More...
 
G4AtlasRunManagerm_pRunMgr {}
 
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< bool > m_releaseGeoModel {this, "ReleaseGeoModel", true, ""}
 
Gaudi::Property< bool > m_recordFlux {this, "RecordFlux", 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"}
 
ServiceHandle< IAthRNGSvcm_rndmGenSvc {this, "RandomNumberService", "AthRNGSvc", ""}
 
Gaudi::Property< std::string > m_randomStreamName {this, "RandomStreamName", "Geant4", ""}
 Random Stream Name. More...
 
ServiceHandle< IUserLimitsSvcm_userLimitsSvc {this, "UserLimitsSvc", "UserLimitsSvc", ""}
 
ServiceHandle< G4UA::IUserActionSvcm_userActionSvc {this, "UserActionSvc", "", ""}
 user action service More...
 
ServiceHandle< IDetectorGeometrySvcm_detGeoSvc {this, "DetGeoSvc", "DetectorGeometrySvc", ""}
 Detector Geometry Service (builds G4 Geometry) More...
 
ServiceHandle< ISF::IInputConverterm_inputConverter {this, "InputConverter", "ISF_InputConverter", ""}
 Service to convert ISF_Particles into a G4Event. More...
 
ServiceHandle< IPhysicsListSvcm_physListSvc {this, "PhysicsListSvc", "PhysicsListSvc", ""}
 Physics List Service. More...
 
PublicToolHandle< ISensitiveDetectorMasterToolm_senDetTool {this, "SenDetMasterTool", "SensitiveDetectorMasterTool", ""}
 Sensitive Detector Master Tool. More...
 
PublicToolHandle< IFastSimulationMasterToolm_fastSimTool {this, "FastSimMasterTool", "FastSimulationMasterTool", ""}
 Fast Simulation Master Tool. More...
 

Detailed Description

Geant4 AlgTool to create a ISFParticle at a volume entry/exit

Author
Robert Harrington

Definition at line 58 of file G4LegacyTransportTool.h.

Constructor & Destructor Documentation

◆ G4LegacyTransportTool()

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

Constructor.

Definition at line 55 of file G4LegacyTransportTool.cxx.

59 {
60  //declareProperty("KillAllNeutrinos", m_KillAllNeutrinos=true);
61  //declareProperty("KillLowEPhotons", m_KillLowEPhotons=-1.);
62 }

◆ ~G4LegacyTransportTool()

virtual iGeant4::G4LegacyTransportTool::~G4LegacyTransportTool ( )
virtualdefault

Destructor.

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

void initializeOnce iGeant4::G4LegacyTransportTool::ATLAS_NOT_THREAD_SAFE ( )

G4 initialization called only by the first tool instance.

This is done (for now) because we get multiple tool instances in hive.

◆ chronoStart()

const ChronoEntity* ISF::BaseSimulatorTool::chronoStart ( const IChronoSvc::ChronoTag &  tag)
inlineinherited

wrapper call to start chrono with given tag

Definition at line 100 of file BaseSimulatorTool.h.

100  {
101  if (m_chrono) return m_chrono->chronoStart( tag);
102  return nullptr;
103  }

◆ chronoStop()

const ChronoEntity* ISF::BaseSimulatorTool::chronoStop ( const IChronoSvc::ChronoTag &  tag)
inlineinherited

wrapper call to stop chrono with given tag

Definition at line 106 of file BaseSimulatorTool.h.

106  {
107  if (m_chrono) return m_chrono->chronoStop( tag);
108  return nullptr;
109  }

◆ commandLog()

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

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

Definition at line 401 of file G4LegacyTransportTool.cxx.

402 {
403  switch(returnCode) {
404  case 0: { ATH_MSG_DEBUG("G4 Command: " << commandString << " - Command Succeeded"); } break;
405  case 100: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Command Not Found!"); } break;
406  case 200: {
407  auto* stateManager = G4StateManager::GetStateManager();
408  ATH_MSG_DEBUG("G4 Command: " << commandString << " - Illegal Application State (" <<
409  stateManager->GetStateString(stateManager->GetCurrentState()) << ")!");
410  } break;
411  case 300: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Range!"); } break;
412  case 400: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Unreadable!"); } break;
413  case 500: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Candidates!"); } break;
414  case 600: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Alias Not Found!"); } break;
415  default: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Unknown Status!"); } break;
416  }
417 
418 }

◆ finalize()

StatusCode iGeant4::G4LegacyTransportTool::finalize ( )
finaloverridevirtual

AlgTool finalize method.

Definition at line 196 of file G4LegacyTransportTool.cxx.

197 {
198  ATH_MSG_VERBOSE("++++++++++++ ISF G4 G4LegacyTransportTool finalized ++++++++++++");
199 
200  // One time finalization
201  try {
202  std::call_once(finalizeOnceFlag, &iGeant4::G4LegacyTransportTool::finalizeOnce, this);
203  }
204  catch(const std::exception& e) {
205  ATH_MSG_ERROR("Failure in iGeant4::G4LegacyTransportTool::finalizeOnce: " << e.what());
206  return StatusCode::FAILURE;
207  }
208 
209  if (m_doTiming) {
210  m_runTimer->Stop();
211  float runTime=m_runTimer->GetUserElapsed()+m_runTimer->GetSystemElapsed();
212  float avgTimePerEvent=(m_nrOfEntries>1) ? m_accumulatedEventTime/(m_nrOfEntries-1.) : runTime;
213  float sigma=( m_nrOfEntries>2) ? std::sqrt((m_accumulatedEventTimeSq/float(m_nrOfEntries-1)-
214  avgTimePerEvent*avgTimePerEvent)/float(m_nrOfEntries-2)) : 0;
215  ATH_MSG_INFO("*****************************************"<<endmsg<<
216  "** **"<<endmsg<<
217  " End of run - time spent is "<<std::setprecision(4) <<
218  runTime<<endmsg<<
219  " Average time per event was "<<std::setprecision(4) <<
220  avgTimePerEvent <<" +- "<< std::setprecision(4) << sigma<<endmsg<<
221  "** **"<<endmsg<<
222  "*****************************************");
223  }
224 
225  return StatusCode::SUCCESS;
226 }

◆ finalizeOnce()

void iGeant4::G4LegacyTransportTool::finalizeOnce ( )

G4 finalization called only by the first tool instance.

This is done (for now) because we get multiple tool instances in hive.

Definition at line 229 of file G4LegacyTransportTool.cxx.

230 {
231  ATH_MSG_DEBUG("\t terminating the current G4 run");
232 
234 
235  return;
236 }

◆ genEvent()

HepMC::GenEvent * iGeant4::G4LegacyTransportTool::genEvent ( McEventCollection mcEventCollection) const
private

Definition at line 379 of file G4LegacyTransportTool.cxx.

380 {
381 
382  if(!mcEventCollection) {
383  // retrieve McEventCollection from storegate
384  if (evtStore()->contains<McEventCollection>(m_mcEventCollectionName)) {
385  if (evtStore()->retrieve( mcEventCollection, m_mcEventCollectionName).isFailure()) {
386  ATH_MSG_ERROR( "Unable to retrieve McEventCollection with name=" << m_mcEventCollectionName
387  << ".");
388  return nullptr;
389  }
390  else {
391  ATH_MSG_WARNING( "Fallback. Sucessfully retrieved McEventCollection with name=" << m_mcEventCollectionName);
392  }
393  }
394  else { return nullptr; }
395  }
396  // collect last GenEvent from McEventCollection
397  return mcEventCollection->back();
398 }

◆ initialize()

StatusCode iGeant4::G4LegacyTransportTool::initialize ( )
finaloverridevirtual

AlgTool initialize method.

Reimplemented from ISF::BaseSimulatorTool.

Definition at line 65 of file G4LegacyTransportTool.cxx.

66 {
67  ATH_MSG_VERBOSE("initialize");
68 
70 
71  // create G4Timers if enabled
72  if (m_doTiming) {
73  m_runTimer = new G4Timer();
74  m_eventTimer = new G4Timer();
75  m_runTimer->Start();
76  }
77 
78  // Create the scoring manager if requested
79  if (m_recordFlux) G4ScoringManager::GetScoringManager();
80 
81  // One-time initialization
82  try {
83  std::call_once(initializeOnceFlag, &iGeant4::G4LegacyTransportTool::initializeOnce, this);
84  }
85  catch(const std::exception& e) {
86  ATH_MSG_ERROR("Failure in iGeant4::G4LegacyTransportTool::initializeOnce: " << e.what());
87  return StatusCode::FAILURE;
88  }
89 
90  ATH_CHECK( m_rndmGenSvc.retrieve() );
91  ATH_CHECK( m_userActionSvc.retrieve() );
92 
93  ATH_CHECK(m_senDetTool.retrieve());
94  ATH_CHECK(m_fastSimTool.retrieve());
95 
96  ATH_CHECK(m_inputConverter.retrieve());
97 
98  return StatusCode::SUCCESS;
99 }

◆ releaseEvent()

StatusCode iGeant4::G4LegacyTransportTool::releaseEvent ( const EventContext &  )
overridevirtual

Release Event chain - in case of an end-of event action is needed.

Todo:
: strip hits of the tracks ...

Reimplemented from ISF::BaseSimulatorTool.

Definition at line 333 of file G4LegacyTransportTool.cxx.

334 {
335  ATH_MSG_DEBUG ( "release Event" );
338  /* todo: ELLI: the following is copied in from the PyG4AtlasAlg:
339  -> this somehow needs to be moved into C++
340  and put into releaseEvent() ( or setupEvent() ?)
341 
342  from ISF_Geant4Example import AtlasG4Eng
343  from ISF_Geant4Example.ISF_SimFlags import simFlags
344  if self.doFirstEventG4SeedsCheck :
345  if simFlags.SeedsG4.statusOn:
346  rnd = AtlasG4Eng.G4Eng.menu_G4RandomNrMenu()
347  rnd.set_Seed(simFlags.SeedsG4.get_Value())
348  self.doFirstEventG4SeedsCheck = False
349  if self.RndG4Menu.SaveStatus:
350  self.RndG4Menu.Menu.saveStatus('G4Seeds.txt')
351  */
352 
353  // print per-event timing info if enabled
354  if (m_doTiming) {
355  m_eventTimer->Stop();
356 
357  double eventTime=m_eventTimer->GetUserElapsed()+m_eventTimer->GetSystemElapsed();
358  if (m_nrOfEntries>1) {
359  m_accumulatedEventTime +=eventTime;
360  m_accumulatedEventTimeSq+=eventTime*eventTime;
361  }
362 
363  float avgTimePerEvent=(m_nrOfEntries>1) ? m_accumulatedEventTime/(m_nrOfEntries-1.) : eventTime;
364  float sigma=(m_nrOfEntries>2) ? std::sqrt((m_accumulatedEventTimeSq/float(m_nrOfEntries-1)-
365  avgTimePerEvent*avgTimePerEvent)/float(m_nrOfEntries-2)) : 0.;
366 
367  ATH_MSG_INFO("\t Run:Event "<<ctx.eventID().run_number()<<":"<<ctx.eventID().event_number() << "\t ("<<m_nrOfEntries<<"th event for this worker) took " << std::setprecision(4) <<
368  eventTime << " s. New average " << std::setprecision(4) <<
369  avgTimePerEvent<<" +- "<<std::setprecision(4) << sigma);
370  }
371 
372  ATH_CHECK(m_senDetTool->EndOfAthenaEvent());
373  ATH_CHECK(m_fastSimTool->EndOfAthenaEvent());
374 
375  return StatusCode::SUCCESS;
376 }

◆ releaseEventST()

virtual StatusCode ISF::BaseSimulatorTool::releaseEventST ( )
inlineoverridevirtualinherited

Release Event chain - in case of an end-of event action is needed (called by ISimulationSvc)

Reimplemented in ISF::FastCaloSimV2Tool.

Definition at line 96 of file BaseSimulatorTool.h.

97  { return releaseEvent(Gaudi::Hive::currentContext()); }

◆ setupEvent()

StatusCode iGeant4::G4LegacyTransportTool::setupEvent ( const EventContext &  )
overridevirtual

Setup Event chain - in case of a begin-of event action is needed.

Reimplemented from ISF::BaseSimulatorTool.

Definition at line 311 of file G4LegacyTransportTool.cxx.

312 {
313  ATH_MSG_DEBUG ( "setup Event" );
314 
315  // Set the RNG to use for this event. We need to reset it for MT jobs
316  // because of the mismatch between Gaudi slot-local and G4 thread-local RNG.
317  ATHRNG::RNGWrapper* rngWrapper = m_rndmGenSvc->getEngine(this, m_randomStreamName);
318  rngWrapper->setSeed( m_randomStreamName, ctx );
319  G4Random::setTheEngine(rngWrapper->getEngine(ctx));
320 
321  ATH_CHECK(m_senDetTool->BeginOfAthenaEvent());
322 
323  m_nrOfEntries++;
324  if (m_doTiming) m_eventTimer->Start();
325 
326  // make sure SD collections are properly initialized in every Athena event
327  G4SDManager::GetSDMpointer()->PrepareNewEvent();
328 
329  return StatusCode::SUCCESS;
330 }

◆ setupEventST()

virtual StatusCode ISF::BaseSimulatorTool::setupEventST ( )
inlineoverridevirtualinherited

Setup Event chain - in case of a begin-of event action is needed (called by ISimulationSvc)

Reimplemented in ISF::FastCaloSimV2Tool.

Definition at line 69 of file BaseSimulatorTool.h.

70  { return setupEvent(Gaudi::Hive::currentContext()); }

◆ simFlavor()

virtual ISF::SimulationFlavor iGeant4::G4LegacyTransportTool::simFlavor ( ) const
inlineoverridevirtual

Definition at line 89 of file G4LegacyTransportTool.h.

89 { return ISF::Geant4; };

◆ simulate()

StatusCode iGeant4::G4LegacyTransportTool::simulate ( ISF::ISFParticle isp,
ISF::ISFParticleContainer secondaries,
McEventCollection mcEventCollection 
)
overridevirtual

Process ParticleState from particle stack

Reimplemented from ISF::BaseSimulatorTool.

Definition at line 239 of file G4LegacyTransportTool.cxx.

239  {
240 
241  // give a screen output that you entered Geant4SimSvc
242  ATH_MSG_VERBOSE( "Particle " << isp << " received for simulation." );
243 
245  // wrap the given ISFParticle into a STL vector of ISFParticles with length 1
246  // (minimizing code duplication)
247  const ISF::ISFParticleVector ispVector(1, &isp);
248  StatusCode success = this->simulateVector(ispVector, secondaries, mcEventCollection);
249  ATH_MSG_VERBOSE( "Simulation done" );
250 
251  // Geant4 call done
252  return success;
253 }

◆ simulateVector()

StatusCode iGeant4::G4LegacyTransportTool::simulateVector ( const ISF::ISFParticleVector particles,
ISF::ISFParticleContainer secondaries,
McEventCollection mcEventCollection,
McEventCollection = nullptr 
)
overridevirtual

Simulation call for vectors of particles.

Process ParticleState from particle stack

Reimplemented from ISF::BaseSimulatorTool.

Definition at line 256 of file G4LegacyTransportTool.cxx.

256  {
257 
258  ATH_MSG_DEBUG (name() << ".simulateVector(...) : Received a vector of " << particles.size() << " particles for simulation.");
260  G4Event* inputEvent = m_inputConverter->ISF_to_G4Event(particles, genEvent(mcEventCollection));
261  if (!inputEvent) {
262  ATH_MSG_ERROR("ISF Event conversion failed ");
263  return StatusCode::FAILURE;
264  }
265 
266  ATH_MSG_DEBUG("Calling ISF_Geant4 ProcessEvent");
267  bool abort = m_pRunMgr->ProcessEvent(inputEvent);
268 
269  if (abort) {
270  ATH_MSG_WARNING("Event was aborted !! ");
271  //ATH_MSG_WARNING("Simulation will now go on to the next event ");
272  //ATH_MSG_WARNING("setFilterPassed is now False");
273  //setFilterPassed(false);
274  return StatusCode::FAILURE;
275  }
276 
277 
278  // const DataHandle <TrackRecordCollection> tracks;
279 
280  // StatusCode sc = evtStore()->retrieve(tracks,m_trackCollName);
281 
282  // if (sc.isFailure()) {
283  // ATH_MSG_WARNING(" Cannot retrieve TrackRecordCollection " << m_trackCollName);
284  // }
285 
286  // not implemented yet... need to get particle stack from Geant4 and convert to ISFParticle
287  ATH_MSG_VERBOSE( "Simulation done" );
288 
289  Slot& slot = *m_slots;
290  Slot::lock_t lock (slot.m_mutex);
291 
292  for (auto* cisp : particles) {
293  // return any secondaries associated with this particle
294  auto searchResult = slot.m_secondariesMap.find( cisp );
295  if ( searchResult == slot.m_secondariesMap.end() ) {
296 
297  ATH_MSG_VERBOSE( "Found no secondaries" );
298 
299  } else {
300 
301  ATH_MSG_VERBOSE( "Found secondaries: " << searchResult->second.size() );
302  secondaries.splice( end(secondaries), std::move(searchResult->second) ); //append vector
303  slot.m_secondariesMap.erase( searchResult );
304  }
305  }
306  // Geant4 call done
307  return StatusCode::SUCCESS;
308 }

◆ sysInitialize()

virtual StatusCode ISF::BaseSimulatorTool::sysInitialize ( )
inlineoverridevirtualinherited

Gaudi sysInitialize() methods.

Definition at line 51 of file BaseSimulatorTool.h.

52  {
54  ATH_CHECK( serviceLocator()->service(m_chronoSvcName, m_chrono ) );
55  return StatusCode::SUCCESS;
56  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

SG::SlotSpecificObj<Slot> m_slots iGeant4::G4LegacyTransportTool::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 119 of file G4LegacyTransportTool.h.

◆ m_accumulatedEventTime

float iGeant4::G4LegacyTransportTool::m_accumulatedEventTime {0.}
private

Definition at line 104 of file G4LegacyTransportTool.h.

◆ m_accumulatedEventTimeSq

float iGeant4::G4LegacyTransportTool::m_accumulatedEventTimeSq {0.}
private

Definition at line 105 of file G4LegacyTransportTool.h.

◆ m_activateParallelGeometries

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

Definition at line 134 of file G4LegacyTransportTool.h.

◆ m_chrono

IChronoStatSvc* ISF::BaseSimulatorTool::m_chrono {}
protectedinherited

The timing service for general usage.

Definition at line 120 of file BaseSimulatorTool.h.

◆ m_chronoSvcName

std::string ISF::BaseSimulatorTool::m_chronoSvcName {"ChronoStatSvc"}
protectedinherited

Name of the timing service - can be set by declareProperty()

Definition at line 117 of file BaseSimulatorTool.h.

◆ m_detGeoSvc

ServiceHandle<IDetectorGeometrySvc> iGeant4::G4LegacyTransportTool::m_detGeoSvc {this, "DetGeoSvc", "DetectorGeometrySvc", ""}
private

Detector Geometry Service (builds G4 Geometry)

Definition at line 144 of file G4LegacyTransportTool.h.

◆ m_doTiming

Gaudi::Property<bool> iGeant4::G4LegacyTransportTool::m_doTiming {this, "PrintTimingInfo", true, ""}
private

Definition at line 102 of file G4LegacyTransportTool.h.

◆ m_eventTimer

G4Timer* iGeant4::G4LegacyTransportTool::m_eventTimer {nullptr}
private

Definition at line 109 of file G4LegacyTransportTool.h.

◆ m_fastSimTool

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

Fast Simulation Master Tool.

Definition at line 152 of file G4LegacyTransportTool.h.

◆ m_fieldMap

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

Definition at line 127 of file G4LegacyTransportTool.h.

◆ m_g4commands

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

Commands to send to the G4 UI.

Definition at line 131 of file G4LegacyTransportTool.h.

◆ m_g4RunManagerHelper

PublicToolHandle<ISF::IG4RunManagerHelper> iGeant4::G4LegacyTransportTool::m_g4RunManagerHelper {this, "G4RunManagerHelper", "iGeant4::G4RunManagerHelper/G4RunManagerHelper", ""}
private

Helper Tool to provide G4RunManager.

Definition at line 122 of file G4LegacyTransportTool.h.

◆ m_inputConverter

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

Service to convert ISF_Particles into a G4Event.

Definition at line 146 of file G4LegacyTransportTool.h.

◆ m_libList

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

Definition at line 125 of file G4LegacyTransportTool.h.

◆ m_mcEventCollectionName

Gaudi::Property<std::string> iGeant4::G4LegacyTransportTool::m_mcEventCollectionName {this, "McEventCollection", "TruthEvent", ""}
private

Definition at line 120 of file G4LegacyTransportTool.h.

◆ m_nrOfEntries

unsigned int iGeant4::G4LegacyTransportTool::m_nrOfEntries {0}
private

Definition at line 106 of file G4LegacyTransportTool.h.

◆ m_physList

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

Definition at line 126 of file G4LegacyTransportTool.h.

◆ m_physListSvc

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

Physics List Service.

Definition at line 148 of file G4LegacyTransportTool.h.

◆ m_pRunMgr

G4AtlasRunManager* iGeant4::G4LegacyTransportTool::m_pRunMgr {}
private

Definition at line 123 of file G4LegacyTransportTool.h.

◆ m_randomStreamName

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

Random Stream Name.

Definition at line 138 of file G4LegacyTransportTool.h.

◆ m_recordFlux

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

Definition at line 129 of file G4LegacyTransportTool.h.

◆ m_releaseGeoModel

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

Definition at line 128 of file G4LegacyTransportTool.h.

◆ m_rndmGenSvc

ServiceHandle<IAthRNGSvc> iGeant4::G4LegacyTransportTool::m_rndmGenSvc {this, "RandomNumberService", "AthRNGSvc", ""}
private

Definition at line 136 of file G4LegacyTransportTool.h.

◆ m_runTimer

G4Timer* iGeant4::G4LegacyTransportTool::m_runTimer {nullptr}
private

Definition at line 108 of file G4LegacyTransportTool.h.

◆ m_senDetTool

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

Sensitive Detector Master Tool.

Definition at line 150 of file G4LegacyTransportTool.h.

◆ m_useMT

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

Activate multi-threading configuration.

Definition at line 133 of file G4LegacyTransportTool.h.

◆ m_userActionSvc

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

user action service

Definition at line 142 of file G4LegacyTransportTool.h.

◆ m_userLimitsSvc

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

Definition at line 140 of file G4LegacyTransportTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
iGeant4::G4LegacyTransportTool::simulateVector
virtual StatusCode simulateVector(const ISF::ISFParticleVector &particles, ISF::ISFParticleContainer &secondaries, McEventCollection *mcEventCollection, McEventCollection *shadowTruth=nullptr) override
Simulation call for vectors of particles.
Definition: G4LegacyTransportTool.cxx:256
ATHRNG::RNGWrapper::setSeed
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition: RNGWrapper.h:169
ISF::BaseSimulatorTool::m_chronoSvcName
std::string m_chronoSvcName
Name of the timing service - can be set by declareProperty()
Definition: BaseSimulatorTool.h:117
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ISF::BaseSimulatorTool::releaseEvent
virtual StatusCode releaseEvent(const EventContext &) override
Release Event chain - in case of an end-of event action is needed.
Definition: BaseSimulatorTool.h:92
G4AtlasRunManager::RunTermination
void RunTermination() override final
G4 function called at end of run.
Definition: G4AtlasRunManager.cxx:141
iGeant4::G4LegacyTransportTool::finalizeOnce
void finalizeOnce()
G4 finalization called only by the first tool instance.
Definition: G4LegacyTransportTool.cxx:229
ISF::BaseSimulatorTool::m_chrono
IChronoStatSvc * m_chrono
The timing service for general usage.
Definition: BaseSimulatorTool.h:120
iGeant4::G4LegacyTransportTool::m_accumulatedEventTime
float m_accumulatedEventTime
Definition: G4LegacyTransportTool.h:104
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
iGeant4::G4LegacyTransportTool::m_accumulatedEventTimeSq
float m_accumulatedEventTimeSq
Definition: G4LegacyTransportTool.h:105
iGeant4::G4LegacyTransportTool::m_userActionSvc
ServiceHandle< G4UA::IUserActionSvc > m_userActionSvc
user action service
Definition: G4LegacyTransportTool.h:142
iGeant4::G4LegacyTransportTool::m_pRunMgr
G4AtlasRunManager * m_pRunMgr
Definition: G4LegacyTransportTool.h:123
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
iGeant4::G4LegacyTransportTool::m_rndmGenSvc
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
Definition: G4LegacyTransportTool.h:136
ISF::Geant4
@ Geant4
Definition: SimulationFlavor.h:23
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ISF::ISFParticleVector
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
Definition: ISFParticleContainer.h:26
calibdata.exception
exception
Definition: calibdata.py:496
G4AtlasRunManager::ProcessEvent
bool ProcessEvent(G4Event *event)
Does the work of simulating an ATLAS event.
Definition: G4AtlasRunManager.cxx:117
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
iGeant4::G4LegacyTransportTool::m_doTiming
Gaudi::Property< bool > m_doTiming
Definition: G4LegacyTransportTool.h:102
iGeant4::G4LegacyTransportTool::m_runTimer
G4Timer * m_runTimer
Definition: G4LegacyTransportTool.h:108
DataVector::back
const T * back() const
Access the last element in the collection as an rvalue.
iGeant4::G4LegacyTransportTool::m_inputConverter
ServiceHandle< ISF::IInputConverter > m_inputConverter
Service to convert ISF_Particles into a G4Event.
Definition: G4LegacyTransportTool.h:146
iGeant4::G4LegacyTransportTool::m_nrOfEntries
unsigned int m_nrOfEntries
Definition: G4LegacyTransportTool.h:106
iGeant4::G4LegacyTransportTool::m_recordFlux
Gaudi::Property< bool > m_recordFlux
Definition: G4LegacyTransportTool.h:129
ISF::BaseSimulatorTool
Definition: BaseSimulatorTool.h:36
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
iGeant4::G4LegacyTransportTool::m_eventTimer
G4Timer * m_eventTimer
Definition: G4LegacyTransportTool.h:109
AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize
virtual StatusCode sysInitialize() override
Perform system initialization for an algorithm.
ISF::BaseSimulatorTool::setupEvent
virtual StatusCode setupEvent(const EventContext &) override
Setup Event chain - in case of a begin-of event action is needed.
Definition: BaseSimulatorTool.h:65
iGeant4::G4LegacyTransportTool::m_randomStreamName
Gaudi::Property< std::string > m_randomStreamName
Random Stream Name.
Definition: G4LegacyTransportTool.h:138
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
iGeant4::G4LegacyTransportTool::m_senDetTool
PublicToolHandle< ISensitiveDetectorMasterTool > m_senDetTool
Sensitive Detector Master Tool.
Definition: G4LegacyTransportTool.h:150
ISF::BaseSimulatorTool::initialize
virtual StatusCode initialize() override
Definition: BaseSimulatorTool.h:59
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
iGeant4::G4LegacyTransportTool::Slot::lock_t
std::lock_guard< mutex_t > lock_t
Definition: G4LegacyTransportTool.h:116
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
CI_EMPFlowData22test.returnCode
returnCode
Definition: CI_EMPFlowData22test.py:16
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
iGeant4::G4LegacyTransportTool::m_mcEventCollectionName
Gaudi::Property< std::string > m_mcEventCollectionName
Definition: G4LegacyTransportTool.h:120
iGeant4::G4LegacyTransportTool::genEvent
HepMC::GenEvent * genEvent(McEventCollection *mcEventCollection) const
Definition: G4LegacyTransportTool.cxx:379
iGeant4::G4LegacyTransportTool::m_fastSimTool
PublicToolHandle< IFastSimulationMasterTool > m_fastSimTool
Fast Simulation Master Tool.
Definition: G4LegacyTransportTool.h:152