Skip to content
Snippets Groups Projects
Commit 0f912eeb authored by Christos Anastopoulos's avatar Christos Anastopoulos Committed by Julien Maurer
Browse files

ParticleCaloExtensionTool rm unneeded option

ParticleCaloExtensionTool rm unneeded option
parent 95aebc6c
No related branches found
No related tags found
3 merge requests!64457Daily merge of 23.0 into main,!64425Daily merge of 23.0 into main,!64400ParticleCaloExtensionTool rm unneeded option
......@@ -17,15 +17,17 @@
* - caloExtension : extrapolate typically from parameters
* until the exit of the calorimeter (can be changed to be
* entry in the configuration). This typically uses the STEP
* propagator via the Extrapolator. This is the most
* generic case if one wants all intersections and
* the full path inside the calo.
* propagator via the Extrapolator and the
* Tracking Geometry so to collect possible
* intersections following the full path
* inside the calo.
*
* - layersCaloExtension : Extrapolate to particular
* layers directly using the configured Propagator in the
* Extrapolator. This is faster but assumes
* Extrapolator. This can be much faster and
* needs just the Calo Detector Description but assumes
* explicit knowledge of which layer intersection to
* target
* target.
*
*
* Methods accepting IParticle :
......
......@@ -31,10 +31,11 @@ def EMParticleCaloExtensionToolCfg(flags,
name='EMParticleCaloExtensionTool',
**kwargs):
''' e/gamma configuration of the tool.
Useful when targeting a specific layer given
a cluster i.e "direct" extrapolation'''
Useful when targeting a specific layers in
"direct" extrapolation mode. It needs the
CaloSurfaceBuilder.
'''
acc = ComponentAccumulator()
kwargs.setdefault("ParticleType", "electron")
kwargs.setdefault("StartFromPerigee", True)
if "CaloSurfaceBuilder" not in kwargs:
......
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
#include "ParticleCaloExtensionTool.h"
......@@ -44,8 +44,6 @@ ParticleCaloExtensionTool::initialize()
m_particleStrategy = muon;
} else if (m_particleTypeName == "pion") {
m_particleStrategy = pion;
} else if (m_particleTypeName == "electron") {
m_particleStrategy = electron;
} else {
ATH_MSG_WARNING("Unsupported particle type, using strategy based on type "
<< m_particleTypeName);
......@@ -57,7 +55,9 @@ ParticleCaloExtensionTool::initialize()
}
ATH_MSG_INFO(" Using strategy based on particle type "
<< m_particleTypeName << " enum value " << m_particleStrategy);
if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
if (!m_monTool.empty()) {
ATH_CHECK(m_monTool.retrieve());
}
return StatusCode::SUCCESS;
}
......@@ -213,23 +213,12 @@ ParticleCaloExtensionTool::caloExtension(
* the strategy we want to follow for muons.
* But should also work well as a generic
* strategy.
*
* For electrons the extrapolation will be done as
* a muon (we want close to non-interacting)
*/
// Start with what the user opted as strategy
ParticleHypothesis particleType = m_particleStrategy;
// special treatment when we want an electron strategy
if (m_particleStrategy == electron) {
particleType = muon;
}
if (particle.particleHypothesis() == xAOD::electron) {
particleType = muon;
}
// In principle we will extrapolate either from the perigee or
// wee extrapolate either from the perigee or
// from the last measurement.
if (m_startFromPerigee || !particle.track()) {
bool idExit = true;
......
......@@ -57,7 +57,8 @@ public:
/*
* Implement the IParticleCaloExtension methods
* see IParticleCaloExtension.h for
* documentation
* detailed documentation of the various options
* and methods
*/
virtual std::unique_ptr<Trk::CaloExtension> caloExtension(
const EventContext& ctx,
......@@ -131,13 +132,13 @@ private:
"",
"Tool to build calorimeter layer surfaces"
};
Gaudi::Property<std::string> m_particleTypeName{
this,
"ParticleType",
"muon",
"The particle type used to decide for the extrapolation strategy"
": muon, pion, electron,nonInteracting"
};
this, "ParticleType", "muon",
"The particle type used during extrapolation when not passed via the "
"method interfaces"
": muon, pion, nonInteracting"};
Gaudi::Property<bool> m_startFromPerigee{ this,
"StartFromPerigee",
false,
......
......@@ -27,7 +27,6 @@ EMParticleCaloExtensionTool = ToolFactory(
CfgMgr.Trk__ParticleCaloExtensionTool,
name="EMParticleCaloExtensionTool",
Extrapolator=egammaCaloExtrapolator,
ParticleType="electron",
CaloSurfaceBuilder=egCaloSurfaceBuilder,
StartFromPerigee=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment