ATLAS Offline Software
Loading...
Searching...
No Matches
TrackParticle_v1.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef XAODTRACKING_VERSIONS_TRACKPARTICLE_V1_H
8#define XAODTRACKING_VERSIONS_TRACKPARTICLE_V1_H
9
10// System include(s):
11#include <bitset>
12extern "C" {
13# include <stdint.h>
14}
15
16// Core include(s):
17#include "AthLinks/ElementLink.h"
20
21// xAOD include(s):
22#include "xAODBase/IParticle.h"
25
26#ifndef XAOD_ANALYSIS
27// Athena includes
30#endif // not XAOD_ANALYSIS
31
32// ROOT include(s):
33#include "Math/Vector4D.h"
34
35//Already include the DataVector specialization for this type
37namespace xAOD {
38
44 class TrackParticle_v1 : public IParticle {
45
46 public:
47
56
60 virtual double pt() const override final;
62 virtual double eta() const override final;
64 virtual double phi() const override final;
66 virtual double m() const override final;
68 virtual double e() const override final;
70 virtual double rapidity() const override final;
71
74
76 virtual FourMom_t p4() const override final;
77
79 typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> > GenVecFourMom_t;
80
83
85 virtual Type::ObjectType type() const override final;
87
98 float charge() const;
100 float d0() const;
102 float z0() const;
104 float phi0() const;
106 float theta() const;
108 float qOverP() const;
110 float time() const;
118 DefiningParameters_t definingParameters() const;
120 const ParametersCovMatrix_t definingParametersCovMatrix() const;
131 void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP);
132 void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP, float time);
133 void setTime(float time);
137 void setDefiningParametersCovMatrix(const ParametersCovMatrix_t& cov);
147 float vx() const;
149 float vy() const;
151 float vz() const;
153 void setParametersOrigin(float x, float y, float z);
154
155#ifndef XAOD_ANALYSIS
161 const Trk::Perigee& perigeeParameters() const;
162#endif // not XAOD_ANALYSIS
164
180 size_t numberOfParameters() const;
182 const CurvilinearParameters_t trackParameters(unsigned int index) const;
184 float parameterX(unsigned int index) const;
186 float parameterY(unsigned int index) const;
188 float parameterZ(unsigned int index) const;
190 float parameterPX(unsigned int index) const;
192 float parameterPY(unsigned int index) const;
194 float parameterPZ(unsigned int index) const;
197 void setTrackParameters(std::vector<std::vector<float> >& parameters);
200 ParametersCovMatrix_t trackParameterCovarianceMatrix(unsigned int index) const;
204 void setTrackParameterCovarianceMatrix(unsigned int index, std::vector<float>& cov);
211 bool indexOfParameterAtPosition(unsigned int& index, ParameterPosition position) const;
213 void setParameterPosition(unsigned int index, ParameterPosition pos);
214#ifndef XAOD_ANALYSIS
218#endif // not XAOD_ANALYSIS
219
221 float radiusOfFirstHit() const;
223 void setRadiusOfFirstHit(float radius);
224
229
230 float beamlineTiltX() const;
231 void setBeamlineTiltX(float tiltX);
232
233 float beamlineTiltY() const;
234 void setBeamlineTiltY(float tiltY);
235
237 void setHitPattern(uint32_t hitpattern);
238
241
244
246
251 float chiSquared() const;
253 float numberDoF() const;
255 void setFitQuality(float chiSquared, float numberDoF);
257
264 void setTrackProperties (const TrackProperties properties) ;
271 void setPatternRecognitionInfo(const std::bitset<xAOD::NumberOfTrackRecoInfo>& patternReco) ;
278 void setPatternRecognitionInfo(uint64_t patternReco) ;
280 void setTrackFitter(const TrackFitter fitter) ;
294 std::bitset<NumberOfTrackRecoInfo> patternRecoInfo() const;
298 TrackFitter trackFitter() const;
300
301
319 bool summaryValue(uint8_t& value, const SummaryType &information) const;
321 bool summaryValue(float& value, const SummaryType &information) const;
323 void setSummaryValue(uint8_t& value, const SummaryType &information);
325 void setSummaryValue(float& value, const SummaryType &information);
327
330#ifndef XAOD_ANALYSIS
339 const Trk::Track* track() const;
340#endif // not XAOD_ANALYSIS
341
343
345 void resetCache();
346
347private:
348
351 typedef std::vector< std::pair<covMatrixIndex,covMatrixIndex> > covMatrixIndexPairVec;
353
354#if ( ! defined(XAOD_ANALYSIS) )
355# ifdef __CLING__
356 // If Cling sees the declaration below, then we get mysterious
357 // errors during auto-parsing. On the other hand, if we hide
358 // it completely, then we can run into memory corruption problems
359 // if instances of this class are created from Python,
360 // since Cling will then be allocating a block of the wrong size
361 // (see !63818). However, everything dealing with this member
362 // is out-of-line (including ctors/dtor/assignment), and it also
363 // declared as transient. Thus, for the Cling case, we can replace
364 // it with padding of the correct size.
366# else
370# endif
371#endif // not XAOD_ANALYSIS
372
373 }; // class Track Particle
374
375 } // namespace xAOD
376
377// Finish declaration of IParticle as a base class of TrackParticle_v1
379
380#endif // XAODTRACKING_VERSIONS_TrackParticle_v1_H
ObjectType
Definition BaseObject.h:11
Cached value with atomic update.
std::vector< size_t > vec
An STL vector of pointers that by default owns its pointed-to elements.
#define DATAVECTOR_BASE_FIN(T, B)
Used to finish up a forward declaration.
Definition DataVector.h:774
Helper functions for TrackingDetails accessors.
#define y
#define x
#define z
Cached value with atomic update.
Definition CachedValue.h:55
Class providing the definition of the 4-vector interface.
IParticle()=default
Class describing a TrackParticle.
void setTrackParameterCovarianceMatrix(unsigned int index, std::vector< float > &cov)
Set the cov matrix of the parameter at 'index', using a vector of floats.
void setDefiningParametersCovMatrix(const ParametersCovMatrix_t &cov)
Set the defining parameters covariance matrix.
float z0() const
Returns the parameter.
uint64_t identifierOfFirstHit() const
Returns the offline identifier of the first hit.
void setTrackParameters(std::vector< std::vector< float > > &parameters)
Set the parameters via the passed vector of vectors.
float timeResolution() const
Returns the time resolution.
const std::vector< float > & definingParametersCovMatrixDiagVec() const
Returns the diagonal elements of the defining parameters covariance matrix.
TrackingDetails::covMatrixIndex covMatrixIndex
void setBeamlineTiltX(float tiltX)
void setNumberOfIBLOverflowsdEdx(uint8_t numoverflows)
float vx() const
The x origin for the parameters.
void setTrackLink(const ElementLink< TrackCollection > &track)
Set the link to the original track.
const ElementLink< TrackCollection > & trackLink() const
Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle.
float theta() const
Returns the parameter, which has range 0 to .
float numberDoF() const
Returns the number of degrees of freedom of the overall track or vertex fit as float.
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzM4D< double > > GenVecFourMom_t
Base 4 Momentum type for TrackParticle.
DefiningParameters_t definingParameters() const
Returns a SVector of the Perigee track parameters.
void setDefiningParametersCovMatrixOffDiagVec(const std::vector< float > &vec)
Set the off-diagonal elements of the defining parameters covariance matrix.
bool definingParametersCovMatrixOffDiagCompr() const
void setIdentifierOfFirstHit(uint64_t id)
Set the offline identifier of the first hit.
float time() const
Returns the time.
void resetCache()
Reset the internal cache of the object.
virtual double m() const override final
The invariant mass of the particle..
TrackParticle_v1 & operator=(const TrackParticle_v1 &tp)
Assignment operator. This can involve creating and copying an Auxilary store, and so should be used s...
void setTimeResolution(float timeResolution)
bool indexOfParameterAtPosition(unsigned int &index, ParameterPosition position) const
Function to determine if this TrackParticle contains track parameters at a certain position,...
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
void compressDefiningParametersCovMatrixOffDiag()
Delete some off-diagonal elements for compression.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
static const covMatrixIndexPairVec & covMatrixComprIndexPairs()
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
void setRadiusOfFirstHit(float radius)
Set the radius of the first hit.
void setParameterPosition(unsigned int index, ParameterPosition pos)
Set the 'position' (i.e. where it is in ATLAS) of the parameter at 'index', using the ParameterPositi...
float parameterPX(unsigned int index) const
Returns the parameter x momentum component, for 'index'.
float radiusOfFirstHit() const
Returns the radius of the first hit.
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
float parameterX(unsigned int index) const
Returns the parameter x position, for 'index'.
uint8_t numberOfUsedHitsdEdx() const
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 .)
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
float parameterPY(unsigned int index) const
Returns the parameter y momentum component, for 'index'.
const CurvilinearParameters_t trackParameters(unsigned int index) const
Returns the track parameter vector at 'index'.
uint8_t numberOfIBLOverflowsdEdx() const
TrackProperties trackProperties() const
Access methods for track properties, which returns 'true' if a logical AND of the parameter 'proprty'...
float vz() const
The z origin for the parameters.
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
uint8_t hasValidTime() const
Returns whether or not the track has a valid time.
std::bitset< NumberOfTrackRecoInfo > patternRecoInfo() const
Access method for pattern recognition algorithm.
virtual double rapidity() const override final
The true rapidity (y) of the particle.
ParametersCovMatrix_t trackParameterCovarianceMatrix(unsigned int index) const
Returns the TrackParticleCovMatrix_t (covariance matrix) at 'index', which corresponds to the paramet...
void setBeamlineTiltY(float tiltY)
void setParametersOrigin(float x, float y, float z)
Set the origin for the parameters.
float parameterZ(unsigned int index) const
Returns the parameter z position, for 'index'.
CxxUtils::CachedValue< Trk::Perigee > m_perigeeParameters
Cached MeasuredPerigee, built from this object.
float vy() const
The y origin for the parameters.
xAOD::ParameterPosition parameterPosition(unsigned int index) const
Return the ParameterPosition of the parameters at 'index'.
float d0() const
Returns the parameter.
void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP)
Set the defining parameters.
uint32_t hitPattern() const
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
void setDefiningParametersCovMatrixDiagVec(const std::vector< float > &vec)
Set the defining parameters covariance matrix using a length 15 vector.
void setNumberOfUsedHitsdEdx(uint8_t numhits)
void setParticleHypothesis(const ParticleHypothesis hypo)
Method for setting the particle type, using the ParticleHypothesis enum.
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
float qOverP() const
Returns the parameter.
void setTrackProperties(const TrackProperties properties)
Methods setting the TrackProperties.
std::vector< float > definingParametersCovMatrixVec() const
Returns the length 6 vector containing the elements of defining parameters covariance matrix.
float beamlineTiltY() const
virtual Type::ObjectType type() const override final
The type of the object as a simple enumeration.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
float parameterY(unsigned int index) const
Returns the parameter y position, for 'index'.
float beamlineTiltX() const
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector form.
float chiSquared() const
Returns the of the overall track fit.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
void setSummaryValue(uint8_t &value, const SummaryType &information)
Set method for TrackSummary values.
static const std::size_t COVMATRIX_OFFDIAG_VEC_COMPR_SIZE
ParametersCovMatrixFilled_t definingParametersCovMatrixFilled() const
Returns a 5x5 matrix describing which elements of the covariance matrix are known.
void setTrackFitter(const TrackFitter fitter)
Method for setting the fitter, using the TrackFitter enum.
void setPatternRecognitionInfo(const std::bitset< xAOD::NumberOfTrackRecoInfo > &patternReco)
Method setting the pattern recognition algorithm, using a bitset.
float charge() const
Returns the charge.
TrackParticle_v1()
Default constructor.
void setHitPattern(uint32_t hitpattern)
TrackFitter trackFitter() const
Returns the fitter.
const std::vector< float > & definingParametersCovMatrixOffDiagVec() const
Returns the correlation coefficient associated with the off-diagonal elements of the covariance matri...
void setTime(float time)
std::vector< std::pair< covMatrixIndex, covMatrixIndex > > covMatrixIndexPairVec
ParticleHypothesis particleHypothesis() const
Returns the particle hypothesis used for Track fitting.
float phi0() const
Returns the parameter, which has range to .
void setHasValidTime(uint8_t hasValidTime)
void setDefiningParametersCovMatrixVec(const std::vector< float > &cov)
float parameterPZ(unsigned int index) const
Returns the parameter z momentum component, for 'index'.
virtual double e() const override final
The total energy of the particle.
Selection rules: declare transient members.
Definition DataVector.h:581
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters
Definition index.py:1
STL namespace.
constexpr std::size_t COVMATRIX_OFFDIAG_VEC_COMPR_SIZE
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Eigen::Matrix< bool, 5, 5, 0, 5, 5 > ParametersCovMatrixFilled_t
TrackFitter
Enums to identify who created this track and which properties does it have.
SummaryType
Enumerates the different types of information stored in Summary.
setEventNumber uint32_t
ParameterPosition
Enum allowing us to know where in ATLAS the parameters are defined.