ATLAS Offline Software
G4LegacyTransportTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // class header
7 
8 //package includes
14 #include "ISFFluxRecorder.h"
15 
16 // ISF classes
17 #include "ISF_Event/ISFParticle.h"
19 
20 // Athena classes
26 
27 // HepMC classes
28 #include "AtlasHepMC/GenParticle.h"
29 
30 // Geant4 classes
31 #include "G4ChargedGeantino.hh"
32 #include "G4Event.hh"
33 #include "G4Geantino.hh"
34 #include "G4LorentzVector.hh"
35 #include "G4ParallelWorldPhysics.hh"
36 #include "G4ParticleTable.hh"
37 #include "G4PrimaryParticle.hh"
38 #include "G4PrimaryVertex.hh"
39 #include "G4SDManager.hh"
40 #include "G4ScoringManager.hh"
41 #include "G4StateManager.hh"
42 #include "G4Timer.hh"
43 #include "G4Trajectory.hh"
44 #include "G4TransportationManager.hh"
45 #include "G4UImanager.hh"
46 #include "G4VModularPhysicsList.hh"
47 #include "G4VUserPhysicsList.hh"
48 
49 // standard library
50 #include <memory>
51 #include <mutex>
52 static std::once_flag initializeOnceFlag;
53 static std::once_flag finalizeOnceFlag;
54 
55 //________________________________________________________________________
57  const std::string& name,
58  const IInterface* parent )
59  : ISF::BaseSimulatorG4Tool(type, name, parent)
60 {
61  //declareProperty("KillAllNeutrinos", m_KillAllNeutrinos=true);
62  //declareProperty("KillLowEPhotons", m_KillLowEPhotons=-1.);
63 }
64 
65 //________________________________________________________________________
67 {
68  ATH_MSG_VERBOSE("initialize");
69 
71 
72  // create G4Timers if enabled
73  if (m_doTiming) {
74  m_runTimer = new G4Timer();
75  m_eventTimer = new G4Timer();
76  m_runTimer->Start();
77  }
78 
79  // Create the scoring manager if requested
80  if (m_recordFlux) G4ScoringManager::GetScoringManager();
81 
82  // One-time initialization
83  try {
84  std::call_once(initializeOnceFlag, &iGeant4::G4LegacyTransportTool::initializeOnce, this);
85  }
86  catch(const std::exception& e) {
87  ATH_MSG_ERROR("Failure in iGeant4::G4LegacyTransportTool::initializeOnce: " << e.what());
88  return StatusCode::FAILURE;
89  }
90 
91  ATH_CHECK( m_rndmGenSvc.retrieve() );
92  ATH_CHECK( m_userActionSvc.retrieve() );
93 
94  ATH_CHECK(m_senDetTool.retrieve());
95  ATH_CHECK(m_fastSimTool.retrieve());
96 
97  ATH_CHECK(m_inputConverter.retrieve());
98 
99  return StatusCode::SUCCESS;
100 }
101 
102 //________________________________________________________________________
103 void iGeant4::G4LegacyTransportTool::initializeOnce ATLAS_NOT_THREAD_SAFE ()
104 {
105  // get G4AtlasRunManager
106  ATH_MSG_DEBUG("initialize G4AtlasRunManager");
107 
108  if (m_g4RunManagerHelper.retrieve().isFailure()) {
109  throw std::runtime_error("Could not initialize G4RunManagerHelper!");
110  }
111  ATH_MSG_DEBUG("retrieved "<<m_g4RunManagerHelper);
112  m_pRunMgr = m_g4RunManagerHelper ? m_g4RunManagerHelper->g4RunManager() : nullptr;
113  if (!m_pRunMgr) {
114  throw std::runtime_error("G4RunManagerHelper::g4RunManager() returned nullptr.");
115  }
116 
117  if(m_physListSvc.retrieve().isFailure()) {
118  throw std::runtime_error("Could not initialize ATLAS PhysicsListSvc!");
119  }
120  m_physListSvc->SetPhysicsList();
121  ATH_MSG_INFO( "retireving the Detector Construction tool" );
122  if(m_detConstruction.retrieve().isFailure()) {
123  throw std::runtime_error("Could not initialize ATLAS DetectorConstruction!");
124  }
125 
126  m_pRunMgr->SetRecordFlux( m_recordFlux, std::make_unique<ISFFluxRecorder>() );
127  m_pRunMgr->SetLogLevel( int(msg().level()) ); // Synch log levels
128  m_pRunMgr->SetDetConstructionTool( m_detConstruction.get() );
129  m_pRunMgr->SetPhysListSvc(m_physListSvc.typeAndName() );
130  m_pRunMgr->SetQuietMode( m_quietMode );
131  std::unique_ptr<G4AtlasActionInitialization> actionInitialization =
132  std::make_unique<G4AtlasActionInitialization>(&*m_userActionSvc);
133  m_pRunMgr->SetUserInitialization(actionInitialization.release());
134  m_pRunMgr->SetUserInitialization(new G4AtlasUserWorkerInitialization({.m_activateFastSimulation = m_fastSimTool->HasFastSimulationModels()}));
135 
136  G4UImanager *ui = G4UImanager::GetUIpointer();
137 
138  if (!m_libList.empty()) {
139  ATH_MSG_INFO("G4AtlasAlg specific libraries requested ") ;
140  std::string temp="/load "+m_libList;
141  ui->ApplyCommand(temp);
142  }
143 
144  if (!m_physList.empty()) {
145  ATH_MSG_INFO("requesting a specific physics list "<< m_physList) ;
146  std::string temp="/Physics/GetPhysicsList "+m_physList;
147  ui->ApplyCommand(temp);
148  }
149 
150  if (!m_fieldMap.empty()) {
151  ATH_MSG_INFO("requesting a specific field map "<< m_fieldMap) ;
152  ATH_MSG_INFO("the field is initialized straight away") ;
153  std::string temp="/MagneticField/Select "+m_fieldMap;
154  ui->ApplyCommand(temp);
155  ui->ApplyCommand("/MagneticField/Initialize");
156  }
157 
158  // Send UI commands
159  ATH_MSG_DEBUG("G4 Command: Trying at the end of initializeOnce()");
160  for (const auto& g4command : m_g4commands) {
161  int returnCode = ui->ApplyCommand( g4command );
162  commandLog(returnCode, g4command);
163  }
164 
165  // Code from G4AtlasSvc
166  auto* rm = G4RunManager::GetRunManager();
167  if(!rm) {
168  throw std::runtime_error("Run manager retrieval has failed");
169  }
170  rm->Initialize(); // Initialization differs slightly in multi-threading.
171  // TODO: add more details about why this is here.
172  if(!m_useMT && rm->ConfirmBeamOnCondition()) {
173  rm->RunInitialization();
174  }
175 
176  ATH_MSG_INFO("Initializing " << m_physicsInitializationTools.size() << " physics initialization tools");
177  for(auto& physicsTool : m_physicsInitializationTools) {
178  if (physicsTool->initializePhysics().isFailure()) {
179  throw std::runtime_error("Failed to initialize physics with tool " + physicsTool.name());
180  }
181  }
182 
183  if(m_userLimitsSvc.retrieve().isFailure()) {
184  throw std::runtime_error("Could not initialize ATLAS UserLimitsSvc!");
185  }
186 
187  if (m_activateParallelGeometries) {
188  G4VModularPhysicsList* thePhysicsList=dynamic_cast<G4VModularPhysicsList*>(m_physListSvc->GetPhysicsList());
189  if (!thePhysicsList) {
190  throw std::runtime_error("Failed dynamic_cast!! this is not a G4VModularPhysicsList!");
191  }
192 #if G4VERSION_NUMBER >= 1010
193  std::vector<std::string>& parallelWorldNames=m_detConstruction->GetParallelWorldNames();
194  for (auto& it: parallelWorldNames) {
195  thePhysicsList->RegisterPhysics(new G4ParallelWorldPhysics(it,true));
196  }
197 #endif
198  }
199 
200  return;
201 }
202 
203 //________________________________________________________________________
205 {
206  ATH_MSG_VERBOSE("++++++++++++ ISF G4 G4LegacyTransportTool finalized ++++++++++++");
207 
208  // One time finalization
209  try {
210  std::call_once(finalizeOnceFlag, &iGeant4::G4LegacyTransportTool::finalizeOnce, this);
211  }
212  catch(const std::exception& e) {
213  ATH_MSG_ERROR("Failure in iGeant4::G4LegacyTransportTool::finalizeOnce: " << e.what());
214  return StatusCode::FAILURE;
215  }
216 
217  if (m_doTiming) {
218  m_runTimer->Stop();
219  float runTime=m_runTimer->GetUserElapsed()+m_runTimer->GetSystemElapsed();
220  float avgTimePerEvent=(m_nrOfEntries>1) ? m_accumulatedEventTime/(m_nrOfEntries-1.) : runTime;
221  float sigma=( m_nrOfEntries>2) ? std::sqrt((m_accumulatedEventTimeSq/float(m_nrOfEntries-1)-
222  avgTimePerEvent*avgTimePerEvent)/float(m_nrOfEntries-2)) : 0;
223  ATH_MSG_INFO("*****************************************"<<endmsg<<
224  "** **"<<endmsg<<
225  " End of run - time spent is "<<std::setprecision(4) <<
226  runTime<<endmsg<<
227  " Average time per event was "<<std::setprecision(4) <<
228  avgTimePerEvent <<" +- "<< std::setprecision(4) << sigma<<endmsg<<
229  "** **"<<endmsg<<
230  "*****************************************");
231  }
232 
233  return StatusCode::SUCCESS;
234 }
235 
236 //________________________________________________________________________
238 {
239  ATH_MSG_DEBUG("\t terminating the current G4 run");
240 
241  m_pRunMgr->RunTermination();
242 
243  return;
244 }
245 
246 //________________________________________________________________________
248  const EventContext& ctx, ISF::ISFParticle& isp,
249  ISF::ISFParticleContainer& secondaries,
250  McEventCollection* mcEventCollection, std::shared_ptr<HitCollectionMap> hitCollections) {
251 
252  // give a screen output that you entered Geant4SimSvc
253  ATH_MSG_VERBOSE( "Particle " << isp << " received for simulation." );
254 
256  // wrap the given ISFParticle into a STL vector of ISFParticles with length 1
257  // (minimizing code duplication)
258  const ISF::ISFParticleVector ispVector(1, &isp);
259  StatusCode success = this->simulateVector(ctx, ispVector, secondaries,
260  mcEventCollection, hitCollections);
261  ATH_MSG_VERBOSE( "Simulation done" );
262 
263  // Geant4 call done
264  return success;
265 }
266 
267 //________________________________________________________________________
269  const EventContext& ctx, const ISF::ISFParticleVector& particles,
270  ISF::ISFParticleContainer& secondaries,
271  McEventCollection* mcEventCollection, std::shared_ptr<HitCollectionMap> hitCollections,
273 
274  ATH_MSG_DEBUG (name() << ".simulateVector(...) : Received a vector of " << particles.size() << " particles for simulation.");
276  // Lambda prevents using the unique_ptr
277  bool abort = [&] ATLAS_NOT_THREAD_SAFE {
278  auto eventInfo = std::make_unique<AtlasG4EventUserInfo>();
279  eventInfo->SetHitCollectionMap(hitCollections);
280 
281  auto inputEvent = std::make_unique<G4Event>(ctx.eventID().event_number());
282  inputEvent->SetUserInformation(eventInfo.release());
283 
284  m_inputConverter->ISF_to_G4Event(*inputEvent, particles,
285  genEvent(mcEventCollection));
286 
287  ATH_MSG_DEBUG("Calling ISF_Geant4 ProcessEvent");
288  return m_pRunMgr->ProcessEvent(inputEvent.release());
289  }();
290 
291  if (abort) {
292  ATH_MSG_WARNING("Event was aborted !! ");
293  //ATH_MSG_WARNING("Simulation will now go on to the next event ");
294  //ATH_MSG_WARNING("setFilterPassed is now False");
295  //setFilterPassed(false);
296  return StatusCode::FAILURE;
297  }
298 
299 
300  // const DataHandle <TrackRecordCollection> tracks;
301 
302  // StatusCode sc = evtStore()->retrieve(tracks,m_trackCollName);
303 
304  // if (sc.isFailure()) {
305  // ATH_MSG_WARNING(" Cannot retrieve TrackRecordCollection " << m_trackCollName);
306  // }
307 
308  // not implemented yet... need to get particle stack from Geant4 and convert to ISFParticle
309  ATH_MSG_VERBOSE( "Simulation done" );
310 
311  Slot& slot = *m_slots;
312  Slot::lock_t lock (slot.m_mutex);
313 
314  for (auto* cisp : particles) {
315  // return any secondaries associated with this particle
316  auto searchResult = slot.m_secondariesMap.find( cisp );
317  if ( searchResult == slot.m_secondariesMap.end() ) {
318 
319  ATH_MSG_VERBOSE( "Found no secondaries" );
320 
321  } else {
322 
323  ATH_MSG_VERBOSE( "Found secondaries: " << searchResult->second.size() );
324  secondaries.splice( end(secondaries), std::move(searchResult->second) ); //append vector
325  slot.m_secondariesMap.erase( searchResult );
326  }
327  }
328  // Geant4 call done
329  return StatusCode::SUCCESS;
330 }
331 
332 //________________________________________________________________________
334  const EventContext& ctx, HitCollectionMap& hitCollections) {
335  ATH_MSG_DEBUG ( "setup Event" );
336 
337  // Set the RNG to use for this event. We need to reset it for MT jobs
338  // because of the mismatch between Gaudi slot-local and G4 thread-local RNG.
339  ATHRNG::RNGWrapper* rngWrapper = m_rndmGenSvc->getEngine(this, m_randomStreamName);
340  rngWrapper->setSeed( m_randomStreamName, ctx );
341  G4Random::setTheEngine(rngWrapper->getEngine(ctx));
342  ATH_CHECK(m_senDetTool->BeginOfAthenaEvent(hitCollections));
343 
344  m_nrOfEntries++;
345  if (m_doTiming) m_eventTimer->Start();
346 
347  // make sure SD collections are properly initialized in every Athena event
348  G4SDManager::GetSDMpointer()->PrepareNewEvent();
349 
350  return StatusCode::SUCCESS;
351 }
352 
353 //________________________________________________________________________
355  const EventContext& ctx, HitCollectionMap& hitCollections) {
356  ATH_MSG_DEBUG ( "release Event" );
359  /* todo: ELLI: the following is copied in from the PyG4AtlasAlg:
360  -> this somehow needs to be moved into C++
361  and put into releaseEvent() ( or setupEvent() ?)
362 
363  from ISF_Geant4Example import AtlasG4Eng
364  from ISF_Geant4Example.ISF_SimFlags import simFlags
365  if self.doFirstEventG4SeedsCheck :
366  if simFlags.SeedsG4.statusOn:
367  rnd = AtlasG4Eng.G4Eng.menu_G4RandomNrMenu()
368  rnd.set_Seed(simFlags.SeedsG4.get_Value())
369  self.doFirstEventG4SeedsCheck = False
370  if self.RndG4Menu.SaveStatus:
371  self.RndG4Menu.Menu.saveStatus('G4Seeds.txt')
372  */
373 
374  // print per-event timing info if enabled
375  if (m_doTiming) {
376  m_eventTimer->Stop();
377 
378  double eventTime=m_eventTimer->GetUserElapsed()+m_eventTimer->GetSystemElapsed();
379  if (m_nrOfEntries>1) {
380  m_accumulatedEventTime +=eventTime;
381  m_accumulatedEventTimeSq+=eventTime*eventTime;
382  }
383 
384  float avgTimePerEvent=(m_nrOfEntries>1) ? m_accumulatedEventTime/(m_nrOfEntries-1.) : eventTime;
385  float sigma=(m_nrOfEntries>2) ? std::sqrt((m_accumulatedEventTimeSq/float(m_nrOfEntries-1)-
386  avgTimePerEvent*avgTimePerEvent)/float(m_nrOfEntries-2)) : 0.;
387 
388  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) <<
389  eventTime << " s. New average " << std::setprecision(4) <<
390  avgTimePerEvent<<" +- "<<std::setprecision(4) << sigma);
391  }
392 
393  ATH_CHECK(m_senDetTool->EndOfAthenaEvent(hitCollections));
394  ATH_CHECK(m_fastSimTool->EndOfAthenaEvent());
395 
396  return StatusCode::SUCCESS;
397 }
398 
399 //________________________________________________________________________
400 HepMC::GenEvent* iGeant4::G4LegacyTransportTool::genEvent(McEventCollection* mcEventCollection) const
401 {
402 
403  if(!mcEventCollection) {
404  // retrieve McEventCollection from storegate
405  if (evtStore()->contains<McEventCollection>(m_mcEventCollectionName)) {
406  if (evtStore()->retrieve( mcEventCollection, m_mcEventCollectionName).isFailure()) {
407  ATH_MSG_ERROR( "Unable to retrieve McEventCollection with name=" << m_mcEventCollectionName
408  << ".");
409  return nullptr;
410  }
411  else {
412  ATH_MSG_WARNING( "Fallback. Sucessfully retrieved McEventCollection with name=" << m_mcEventCollectionName);
413  }
414  }
415  else { return nullptr; }
416  }
417  // collect last GenEvent from McEventCollection
418  return mcEventCollection->back();
419 }
420 
421 //________________________________________________________________________
422 void iGeant4::G4LegacyTransportTool::commandLog(int returnCode, const std::string& commandString) const
423 {
424  switch(returnCode) {
425  case 0: { ATH_MSG_DEBUG("G4 Command: " << commandString << " - Command Succeeded"); } break;
426  case 100: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Command Not Found!"); } break;
427  case 200: {
428  auto* stateManager = G4StateManager::GetStateManager();
429  ATH_MSG_DEBUG("G4 Command: " << commandString << " - Illegal Application State (" <<
430  stateManager->GetStateString(stateManager->GetCurrentState()) << ")!");
431  } break;
432  case 300: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Range!"); } break;
433  case 400: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Unreadable!"); } break;
434  case 500: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Parameter Out of Candidates!"); } break;
435  case 600: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Alias Not Found!"); } break;
436  default: { ATH_MSG_ERROR("G4 Command: " << commandString << " - Unknown Status!"); } break;
437  }
438 
439 }
440 
ISF::ISFParticleContainer
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)
Definition: ISFParticleContainer.h:23
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
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
iGeant4::G4LegacyTransportTool::setupEvent
virtual StatusCode setupEvent(const EventContext &, HitCollectionMap &) override
Create data containers for an event.
Definition: G4LegacyTransportTool.cxx:333
ATLAS_NOT_THREAD_SAFE
void iGeant4::G4LegacyTransportTool::initializeOnce ATLAS_NOT_THREAD_SAFE()
Install fatal handler with default options.
Definition: G4LegacyTransportTool.cxx:103
HitCollectionMap
Small wrapper around hit collection map to facilitate accessing the hit collection.
Definition: HitCollectionMap.h:21
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
HitCollectionMap.h
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
iGeant4::G4LegacyTransportTool::G4LegacyTransportTool
G4LegacyTransportTool(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition: G4LegacyTransportTool.cxx:56
G4AtlasActionInitialization.h
ISFFluxRecorder.h
G4AtlasUserWorkerInitialization
ATLAS custom class for worker initialization functionality.
Definition: G4AtlasUserWorkerInitialization.h:18
skel.it
it
Definition: skel.GENtoEVGEN.py:407
ISF::ISFParticle
Definition: ISFParticle.h:42
iGeant4::G4LegacyTransportTool::finalizeOnce
void finalizeOnce()
G4 finalization called only by the first tool instance.
Definition: G4LegacyTransportTool.cxx:237
iGeant4::G4LegacyTransportTool::finalize
virtual StatusCode finalize() override final
AlgTool finalize method.
Definition: G4LegacyTransportTool.cxx:204
python.RatesEmulationExample.lock
lock
Definition: RatesEmulationExample.py:148
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
iGeant4::G4LegacyTransportTool::Slot
Definition: G4LegacyTransportTool.h:132
iGeant4::G4LegacyTransportTool::initialize
virtual StatusCode initialize() override final
AlgTool initialize method.
Definition: G4LegacyTransportTool.cxx:66
GenParticle.h
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
ISFParticleContainer.h
G4AtlasRunManager.h
ISFParticle.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
iGeant4::G4LegacyTransportTool::simulateVector
virtual StatusCode simulateVector(const EventContext &ctx, const ISF::ISFParticleVector &particles, ISF::ISFParticleContainer &secondaries, McEventCollection *mcEventCollection, std::shared_ptr< HitCollectionMap > hitCollections, McEventCollection *shadowTruth=nullptr) override
Simulation call for vectors of particles.
Definition: G4LegacyTransportTool.cxx:268
McEventCollection.h
iGeant4::G4LegacyTransportTool::commandLog
void commandLog(int returnCode, const std::string &commandString) const
This command prints a message about a G4Command depending on its returnCode.
Definition: G4LegacyTransportTool.cxx:422
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:495
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AtlasRegionHelper.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:32
DataVector::back
const T * back() const
Access the last element in the collection as an rvalue.
G4AtlasUserWorkerInitialization.h
G4LegacyTransportTool.h
iGeant4::G4LegacyTransportTool::releaseEvent
virtual StatusCode releaseEvent(const EventContext &, HitCollectionMap &) override
Finalise data containers for an event.
Definition: G4LegacyTransportTool.cxx:354
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
iGeant4::G4LegacyTransportTool::Slot::m_mutex
mutex_t m_mutex
Definition: G4LegacyTransportTool.h:137
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
RNGWrapper.h
ISF::BaseSimulatorTool::initialize
virtual StatusCode initialize() override
Definition: BaseSimulatorTool.h:57
AtlasG4EventUserInfo.h
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
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:136
iGeant4::G4LegacyTransportTool::Slot::m_secondariesMap
std::unordered_map< ISF::ISFParticle const *, ISF::ISFParticleContainer > m_secondariesMap
Definition: G4LegacyTransportTool.h:134
PrimaryParticleInformation.h
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
iGeant4::G4LegacyTransportTool::simulate
virtual StatusCode simulate(const EventContext &ctx, ISF::ISFParticle &isp, ISF::ISFParticleContainer &secondaries, McEventCollection *mcEventCollection, std::shared_ptr< HitCollectionMap >) override
Simulation call for individual particles.
Definition: G4LegacyTransportTool.cxx:247
checker_macros.h
Define macros for attributes used to control the static checker.
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
iGeant4::G4LegacyTransportTool::genEvent
HepMC::GenEvent * genEvent(McEventCollection *mcEventCollection) const
Definition: G4LegacyTransportTool.cxx:400