ATLAS Offline Software
Geant4SimSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // class header
6 #include "Geant4SimSvc.h"
7 
9 iGeant4::Geant4SimSvc::Geant4SimSvc(const std::string& name,ISvcLocator* svc) :
10  BaseSimulationSvc(name, svc)
11 {
12 }
13 
15 {}
16 
19 {
20  ATH_CHECK (m_simulatorTool.retrieve());
21  return StatusCode::SUCCESS;
22 }
23 
26 {
27  return StatusCode::SUCCESS;
28 }
29 
31 {
32  return m_simulatorTool->setupEventST();
33 }
34 
36 {
37  return m_simulatorTool->releaseEventST();
38 }
39 
42 {
43  ISF::ISFParticleContainer secondaries; // filled, but not used
44  ATH_CHECK(m_simulatorTool->simulate(isp, secondaries, mcEventCollection));
45  return StatusCode::SUCCESS;
46 }
47 
50 {
51  ISF::ISFParticleContainer secondaries; // filled, but not used
52  ATH_CHECK (m_simulatorTool->simulateVector(particles,secondaries, mcEventCollection, shadowTruth));
53  return StatusCode::SUCCESS;
54 }
55 
ISF::ISFParticleContainer
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)
Definition: ISFParticleContainer.h:23
Geant4SimSvc.h
iGeant4::Geant4SimSvc::simulateVector
virtual StatusCode simulateVector(const ISF::ISFParticleVector &particles, McEventCollection *mcEventCollection, McEventCollection *shadowTruth=nullptr) override
Simulation Call for vector of ISF particles.
Definition: Geant4SimSvc.cxx:49
iGeant4::Geant4SimSvc::Geant4SimSvc
Geant4SimSvc()
Default constructor.
ISF::ISFParticle
Definition: ISFParticle.h:42
iGeant4::Geant4SimSvc::finalize
virtual StatusCode finalize() override
framework methods
Definition: Geant4SimSvc.cxx:25
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ISF::ISFParticleVector
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
Definition: ISFParticleContainer.h:26
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
iGeant4::Geant4SimSvc::setupEvent
virtual StatusCode setupEvent() override
Setup Event chain - in case of a begin-of event action is needed.
Definition: Geant4SimSvc.cxx:30
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
iGeant4::Geant4SimSvc::~Geant4SimSvc
virtual ~Geant4SimSvc()
Destructor.
Definition: Geant4SimSvc.cxx:14
iGeant4::Geant4SimSvc::releaseEvent
virtual StatusCode releaseEvent() override
Release Event chain - in case of an end-of event action is needed.
Definition: Geant4SimSvc.cxx:35
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
iGeant4::Geant4SimSvc::initialize
virtual StatusCode initialize() override
Athena algorithm's interface methods.
Definition: Geant4SimSvc.cxx:18
iGeant4::Geant4SimSvc::simulate
virtual StatusCode simulate(ISF::ISFParticle &isp, McEventCollection *mcEventCollection) override
Simulation Call
Definition: Geant4SimSvc.cxx:41