ATLAS Offline Software
Loading...
Searching...
No Matches
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"
8
10ISF::LegacySimSvc::LegacySimSvc(const std::string& name,ISvcLocator* svc) :
11 BaseSimulationSvc(name, svc)
12{
13}
14
17{
18 m_checkToolDeps = false;
19 ATH_CHECK ( m_simulatorTool.retrieve() );
20 return StatusCode::SUCCESS;
21}
22
24{
25 return m_simulatorTool->setupEventST();
26}
27
29{
30 return m_simulatorTool->releaseEventST();
31}
32
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}
#define ATH_CHECK
Evaluate an expression and check for errors.
IParticleBroker * m_particleBroker
The particle service used to push particles into the simulation.
BaseSimulationSvc(const std::string &name, ISvcLocator *pSvcLocator)
The generic ISF particle definition,.
Definition ISFParticle.h:42
virtual StatusCode setupEvent() override
Setup Event chain - in case of a begin-of event action is needed.
virtual StatusCode initialize() override
Athena algorithm's interface methods.
virtual StatusCode releaseEvent() override
Release Event chain - in case of an end-of event action is needed.
LegacySimSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual StatusCode simulate(ISFParticle &isp, McEventCollection *mcEventCollection) override
Simulation Call.
PublicToolHandle< ISimulatorTool > m_simulatorTool
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)