ATLAS Offline Software
Loading...
Searching...
No Matches
EMExtrapolationTools.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef EGAMMATRACKTOOLS_EMEXTRAPOLATIONTOOLS_H
6#define EGAMMATRACKTOOLS_EMEXTRAPOLATIONTOOLS_H
12/********************************************************************
13NAME: EMExtrapolationTools.h
14PACKAGE: offline/Reconstruction/egammaTrackTools
15AUTHORS: T. Koffas, C.Anastopoulos
16PURPOSE: Tool which propagate track and vertices to the calorimeter cluster
17********************************************************************/
18
20#include "GaudiKernel/EventContext.h"
21#include "GaudiKernel/ToolHandle.h"
23
25
31
36
37class TRT_ID;
38class CaloDepthTool;
39
40namespace Trk {
42}
43
45 : virtual public IEMExtrapolationTools
46 , public AthAlgTool
47{
48
49public:
51 EMExtrapolationTools(const std::string& type,
52 const std::string& name,
53 const IInterface* parent);
55 virtual ~EMExtrapolationTools() = default;
56
58 virtual StatusCode initialize() override final;
59
63 const xAOD::CaloCluster& cluster,
64 const CaloDetDescrManager& caloDD) const override final;
67 virtual StatusCode getMatchAtCalo(
68 const EventContext& ctx,
69 const xAOD::CaloCluster& cluster,
70 const xAOD::TrackParticle& trkPB,
72 const std::vector<std::unique_ptr<Trk::Surface>>& surfaces,
73 std::array<double, 4>& eta,
74 std::array<double, 4>& phi,
75 std::array<double, 4>& deltaEta,
76 std::array<double, 4>& deltaPhi,
77 unsigned int extrapFrom = fromPerigee) const override final;
78
81 virtual bool matchesAtCalo(const xAOD::CaloCluster* cluster,
82 const xAOD::Vertex* vertex,
83 float etaAtCalo,
84 float phiAtCalo) const override final;
85
88 virtual bool getEtaPhiAtCalo(const EventContext& ctx,
89 const xAOD::Vertex* vertex,
90 float* etaAtCalo,
91 float* phiAtCalo) const override final;
92
95 virtual bool getEtaPhiAtCalo(const EventContext& ctx,
96 const Trk::TrackParameters* trkPar,
97 float* etaAtCalo,
98 float* phiAtCalo) const override final;
99
102 Amg::Vector3D getMomentumAtVertex(const EventContext& ctx,
103 const xAOD::Vertex&,
104 unsigned int) const override final;
105
108 Amg::Vector3D getMomentumAtVertex(const EventContext& ctx,
109 const xAOD::Vertex&,
110 bool reuse = true) const override final;
111
112private:
115 int getTRTsection(const xAOD::TrackParticle* trkPB) const;
116
118 ToolHandle<Trk::IParticleCaloExtensionTool> m_ParticleCaloExtensionTool{
119 this,
120 "CaloExtensionTool",
121 "Trk::ParticleCaloExtensionTool/EMParticleCaloExtensionTool"
122 };
123
125 ToolHandle<Trk::IExtrapolator> m_extrapolator{
126 this,
127 "Extrapolator",
128 "Trk::Extrapolator/AtlasExtrapolator"
129 };
130
131 // vertex-to-cluster match cuts used in matchesAtCalo
132 Gaudi::Property<double> m_narrowDeltaPhi{ this, "NarrowDeltaPhi", 0.05 };
133 Gaudi::Property<double> m_narrowDeltaPhiTRTbarrel{ this,
134 "NarrowDeltaPhiTRTbarrel",
135 0.02 };
136 Gaudi::Property<double> m_narrowDeltaPhiTRTendcap{ this,
137 "NarrowDeltaPhiTRTendcap",
138 0.02 };
139 Gaudi::Property<double> m_narrowDeltaEta{ this, "NarrowDeltaEta", 0.05 };
140 Gaudi::Property<double> m_TRTbarrelDeltaEta{ this,
141 "TRTbarrelDeltaEta",
142 0.35 };
143 Gaudi::Property<double> m_TRTendcapDeltaEta{ this, "TRTendcapDeltaEta", 0.2 };
144
145 // ID TRT helper
147 Gaudi::Property<bool> m_enableTRT{ this, "EnableTRT", true };
148};
149
150#endif
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
CaloCell_ID::CaloSample CaloSample
boost::graph_traits< boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS > >::vertex_descriptor Vertex
Property holding a SG store/key/clid from which a ReadHandle is made.
Eigen::Matrix< double, 3, 1 > Vector3D
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Principal data class for CaloCell clusters.
Implementation of the ICaloDepthTool interface.Given a Track direction, checks if it is in the Calori...
This class provides the client interface for accessing the detector description information common to...
ToolHandle< Trk::IParticleCaloExtensionTool > m_ParticleCaloExtensionTool
Used for extrapolation to the calo.
virtual std::pair< std::vector< CaloSampling::CaloSample >, std::vector< std::unique_ptr< Trk::Surface > > > getClusterLayerSurfaces(const xAOD::CaloCluster &cluster, const CaloDetDescrManager &caloDD) const override final
ToolHandle< Trk::IExtrapolator > m_extrapolator
Used for extrapolation to the conversion vertex.
Gaudi::Property< double > m_narrowDeltaPhi
virtual ~EMExtrapolationTools()=default
Destructor.
virtual StatusCode getMatchAtCalo(const EventContext &ctx, const xAOD::CaloCluster &cluster, const xAOD::TrackParticle &trkPB, const std::vector< CaloSampling::CaloSample > &samples, const std::vector< std::unique_ptr< Trk::Surface > > &surfaces, std::array< double, 4 > &eta, std::array< double, 4 > &phi, std::array< double, 4 > &deltaEta, std::array< double, 4 > &deltaPhi, unsigned int extrapFrom=fromPerigee) const override final
get eta, phi, deltaEta, and deltaPhi at the four calorimeter layers given the Trk::ParametersBase.
Gaudi::Property< double > m_TRTendcapDeltaEta
Gaudi::Property< double > m_TRTbarrelDeltaEta
virtual StatusCode initialize() override final
initialize method
Gaudi::Property< double > m_narrowDeltaPhiTRTendcap
Gaudi::Property< double > m_narrowDeltaEta
Amg::Vector3D getMomentumAtVertex(const EventContext &ctx, const xAOD::Vertex &, unsigned int) const override final
get the momentum of the i-th trackParticle assiciated to the vertex at vertex (designed for conversio...
virtual bool matchesAtCalo(const xAOD::CaloCluster *cluster, const xAOD::Vertex *vertex, float etaAtCalo, float phiAtCalo) const override final
test for vertex-to-cluster match given also the positions at the calorimeter from the vertex extrapol...
virtual bool getEtaPhiAtCalo(const EventContext &ctx, const xAOD::Vertex *vertex, float *etaAtCalo, float *phiAtCalo) const override final
get eta, phi at EM2 given a vertex which is converted to NeutralParameters.
int getTRTsection(const xAOD::TrackParticle *trkPB) const
Return +/- 1 (2) if track is in positive/negative TRT barrel (endcap)
Gaudi::Property< bool > m_enableTRT
Gaudi::Property< double > m_narrowDeltaPhiTRTbarrel
EMExtrapolationTools(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters.
@ fromPerigee
from the perigee of TrackParticle
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
interface for tools taking a two-track vertex and creating a neutral track from it.
STL class.
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Ensure that the ATLAS eigen extensions are properly loaded.
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
#define private