ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleCaloExtensionTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4
5/*
6 * ParticleCaloExtensionTool.h - implements the IParticleCaloExtenions
7 * Interface begin : Summer 2014
8 * updated : 2018-2019 for AthenaMT
9 * authors : Niels van Eldik (CERN PH-ATC),Christos Anastopoulos
10 */
11
12#ifndef TRKPARTICLECREATOR_PARTICLECALOEXTENSIONTOOL_H
13#define TRKPARTICLECREATOR_PARTICLECALOEXTENSIONTOOL_H
15#include "GaudiKernel/ServiceHandle.h"
16#include "GaudiKernel/ToolHandle.h"
17
18/*interface */
20
21/* interfce for the extrapolator tool*/
22
27/*
28 * xAOD includes
29 */
34
35/* monitoring */
37
38class AtlasDetectorID;
40namespace Trk {
41
42class IExtrapolator;
43
45 : virtual public IParticleCaloExtensionTool
46 , public AthAlgTool
47{
48public:
49 ParticleCaloExtensionTool(const std::string&,
50 const std::string&,
51 const IInterface*);
53
54 virtual StatusCode initialize() override final;
55 /*
56 * Implement the IParticleCaloExtension methods
57 * see IParticleCaloExtension.h for
58 * detailed documentation of the various options
59 * and methods
60 */
62 const EventContext& ctx,
63 const xAOD::IParticle& particle) const override final;
64
66 const EventContext& ctx,
67 const xAOD::IParticle& particle,
68 IParticleCaloExtensionTool::Cache& cache) const override final;
69
71 const xAOD::IParticle& particle,
72 const CaloExtensionCollection& cache) const override final;
73
74 virtual StatusCode caloExtensionCollection(
75 const EventContext& ctx,
76 const xAOD::IParticleContainer& particles,
77 const std::vector<bool>& mask,
78 CaloExtensionCollection& caloextensions) const override final;
79
81 const EventContext& ctx,
82 const TrackParameters& startPars,
83 PropDirection propDir,
85
87 const std::vector<CaloSampling::CaloSample>& clusterLayers,
88 double eta,
89 const CaloDetDescrManager& caloDD) const override final;
90
94 const EventContext& ctx,
95 const TrackParameters& startPars,
96 const std::vector<CaloSampling::CaloSample>& clusterLayers,
97 const std::vector<std::unique_ptr<Trk::Surface>>& caloSurfaces,
99
103 const EventContext& ctx,
104 const TrackParameters& startPars,
105 const std::vector<CaloSampling::CaloSample>& clusterLayers,
106 double eta,
108 ParticleHypothesis particleType) const override final;
109
110private:
111 /*
112 * Internal methods for different IParticle types
113 */
115 const EventContext& ctx,
116 const xAOD::TruthParticle& particle) const;
118 const EventContext& ctx,
119 const xAOD::NeutralParticle& particle) const;
121 const EventContext& ctx,
122 const xAOD::TrackParticle& particle) const;
123
124 ToolHandle<Trk::IExtrapolator> m_extrapolator{ this, "Extrapolator", "" };
125
127 ToolHandle<ICaloSurfaceBuilder> m_calosurf{
128 this,
129 "CaloSurfaceBuilder",
130 "",
131 "Tool to build calorimeter layer surfaces"
132 };
133
134 Gaudi::Property<std::string> m_particleTypeName{
135 this, "ParticleType", "muon",
136 "The particle type used during extrapolation when not passed via the "
137 "method interfaces"
138 ": muon, pion, nonInteracting"};
139
140 Gaudi::Property<bool> m_startFromPerigee{ this,
141 "StartFromPerigee",
142 false,
143 "Start from Perigee" };
146
147 Gaudi::Property<unsigned int> m_extrapolDetectorID{
148 this,
149 "ExtrapolationDetectorID",
150 Trk::Calo,
151 "The detector this tool should extrapolate through. Expects a "
152 "Trk::GeometrySignature enum value."
153 };
154
156 ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
157};
158} // namespace Trk
159
160#endif
Scalar eta() const
pseudorapidity method
CaloCell_ID::CaloSample CaloSample
DataVector< Trk::CaloExtension > CaloExtensionCollection
Header file to be included by clients of the Monitored infrastructure.
DataVector< IParticle > IParticleContainer
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
This class provides the client interface for accessing the detector description information common to...
Tracking class to hold the extrapolation through calorimeter Layers Both the caloEntryLayerIntersecti...
Interface class for the extrapolation AlgTool, it inherits from IAlgTool Detailed information about p...
Interface for extending Particles with calo intersections.
std::unordered_map< size_t, std::unique_ptr< Trk::CaloExtension > > Cache
virtual std::unique_ptr< Trk::CaloExtension > caloExtension(const EventContext &ctx, const xAOD::IParticle &particle) const override final
Method returning the calo layers crossed by the IParticle track or the IParticle itself if it is neut...
std::vector< std::unique_ptr< Trk::Surface > > caloSurfacesFromLayers(const std::vector< CaloSampling::CaloSample > &clusterLayers, double eta, const CaloDetDescrManager &caloDD) const override final
Method returning a vector of calo surfaces give calo layers/samplings.
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 override final
Method returning a vector of the Track Parameters at layers/samplings.
ToolHandle< ICaloSurfaceBuilder > m_calosurf
Tool to build calorimeter layer surfaces.
ParticleCaloExtensionTool(const std::string &, const std::string &, const IInterface *)
virtual StatusCode caloExtensionCollection(const EventContext &ctx, const xAOD::IParticleContainer &particles, const std::vector< bool > &mask, CaloExtensionCollection &caloextensions) const override final
Method that can be used by algorithms that : A.
ToolHandle< Trk::IExtrapolator > m_extrapolator
virtual StatusCode initialize() override final
Gaudi::Property< unsigned int > m_extrapolDetectorID
Gaudi::Property< std::string > m_particleTypeName
ToolHandle< GenericMonitoringTool > m_monTool
Monitoring tool for recording histograms of the alg in action.
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) const override final
Method returning a vector of the Track Parameters at layers/samplings.
Abstract Base Class for tracking surfaces.
STL class.
STL class.
Ensure that the ATLAS eigen extensions are properly loaded.
PropDirection
PropDirection, enum for direction of the propagation.
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
ParametersBase< TrackParametersDim, Charged > TrackParameters
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
#define private