ATLAS Offline Software
Simulation
ISF
ISF_Core
ISF_Services
src
LegacySimSvc.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 include
6
#include "
LegacySimSvc.h
"
7
#include "
ISF_Interfaces/IParticleBroker.h
"
8
10
ISF::LegacySimSvc::LegacySimSvc
(
const
std::string&
name
,ISvcLocator*
svc
) :
11
BaseSimulationSvc
(
name
,
svc
)
12
{
13
}
14
16
StatusCode
ISF::LegacySimSvc::initialize
()
17
{
18
m_checkToolDeps =
false
;
19
ATH_CHECK
( m_simulatorTool.retrieve() );
20
return
StatusCode::SUCCESS;
21
}
22
23
StatusCode
ISF::LegacySimSvc::setupEvent
()
24
{
25
return
m_simulatorTool->setupEventST();
26
}
27
28
StatusCode
ISF::LegacySimSvc::releaseEvent
()
29
{
30
return
m_simulatorTool->releaseEventST();
31
}
32
34
StatusCode
ISF::LegacySimSvc::simulate
(
ISF::ISFParticle
& isfp,
McEventCollection
* mcEventCollection)
35
{
36
const
EventContext& ctx = Gaudi::Hive::currentContext();
37
ISF::ISFParticleContainer
secondaries;
38
ATH_CHECK
(m_simulatorTool->simulate(ctx, isfp, secondaries, mcEventCollection));
39
if
(not secondaries.empty()) {
40
for
(
auto
particle
: secondaries) {
41
m_particleBroker->push(
particle
, &isfp);
42
}
43
}
44
return
StatusCode::SUCCESS;
45
}
ISF::ISFParticleContainer
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)
Definition:
ISFParticleContainer.h:23
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition:
ParticleHypothesis.h:76
IParticleBroker.h
ISF::ISFParticle
Definition:
ISFParticle.h:42
LegacySimSvc.h
ISF::LegacySimSvc::LegacySimSvc
LegacySimSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition:
LegacySimSvc.cxx:10
ISF::LegacySimSvc::simulate
virtual StatusCode simulate(ISFParticle &isp, McEventCollection *mcEventCollection) override
Simulation Call.
Definition:
LegacySimSvc.cxx:34
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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
ISF::LegacySimSvc::setupEvent
virtual StatusCode setupEvent() override
Setup Event chain - in case of a begin-of event action is needed.
Definition:
LegacySimSvc.cxx:23
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
ISF::LegacySimSvc::initialize
virtual StatusCode initialize() override
Athena algorithm's interface methods.
Definition:
LegacySimSvc.cxx:16
ISF::LegacySimSvc::releaseEvent
virtual StatusCode releaseEvent() override
Release Event chain - in case of an end-of event action is needed.
Definition:
LegacySimSvc.cxx:28
ISF::BaseSimulationSvc
Definition:
BaseSimulationSvc.h:40
Generated on Sun Dec 22 2024 21:13:51 for ATLAS Offline Software by
1.8.18