ATLAS Offline Software
GXFTrajectory.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRK_GXFTRAJECTORY_H
6 #define TRK_GXFTRAJECTORY_H
7 
10 
17 namespace Trk {
18  class MeasurementBase;
19  class MaterialEffectsBase;
20  class Layer;
21  class CylinderLayer;
22  class DiscLayer;
23  class MagneticFieldProperties;
24 
31  class GXFTrajectory {
32 
33  public:
34  GXFTrajectory();
35  GXFTrajectory(const GXFTrajectory & rhs);
37  GXFTrajectory(GXFTrajectory &&rhs) = default;
39  ~GXFTrajectory() = default;
40 
41  bool addMeasurementState(std::unique_ptr<GXFTrackState>, int index = -1);
42  void addMaterialState(std::unique_ptr<GXFTrackState>, int index = -1);
43  void addBasicState(std::unique_ptr<GXFTrackState>, int index = -1);
44 
45  void setReferenceParameters(std::unique_ptr<const TrackParameters>);
46  void setScatteringAngles(std::vector < std::pair < double, double > >&);
47  void setBrems(std::vector<double> &);
49  void setConverged(bool);
50  void reset();
51  void setPrefit(int);
52  void setOutlier(int, bool isoutlier = true);
53  void setPrevChi2(double);
54  void setChi2(double);
55  void setMass(double);
56 
58 
59  std::pair<GXFTrackState *, GXFTrackState *> findFirstLastMeasurement(void);
60  bool hasKink(void);
61 
62  int numberOfScatterers() const;
63  void setNumberOfScatterers(int);
64  int numberOfBrems() const;
65  void setNumberOfBrems(int);
66  int numberOfUpstreamStates() const;
67  int numberOfUpstreamScatterers() const;
68  int numberOfUpstreamBrems() const;
69  int numberOfPerigeeParameters() const;
70  int numberOfFitParameters() const;
71  int numberOfSiliconHits() const;
72  int numberOfTRTPrecHits() const;
73  int numberOfTRTTubeHits() const;
74  int numberOfTRTHits() const;
75  int numberOfHits() const;
76  int numberOfPseudoMeasurements() const;
77  int numberOfOutliers() const;
78 
79  void updateTRTHitCount(int index, float oldError);
80 
81  const std::vector<std::unique_ptr<GXFTrackState>> & trackStates() const;
82  std::vector<std::unique_ptr<GXFTrackState>> & trackStates();
83  std::vector < std::pair < double, double >>&scatteringAngles();
84  std::vector < std::pair < double, double >>&scatteringSigmas();
85  std::vector<double> & brems();
86 
88  bool converged() const;
89  int prefit() const;
91  double chi2() const;
92  double prevchi2() const;
93  int nDOF() const;
94 
96  Amg::VectorX & errors();
98 
99  double totalX0() const;
100  double totalEnergyLoss() const;
101 
102  double mass() const;
104 
105  std::vector < std::pair < const Layer *,
106  const Layer *>>&upstreamMaterialLayers();
107 
108  void resetCovariances(void);
109  std::unique_ptr<const FitQuality> quality(void) const;
110 
113 
114  private:
115  std::vector<std::unique_ptr<GXFTrackState>> m_states;
116  int m_ndof;
117  double m_chi2;
118  double m_prevchi2;
122  int m_nbrems;
127  int m_nhits;
128  int m_noutl;
135  std::unique_ptr<const TrackParameters> m_refpar;
137  std::vector < std::pair < double, double >>m_scatteringangles;
138  std::vector < std::pair < double, double >>m_scatteringsigmas;
139  std::vector<double> m_brems;
143  double m_totx0;
144  double m_toteloss;
145  double m_mass;
146  int m_prefit;
148  std::vector < std::pair < const Layer *, const Layer *>>m_upstreammat;
149  };
150 }
151 #endif
Trk::GXFTrajectory::numberOfUpstreamScatterers
int numberOfUpstreamScatterers() const
Definition: GXFTrajectory.cxx:481
Trk::GXFTrajectory::m_nupstreamstates
int m_nupstreamstates
Definition: GXFTrajectory.h:123
Trk::GXFTrajectory::m_upstreammat
std::vector< std::pair< const Layer *, const Layer * > > m_upstreammat
Definition: GXFTrajectory.h:148
Trk::GXFTrajectory::m_refpar
std::unique_ptr< const TrackParameters > m_refpar
Definition: GXFTrajectory.h:135
Trk::GXFTrajectory::setMass
void setMass(double)
Definition: GXFTrajectory.cxx:635
Trk::GXFTrajectory::m_ndof
int m_ndof
Definition: GXFTrajectory.h:116
Trk::GXFTrajectory::numberOfUpstreamStates
int numberOfUpstreamStates() const
Definition: GXFTrajectory.cxx:477
Trk::GXFTrajectory::numberOfScatterers
int numberOfScatterers() const
Definition: GXFTrajectory.cxx:458
Trk::GXFTrajectory::m_nperpars
int m_nperpars
Definition: GXFTrajectory.h:119
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Trk::GXFTrajectory::m_scatteringangles
std::vector< std::pair< double, double > > m_scatteringangles
Definition: GXFTrajectory.h:137
Trk::GXFTrajectory::quality
std::unique_ptr< const FitQuality > quality(void) const
Definition: GXFTrajectory.cxx:694
Trk::GXFTrajectory::numberOfFitParameters
int numberOfFitParameters() const
Definition: GXFTrajectory.cxx:496
Trk::GXFTrajectory::brems
std::vector< double > & brems()
Definition: GXFTrajectory.cxx:552
Trk::MagneticFieldProperties
Definition: MagneticFieldProperties.h:31
Trk::GXFTrajectory::numberOfTRTPrecHits
int numberOfTRTPrecHits() const
Definition: GXFTrajectory.cxx:446
Trk::GXFTrajectory::m_res
Amg::VectorX m_res
Definition: GXFTrajectory.h:140
Trk::GXFTrajectory::operator=
GXFTrajectory & operator=(const GXFTrajectory &rhs)
Definition: GXFTrajectory.cxx:95
Trk::GXFTrajectory::addMeasurementState
bool addMeasurementState(std::unique_ptr< GXFTrackState >, int index=-1)
Definition: GXFTrajectory.cxx:166
Trk::GXFTrajectory::addBasicState
void addBasicState(std::unique_ptr< GXFTrackState >, int index=-1)
Definition: GXFTrajectory.cxx:266
index
Definition: index.py:1
GXFTrackState.h
Trk::GXFTrajectory::numberOfPerigeeParameters
int numberOfPerigeeParameters() const
Definition: GXFTrajectory.cxx:492
Trk::GXFTrajectory::numberOfTRTTubeHits
int numberOfTRTTubeHits() const
Definition: GXFTrajectory.cxx:450
Trk::GXFTrajectory::residuals
Amg::VectorX & residuals()
Definition: GXFTrajectory.cxx:595
Trk::GXFTrajectory::prefit
int prefit() const
Definition: GXFTrajectory.cxx:426
Trk::GXFTrajectory::setNumberOfPerigeeParameters
void setNumberOfPerigeeParameters(int)
Definition: GXFTrajectory.cxx:351
Trk::GXFTrajectory::m_states
std::vector< std::unique_ptr< GXFTrackState > > m_states
The vector of track states, i.e.
Definition: GXFTrajectory.h:115
Trk::GXFTrajectory::totalEnergyLoss
double totalEnergyLoss() const
Definition: GXFTrajectory.cxx:625
Trk::GXFTrajectory::numberOfHits
int numberOfHits() const
Definition: GXFTrajectory.cxx:430
Trk::GXFTrajectory
Internal representation of the track, used in the track fit.
Definition: GXFTrajectory.h:31
Trk::GXFTrajectory::m_errors
Amg::VectorX m_errors
Definition: GXFTrajectory.h:141
Trk::GXFTrajectory::referenceParameters
const TrackParameters * referenceParameters()
Definition: GXFTrajectory.cxx:343
Trk::GXFTrajectory::resetCovariances
void resetCovariances(void)
Definition: GXFTrajectory.cxx:688
Trk::GXFTrajectory::upstreamMaterialLayers
std::vector< std::pair< const Layer *, const Layer * > > & upstreamMaterialLayers()
Definition: GXFTrajectory.cxx:644
python.RingerConstants.Layer
Layer
Definition: RingerConstants.py:42
Trk::GXFTrajectory::setOutlier
void setOutlier(int, bool isoutlier=true)
Definition: GXFTrajectory.cxx:356
Trk::GXFTrajectory::m_mass
double m_mass
Definition: GXFTrajectory.h:145
Trk::GXFTrajectory::nDOF
int nDOF() const
Definition: GXFTrajectory.cxx:519
Trk::GXFTrajectory::setPrefit
void setPrefit(int)
Definition: GXFTrajectory.cxx:404
Trk::GXFTrajectory::operator=
GXFTrajectory & operator=(GXFTrajectory &&rhs)=default
Trk::GXFTrajectory::updateTRTHitCount
void updateTRTHitCount(int index, float oldError)
Definition: GXFTrajectory.cxx:388
Trk::GXFTrajectory::caloElossState
GXFTrackState * caloElossState()
Definition: GXFTrajectory.cxx:639
Trk::GXFTrajectory::m_noutl
int m_noutl
Definition: GXFTrajectory.h:128
Trk::GXFTrajectory::setPrevChi2
void setPrevChi2(double)
Definition: GXFTrajectory.cxx:515
MagneticFieldProperties.h
Trk::GXFTrajectory::numberOfSiliconHits
int numberOfSiliconHits() const
Definition: GXFTrajectory.cxx:438
Trk::GXFTrajectory::m_nupstreambrems
int m_nupstreambrems
Definition: GXFTrajectory.h:126
Trk::GXFTrajectory::m_totx0
double m_totx0
Definition: GXFTrajectory.h:143
Trk::GXFTrajectory::scatteringSigmas
std::vector< std::pair< double, double > > & scatteringSigmas()
Definition: GXFTrajectory.cxx:545
Trk::GXFTrajectory::m_toteloss
double m_toteloss
Definition: GXFTrajectory.h:144
Trk::GXFTrajectory::numberOfBrems
int numberOfBrems() const
Definition: GXFTrajectory.cxx:469
Trk::GXFTrajectory::setConverged
void setConverged(bool)
Definition: GXFTrajectory.cxx:408
Trk::GXFTrajectory::m_converged
bool m_converged
Definition: GXFTrajectory.h:136
Trk::GXFTrajectory::m_straightline
bool m_straightline
Definition: GXFTrajectory.h:111
Trk::GXFTrajectory::totalX0
double totalX0() const
Definition: GXFTrajectory.cxx:620
Trk::GXFTrackState
Definition: GXFTrackState.h:30
Trk::GXFTrajectory::m_nsihits
int m_nsihits
Definition: GXFTrajectory.h:129
Trk::GXFTrajectory::~GXFTrajectory
~GXFTrajectory()=default
Trk::GXFTrajectory::m_nmeasoutl
int m_nmeasoutl
Definition: GXFTrajectory.h:134
Trk::GXFTrajectory::m_prefit
int m_prefit
Definition: GXFTrajectory.h:146
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::GXFTrajectory::m_nscatterers
int m_nscatterers
Definition: GXFTrajectory.h:120
Trk::GXFTrajectory::m_chi2
double m_chi2
Definition: GXFTrajectory.h:117
Trk::GXFTrajectory::m_nupstreamscatterers
int m_nupstreamscatterers
Definition: GXFTrajectory.h:124
Trk::GXFTrajectory::setReferenceParameters
void setReferenceParameters(std::unique_ptr< const TrackParameters >)
Definition: GXFTrajectory.cxx:274
Trk::GXFTrajectory::mass
double mass() const
Definition: GXFTrajectory.cxx:630
Trk::GXFTrajectory::GXFTrajectory
GXFTrajectory(GXFTrajectory &&rhs)=default
Trk::FullField
@ FullField
Field is set to be realistic, but within a given Volume.
Definition: MagneticFieldMode.h:21
Trk::GXFTrajectory::numberOfPseudoMeasurements
int numberOfPseudoMeasurements() const
Definition: GXFTrajectory.cxx:454
Trk::GXFTrajectory::m_nupstreamcaloscatterers
int m_nupstreamcaloscatterers
Definition: GXFTrajectory.h:125
Trk::GXFTrajectory::setBrems
void setBrems(std::vector< double > &)
Definition: GXFTrajectory.cxx:574
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::GXFTrajectory::m_nbrems
int m_nbrems
Definition: GXFTrajectory.h:122
Trk::GXFTrajectory::m_scatteringsigmas
std::vector< std::pair< double, double > > m_scatteringsigmas
Definition: GXFTrajectory.h:138
Trk::GXFTrajectory::scatteringAngles
std::vector< std::pair< double, double > > & scatteringAngles()
Definition: GXFTrajectory.cxx:523
Trk::GXFTrajectory::errors
Amg::VectorX & errors()
Definition: GXFTrajectory.cxx:602
Trk::GXFTrajectory::m_prevchi2
double m_prevchi2
Definition: GXFTrajectory.h:118
Trk::GXFTrajectory::m_nhits
int m_nhits
Definition: GXFTrajectory.h:127
Trk::GXFTrajectory::addMaterialState
void addMaterialState(std::unique_ptr< GXFTrackState >, int index=-1)
Definition: GXFTrajectory.cxx:224
Trk::GXFTrajectory::m_ncaloscatterers
int m_ncaloscatterers
Definition: GXFTrajectory.h:121
Trk::GXFTrajectory::findFirstLastMeasurement
std::pair< GXFTrackState *, GXFTrackState * > findFirstLastMeasurement(void)
Definition: GXFTrajectory.cxx:648
Trk::GXFTrajectory::hasKink
bool hasKink(void)
Definition: GXFTrajectory.cxx:668
Trk::GXFTrajectory::m_ntrthits
int m_ntrthits
Definition: GXFTrajectory.h:130
Trk::GXFTrajectory::m_ntrttubehits
int m_ntrttubehits
Definition: GXFTrajectory.h:132
Trk::GXFTrajectory::prevchi2
double prevchi2() const
Definition: GXFTrajectory.cxx:507
Trk::GXFTrajectory::resetReferenceParameters
void resetReferenceParameters()
Definition: GXFTrajectory.cxx:347
Trk::GXFTrajectory::numberOfTRTHits
int numberOfTRTHits() const
Definition: GXFTrajectory.cxx:442
Trk::GXFTrajectory::m_ntrtprechits
int m_ntrtprechits
Definition: GXFTrajectory.h:131
Trk::GXFTrajectory::setChi2
void setChi2(double)
Definition: GXFTrajectory.cxx:511
Trk::GXFTrajectory::setNumberOfScatterers
void setNumberOfScatterers(int)
Definition: GXFTrajectory.cxx:465
Trk::GXFTrajectory::GXFTrajectory
GXFTrajectory()
Definition: GXFTrajectory.cxx:15
Trk::GXFTrajectory::m_caloelossstate
GXFTrackState * m_caloelossstate
Definition: GXFTrajectory.h:147
Trk::GXFTrajectory::setNumberOfBrems
void setNumberOfBrems(int)
Definition: GXFTrajectory.cxx:473
Trk::GXFTrajectory::reset
void reset()
Definition: GXFTrajectory.cxx:412
Trk::GXFTrajectory::m_fieldprop
MagneticFieldProperties m_fieldprop
Definition: GXFTrajectory.h:112
Trk::GXFTrajectory::weightedResidualDerivatives
Amg::MatrixX & weightedResidualDerivatives()
Definition: GXFTrajectory.cxx:609
Trk::GXFTrajectory::m_brems
std::vector< double > m_brems
Definition: GXFTrajectory.h:139
Trk::GXFTrajectory::setScatteringAngles
void setScatteringAngles(std::vector< std::pair< double, double > > &)
Definition: GXFTrajectory.cxx:558
Trk::GXFTrajectory::m_weightresderiv
Amg::MatrixX m_weightresderiv
Definition: GXFTrajectory.h:142
Trk::GXFTrajectory::converged
bool converged() const
Definition: GXFTrajectory.cxx:422
Trk::GXFTrajectory::numberOfOutliers
int numberOfOutliers() const
Definition: GXFTrajectory.cxx:434
Trk::GXFTrajectory::trackStates
const std::vector< std::unique_ptr< GXFTrackState > > & trackStates() const
Definition: GXFTrajectory.cxx:587
Trk::GXFTrajectory::m_npseudo
int m_npseudo
Definition: GXFTrajectory.h:133
Trk::GXFTrajectory::numberOfUpstreamBrems
int numberOfUpstreamBrems() const
Definition: GXFTrajectory.cxx:488
Trk::Layer
Definition: Layer.h:73
Trk::GXFTrajectory::chi2
double chi2() const
Definition: GXFTrajectory.cxx:503
Trk::GXFTrajectory::conditionalSetCalorimeterEnergyLossState
void conditionalSetCalorimeterEnergyLossState(GXFTrackState *)
Definition: GXFTrajectory.cxx:148