ATLAS Offline Software
Loading...
Searching...
No Matches
EMTrackMatchBuilder.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3 */
4
5
7
10
15
19
20#include "GaudiKernel/EventContext.h"
22
23
25
27 const std::string& name,
28 const IInterface* parent)
29 : AthAlgTool(type, name, parent)
30{
31 // declare interface
32 declareInterface<IEMTrackMatchBuilder>(this);
33}
34
35StatusCode
37{
38 ATH_CHECK(m_TrackParticlesKey.initialize());
39 ATH_CHECK(m_caloDetDescrMgrKey.initialize());
40 // the extrapolation tool
42
43 // set things up for the sorting
48
49 return StatusCode::SUCCESS;
50}
51
52StatusCode
53EMTrackMatchBuilder::executeRec(const EventContext& ctx,
54 EgammaRecContainer* egammas) const
55{
56 // protection against bad pointers
57 if (egammas == nullptr) {
58 return StatusCode::SUCCESS;
59 }
60 // retrieve the trackparticle container
62 ctx);
63
64 SG::ReadCondHandle<CaloDetDescrManager> caloDetDescrMgrHandle{
66 };
67 ATH_CHECK(caloDetDescrMgrHandle.isValid());
68
69 const CaloDetDescrManager* caloDD = *caloDetDescrMgrHandle;
70
71 // check is only used for serial running; remove when MT scheduler used
72 ATH_CHECK(trackPC.isValid());
73 // Loop over calling the trackExecute method
74 for (egammaRec* eg : *egammas) {
75 // retrieve the cluster
76 ATH_CHECK(trackExecute(ctx, eg, trackPC.cptr(), *caloDD));
77 }
78 return StatusCode::SUCCESS;
79}
80
81StatusCode
82EMTrackMatchBuilder::trackExecute(const EventContext& ctx,
83 egammaRec* eg,
84 const xAOD::TrackParticleContainer* trackPC,
85 const CaloDetDescrManager& caloDD) const
86{
87 if (!eg || !trackPC) {
89 "trackExecute: NULL pointer to egammaRec or TrackParticleContainer");
90 return StatusCode::SUCCESS;
91 }
92 // retrieve corresponding cluster
93 const xAOD::CaloCluster* cluster = eg->caloCluster();
94 // check if the cluster is sane
95 if (!cluster){
96 ATH_MSG_WARNING("trackExecute: cluster ptr is null! Ignoring cluster.");
97 return StatusCode::SUCCESS;
98 }
99 if (cluster->e() == 0.0) {
100 ATH_MSG_WARNING("trackExecute: cluster energy is 0.0! Ignoring cluster.");
101 return StatusCode::SUCCESS;
102 }
103
104 // Loop over tracks and fill TrackMatch vector
105 std::vector<TrackMatch> trkMatches;
107 for (unsigned int trackNumber = 0; trkIt != trackPC->end();
108 ++trkIt, ++trackNumber) {
109 // Avoid TRT alone
110 if (xAOD::EgammaHelpers::numberOfSiHits(*trkIt) < 4) {
111 continue;
112 }
113 /*
114 * Try with normal directions.
115 * For cosmics allow a retry with inverted direction.
116 */
117 if (isCandidateMatch(cluster, (*trkIt), false)) {
118 inBroadWindow(ctx, trkMatches, *cluster, trackNumber, (**trkIt), caloDD);
119 }
120 }
121
122 if (!trkMatches.empty()) {
123 // sort the track matches
124 std::sort(trkMatches.begin(), trkMatches.end(), m_sorter);
125 // set the matching values
126 TrackMatch bestTrkMatch = trkMatches.at(0);
127 eg->setDeltaEta(bestTrkMatch.deltaEta);
128 eg->setDeltaPhi(bestTrkMatch.deltaPhi);
129 eg->setDeltaPhiRescaled(bestTrkMatch.deltaPhiRescaled);
130 eg->setDeltaPhiLast(bestTrkMatch.deltaPhiLast);
131
132 // set the element Links
134 std::vector<EL> trackParticleLinks;
135 trackParticleLinks.reserve(trkMatches.size());
136 const std::string key = EL(*trackPC, 0, ctx).dataID();
137 for (const TrackMatch& m : trkMatches) {
138 ATH_MSG_DEBUG("Match dR: " << m.dR << " second dR: " << m.seconddR
139 << " hasPix: " << m.hasPix
140 << " hitsScore: " << m.hitsScore);
141 if (key.empty()) {
142 trackParticleLinks.emplace_back(*trackPC, m.trackNumber, ctx);
143 } else {
144 trackParticleLinks.emplace_back(key, m.trackNumber, ctx);
145 }
146 }
147 eg->setTrackParticles(trackParticleLinks);
148 }
149 return StatusCode::SUCCESS;
150}
151
152bool
154 std::vector<TrackMatch>& trackMatches,
155 const xAOD::CaloCluster& cluster,
156 int trackNumber,
157 const xAOD::TrackParticle& trkPB,
158 const CaloDetDescrManager& caloDD) const
159{
160
163
164 // Now get the delta eta/phi and eta correction at the calorimeter
165 // final arrays that we will write
166 // Save the value of deltaPhiRescale. If we do not use rescaled
167 // perigee, we recalculate deltaPhi using rescaled momentum. This
168 // will be saved in EMTrackMatch
169 std::array<double, 4> eta = { -999.0, -999.0, -999.0, -999.0 };
170 std::array<double, 4> phi = { -999.0, -999.0, -999.0, -999.0 };
171 std::array<double, 4> deltaEta = { -999.0, -999.0, -999.0, -999.0 };
172 std::array<double, 4> deltaPhi = { -999.0, -999.0, -999.0, -999.0 };
173
174 /*
175 * Try both from perigee
176 * and from perigee Rescale.
177 *
178 * We need anyhow both to be there at the end.
179 */
180 std::pair<std::vector<CaloSampling::CaloSample>,
181 std::vector<std::unique_ptr<Trk::Surface>>>
182 layersAndSurfaces =
183 m_extrapolationTool->getClusterLayerSurfaces(cluster, caloDD);
185 ->getMatchAtCalo(ctx,
186 cluster,
187 trkPB,
188 layersAndSurfaces.first,
189 layersAndSurfaces.second,
190 eta,
191 phi,
192 deltaEta,
193 deltaPhi,
194 extrapFrom)
195 .isFailure()) {
196 return false;
197 }
198
201 std::array<double, 4> etaRes = { -999.0, -999.0, -999.0, -999.0 };
202 std::array<double, 4> phiRes = { -999.0, -999.0, -999.0, -999.0 };
203 std::array<double, 4> deltaEtaRes = { -999.0, -999.0, -999.0, -999.0 };
204 std::array<double, 4> deltaPhiRes = { -999.0, -999.0, -999.0, -999.0 };
205
207 ->getMatchAtCalo(ctx,
208 cluster,
209 trkPB,
210 layersAndSurfaces.first,
211 layersAndSurfaces.second,
212 etaRes,
213 phiRes,
214 deltaEtaRes,
215 deltaPhiRes,
216 extrapFromRes)
217 .isFailure()) {
218 return false;
219 }
220
221 double deltaPhiRescale = deltaPhiRes[2];
222 /*
223 * Sanity check for very far away matches
224 * The assumption is when we rescale we should be in the
225 * correct neighborhood for a valid track-cluster pair.
226 */
227 if (std::abs(deltaPhiRes[2]) > m_MaxDeltaPhiRescale) {
228 ATH_MSG_DEBUG("DeltaPhiRescaled above maximum: "
229 << deltaPhiRes[2] << " (max: " << m_MaxDeltaPhiRescale
230 << ")");
231 return false;
232 }
233 /*
234 * Try to match : First standard way.
235 * If this fails and the cluster Et is larger than the track Pt
236 * it might get matched only under the rescaled assumption that
237 * should be less sensitive to radiative losses.
238 */
239 if (std::abs(deltaEta[2]) < m_narrowDeltaEta && deltaPhi[2] < m_narrowDeltaPhi &&
241 ATH_MSG_DEBUG("Matched with Perigee");
242 } else if (m_SecondPassRescale && cluster.et() > trkPB.pt() &&
243 std::abs(deltaEtaRes[2]) < m_narrowDeltaEta &&
244 deltaPhiRes[2] < m_narrowDeltaPhiRescale &&
245 deltaPhiRes[2] > -m_narrowDeltaPhiRescaleBrem) {
246 ATH_MSG_DEBUG("Not Perigee but matched with Rescale");
247 } else {
248 ATH_MSG_DEBUG("Normal matched Failed deltaPhi/deltaEta "
249 << deltaPhi[2] << " / " << deltaEta[2]);
250 ATH_MSG_DEBUG("Rescaled matched Failed deltaPhi/deltaEta "
251 << deltaPhiRes[2] << " / " << deltaEtaRes[2]);
252 return false;
253 }
254
255 // Always the deltaPhiLast will be from the last measurement
258 std::array<double, 4> eta1 = { -999.0, -999.0, -999.0, -999.0 };
259 std::array<double, 4> phi1 = { -999.0, -999.0, -999.0, -999.0 };
260 std::array<double, 4> deltaEta1 = { -999.0, -999.0, -999.0, -999.0 };
261 std::array<double, 4> deltaPhi1 = { -999.0, -999.0, -999.0, -999.0 };
262
264 ->getMatchAtCalo(ctx,
265 cluster,
266 trkPB,
267 layersAndSurfaces.first,
268 layersAndSurfaces.second,
269 eta1,
270 phi1,
271 deltaEta1,
272 deltaPhi1,
273 extrapFrom1)
274 .isFailure()) {
275 ATH_MSG_DEBUG("Extrapolation from last measurement failed");
276 return false;
277 }
278 double deltaPhiLast = deltaPhi1[2];
279 ATH_MSG_DEBUG("Rescale dPhi " << deltaPhiRescale);
280 ATH_MSG_DEBUG("dPhi Last measurement " << deltaPhiLast);
281 /*
282 * Done with extrapolation
283 * Lets do the matching logic
284 */
285 TrackMatch trkmatch{};
286 // Add the matching variable to the TrackMAtch
287 trkmatch.deltaEta = deltaEta;
288 trkmatch.deltaPhi = deltaPhi;
289 trkmatch.deltaPhiRescaled = deltaPhiRes;
290 trkmatch.deltaPhiLast = deltaPhiLast;
291
292 // Variables used for the sorting. Note both dPhi's will be used.
293 trkmatch.trackNumber = trackNumber;
294 if (m_useRescaleMetric) {
295 trkmatch.dR = sqrt(std::pow(m_deltaEtaWeight * deltaEta[2], 2) +
296 std::pow(m_deltaPhiRescaleWeight * deltaPhiRescale, 2));
297 trkmatch.seconddR = sqrt(std::pow(m_deltaEtaWeight * deltaEta[2], 2) +
298 std::pow(m_deltaPhiWeight * deltaPhi[2], 2));
299 } else {
300 trkmatch.dR = sqrt(std::pow(m_deltaEtaWeight * deltaEta[2], 2) +
301 std::pow(m_deltaPhiWeight * deltaPhi[2], 2));
302 trkmatch.seconddR =
303 sqrt(std::pow(m_deltaEtaWeight * deltaEta[2], 2) +
304 std::pow(m_deltaPhiRescaleWeight * deltaPhiRescale, 2));
305 }
306 ATH_MSG_DEBUG(" DR " << trkmatch.dR << " deltaPhi " << deltaPhi[2]
307 << " deltaEta " << deltaEta[2]);
308 /*
309 * The first thing is
310 * Prefer pixel over SCT only
311 */
312 // Check number of pixel hits
313 int nPixel = summaryValueInt(trkPB, xAOD::numberOfPixelDeadSensors, 0);
314 nPixel += summaryValueInt(trkPB, xAOD::numberOfPixelHits, 0);
315 trkmatch.hasPix = (nPixel > 0);
316
317 /*
318 * Seconday hitsScore score based on hits to be used
319 * for track that are very close
320 * to each other at the calo i.e similar dR with cluster,
321 * pick the longest possible one
322 */
323 trkmatch.hitsScore = 0;
324 if (m_useScoring) {
325 // Check the 2 innermost layers
326 int nInnerMost = summaryValueInt(trkPB, xAOD::numberOfInnermostPixelLayerHits, 0);
327 int expectInnermostPixelLayerHit = summaryValueInt(trkPB, xAOD::expectInnermostPixelLayerHit, 0);
328 int nNextToInnerMost = summaryValueInt(trkPB, xAOD::numberOfNextToInnermostPixelLayerHits, 0);
329 int expectNextToInnermostPixelLayerHit = summaryValueInt(trkPB, xAOD::expectNextToInnermostPixelLayerHit, 0);
330
331 // Secondary score , find the longest track possible,
332 // i.e the one with the most inner hists in the pixel
333 // npixel*5
334 trkmatch.hitsScore += (nPixel * 5);
335 // Extra points for NextToInnermost
336 if (!expectNextToInnermostPixelLayerHit || nNextToInnerMost > 0) {
337 trkmatch.hitsScore += 5;
338 }
339 // Extra points for Innermost
340 if (!expectInnermostPixelLayerHit || nInnerMost > 0) {
341 trkmatch.hitsScore += 10;
342 }
343 }
344 ATH_MSG_DEBUG("hasPix : " << trkmatch.hasPix
345 << " hitsScore : " << trkmatch.hitsScore);
346
347 trackMatches.push_back(trkmatch);
348 return true;
349}
350
351bool
353 const xAOD::TrackParticle* track,
354 bool flip) const
355{
356 // loose cluster-track matching
357 if (!m_useCandidateMatch) {
358 return true;
359 }
360
361 // Tracking
362 const Trk::Perigee& candidatePerigee = track->perigeeParameters();
363 // Decide whether to try the opposite direction (cosmics)
364 const double trkPhi = (!flip) ? candidatePerigee.parameters()[Trk::phi]
365 : -candidatePerigee.parameters()[Trk::phi];
366 const double trkEta =
367 (!flip) ? candidatePerigee.eta() : -candidatePerigee.eta();
368 const double z_perigee = candidatePerigee.position().z();
369 const double r_perigee = candidatePerigee.position().perp();
370 const Amg::Vector3D PerigeeXYZPosition(candidatePerigee.position().x(),
371 candidatePerigee.position().y(),
372 z_perigee);
373 // Cluster variables
374 const double clusterEta = cluster->eta();
375 const bool isEndCap = !xAOD::EgammaHelpers::isBarrel(cluster);
376 const double Et = cluster->e() / cosh(trkEta);
377 const double clusterPhi = cluster->phi();
378
379 // Avoid clusters with |eta| > 10 or Et less than 10 MeV
380 if (std::abs(clusterEta) > 10.0 || Et < 10) {
381 return false;
382 }
383 // Calculate the eta/phi of the cluster as would be seen from the perigee
384 // position of the Track
385 const Amg::Vector3D XYZClusterWrtTrackPerigee =
387 *cluster, PerigeeXYZPosition, isEndCap);
388
389 const double clusterEtaCorrected = XYZClusterWrtTrackPerigee.eta();
390 // check eta match . Both metrics need to fail in order to disgard the track
391 if ((std::abs(clusterEta - trkEta) > 2. * m_broadDeltaEta) &&
392 (std::abs(clusterEtaCorrected - trkEta) > 2. * m_broadDeltaEta)) {
393 ATH_MSG_DEBUG(" Fails broad window eta match (track eta, cluster eta, "
394 "cluster eta corrected): ( "
395 << trkEta << ", " << clusterEta << ", " << clusterEtaCorrected
396 << ")");
397 return false;
398 }
399 // Calculate the possible rotation of the track
400 // Once assuming the cluster Et being the better estimate (e.g big brem)
401 const double phiRotRescaled = CandidateMatchHelpers::PhiROT(
402 Et, trkEta, track->charge(), r_perigee, isEndCap);
403 // And also assuming the track Pt being correct
404 const double phiRotTrack = CandidateMatchHelpers::PhiROT(
405 track->pt(), trkEta, track->charge(), r_perigee, isEndCap);
406 //
407 const double clusterPhiCorrected = XYZClusterWrtTrackPerigee.phi();
408 // deltaPhi between the track and the cluster
409 const double deltaPhiStd = P4Helpers::deltaPhi(clusterPhiCorrected, trkPhi);
410 // deltaPhi between the track and the cluster accounting for rotation assuming
411 // cluster Et is a better estimator
412 const double trkPhiRescaled = P4Helpers::deltaPhi(trkPhi, phiRotRescaled);
413 const double deltaPhiRescaled =
414 P4Helpers::deltaPhi(clusterPhiCorrected, trkPhiRescaled);
415 // deltaPhi between the track and the cluster accounting for rotation
416 const double trkPhiCorrTrack = P4Helpers::deltaPhi(trkPhi, phiRotTrack);
417 const double deltaPhiTrack =
418 P4Helpers::deltaPhi(clusterPhiCorrected, trkPhiCorrTrack);
419
420 // It has to fail all phi metrics in order to be disgarded
421 if ((std::abs(deltaPhiRescaled) > 2. * m_broadDeltaPhi) &&
422 (std::abs(deltaPhiTrack) > 2. * m_broadDeltaPhi) &&
423 (std::abs(deltaPhiStd) > 2. * m_broadDeltaPhi)) {
424
426 "FAILS broad window phi match (track phi, phirotCluster , phiRotTrack , "
427 << "cluster phi corrected, cluster phi): ( " << trkPhi << ", "
428 << phiRotRescaled << ", " << phiRotTrack << ", " << clusterPhiCorrected
429 << ", " << clusterPhi << ")");
430
431 return false;
432 }
433 // if not false returned we end up here
434 return true;
435}
436
437bool
440 const EMTrackMatchBuilder::TrackMatch& match2) const
441{
442 if (match1.hasPix != match2.hasPix) { // prefer pixels first
443 return match1.hasPix;
444 }
445 // sqrt(0.025**2)*sqrt(2)/sqrt(12) ~ 0.01
446 if (std::abs(match1.dR - match2.dR) < m_distance) {
447
448 if (std::abs(match1.seconddR - match2.seconddR) >
449 m_distance) { // Can the second distance separate them?
450 return match1.seconddR < match2.seconddR;
451 }
452 if ((match1.hitsScore != match2.hitsScore)) { // use the one with more pixel
453 return match1.hitsScore > match2.hitsScore;
454 }
455 }
456 // closest DR
457 return match1.dR < match2.dR;
458}
int summaryValueInt(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, int deflt=-999)
return the summary value for a TrackParticle or default value (-999) (to be used mostly in python whe...
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
Handle class for reading from StoreGate.
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...
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:861
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
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
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.
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
TrkExtrapDef
Enum for track extrapolation to calo.
@ fromPerigee
from the perigee of TrackParticle
@ fromLastMeasurement
from the last measurement of TrackParticle
@ fromPerigeeRescaled
from the perigee of TrackParticle recaled by Ecluster
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
double eta() const
Access method for pseudorapidity - from momentum.
const Amg::Vector3D & position() const
Access method for the position.
Represent an egamma object for internal egamma usage during reconstruction.
Definition egammaRec.h:31
void setDeltaEta(const std::array< double, 4 > &deltaEtas)
set deltaEta at pre sampler(0) -> 3rd sampling(3)
void setDeltaPhiLast(double value)
set deltaPhi at sampling 2 from Last track Measurement
void setDeltaPhiRescaled(std::array< double, 4 > &deltaPhis)
set deltaPhi at sampling for rescaled momentum extrapolation from the perigee.
void setTrackParticles(const std::vector< ElementLink< xAOD::TrackParticleContainer > > &links)
Set the ElementLinks to the xAOD::TrackParticle/s that match the electron candidate.
void setDeltaPhi(const std::array< double, 4 > &deltaPhis)
set Phi of track extrapolated at pre sampler(0) -> 3rd sampling(3)
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Definition egammaRec.cxx:8
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double e() const
The total energy of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
DataVector< egammaRec > EgammaRecContainer
The container is a simple typedef for now.
Eigen::Matrix< double, 3, 1 > Vector3D
double PhiROT(const double pt, const double eta, const int charge, const double r_start, const bool isEndCap)
Function to calculate the approximate rotation in phi/bending of a track until it reaches the calo.
Amg::Vector3D approxXYZwrtPoint(const xAOD::CaloCluster &cluster, const Amg::Vector3D &point, const bool isEndCap)
Function to get the (x,y,z) of the cluster wrt to a point (x0,y0,z0).
This module defines the arguments passed from the BATCH driver to the BATCH worker.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition P4Helpers.h:34
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ phi
Definition ParamDefs.h:75
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
bool isBarrel(const xAOD::Egamma *eg)
return true if the cluster is in the barrel
int summaryValueInt(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, int deflt=-999)
return the summary value for a TrackParticle or default value (-999) (to be used mostly in python whe...
std::size_t numberOfSiHits(const xAOD::TrackParticle *tp)
return the number of Si hits in the track particle
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
A structure for keeping track match information.
std::array< double, 4 > deltaPhiRescaled