ATLAS Offline Software
Geant4SimSvc.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
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  const EventContext& ctx = Gaudi::Hive::currentContext();
44  ISF::ISFParticleContainer secondaries; // filled, but not used
45  ATH_CHECK(m_simulatorTool->simulate(ctx, isp, secondaries, mcEventCollection));
46  return StatusCode::SUCCESS;
47 }
48 
51 {
52  const EventContext& ctx = Gaudi::Hive::currentContext();
53  ISF::ISFParticleContainer secondaries; // filled, but not used
54  ATH_CHECK (m_simulatorTool->simulateVector(ctx, particles,secondaries, mcEventCollection, shadowTruth));
55  return StatusCode::SUCCESS;
56 }
57 
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:50
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:228
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