ATLAS Offline Software
Loading...
Searching...
No Matches
EMTrackMatchBuilder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef EGAMMATOOLS_EMTRACKMATCHBUILDER_H
6#define EGAMMATOOLS_EMTRACKMATCHBUILDER_H
7
18
19// INCLUDE HEADER FILES:
22
24#include "GaudiKernel/EventContext.h"
25#include "GaudiKernel/ToolHandle.h"
27
32
33namespace Reco {
34class ITrackToVertex;
35}
36
38
40 : public AthAlgTool
41 , virtual public IEMTrackMatchBuilder
42{
43
44public:
46 EMTrackMatchBuilder(const std::string& type,
47 const std::string& name,
48 const IInterface* parent);
49
51 virtual ~EMTrackMatchBuilder() = default;
52
54 StatusCode initialize() override final;
56 virtual StatusCode executeRec(
57 const EventContext& ctx,
58 EgammaRecContainer* egammas) const override final;
59
62 StatusCode trackExecute(const EventContext& ctx,
63 egammaRec* eg,
64 const xAOD::TrackParticleContainer* trackPC,
66
69 {
70 public:
71 bool hasPix;
74 double dR;
75 double seconddR;
77 std::array<double, 4> deltaEta;
78 std::array<double, 4> deltaPhi;
79 std::array<double, 4> deltaPhiRescaled;
80 };
81
84 {
85 public:
86 TrackMatchSorter(double distance = 0.0)
87 : m_distance(distance){};
88 bool operator()(const TrackMatch& match1, const TrackMatch& match2) const;
89
90 private:
91 double m_distance;
92 };
93
96 bool inBroadWindow(const EventContext& ctx,
97 std::vector<TrackMatch>& trackMatches,
98 const xAOD::CaloCluster& cluster,
99 int trackNumber,
100 const xAOD::TrackParticle& trkPB,
101 const CaloDetDescrManager& caloDD) const;
102
104 bool isCandidateMatch(const xAOD::CaloCluster* cluster,
105 const xAOD::TrackParticle* track,
106 bool flip) const;
107
108 // configuration:
111 this,
112 "TrackParticlesName",
113 "",
114 "Name of the input track particle container"
115 };
116
118 this,
119 "CaloDetDescrManager",
120 "CaloDetDescrManager",
121 "SG Key for CaloDetDescrManager in the Condition Store"
122 };
123
125 Gaudi::Property<double> m_broadDeltaEta{ this,
126 "broadDeltaEta",
127 0.1,
128 "Value of broad cut for delta eta" };
129
131 Gaudi::Property<double> m_broadDeltaPhi{ this,
132 "broadDeltaPhi",
133 0.1,
134 "Value of broad cut for delta phi" };
135
137 Gaudi::Property<double> m_narrowDeltaEta{
138 this,
139 "narrowDeltaEta",
140 0.05,
141 "Value of narrow cut for delta eta"
142 };
143
145 Gaudi::Property<double> m_narrowDeltaPhi{
146 this,
147 "narrowDeltaPhi",
148 0.05,
149 "Value of the narrowd cut for delta phi"
150 };
151
153 Gaudi::Property<double> m_narrowDeltaPhiBrem{
154 this,
155 "narrowDeltaPhiBrem",
156 0.1,
157 "Value of the narrow cut for delta phi Brem"
158 };
159
161 Gaudi::Property<double> m_narrowDeltaPhiRescale{
162 this,
163 "narrowDeltaPhiRescale",
164 0.05,
165 "Value of the narrow cut for delta phi Rescale"
166 };
167
169 Gaudi::Property<double> m_narrowDeltaPhiRescaleBrem{
170 this,
171 "narrowDeltaPhiRescaleBrem",
172 0.1,
173 "Value of the narrow cut for delta phi Rescale Brem"
174 };
175
177 Gaudi::Property<double> m_MaxDeltaPhiRescale{
178 this,
179 "MaxDeltaPhiRescale",
180 0.25,
181 "Maximum Value of the deltaPhi rescale"
182 };
183
185 Gaudi::Property<bool> m_useCandidateMatch{
186 this,
187 "useCandidateMatch",
188 true,
189 "Boolean to use candidate matching"
190 };
191
193 Gaudi::Property<bool> m_useScoring{
194 this,
195 "useScoring",
196 true,
197 "Boolean to apply heuristic when tracks have close deltaR"
198 };
199
201 Gaudi::Property<bool> m_useRescaleMetric{ this,
202 "UseRescaleMetric",
203 true,
204 "Use Rescale Metric" };
205
207 Gaudi::Property<bool> m_SecondPassRescale{ this,
208 "SecondPassRescale",
209 true,
210 "Do second pass with rescale" };
211
213 Gaudi::Property<float> m_deltaEtaResolution{ this,
214 "DeltaEtaResolution",
215 1.0,
216 "The deltaEta resolution" };
217
218 Gaudi::Property<float> m_deltaPhiResolution{ this,
219 "DeltaPhiResolution",
220 1.0,
221 "The deltaPhi resolution" };
222
223 Gaudi::Property<float> m_deltaPhiRescaleResolution{
224 this,
225 "DeltaPhiRescaleResolution",
226 1.0,
227 "The deltaPhiRescale resolution"
228 };
229
235 Gaudi::Property<float> m_distanceForScore{
236 this,
237 "DistanceForScore",
238 0.01,
239 "The distance from which one goes from using better deltaR to using score."
240 };
241
242 ToolHandle<IEMExtrapolationTools> m_extrapolationTool{
243 this,
244 "ExtrapolationTool",
245 "EMExtrapolationTools",
246 "Name of the extrapolation tool"
247 };
248
250 Gaudi::Property<bool> m_isCosmics{ this,
251 "isCosmics",
252 false,
253 "Boolean for use of cosmics" };
254
255 // Calculated values based on resolutions
259
261};
262
263#endif
264
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
This class provides the client interface for accessing the detector description information common to...
function object to sort track matches based on quality
bool operator()(const TrackMatch &match1, const TrackMatch &match2) const
EMTrackMatchBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
Gaudi::Property< bool > m_useScoring
Boolean to apply heuristic when tracks have close deltaR.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
virtual ~EMTrackMatchBuilder()=default
Destructor.
StatusCode initialize() override final
Gaudi algorithm hooks.
Gaudi::Property< double > m_narrowDeltaPhi
narrow cut on deltaPhiRescale
virtual StatusCode executeRec(const EventContext &ctx, EgammaRecContainer *egammas) const override final
execute method
Gaudi::Property< float > m_distanceForScore
The distance from which one goes from using better deltaR to using score.
ToolHandle< IEMExtrapolationTools > m_extrapolationTool
Gaudi::Property< double > m_MaxDeltaPhiRescale
@Maximum deltaPhi (Res) allowed for a match
bool isCandidateMatch(const xAOD::CaloCluster *cluster, const xAOD::TrackParticle *track, bool flip) const
Loose track-cluster matching.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackParticlesKey
name of TrackParticle container in TDS
Gaudi::Property< double > m_narrowDeltaPhiRescale
narrow cut on deltaPhiRescale
Gaudi::Property< bool > m_useCandidateMatch
flag to turn on/off use of isCandidateMatch
bool inBroadWindow(const EventContext &ctx, std::vector< TrackMatch > &trackMatches, const xAOD::CaloCluster &cluster, int trackNumber, const xAOD::TrackParticle &trkPB, const CaloDetDescrManager &caloDD) const
Compute for tracks passing the loose matching the distance between track extrapolated to 2nd sampling...
Gaudi::Property< double > m_narrowDeltaPhiRescaleBrem
narrow cut on deltaPhiRescale for electrons
Gaudi::Property< float > m_deltaPhiRescaleResolution
Gaudi::Property< float > m_deltaPhiResolution
Gaudi::Property< bool > m_useRescaleMetric
Boolean to use Rescale in the metric.
Gaudi::Property< bool > m_isCosmics
StatusCode trackExecute(const EventContext &ctx, egammaRec *eg, const xAOD::TrackParticleContainer *trackPC, const CaloDetDescrManager &caloDD) const
execute method
Gaudi::Property< double > m_narrowDeltaEta
narrow cut on deltaEta
Gaudi::Property< bool > m_SecondPassRescale
Boolean to do second pass with Rescale.
Gaudi::Property< double > m_broadDeltaEta
broad cut on deltaEta
Gaudi::Property< double > m_broadDeltaPhi
broad cut on deltaPhi
Gaudi::Property< float > m_deltaEtaResolution
The resolutions: might be good to split in barrel/end-cap in the future.
Gaudi::Property< double > m_narrowDeltaPhiBrem
narrow cut on deltaPhi for electrons
TrackMatchSorter m_sorter
Interface for the Reconstruction/egamma/egammaTools/EMTrackMatchBuilder.
Interface class for the TrackToVertex AlgTool, for more detailed information, take a look at the head...
Property holding a SG store/key/clid from which a ReadHandle is made.
Represent an egamma object for internal egamma usage during reconstruction.
Definition egammaRec.h:31
DataVector< egammaRec > EgammaRecContainer
The container is a simple typedef for now.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
A structure for keeping track match information.
std::array< double, 4 > deltaPhiRescaled
#define private