ATLAS Offline Software
Loading...
Searching...
No Matches
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
8
9// extrapolation
13//
16#include "xAODTracking/Vertex.h"
17//
19#include "TrkTrack/Track.h"
20//
22#include "GaudiKernel/EventContext.h"
25//
26#include <tuple>
27
28namespace {
29/*
30 * Create Rescaled Perigee Parametrs
31 */
33getRescaledPerigee(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
47template <std::size_t N>
48void
49getClusterLayers(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)
64 : AthAlgTool(type, name, parent)
65 , m_trtId(nullptr)
66{
67 declareInterface<IEMExtrapolationTools>(this);
68}
69
70StatusCode
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
94std::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 = {
105 CaloSampling::PreSamplerB,
106 CaloSampling::EMB1,
107 CaloSampling::EMB2,
108 CaloSampling::EMB3
109 };
110 constexpr std::array<CaloSampling::CaloSample, 4> endcapLayers = {
111 CaloSampling::PreSamplerE,
112 CaloSampling::EME1,
113 CaloSampling::EME2,
114 CaloSampling::EME3
115 };
116 constexpr std::array<CaloSampling::CaloSample, 4> endcapLayersAboveEta2p5 = {
117 CaloSampling::EME2,
118 CaloSampling::EME3
119 };
120 constexpr std::array<CaloSampling::CaloSample, 1> forwardLayers = {
121 CaloSampling::FCAL0,
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 */
156StatusCode
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);
256 if (sample == CaloSampling::PreSamplerE ||
257 sample == CaloSampling::PreSamplerB) {
258 i = 0;
259 } else if (sample == CaloSampling::EME1 || sample == CaloSampling::EMB1) {
260 i = 1;
261 } else if (sample == CaloSampling::EME2 || sample == CaloSampling::EMB2 || sample == CaloSampling::FCAL0) {
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 */
289bool
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 */
331bool
333 const xAOD::Vertex* vertex,
334 float* etaAtCalo,
335 float* phiAtCalo) const
336{
337 if (!vertex) {
338 return false;
339 }
340 Amg::Vector3D momentum = getMomentumAtVertex(ctx, *vertex);
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*/
356bool
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);
387 if ((sample == CaloSampling::EME2 || sample == CaloSampling::EMB2)) {
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) {
473 momentum += getMomentumAtVertex(ctx, vertex, i);
474 }
475
476 return momentum;
477}
478/*
479 * Helper to identify the TRT section
480 */
481int
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}
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
double charge(const T &p)
Definition AtlasPID.h:997
CaloCell_ID::CaloSample CaloSample
#define AmgVector(rows)
static Double_t sc
This is an Identifier helper class for the TRT subdetector.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
const ServiceHandle< StoreGateSvc > & detStore() const
Principal data class for CaloCell clusters.
This class provides the client interface for accessing the detector description information common to...
const_reverse_iterator rend() const noexcept
Return a const_reverse_iterator pointing at the beginning of the collection.
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition DataVector.h:847
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 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
@ fromLastMeasurement
from the last measurement of TrackParticle
@ fromPerigeeRescaled
from the perigee of TrackParticle recaled by Ecluster
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
This class is the pure abstract base class for all fittable tracking measurements.
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
double eta() const
Access method for pseudorapidity - from momentum.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
Class describing the Line to which the Perigee refers to.
Abstract Base Class for tracking surfaces.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double e() const
The total energy of the particle.
bool inBarrel() const
Returns true if at least one clustered cell in the barrel.
float eSample(const CaloSample sampling) const
bool inEndcap() const
Returns true if at least one clustered cell in the endcap.
virtual double phi() const
The azimuthal angle ( ) of the particle.
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
const ElementLink< TrackCollection > & trackLink() const
Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle.
bool indexOfParameterAtPosition(unsigned int &index, ParameterPosition position) const
Function to determine if this TrackParticle contains track parameters at a certain position,...
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const
Returns a curvilinear representation of the parameters at 'index'.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
float charge() const
Returns the charge.
TrackFitter trackFitter() const
Returns the fitter.
void setParameters(T *h, TGraphAsymmErrors *tg)
Definition computils.h:436
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
Eigen::Matrix< double, 3, 1 > Vector3D
std::set< CaloSampling::CaloSample > LayersToSelect
void midPointEtaPhiPerLayerVector(const Trk::CaloExtension &extension, EtaPhiPerLayerVector &result, const LayersToSelect *selection=nullptr)
std::vector< std::tuple< CaloSampling::CaloSample, double, double > > EtaPhiPerLayerVector
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition P4Helpers.h:34
@ alongMomentum
DataVector< const Trk::TrackStateOnSurface > TrackStates
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters
ParametersBase< TrackParametersDim, Charged > TrackParameters
Definition index.py:1
STL namespace.
std::size_t numberOfSiTracks(const xAOD::Photon *eg)
return the number of Si tracks in the conversion
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:
Vertex_v1 Vertex
Define the latest version of the vertex class.
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
@ LastMeasurement
Parameter defined at the position of the last measurement.