ATLAS Offline Software
Loading...
Searching...
No Matches
FatrasSimTool.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#include "./FatrasSimTool.h"
6
7ISF::FatrasSimTool::FatrasSimTool(const std::string& type, const std::string& name, const IInterface* parent)
8 : BaseSimulatorTool(type, name, parent)
9{
10 declareProperty("UseSimulationTool", m_useExtrapolator);
11}
12
16
18
20
21 // retrieve simulation tool
22 ATH_CHECK( m_IDsimulationTool.retrieve() );
23
24 // retrieve simulation tool
25 if ( m_useExtrapolator ) {
26 ATH_CHECK( m_simulationTool.retrieve() );
27 }
28 else {
29 m_simulationTool.disable();
30 ATH_MSG_INFO ( "Using only Extrapolation Engine Tools...");
31 }
32
33 // retrieve particle filter
34 if ( !m_particleFilter.empty() ) {
35 ATH_CHECK( m_particleFilter.retrieve() );
36 }
37 return StatusCode::SUCCESS;
38}
39
40StatusCode ISF::FatrasSimTool::simulate( const EventContext&, ISFParticle& isp, ISFParticleContainer& secondaries, McEventCollection* ) {
41
42 // give a screen output that you entered FatrasSimSvc
43 ATH_MSG_VERBOSE( "Particle " << isp << " received for simulation." );
44
45 // now decide what to do with the particle
46 if (!m_particleFilter.empty() && !m_particleFilter->passFilter(isp)){
47 ATH_MSG_VERBOSE( "ISFParticle " << isp << " does not pass selection. Ignore.");
48 return StatusCode::SUCCESS;
49 }
52 ATH_MSG_VERBOSE( "Simulation created : " << ( newIsp ? "" : "no") << " new particle");
53
54 if (newIsp) {
55 // new particle into the stack
56 secondaries.push_back(newIsp);
57 }
58
59 // Fatras call done
60 return StatusCode::SUCCESS;
61}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
virtual StatusCode initialize() override
BaseSimulatorTool(const std::string &type, const std::string &name, const IInterface *parent)
FatrasSimTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode simulate(const EventContext &ctx, ISFParticle &isp, ISFParticleContainer &, McEventCollection *) override
virtual StatusCode initialize() override
bool m_useExtrapolator
Boolean used to run with the old extrapolator setup.
PublicToolHandle< ISF::IParticleProcessor > m_simulationTool
Pointer to the transport AlgTool.
PublicToolHandle< ISF::IParticleProcessor > m_IDsimulationTool
Track Creation & transport.
PublicToolHandle< ISF::IParticleFilter > m_particleFilter
the particle filter concerning kinematic cuts, etc.
The generic ISF particle definition,.
Definition ISFParticle.h:42
AtlasDetDescr::AtlasRegion nextGeoID() const
next geoID the particle will be simulated in
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!)