ATLAS Offline Software
GXFTrackState.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // GXFTrackState.h
7 // Class grouping all fitter relevant info on a surface-by-surface
8 // basis
10 // (c) ATLAS Detector software
12 
13 #ifndef TRK_GXFTRACKSTATE_H
14 #define TRK_GXFTRACKSTATE_H
15 
20 #include <memory>
21 #include <bitset>
22 
23 
24 namespace Trk {
25 
26  class MeasurementBase;
27  class GXFMaterialEffects;
28  class TransportJacobian;
29 
30  class GXFTrackState {
31  public:
32  GXFTrackState() = delete;
35  GXFTrackState & operator=(const GXFTrackState &) = delete;
37  ~GXFTrackState() = default;
38 
39  GXFTrackState(std::unique_ptr<const MeasurementBase>, std::unique_ptr<const TrackParameters>);
40  GXFTrackState(std::unique_ptr<const TrackParameters>, TrackStateOnSurface::TrackStateOnSurfaceType);
41  GXFTrackState(std::unique_ptr<GXFMaterialEffects>, std::unique_ptr<const TrackParameters>);
43  bool isSane() const;
44 
45 
46  void setMeasurement(std::unique_ptr<const MeasurementBase>);
47  const MeasurementBase *measurement(void);
48 
49  void setTrackParameters(std::unique_ptr<const TrackParameters>);
50  const TrackParameters *trackParameters(void) const;
51 
53  const Surface & associatedSurface() const;
55  Eigen::Matrix<double, 5, 5> & jacobian();
58 
60  void resetTrackCovariance();
61  AmgSymMatrix(5) & trackCovariance(void);
62  bool hasTrackCovariance(void) const;
63  void zeroTrackCovariance(void);
64 
66  const FitQualityOnSurface fitQuality(void);
67 
70 
71  double sinStereo() const;
72  void setSinStereo(double);
73 
74  double *measurementErrors();
75  void setMeasurementErrors(const double *);
76 
78 
79  bool isRecalibrated();
80  void setRecalibrated(bool);
81 
83  void setPosition(Amg::Vector3D &);
84 
85  bool measuresPhi() const;
86  void setMeasuresPhi(bool);
87 
98 
109 
117 
118  std::optional<std::vector<std::unique_ptr<TrackParameters>>> & getHoles(void);
119  void setHoles(std::vector<std::unique_ptr<TrackParameters>> &&);
120 
121  std::unique_ptr<const TrackStateOnSurface>
122  trackStateOnSurface() const;
123 
124  private:
125  std::unique_ptr<const MeasurementBase> m_measurement;
126  std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> m_tsType;
127  std::unique_ptr<const TrackParameters> m_trackpar;
128  std::unique_ptr<GXFMaterialEffects> m_materialEffects;
129  Eigen::Matrix<double, 5, 5> m_jacobian;
131 
132  AmgSymMatrix(5) m_covariancematrix;
134 
136  double m_measerror[5]{};
137  double m_sinstereo;
139  bool m_recalib;
140  bool m_measphi;
142  std::optional<std::vector<std::unique_ptr<TrackParameters>>> m_holes;
143 
144  public:
145  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
146  };
147 
148  inline Eigen::Matrix<double, 5, 5> & GXFTrackState::jacobian() {
149  return m_jacobian;
150  }
151 
153  return m_derivs;
154  }
155 
156  inline AmgSymMatrix(5) & GXFTrackState::trackCovariance(void) {
157  return m_covariancematrix;
158  }
159 
161  return m_trackpar.get();
162  }
163 
165  return m_materialEffects.get();
166  }
167 
169  return m_mType;
170  }
171 
173  m_mType = mt;
174  }
175 
177  return m_recalib;
178  }
179 }
180 #endif
Trk::GXFTrackState::sinStereo
double sinStereo() const
Definition: GXFTrackState.cxx:173
Trk::TransportJacobian
Definition: TransportJacobian.h:46
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Trk::GXFTrackState::m_mType
TrackState::MeasurementType m_mType
Measurement type, eg pixel, SCT, ...
Definition: GXFTrackState.h:138
Trk::GXFTrackState::isRecalibrated
bool isRecalibrated()
Definition: GXFTrackState.h:176
Trk::TrackStateOnSurface::TrackStateOnSurfaceType
TrackStateOnSurfaceType
Definition: TrackStateOnSurface.h:98
TrackParameters.h
Trk::GXFTrackState::fitQuality
const FitQualityOnSurface fitQuality(void)
Definition: GXFTrackState.cxx:210
Trk::GXFTrackState::trackStateOnSurface
std::unique_ptr< const TrackStateOnSurface > trackStateOnSurface() const
Definition: GXFTrackState.cxx:295
Trk::GXFTrackState::GXFTrackState
GXFTrackState()=delete
Trk::GXFTrackState::numberOfMeasuredParameters
int numberOfMeasuredParameters()
Definition: GXFTrackState.cxx:215
TrackStateDefs.h
Trk::GXFTrackState::setStateType
void setStateType(TrackStateOnSurface::TrackStateOnSurfaceType type, bool value=true)
Set a specific type bit.
Definition: GXFTrackState.cxx:278
Trk::GXFTrackState::measurement
const MeasurementBase * measurement(void)
Definition: GXFTrackState.cxx:142
Trk::GXFTrackState::getStateType
bool getStateType(TrackStateOnSurface::TrackStateOnSurfaceType type) const
Retrieve the value of a specific type bit.
Definition: GXFTrackState.cxx:282
Trk::GXFTrackState::GXFTrackState
GXFTrackState(GXFTrackState &&)=default
Trk::GXFTrackState::m_measphi
bool m_measphi
Definition: GXFTrackState.h:140
Trk::GXFTrackState::setMeasuresPhi
void setMeasuresPhi(bool)
Definition: GXFTrackState.cxx:250
athena.value
value
Definition: athena.py:124
FitQualityOnSurface.h
Trk::GXFTrackState::setPosition
void setPosition(Amg::Vector3D &)
Definition: GXFTrackState.cxx:240
Trk::GXFTrackState::measurementType
TrackState::MeasurementType measurementType()
Definition: GXFTrackState.h:168
Trk::GXFTrackState::position
Amg::Vector3D position()
Definition: GXFTrackState.cxx:229
Trk::GXFTrackState::setRecalibrated
void setRecalibrated(bool)
Definition: GXFTrackState.cxx:255
Trk::GXFTrackState::setMeasurementErrors
void setMeasurementErrors(const double *)
Definition: GXFTrackState.cxx:164
Trk::GXFTrackState::m_fitqual
FitQualityOnSurface m_fitqual
Definition: GXFTrackState.h:135
Trk::GXFTrackState::resetStateType
void resetStateType(TrackStateOnSurface::TrackStateOnSurfaceType type, bool value=true)
Set a specific type, wiping all others.
Definition: GXFTrackState.cxx:273
Trk::GXFTrackState::trackParameters
const TrackParameters * trackParameters(void) const
Definition: GXFTrackState.h:160
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
Trk::FitQualityOnSurface
Definition: FitQualityOnSurface.h:19
Trk::GXFTrackState::m_globpos
Amg::Vector3D m_globpos
Definition: GXFTrackState.h:141
Trk::GXFTrackState::m_measerror
double m_measerror[5]
Measurement errors (corrected for stereo angle)
Definition: GXFTrackState.h:136
Trk::GXFTrackState::associatedSurface
const Surface & associatedSurface() const
Definition: GXFTrackState.cxx:183
Trk::GXFTrackState::jacobian
Eigen::Matrix< double, 5, 5 > & jacobian()
Definition: GXFTrackState.h:148
Trk::GXFTrackState::m_holes
std::optional< std::vector< std::unique_ptr< TrackParameters > > > m_holes
Definition: GXFTrackState.h:142
Trk::GXFTrackState::setHoles
void setHoles(std::vector< std::unique_ptr< TrackParameters >> &&)
Definition: GXFTrackState.cxx:290
Trk::GXFTrackState::AmgSymMatrix
AmgSymMatrix(5) m_covariancematrix
Covariance matrix of track parameters at this surface.
Trk::GXFTrackState::setTrackCovariance
void setTrackCovariance(AmgSymMatrix(5) *)
Definition: GXFTrackState.cxx:197
Trk::GXFTrackState::setMeasurementType
void setMeasurementType(TrackState::MeasurementType)
Definition: GXFTrackState.h:172
Trk::GXFTrackState::m_tsType
std::bitset< TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes > m_tsType
type of track state, eg Fittable, Outlier, Scatterer, Brem, Hole
Definition: GXFTrackState.h:126
Trk::GXFTrackState
Definition: GXFTrackState.h:30
Trk::TrackState::MeasurementType
MeasurementType
enum describing the flavour of MeasurementBase
Definition: TrackStateDefs.h:26
Trk::GXFTrackState::setMeasurement
void setMeasurement(std::unique_ptr< const MeasurementBase >)
Definition: GXFTrackState.cxx:137
Trk::GXFTrackState::AmgSymMatrix
AmgSymMatrix(5) &trackCovariance(void)
Trk::GXFTrackState::setDerivatives
void setDerivatives(Amg::MatrixX &)
Definition: GXFTrackState.cxx:155
Trk::GXFTrackState::m_trackpar
std::unique_ptr< const TrackParameters > m_trackpar
track parameters
Definition: GXFTrackState.h:127
Trk::GXFMaterialEffects
class that is similar to MaterialEffectsOnTrack, but has 'set' methods for more flexibility during tr...
Definition: GXFMaterialEffects.h:24
Trk::GXFTrackState::m_materialEffects
std::unique_ptr< GXFMaterialEffects > m_materialEffects
Material effects on track (ie scatterer, brem)
Definition: GXFTrackState.h:128
Trk::GXFTrackState::operator=
GXFTrackState & operator=(GXFTrackState &&)=default
Trk::GXFTrackState::m_measurement
std::unique_ptr< const MeasurementBase > m_measurement
The measurement defining the track state.
Definition: GXFTrackState.h:125
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::GXFTrackState::measurementErrors
double * measurementErrors()
Definition: GXFTrackState.cxx:159
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::GXFTrackState::~GXFTrackState
~GXFTrackState()=default
Trk::GXFTrackState::m_recalib
bool m_recalib
Has this measurement already been recalibrated?
Definition: GXFTrackState.h:139
Trk::GXFTrackState::getHoles
std::optional< std::vector< std::unique_ptr< TrackParameters > > > & getHoles(void)
Definition: GXFTrackState.cxx:286
Trk::GXFTrackState::m_derivs
Amg::MatrixX m_derivs
Derivatives of local parameters wrt fit parameters.
Definition: GXFTrackState.h:130
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::GXFTrackState::zeroTrackCovariance
void zeroTrackCovariance(void)
Definition: GXFTrackState.cxx:263
Trk::GXFTrackState::measuresPhi
bool measuresPhi() const
Definition: GXFTrackState.cxx:245
Trk::GXFTrackState::resetTrackCovariance
void resetTrackCovariance()
reset covariance to nullptr
Definition: GXFTrackState.cxx:267
Trk::GXFTrackState::isSane
bool isSane() const
Definition: GXFTrackState.cxx:112
Trk::GXFTrackState::setTrackParameters
void setTrackParameters(std::unique_ptr< const TrackParameters >)
Definition: GXFTrackState.cxx:146
Trk::GXFTrackState::setFitQuality
void setFitQuality(FitQualityOnSurface)
Definition: GXFTrackState.cxx:206
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::GXFTrackState::hasTrackCovariance
bool hasTrackCovariance(void) const
Definition: GXFTrackState.cxx:259
Trk::GXFTrackState::derivatives
Amg::MatrixX & derivatives()
Definition: GXFTrackState.h:152
Trk::GXFTrackState::materialEffects
GXFMaterialEffects * materialEffects()
Definition: GXFTrackState.h:164
Trk::GXFTrackState::m_jacobian
Eigen::Matrix< double, 5, 5 > m_jacobian
Transport jacobian wrt previous state.
Definition: GXFTrackState.h:129
Trk::GXFTrackState::setJacobian
void setJacobian(TransportJacobian &)
Definition: GXFTrackState.cxx:150
Trk::GXFTrackState::m_covariance_set
bool m_covariance_set
Definition: GXFTrackState.h:133
Trk::GXFTrackState::m_sinstereo
double m_sinstereo
stereo angle
Definition: GXFTrackState.h:137
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::GXFTrackState::operator=
GXFTrackState & operator=(GXFTrackState &)=delete
TrackStateOnSurface.h
Trk::GXFTrackState::operator=
GXFTrackState & operator=(const GXFTrackState &)=delete
Trk::GXFTrackState::setSinStereo
void setSinStereo(double)
Definition: GXFTrackState.cxx:178