ATLAS Offline Software
EMExtrapolationTools.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #include "EMExtrapolationTools.h"
8 
9 // extrapolation
10 #include "InDetIdentifier/TRT_ID.h"
13 //
16 #include "xAODTracking/Vertex.h"
17 //
19 #include "TrkTrack/Track.h"
20 //
21 #include "FourMomUtils/P4Helpers.h"
22 #include "GaudiKernel/EventContext.h"
25 //
26 #include <tuple>
27 
28 namespace {
29 /*
30  * Create Rescaled Perigee Parametrs
31  */
33 getRescaledPerigee(const xAOD::TrackParticle& trkPB,
34  const xAOD::CaloCluster& cluster)
35 {
36  // copy over the one of the input track particle
37  Trk::Perigee perigee = trkPB.perigeeParameters();
38  // we rescale q/p
39  AmgVector(5) rescaled;
40  rescaled << trkPB.d0(), trkPB.z0(), trkPB.phi0(), trkPB.theta(),
41  trkPB.charge() / cluster.e();
42  perigee.setParameters(rescaled);
43 
44  return perigee;
45 }
46 
47 template <std::size_t N>
48 void
49 getClusterLayers(const std::array<CaloSampling::CaloSample, N>& srcLayers,
50  std::vector<CaloSampling::CaloSample>& destLayers,
51  const xAOD::CaloCluster& cluster) {
52  for (const CaloSampling::CaloSample lay : srcLayers) {
53  if (cluster.hasSampling(lay)) {
54  destLayers.emplace_back(lay);
55  }
56  }
57 }
58 
59 } // end of anonymous namespace
60 
62  const std::string& name,
63  const IInterface* parent)
65  , m_trtId(nullptr)
66 {
67  declareInterface<IEMExtrapolationTools>(this);
68 }
69 
72 {
73 
74  ATH_MSG_DEBUG("Initializing " << name() << "...");
75  // Retrieve tools
77  ATH_CHECK(m_extrapolator.retrieve());
78 
79  // retrieve TRT-ID helper
80  if (m_enableTRT && detStore()->contains<TRT_ID>("TRT_ID")) {
81  StatusCode sc = detStore()->retrieve(m_trtId, "TRT_ID");
82  if (sc.isFailure() || !m_trtId->is_valid()) {
83  // TRT is not present for sLHC
84  ATH_MSG_DEBUG("Could not get TRT_ID helper !");
85  m_trtId = nullptr;
86  }
87  ATH_MSG_DEBUG("m_trtId initialization successful");
88  } else {
89  ATH_MSG_DEBUG("Could not get TRT_ID helper !");
90  }
91  return StatusCode::SUCCESS;
92 }
93 
94 std::pair<std::vector<CaloSampling::CaloSample>,
95  std::vector<std::unique_ptr<Trk::Surface>>>
97  const xAOD::CaloCluster& cluster,
98  const CaloDetDescrManager& caloDD) const
99 {
100  // figure which layer we need
101  // based on the where most of the energy of the cluster
102  // is we might want to do EM barrel, EM endCap
103  // or forward calo layers/samplings
104  constexpr std::array<CaloSampling::CaloSample, 4> barrelLayers = {
109  };
110  constexpr std::array<CaloSampling::CaloSample, 4> endcapLayers = {
115  };
116  constexpr std::array<CaloSampling::CaloSample, 4> endcapLayersAboveEta2p5 = {
119  };
120  constexpr std::array<CaloSampling::CaloSample, 1> forwardLayers = {
122  };
123 
124  std::vector<CaloSampling::CaloSample> clusterLayers;
125  clusterLayers.reserve(4);
126 
127  if (cluster.inBarrel() && (!cluster.inEndcap() ||
128  cluster.eSample(CaloSampling::EMB2) >=
129  cluster.eSample(CaloSampling::EME2))) {
130  getClusterLayers(barrelLayers, clusterLayers, cluster);
131  }
132  else if (cluster.eSample(CaloSampling::EME2) >
133  cluster.eSample(CaloSampling::FCAL0)) {
134  if(std::abs(cluster.eta()) < 2.5){
135  getClusterLayers(endcapLayers, clusterLayers, cluster);
136  }
137  else {
138  getClusterLayers(endcapLayersAboveEta2p5, clusterLayers, cluster);
139  }
140  }
141  else {
142  getClusterLayers(forwardLayers, clusterLayers, cluster);
143  }
144 
145  std::vector<std::unique_ptr<Trk::Surface>> caloSurfaces =
146  m_ParticleCaloExtensionTool->caloSurfacesFromLayers(
147  clusterLayers, cluster.eta(), caloDD);
148 
149  return { std::move(clusterLayers), std::move(caloSurfaces) };
150 }
151 
152 /*
153  * This is the method that does the heavy lifting for the
154  * electrons extrapolations. Handles multipe extrapolation modes.
155  */
158  const EventContext& ctx,
159  const xAOD::CaloCluster& cluster,
160  const xAOD::TrackParticle& trkPB,
161  const std::vector<CaloSampling::CaloSample>& samples,
162  const std::vector<std::unique_ptr<Trk::Surface>>& surfaces,
163  std::array<double, 4>& eta,
164  std::array<double, 4>& phi,
165  std::array<double, 4>& deltaEta,
166  std::array<double, 4>& deltaPhi,
167  unsigned int extrapFrom) const
168 {
169  /* Extrapolate track to calo and return
170  * the extrapolated eta/phi and
171  * the deta/dphi between cluster and track
172  * We allow different ways to extrapolate:
173  * 1) from the last measurement track parameters (this is always the case for
174  * TRT standalone)
175  * 2) from the perigee track parameters
176  * 3) from the perigee
177  * with the track momentum rescaled by the cluster energy
178  */
179  if (cluster.e() < 10 && trkPB.pt() < 10) { // This is 10 MeV
180  ATH_MSG_WARNING("Too small cluster E :"
181  << cluster.e() << " , or too small track pt" << trkPB.pt());
182  return StatusCode::FAILURE;
183  }
184 
185  bool didExtension = false;
187  intersections.reserve(samples.size());
188 
189  switch (extrapFrom) {
190  case fromPerigeeRescaled: {
191  Trk::Perigee trkPar = getRescaledPerigee(trkPB, cluster);
192  const auto extension = m_ParticleCaloExtensionTool->surfaceCaloExtension(
193  ctx, trkPar, samples, surfaces, Trk::nonInteracting);
194  didExtension = !extension.empty();
195  for (const auto& i : extension) {
196  intersections.emplace_back(
197  i.first, i.second->position().eta(), i.second->position().phi());
198  }
199  } break;
200 
201  case fromPerigee: {
202  const auto extension = m_ParticleCaloExtensionTool->surfaceCaloExtension(
203  ctx, trkPB.perigeeParameters(), samples, surfaces, Trk::nonInteracting);
204  didExtension = !extension.empty();
205  for (const auto& i : extension) {
206  intersections.emplace_back(
207  i.first, i.second->position().eta(), i.second->position().phi());
208  }
209  } break;
210 
211  case fromLastMeasurement: {
212  unsigned int index(0);
214  const Trk::CurvilinearParameters& lastParams =
216  const Amg::Vector3D& position = lastParams.position();
217  // Calo entry around z EME1 3750 and r EMB1 1550
218  if (position.perp() > 1550. || std::abs(position.z()) > 3750.) {
219  ATH_MSG_WARNING("Probematic last parameters : " << lastParams);
220  didExtension = false;
221  } else {
222  const auto extension =
223  m_ParticleCaloExtensionTool->surfaceCaloExtension(
224  ctx, lastParams, samples, surfaces, Trk::nonInteracting);
225  didExtension = !extension.empty();
226  for (const auto& i : extension) {
227  intersections.emplace_back(
228  i.first, i.second->position().eta(), i.second->position().phi());
229  }
230  }
231  }
232  } break;
233 
234  default: {
235  ATH_MSG_ERROR("Invalid ExtrapolateFrom " << extrapFrom);
236  }
237  }
238  /*
239  * Given the extension calculate the deta/dphi for the layers
240  */
241  if (!didExtension) {
242  ATH_MSG_DEBUG("Could not create an extension from "
243  << extrapFrom << " for a track with : "
244  << " Track Pt " << trkPB.pt() << " Track Eta " << trkPB.eta()
245  << " Track Phi " << trkPB.phi() << " Track Fitter "
246  << trkPB.trackFitter());
247  return StatusCode::FAILURE;
248  }
249  // Negative tracks bend to the positive direction.
250  // flip sign for positive ones
251  const bool flipSign = trkPB.charge() > 0;
252 
253  for (const auto& p : intersections) {
254  int i(0);
255  CaloSampling::CaloSample sample = std::get<0>(p);
258  i = 0;
259  } else if (sample == CaloSampling::EME1 || sample == CaloSampling::EMB1) {
260  i = 1;
262  i = 2;
263  } else if (sample == CaloSampling::EME3 || sample == CaloSampling::EMB3) {
264  i = 3;
265  } else {
266  continue;
267  }
268  eta[i] = std::get<1>(p);
269  phi[i] = std::get<2>(p);
270  deltaEta[i] = cluster.etaSample(sample) - std::get<1>(p);
271  deltaPhi[i] =
272  P4Helpers::deltaPhi(cluster.phiSample(sample), std::get<2>(p));
273  // Should we flip the sign for deltaPhi?
274  if (flipSign) {
275  deltaPhi[i] = -deltaPhi[i];
276  }
277  ATH_MSG_DEBUG("getMatchAtCalo: i, eta, phi, deta, dphi: "
278  << i << " " << eta[i] << " " << phi[i] << " " << deltaEta[i]
279  << " " << deltaPhi[i]);
280  }
281  return StatusCode::SUCCESS;
282 }
283 
284 /*
285  * Photon/vertex/Neutral track parameters
286  * Related methods
287  * needed for Extrapolating/matching conversions
288  */
289 bool
291  const xAOD::Vertex* vertex,
292  float etaAtCalo,
293  float phiAtCalo) const
294 {
295  if (!cluster || !vertex) {
296  return false;
297  }
298  float deltaEta = fabs(etaAtCalo - cluster->etaBE(2));
299  float deltaPhi = fabs(P4Helpers::deltaPhi(cluster->phi(), phiAtCalo));
300 
301  int TRTsection = 0;
303  TRTsection = getTRTsection(vertex->trackParticle(0));
304 
305  // First pass on TRT tracks, skip barrel tracks matching endcap clusters and
306  // vice-versa
307  if ((TRTsection == 2 && (cluster->eta() <= 0.6 || cluster->eta() >= 2.4)) ||
308  (TRTsection == -2 &&
309  (cluster->eta() >= -0.6 || cluster->eta() <= -2.4)) ||
310  (TRTsection == 1 && (cluster->eta() <= -0.1 || cluster->eta() >= 1.3)) ||
311  (TRTsection == -1 && (cluster->eta() >= 0.1 || cluster->eta() <= -1.3))) {
312  return false;
313  }
314 
315  // The maximum deltaEta/deltaPhi for Si, TRT barrel, TRT endcap
316  static const std::vector<double> dEtaV{ m_narrowDeltaEta,
319  static const std::vector<double> dPhiV{ m_narrowDeltaPhi,
322 
323  return (deltaEta < dEtaV[abs(TRTsection)] &&
324  deltaPhi < dPhiV[abs(TRTsection)]);
325 }
326 /*
327  * The following two are the heavy lifting methods.
328  * Start from vertex/Track Parameters
329  * and then calculate the eta/phi at calo
330  */
331 bool
333  const xAOD::Vertex* vertex,
334  float* etaAtCalo,
335  float* phiAtCalo) const
336 {
337  if (!vertex) {
338  return false;
339  }
341  if (momentum.mag() < 1e-5) {
342  ATH_MSG_DEBUG("Intersection failed");
343  return false;
344  }
345  /*
346  * Create high pt track parameters to mimic a neutral particle.
347  * This in principle is an approximation
348  */
349  Trk::PerigeeSurface surface(vertex->position());
350  Trk::Perigee trkPar(
351  vertex->position(), momentum.unit() * 1.e10, +1, surface, std::nullopt);
352  bool success = getEtaPhiAtCalo(ctx, &trkPar, etaAtCalo, phiAtCalo);
353  return success;
354 }
355 /* The actual calculation happens here*/
356 bool
358  const Trk::TrackParameters* trkPar,
359  float* etaAtCalo,
360  float* phiAtCalo) const
361 {
362  if (!trkPar)
363  return false;
365  if (fabs(trkPar->eta()) < 1.425) {
366  // Barrel
367  layersToSelect.insert(CaloSampling::EMB2);
368  } else {
369  // Endcap
370  layersToSelect.insert(CaloSampling::EME2);
371  }
372 
373  std::unique_ptr<Trk::CaloExtension> extension = nullptr;
374  extension = m_ParticleCaloExtensionTool->caloExtension(
375  ctx, *trkPar, Trk::alongMomentum, Trk::muon);
376  if (!extension) {
377  ATH_MSG_WARNING("Could not create an extension from getEtaPhiAtCalo ");
378  return false;
379  }
382  *extension, intersections, &layersToSelect);
383  bool hitEM2(false);
384  for (const auto& p : intersections) {
385  int i(0);
386  auto sample = std::get<0>(p);
388  *etaAtCalo = std::get<1>(p);
389  *phiAtCalo = std::get<2>(p);
390  hitEM2 = true;
391  ++i;
392  ATH_MSG_DEBUG("getMatchAtCalo: i, eta, phi : "
393  << i << " " << std::get<1>(p) << " " << std::get<2>(p));
394  }
395  }
396  return hitEM2;
397 }
398 
399 /* Methods to get the momemtum at the conversion vertex*/
402  const xAOD::Vertex& vertex,
403  unsigned int index) const
404 {
405  Amg::Vector3D momentum(0., 0., 0.);
406  if (vertex.nTrackParticles() <= index) {
407  ATH_MSG_WARNING("Invalid track index");
408  } else if (vertex.vxTrackAtVertexAvailable() &&
409  !vertex.vxTrackAtVertex().empty()) {
410  // Use the parameters at the vertex
411  // (the tracks should be parallel but we will do the sum anyway)
412  ATH_MSG_DEBUG("getMomentumAtVertex : getting from vxTrackAtVertex");
413  const auto& trkAtVertex = vertex.vxTrackAtVertex()[index];
414  const Trk::TrackParameters* paramAtVertex = trkAtVertex.perigeeAtVertex();
415  if (!paramAtVertex) {
416  ATH_MSG_WARNING("VxTrackAtVertex does not have perigee at vertex");
417  } else {
418  return paramAtVertex->momentum();
419  }
420  } else if (vertex.nTrackParticles() == 1) {
421  // Use the first measurement
423  "getMomentumAtVertex : 1 track only, getting from first measurement");
424  const xAOD::TrackParticle* tp = vertex.trackParticle(0);
425  unsigned int paramindex(0);
426  if (!tp ||
427  !tp->indexOfParameterAtPosition(paramindex, xAOD::FirstMeasurement)) {
428  ATH_MSG_WARNING("No TrackParticle or no have first measurement");
429  } else {
430  momentum += tp->curvilinearParameters(paramindex).momentum();
431  }
432  } else {
433  // Extrapolate track particle to vertex
434  ATH_MSG_DEBUG("getMomentumAtVertex : extrapolating to perigee surface");
435  const xAOD::TrackParticle* tp = vertex.trackParticle(index);
436  if (!tp) {
437  ATH_MSG_WARNING("NULL pointer to TrackParticle in vertex");
438  } else {
439  Trk::PerigeeSurface surface(vertex.position());
440  std::unique_ptr<const Trk::TrackParameters> params =
441  m_extrapolator->extrapolate(ctx, tp->perigeeParameters(), surface,
443  if (!params) {
444  ATH_MSG_DEBUG("Extrapolation to vertex (perigee) failed");
445  } else {
446  momentum += params->momentum();
447  }
448  }
449  }
450  return momentum;
451 }
452 
455  const xAOD::Vertex& vertex,
456  bool reuse /* = true */) const
457 {
458  Amg::Vector3D momentum(0., 0., 0.);
459  const static SG::AuxElement::Accessor<float> accPx("px");
460  const static SG::AuxElement::Accessor<float> accPy("py");
461  const static SG::AuxElement::Accessor<float> accPz("pz");
462  if (vertex.nTrackParticles() == 0) {
463  ATH_MSG_WARNING("getMomentumAtVertex : vertex has no track particles!");
464  return momentum;
465  }
466  if (reuse && accPx.isAvailable(vertex) && accPy.isAvailable(vertex) &&
467  accPz.isAvailable(vertex)) {
468  // Already decorated with parameters at vertex
469  ATH_MSG_DEBUG("getMomentumAtVertex : getting from auxdata");
470  return { accPx(vertex), accPy(vertex), accPz(vertex) };
471  }
472  for (unsigned int i = 0; i < vertex.nTrackParticles(); ++i) {
474  }
475 
476  return momentum;
477 }
478 /*
479  * Helper to identify the TRT section
480  */
481 int
483 {
484  if (!trkPB) {
485  ATH_MSG_DEBUG("Null pointer to TrackParticle");
486  return 0;
487  }
488  if (!m_trtId) {
490  "No trt ID guessing TRT section based on eta: " << trkPB->eta());
491  return (trkPB->eta() > 0 ? 1 : -1) * (fabs(trkPB->eta()) < 0.6 ? 1 : 2);
492  }
493  const Trk::MeasurementBase* trkPar = nullptr;
494  if (trkPB->trackLink().isValid() && trkPB->track() != nullptr) {
495  ATH_MSG_DEBUG("Will get TrackParameters from Trk::Track");
496  const Trk::TrackStates* trackStates =
497  trkPB->track()->trackStateOnSurfaces();
498  if (!trackStates) {
499  ATH_MSG_WARNING("NULL pointer to trackStateOnSurfaces");
500  return 0;
501  }
502  // Loop over the TrkStateOnSurfaces search last valid TSOS first
504  rItTSoS = trackStates->rbegin();
505  rItTSoS != trackStates->rend();
506  ++rItTSoS) {
507  if ((*rItTSoS)->type(Trk::TrackStateOnSurface::Measurement) &&
508  !((*rItTSoS)->type(Trk::TrackStateOnSurface::Outlier)) &&
509  (*rItTSoS)->measurementOnTrack() != nullptr &&
510  !((*rItTSoS)->measurementOnTrack()->type(
512  trkPar = (*rItTSoS)->measurementOnTrack();
513  break;
514  }
515  }
516  } else {
517  ATH_MSG_WARNING("Track particle without Trk::Track");
518  }
519  if (!trkPar) {
520  return 0;
521  }
522  const Trk::Surface& sf = trkPar->associatedSurface();
523  const Identifier tid = sf.associatedDetectorElementIdentifier();
524  return m_trtId->barrel_ec(tid);
525 }
xAOD::TrackParticle_v1::curvilinearParameters
const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const
Returns a curvilinear representation of the parameters at 'index'.
Definition: TrackParticle_v1.cxx:673
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
EMExtrapolationTools::m_narrowDeltaPhiTRTendcap
Gaudi::Property< double > m_narrowDeltaPhiTRTendcap
Definition: EMExtrapolationTools.h:134
EMExtrapolationTools::EMExtrapolationTools
EMExtrapolationTools(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters.
Definition: EMExtrapolationTools.cxx:61
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
CaloExtensionHelpers::midPointEtaPhiPerLayerVector
void midPointEtaPhiPerLayerVector(const Trk::CaloExtension &extension, EtaPhiPerLayerVector &result, const LayersToSelect *selection=nullptr)
Definition: CaloExtensionHelpers.h:273
TrackParameters.h
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
EMExtrapolationTools::getClusterLayerSurfaces
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
Definition: EMExtrapolationTools.cxx:96
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
EMExtrapolationTools::m_ParticleCaloExtensionTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_ParticleCaloExtensionTool
Definition: EMExtrapolationTools.h:117
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:150
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
DataVector::rend
const_reverse_iterator rend() const noexcept
Return a const_reverse_iterator pointing at the beginning of the collection.
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
index
Definition: index.py:1
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
taskman.template
dictionary template
Definition: taskman.py:317
EMExtrapolationTools::m_TRTendcapDeltaEta
Gaudi::Property< double > m_TRTendcapDeltaEta
Definition: EMExtrapolationTools.h:141
TRT_ID.h
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
EMExtrapolationTools::getTRTsection
int getTRTsection(const xAOD::TrackParticle *trkPB) const
Return +/- 1 (2) if track is in positive/negative TRT barrel (endcap)
Definition: EMExtrapolationTools.cxx:482
CaloSampling
provides Calorimeter Sampling enum
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:17
EMExtrapolationTools::m_narrowDeltaPhiTRTbarrel
Gaudi::Property< double > m_narrowDeltaPhiTRTbarrel
Definition: EMExtrapolationTools.h:131
EMExtrapolationTools::getMatchAtCalo
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.
Definition: EMExtrapolationTools.cxx:157
ParticleTest.tp
tp
Definition: ParticleTest.py:25
TRT_ID::is_valid
bool is_valid() const
Definition: TRT_ID.h:391
EMExtrapolationTools::m_TRTbarrelDeltaEta
Gaudi::Property< double > m_TRTbarrelDeltaEta
Definition: EMExtrapolationTools.h:138
EMExtrapolationTools::m_narrowDeltaPhi
Gaudi::Property< double > m_narrowDeltaPhi
Definition: EMExtrapolationTools.h:130
PropDirection.h
IExtrapolator.h
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
NeutralParameters.h
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
IEMExtrapolationTools::fromPerigee
@ fromPerigee
from the perigee of TrackParticle
Definition: IEMExtrapolationTools.h:37
xAOD::LastMeasurement
@ LastMeasurement
Parameter defined at the position of the last measurement.
Definition: TrackingPrimitives.h:215
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
EMExtrapolationTools::m_trtId
const TRT_ID * m_trtId
Definition: EMExtrapolationTools.h:144
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
xAOD::TrackParticle_v1::indexOfParameterAtPosition
bool indexOfParameterAtPosition(unsigned int &index, ParameterPosition position) const
Function to determine if this TrackParticle contains track parameters at a certain position,...
Definition: TrackParticle_v1.cxx:653
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
Track.h
xAOD::CaloCluster_v1::etaSample
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:532
xAOD::CaloCluster_v1::etaBE
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:644
xAOD::TrackParticle_v1::perigeeParameters
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
Definition: TrackParticle_v1.cxx:485
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: P4Helpers.h:29
xAOD::CaloCluster_v1::inEndcap
bool inEndcap() const
Returns true if at least one clustered cell in the endcap.
Definition: CaloCluster_v1.h:901
EgammaxAODHelpers.h
xAOD::EgammaHelpers::numberOfSiTracks
std::size_t numberOfSiTracks(const xAOD::Photon *eg)
return the number of Si tracks in the conversion
Definition: PhotonxAODHelpers.cxx:57
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:53
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
xAOD::TrackParticle_v1::trackFitter
TrackFitter trackFitter() const
Returns the fitter.
Definition: TrackParticle_v1.cxx:698
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloCluster.h
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
xAOD::FirstMeasurement
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
Definition: TrackingPrimitives.h:213
EMExtrapolationTools::m_narrowDeltaEta
Gaudi::Property< double > m_narrowDeltaEta
Definition: EMExtrapolationTools.h:137
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EMExtrapolationTools::matchesAtCalo
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...
Definition: EMExtrapolationTools.cxx:290
vector
Definition: MultiHisto.h:13
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
setParameters
void setParameters(T *h, TGraphAsymmErrors *tg)
Definition: computils.h:432
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
PseudoMeasurementOnTrack.h
xAOD::CaloCluster_v1::inBarrel
bool inBarrel() const
Returns true if at least one clustered cell in the barrel.
Definition: CaloCluster_v1.h:896
test_pyathena.parent
parent
Definition: test_pyathena.py:15
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
CaloCluster
Principal data class for CaloCell clusters.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:79
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IEMExtrapolationTools::fromPerigeeRescaled
@ fromPerigeeRescaled
from the perigee of TrackParticle recaled by Ecluster
Definition: IEMExtrapolationTools.h:39
CaloExtensionHelpers::EtaPhiPerLayerVector
std::vector< std::tuple< CaloSampling::CaloSample, double, double > > EtaPhiPerLayerVector
Definition: CaloExtensionHelpers.h:25
xAOD::CaloCluster_v1::phiSample
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:547
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:866
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
DataVector< const Trk::TrackStateOnSurface >
Vertex.h
DataVector::rbegin
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
P4Helpers.h
lumiFormat.array
array
Definition: lumiFormat.py:98
EMExtrapolationTools::m_enableTRT
Gaudi::Property< bool > m_enableTRT
Definition: EMExtrapolationTools.h:145
Trk::MeasurementBase
Definition: MeasurementBase.h:58
EMExtrapolationTools::getMomentumAtVertex
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...
Definition: EMExtrapolationTools.cxx:401
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::MeasurementBase::associatedSurface
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
DataVector< const Trk::TrackStateOnSurface >::const_reverse_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
Standard const_reverse_iterator.
Definition: DataVector.h:846
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
Trk::nonInteracting
@ nonInteracting
Definition: ParticleHypothesis.h:25
xAOD::TrackParticle_v1::trackLink
const ElementLink< TrackCollection > & trackLink() const
Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle.
Definition: TrackParticle_v1.cxx:779
EMExtrapolationTools::initialize
virtual StatusCode initialize() override final
initialize method
Definition: EMExtrapolationTools.cxx:71
charge
double charge(const T &p)
Definition: AtlasPID.h:494
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TrackParticle.h
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
DeMoScan.index
string index
Definition: DeMoScan.py:362
xAOD::CaloCluster_v1::eSample
float eSample(const CaloSample sampling) const
Definition: CaloCluster_v1.cxx:521
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::MeasurementBaseType::PseudoMeasurementOnTrack
@ PseudoMeasurementOnTrack
Definition: MeasurementBase.h:51
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Trk::ParametersBase::eta
double eta() const
Access method for pseudorapidity - from momentum.
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
EMExtrapolationTools::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: EMExtrapolationTools.h:123
xAOD::TrackParticle_v1::track
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
Definition: TrackParticle_v1.cxx:805
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
AthAlgTool
Definition: AthAlgTool.h:26
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
EMExtrapolationTools::getEtaPhiAtCalo
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.
Definition: EMExtrapolationTools.cxx:332
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
TrackStateOnSurface.h
IEMExtrapolationTools::fromLastMeasurement
@ fromLastMeasurement
from the last measurement of TrackParticle
Definition: IEMExtrapolationTools.h:35
EMExtrapolationTools.h
CaloExtensionHelpers::LayersToSelect
std::set< CaloSampling::CaloSample > LayersToSelect
Definition: CaloExtensionHelpers.h:27
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)