ATLAS Offline Software
FatrasSimTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "./FatrasSimTool.h"
6 
7 ISF::FatrasSimTool::FatrasSimTool(const std::string& type, const std::string& name, const IInterface* parent)
9 {
10  declareProperty("UseSimulationTool", m_useExtrapolator);
11 }
12 
14 
15 }
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 
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  }
51  ISF::ISFParticle* newIsp = (isp.nextGeoID()==AtlasDetDescr::fAtlasID || isp.nextGeoID()==AtlasDetDescr::fAtlasForward) ? m_IDsimulationTool->process(isp) : m_simulationTool->process(isp);
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 }
ISF::ISFParticleContainer
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)
Definition: ISFParticleContainer.h:23
AtlasDetDescr::fAtlasForward
@ fAtlasForward
Definition: AtlasRegion.h:34
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ISF::ISFParticle
Definition: ISFParticle.h:42
ISF::FatrasSimTool::initialize
virtual StatusCode initialize() override
Definition: FatrasSimTool.cxx:17
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ISF::FatrasSimTool::simulate
virtual StatusCode simulate(ISFParticle &isp, ISFParticleContainer &, McEventCollection *) override
Definition: FatrasSimTool.cxx:40
FatrasSimTool.h
ISF::ISFParticle::nextGeoID
AtlasDetDescr::AtlasRegion nextGeoID() const
next geoID the particle will be simulated in
ISF::FatrasSimTool::FatrasSimTool
FatrasSimTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: FatrasSimTool.cxx:7
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
ISF::BaseSimulatorTool
Definition: BaseSimulatorTool.h:36
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AtlasDetDescr::fAtlasID
@ fAtlasID
Definition: AtlasRegion.h:33
ISF::FatrasSimTool::m_useExtrapolator
bool m_useExtrapolator
Boolean used to run with the old extrapolator setup.
Definition: FatrasSimTool.h:42
ISF::BaseSimulatorTool::initialize
virtual StatusCode initialize() override
Definition: BaseSimulatorTool.h:59
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ISF::FatrasSimTool::~FatrasSimTool
~FatrasSimTool()
Definition: FatrasSimTool.cxx:13
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15