ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleKillerSimTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7ISF::ParticleKillerSimTool::ParticleKillerSimTool(const std::string& type, const std::string& name, const IInterface* parent)
8 : BaseSimulatorTool(type, name, parent)
9{
10}
11
15
17 return StatusCode::SUCCESS;
18}
19
21
22 // give a screen output that you entered ParticleKillerSimSvc
23 ATH_MSG_VERBOSE( "Particle '" << isp << "' received for simulation." );
24 ATH_MSG_VERBOSE( "Killing this particle, since this"
25 << "is the soul purpose of this 'simulation engine'." );
26
27 // particle 'simulation' done
28 // (memory management, ie delete, of the ISFParticle is done inside the ISFKernel)
29 return StatusCode::SUCCESS;
30}
31
32StatusCode ISF::ParticleKillerSimTool::simulateVector(const EventContext& ctx, const ISFParticleVector& particles, ISFParticleContainer& secondaries, McEventCollection* mcEventCollection, McEventCollection *) {
33 for (auto isp : particles) {
34 ATH_CHECK(simulate(ctx, *isp, secondaries, mcEventCollection));
35 }
36 return StatusCode::SUCCESS;
37}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
BaseSimulatorTool(const std::string &type, const std::string &name, const IInterface *parent)
The generic ISF particle definition,.
Definition ISFParticle.h:42
virtual StatusCode initialize() override
ParticleKillerSimTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode simulate(const EventContext &ctx, ISFParticle &isp, ISFParticleContainer &, McEventCollection *) override
virtual StatusCode simulateVector(const EventContext &ctx, const ISFParticleVector &particles, ISFParticleContainer &, McEventCollection *, McEventCollection *) override
Simulation call for vectors of particles.
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!)
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.