ATLAS Offline Software
Loading...
Searching...
No Matches
CalibratedSpacePoint.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONSPACEPOINT_CALIBSPACEPOINT_H
5#define MUONSPACEPOINT_CALIBSPACEPOINT_H
6
8
9namespace MuonR4{
15 public:
26 enum class State : std::uint8_t {
27 Valid = 1,
31 };
32
33 static std::string toString(const State s);
38 CalibratedSpacePoint(const SpacePoint* uncalibSpacePoint,
39 Amg::Vector3D&& posInChamber,
40 State st = State::Valid);
41
43 /*** @brief: Position of the space point inside the chamber */
44 const Amg::Vector3D& localPosition() const;
45 /*** @brief: Returns the direction parallel to the primary channel, i.e. the strip or the wire */
46 const Amg::Vector3D& sensorDirection() const;
47 /*** @brief: Returns the vector pointing to the adjacent channel in the chamber */
48 const Amg::Vector3D& toNextSensor() const;
50 const Amg::Vector3D& planeNormal() const;
52 double time() const;
54 bool isStraw() const;
56 bool hasTime() const;
58 bool measuresLoc0() const;
60 bool measuresLoc1() const;
62 double driftRadius() const;
64 const Cov_t& covariance() const;
65
67 void setCovariance(const Cov_t& cov);
70 void setDriftRadius(const double r);
71
73 const SpacePoint* spacePoint() const;
79 void setTimeMeasurement(double t);
81 bool measuresPhi() const;
83 bool measuresEta() const;
85 State fitState() const;
87 void setFitState(State st);
89 unsigned dimension() const;
91 void setBeamDirection(Amg::Vector3D&& beamDir);
92
93 friend std::ostream& operator<<(std::ostream& ostr, const CalibratedSpacePoint& sp) {
94 sp.print(ostr);
95 return ostr;
96 }
97 private:
99 void print(std::ostream& ostr) const;
101 Amg::Vector3D m_posInChamber{Amg::Vector3D::Zero()};
103 Cov_t m_cov{Acts::filledArray<double, 3>(0.)};
105 double m_driftRadius{0.};
107 double m_time{0.};
110 const SpacePoint* m_parent{nullptr};
112 std::shared_ptr<Amg::Vector3D> m_beamLine{};
114 State m_state{State::Valid};
117
118 };
119 static_assert(Acts::Experimental::CompositeSpacePoint<CalibratedSpacePoint>);
120
121
122}
123
124#endif
static Double_t sp
double driftRadius() const
: Returns the size of the drift radius
Amg::Vector3D m_posInChamber
Calibrated position.
void setDriftRadius(const double r)
Update the drift radius of the space point measurement.
void setTimeMeasurement(double t)
Set the time measurement.
const Amg::Vector3D & toNextSensor() const
const Amg::Vector3D & sensorDirection() const
bool hasTime() const
Returns whether the measurement carries time information.
bool m_measuresTime
time flag (By default true for Mdt detectors)
void setBeamDirection(Amg::Vector3D &&beamDir)
Sets the beamline direction.
bool measuresEta() const
Returns whether the calibrated space point measures eta.
const Amg::Vector3D & planeNormal() const
Returns the vector pointing out of the measurement plane.
double m_time
Calibrated time (Acts units)
const Amg::Vector3D & localPosition() const
bool isStraw() const
Returns whether the measurement is a Mdt.
static std::string toString(const State s)
Converts the state enum into a string.
void setFitState(State st)
Set the state of the calibrated space point.
bool measuresLoc1() const
Returns whether the measurement constains the bending direction.
friend std::ostream & operator<<(std::ostream &ostr, const CalibratedSpacePoint &sp)
bool measuresLoc0() const
Returns whether the measurement constains the non-bending direction.
void setCovariance(const Cov_t &cov)
Set the covariance matrix of the calibrated space point.
double time() const
Returns the measurement's recorded time.
State m_state
Calibration state.
CalibratedSpacePoint(const SpacePoint *uncalibSpacePoint, Amg::Vector3D &&posInChamber, State st=State::Valid)
Standard constructor.
void print(std::ostream &ostr) const
Print function.
const SpacePoint * spacePoint() const
The pointer to the space point out of which this space point has been built.
xAOD::UncalibMeasType type() const
Returns the space point type.
std::shared_ptr< Amg::Vector3D > m_beamLine
Direction of the beamline (Beamspot constraint)
const Cov_t & covariance() const
Returns the covariance array.
bool measuresPhi() const
Returns whether the calibrated space point measures phi.
unsigned dimension() const
Returns the local dimension of the measurement.
const SpacePoint * m_parent
Uncalibrated space point from which this space point is constructed.
State
State flag to distinguish different space point states.
double m_driftRadius
Calibrated drift radius.
State fitState() const
Returns the state of the calibrated space point.
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
std::array< double, 3 > Cov_t
Abrivation of the covariance type.
int r
Definition globals.cxx:22
Eigen::Matrix< double, 3, 1 > Vector3D
This header ties the generic definitions in this package.
CalibratedSpacePoint::State State
UncalibMeasType
Define the type of the uncalibrated measurement.