ATLAS Offline Software
CalibratedSpacePoint.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONSPACEPOINT_CALIBSPACEPOINT_H
5 #define MUONSPACEPOINT_CALIBSPACEPOINT_H
6 
8 #include <variant>
9 
10 namespace MuonR4{
16  public:
17 
24  enum class State : uint8_t {
25  Valid = 0,
26  FailedCalib = 1,
27  Outlier = 2,
28  };
29 
34  CalibratedSpacePoint(const SpacePoint* uncalibSpacePoint,
35  Amg::Vector3D&& posInChamber,
36  Amg::Vector3D&& dirInChamber,
37  State st = State::Valid);
38 
39  ~CalibratedSpacePoint() = default;
41  const Amg::Vector3D& positionInChamber() const;
43  const Amg::Vector3D& directionInChamber() const;
45  double driftRadius() const;
47  void setDriftRadius(const double r);
49  using Covariance_t = std::variant<AmgSymMatrix(2), AmgSymMatrix(3)>;
50  const Covariance_t& covariance() const;
52  template <unsigned k>
54  static_assert(k==2 || k==3, "Covariance dimension needs to be 2 or 3");
55  m_cov = cov;
56  }
58  const SpacePoint* spacePoint() const;
63  double time() const;
66  void setTimeMeasurement(double t);
68  bool measuresTime() const;
70  bool measuresPhi() const;
72  bool measuresEta() const;
74  State fitState() const;
76  void setFitState(State st);
78  unsigned dimension() const;
79  private:
80  const SpacePoint* m_parent{nullptr};
83 
84  double m_driftRadius{0.};
86 
87  double m_time{0.};
91  };
92 
93 }
94 
95 #endif
beamspotman.r
def r
Definition: beamspotman.py:676
MuonR4::CalibratedSpacePoint::setCovariance
void setCovariance(const AmgSymMatrix(k)&cov)
Set the covariance matrix of the calibrated space pooint.
Definition: CalibratedSpacePoint.h:53
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
MuonR4::CalibratedSpacePoint::m_dirInChamber
Amg::Vector3D m_dirInChamber
Definition: CalibratedSpacePoint.h:82
SpacePoint.h
MuonR4::CalibratedSpacePoint::State::Outlier
@ Outlier
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonR4::CalibratedSpacePoint::m_posInChamber
Amg::Vector3D m_posInChamber
Definition: CalibratedSpacePoint.h:81
MuonR4::CalibratedSpacePoint::m_measuresTime
bool m_measuresTime
By default the Mdt may measure time.
Definition: CalibratedSpacePoint.h:89
MuonR4::CalibratedSpacePoint::measuresPhi
bool measuresPhi() const
Returns whether the calibrated space point measures phi.
Definition: CalibratedSpacePoint.cxx:49
MuonR4::CalibratedSpacePoint::setDriftRadius
void setDriftRadius(const double r)
Set the drift radius of the calibrated space point after the calibration procedure.
Definition: CalibratedSpacePoint.cxx:30
MuonR4::CalibratedSpacePoint::CalibratedSpacePoint
CalibratedSpacePoint(const SpacePoint *uncalibSpacePoint, Amg::Vector3D &&posInChamber, Amg::Vector3D &&dirInChamber, State st=State::Valid)
Standard constructor.
Definition: CalibratedSpacePoint.cxx:9
MuonR4::CalibratedSpacePoint::State::FailedCalib
@ FailedCalib
MuonR4::CalibratedSpacePoint::m_driftRadius
double m_driftRadius
Definition: CalibratedSpacePoint.h:84
MuonR4::CalibratedSpacePoint::State
State
State flag to distinguish different space point states.
Definition: CalibratedSpacePoint.h:24
MuonR4::CalibratedSpacePoint::type
xAOD::UncalibMeasType type() const
Returns the space point type.
Definition: CalibratedSpacePoint.cxx:36
MuonR4::CalibratedSpacePoint::State::Valid
@ Valid
MuonR4::SpacePoint
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePoint.h:18
MuonR4::CalibratedSpacePoint::setTimeMeasurement
void setTimeMeasurement(double t)
Set the time measurement.
Definition: CalibratedSpacePoint.cxx:42
MuonR4::CalibratedSpacePoint::fitState
State fitState() const
Returns the state of the calibrated space point.
Definition: CalibratedSpacePoint.cxx:55
MuonR4::CalibratedSpacePoint::positionInChamber
const Amg::Vector3D & positionInChamber() const
The position of the calibrated space point inside the chamber.
Definition: CalibratedSpacePoint.cxx:21
MuonR4::CalibratedSpacePoint::m_cov
Covariance_t m_cov
Definition: CalibratedSpacePoint.h:85
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4::CalibratedSpacePoint::m_state
State m_state
Definition: CalibratedSpacePoint.h:90
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::CalibratedSpacePoint::~CalibratedSpacePoint
~CalibratedSpacePoint()=default
MuonR4::CalibratedSpacePoint::dimension
unsigned dimension() const
Returns the local dimension of the measurement.
Definition: CalibratedSpacePoint.cxx:61
MuonR4::CalibratedSpacePoint
The calibrated Space point is created during the calibration process.
Definition: CalibratedSpacePoint.h:15
MuonR4::CalibratedSpacePoint::m_time
double m_time
Definition: CalibratedSpacePoint.h:87
xAOD::UncalibMeasType
UncalibMeasType
Define the type of the uncalibrated measurement.
Definition: MeasurementDefs.h:24
MuonR4::CalibratedSpacePoint::measuresTime
bool measuresTime() const
Returns whether the calibrated space point measures time.
Definition: CalibratedSpacePoint.cxx:46
MuonR4::CalibratedSpacePoint::setFitState
void setFitState(State st)
Set the state of the calibrated space point.
Definition: CalibratedSpacePoint.cxx:58
MuonR4::CalibratedSpacePoint::covariance
const Covariance_t & covariance() const
Definition: CalibratedSpacePoint.cxx:33
MuonR4::CalibratedSpacePoint::spacePoint
const SpacePoint * spacePoint() const
The pointer to the space point out of which this space point has been built.
Definition: CalibratedSpacePoint.cxx:18
MuonR4::AmgSymMatrix
const AmgSymMatrix(2) &SpacePoint
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:150
MuonR4::CalibratedSpacePoint::directionInChamber
const Amg::Vector3D & directionInChamber() const
The direction of the calibrated space point inside the chamber.
Definition: CalibratedSpacePoint.cxx:24
MuonR4::CalibratedSpacePoint::driftRadius
double driftRadius() const
The drift radius of the calibrated space point.
Definition: CalibratedSpacePoint.cxx:27
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
MuonR4::CalibratedSpacePoint::time
double time() const
Current time of the calibrated space point.
Definition: CalibratedSpacePoint.cxx:39
fitman.k
k
Definition: fitman.py:528
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonR4::CalibratedSpacePoint::m_parent
const SpacePoint * m_parent
Definition: CalibratedSpacePoint.h:80
MuonR4::CalibratedSpacePoint::Covariance_t
std::variant< AmgSymMatrix(2), AmgSymMatrix(3)> Covariance_t
The spatial covariance matrix of the calibrated space point.
Definition: CalibratedSpacePoint.h:49
MuonR4::CalibratedSpacePoint::measuresEta
bool measuresEta() const
Returns whether the calibrated space point measures eta.
Definition: CalibratedSpacePoint.cxx:52