ATLAS Offline Software
IParticleCaloExtensionTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3  */
4 
73 #ifndef ITRKTRACKPARTICLECALOEXTENSIONTOOL_H
74 #define ITRKTRACKPARTICLECALOEXTENSIONTOOL_H
75 
76 #include "GaudiKernel/EventContext.h"
77 #include "GaudiKernel/IAlgTool.h"
78 #include "GaudiKernel/ThreadLocalContext.h"
81 #include "xAODBase/IParticle.h"
85 #include <memory>
86 #include <unordered_map>
87 #include <vector>
88 
90 namespace Trk {
91 static const InterfaceID
92  IID_IParticleCaloExtensionTool("Trk::IParticleCaloExtensionTool", 1, 0);
93 
95 class IParticleCaloExtensionTool : virtual public IAlgTool
96 {
97 public:
98  typedef std::unordered_map<size_t, std::unique_ptr<Trk::CaloExtension>> Cache;
99 
108  virtual std::unique_ptr<Trk::CaloExtension> caloExtension(
109  const EventContext& ctx,
110  const xAOD::IParticle& particle) const = 0;
111 
131  const EventContext& ctx,
132  const xAOD::IParticle& particle,
133  Cache& cache) const = 0;
134 
148  const xAOD::IParticle& particle,
149  const CaloExtensionCollection& cache) const = 0;
150 
168  const EventContext& ctx,
170  const std::vector<bool>& mask,
171  CaloExtensionCollection& caloextensions) const = 0;
172 
182  virtual std::unique_ptr<Trk::CaloExtension> caloExtension(
183  const EventContext& ctx,
184  const TrackParameters& startPars,
185  PropDirection propDir,
186  ParticleHypothesis particleType) const = 0;
187 
195  virtual std::vector<std::unique_ptr<Trk::Surface>> caloSurfacesFromLayers(
196  const std::vector<CaloSampling::CaloSample>& clusterLayers,
197  double eta,
198  const CaloDetDescrManager& caloDD) const = 0;
199 
214  virtual std::vector<std::pair<CaloSampling::CaloSample,
215  std::unique_ptr<const Trk::TrackParameters>>>
217  const EventContext& ctx,
218  const TrackParameters& startPars,
219  const std::vector<CaloSampling::CaloSample>& clusterLayers,
220  const std::vector<std::unique_ptr<Trk::Surface>>& caloSurfaces,
221  ParticleHypothesis particleType) const = 0;
222 
233  virtual std::vector<std::pair<CaloSampling::CaloSample,
234  std::unique_ptr<const Trk::TrackParameters>>>
236  const EventContext& ctx,
237  const TrackParameters& startPars,
238  const std::vector<CaloSampling::CaloSample>& clusterLayers,
239  double eta,
240  const CaloDetDescrManager& caloDD,
242 
243  static const InterfaceID& interfaceID();
244 };
245 
246 inline const InterfaceID&
248 {
249  return IID_IParticleCaloExtensionTool;
250 }
251 
252 } // end of namespace
253 
254 #endif
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
IParticle.h
Trk::CaloExtension
Tracking class to hold the extrapolation from a particle from the ID to the muon system (or the other...
Definition: CaloExtension.h:18
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
CaloExtension.h
Trk::IParticleCaloExtensionTool::caloExtension
virtual const Trk::CaloExtension * caloExtension(const xAOD::IParticle &particle, const CaloExtensionCollection &cache) const =0
Method to return the calo layers crossed (CaloExtension) by the IParticle track or the IParticle itse...
Trk::IParticleCaloExtensionTool::caloExtension
virtual std::unique_ptr< Trk::CaloExtension > caloExtension(const EventContext &ctx, const TrackParameters &startPars, PropDirection propDir, ParticleHypothesis particleType) const =0
Method returning a unique_ptr to the caloExtension given the relevant starting point parameters ,...
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
particleType
Definition: particleType.h:29
Trk::IParticleCaloExtensionTool::caloExtension
virtual std::unique_ptr< Trk::CaloExtension > caloExtension(const EventContext &ctx, const xAOD::IParticle &particle) const =0
Method returning the calo layers crossed by the IParticle track or the IParticle itself if it is neut...
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
Trk::IParticleCaloExtensionTool::caloExtension
virtual const Trk::CaloExtension * caloExtension(const EventContext &ctx, const xAOD::IParticle &particle, Cache &cache) const =0
Method to return the calo layers crossed (CaloExtension) by the IParticle track or the IParticle itse...
Trk::IParticleCaloExtensionTool::interfaceID
static const InterfaceID & interfaceID()
Definition: IParticleCaloExtensionTool.h:247
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloCluster.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IParticleContainer.h
Trk::ParametersBase
Definition: ParametersBase.h:55
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Trk::IParticleCaloExtensionTool
Interface for extending Particles with calo intersections.
Definition: IParticleCaloExtensionTool.h:96
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::nonInteracting
@ nonInteracting
Definition: ParticleHypothesis.h:25
Trk::IParticleCaloExtensionTool::Cache
std::unordered_map< size_t, std::unique_ptr< Trk::CaloExtension > > Cache
Definition: IParticleCaloExtensionTool.h:98
CaloExtensionCollection.h
TrackParticle.h
Trk::IParticleCaloExtensionTool::layersCaloExtension
virtual std::vector< std::pair< CaloSampling::CaloSample, std::unique_ptr< const Trk::TrackParameters > > > layersCaloExtension(const EventContext &ctx, const TrackParameters &startPars, const std::vector< CaloSampling::CaloSample > &clusterLayers, double eta, const CaloDetDescrManager &caloDD, ParticleHypothesis particleType=Trk::nonInteracting) const =0
Method returning a vector of the Track Parameters at layers/samplings.
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
Trk::IParticleCaloExtensionTool::caloSurfacesFromLayers
virtual std::vector< std::unique_ptr< Trk::Surface > > caloSurfacesFromLayers(const std::vector< CaloSampling::CaloSample > &clusterLayers, double eta, const CaloDetDescrManager &caloDD) const =0
Method returning a vector of calo surfaces give calo layers/samplings.
Trk::IParticleCaloExtensionTool::surfaceCaloExtension
virtual std::vector< std::pair< CaloSampling::CaloSample, std::unique_ptr< const Trk::TrackParameters > > > surfaceCaloExtension(const EventContext &ctx, const TrackParameters &startPars, const std::vector< CaloSampling::CaloSample > &clusterLayers, const std::vector< std::unique_ptr< Trk::Surface >> &caloSurfaces, ParticleHypothesis particleType) const =0
Method returning a vector of the Track Parameters at layers/samplings.
Trk::IParticleCaloExtensionTool::caloExtensionCollection
virtual StatusCode caloExtensionCollection(const EventContext &ctx, const xAOD::IParticleContainer &particles, const std::vector< bool > &mask, CaloExtensionCollection &caloextensions) const =0
Method that can be used by algorithms that : A.