ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::CalibratedSpacePoint Class Reference

The calibrated Space point is created during the calibration process. More...

#include <CalibratedSpacePoint.h>

Collaboration diagram for MuonR4::CalibratedSpacePoint:

Public Types

enum class  State : std::uint8_t { Valid = 1 , FailedCalib , Outlier , Duplicate }
 State flag to distinguish different space point states. More...
using Cov_t = SpacePoint::Cov_t
using CovIdx = SpacePoint::CovIdx

Public Member Functions

 CalibratedSpacePoint (const SpacePoint *uncalibSpacePoint, Amg::Vector3D &&posInChamber, State st=State::Valid)
 Standard constructor.
 ~CalibratedSpacePoint ()=default
const Amg::Vector3DlocalPosition () const
const Amg::Vector3DsensorDirection () const
const Amg::Vector3DtoNextSensor () const
const Amg::Vector3DplaneNormal () const
 Returns the vector pointing out of the measurement plane.
double time () const
 Returns the measurement's recorded time.
bool isStraw () const
 Returns whether the measurement is a Mdt.
bool hasTime () const
 Returns whether the measurement carries time information.
bool measuresLoc0 () const
 Returns whether the measurement constains the non-bending direction.
bool measuresLoc1 () const
 Returns whether the measurement constains the bending direction.
double driftRadius () const
 : Returns the size of the drift radius
const Cov_tcovariance () const
 Returns the covariance array.
void setCovariance (const Cov_t &cov)
 Set the covariance matrix of the calibrated space point.
void setDriftRadius (const double r)
 Update the drift radius of the space point measurement.
const SpacePointspacePoint () 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.
void setTimeMeasurement (double t)
 Set the time measurement.
bool measuresPhi () const
 Returns whether the calibrated space point measures phi.
bool measuresEta () const
 Returns whether the calibrated space point measures eta.
State fitState () const
 Returns the state of the calibrated space point.
void setFitState (State st)
 Set the state of the calibrated space point.
unsigned dimension () const
 Returns the local dimension of the measurement.
void setBeamDirection (Amg::Vector3D &&beamDir)
 Sets the beamline direction.

Static Public Member Functions

static std::string toString (const State s)
 Converts the state enum into a string.

Private Member Functions

void print (std::ostream &ostr) const
 Print function.

Private Attributes

Amg::Vector3D m_posInChamber {Amg::Vector3D::Zero()}
 Calibrated position.
Cov_t m_cov {Acts::filledArray<double, 3>(0.)}
 Covariance array.
double m_driftRadius {0.}
 Calibrated drift radius.
double m_time {0.}
 Calibrated time (Acts units)
const SpacePointm_parent {nullptr}
 Uncalibrated space point from which this space point is constructed.
std::shared_ptr< Amg::Vector3Dm_beamLine {}
 Direction of the beamline (Beamspot constraint)
State m_state {State::Valid}
 Calibration state.
bool m_measuresTime {type() == xAOD::UncalibMeasType::MdtDriftCircleType}
 time flag (By default true for Mdt detectors)

Friends

std::ostream & operator<< (std::ostream &ostr, const CalibratedSpacePoint &sp)

Detailed Description

The calibrated Space point is created during the calibration process.

It usually exploits the information of the external tracking seed. Calibrated space points may also be created without a link to a measurement space point. In this case, they serve in an analogous way as the Trk::PseudoMeasurement

Definition at line 14 of file CalibratedSpacePoint.h.

Member Typedef Documentation

◆ Cov_t

◆ CovIdx

Member Enumeration Documentation

◆ State

enum class MuonR4::CalibratedSpacePoint::State : std::uint8_t
strong

State flag to distinguish different space point states.

  • Valid: Calibration of the space point was successful and it should be used in the fit
  • FailedCalib: The calibration procedure produced invalid constants and the space point shall not be included in the current chi2 iteration, but may tried in the next cycle
  • Outlier: The Space point is an outlier and shall never be included in the fit. It's kept for the hit counting purpose but nothing else
  • Duplicate: The hit is marked during the hole recovery procedure as a duplicate. It should never end up on the final trajectory
Enumerator
Valid 
FailedCalib 
Outlier 
Duplicate 

Definition at line 26 of file CalibratedSpacePoint.h.

26 : std::uint8_t {
27 Valid = 1,
28 FailedCalib,
29 Outlier,
30 Duplicate
31 };

Constructor & Destructor Documentation

◆ CalibratedSpacePoint()

MuonR4::CalibratedSpacePoint::CalibratedSpacePoint ( const SpacePoint * uncalibSpacePoint,
Amg::Vector3D && posInChamber,
State st = State::Valid )

Standard constructor.

Parameters
uncalibSpacePointPointer to the underyling uncalibrated space point
posInChamberCalibrated position of the space point inside the chamber
dirInChamberDirection of the space point in chamber

Definition at line 24 of file CalibratedSpacePoint.cxx.

26 :
27 m_posInChamber{std::move(posInChamber)},
28 m_parent{uncalibSpacePoint},
29 m_state{st} {
30 }
Amg::Vector3D m_posInChamber
Calibrated position.
State m_state
Calibration state.
const SpacePoint * m_parent
Uncalibrated space point from which this space point is constructed.

◆ ~CalibratedSpacePoint()

MuonR4::CalibratedSpacePoint::~CalibratedSpacePoint ( )
default

Member Function Documentation

◆ covariance()

const CalibratedSpacePoint::Cov_t & MuonR4::CalibratedSpacePoint::covariance ( ) const

Returns the covariance array.

Definition at line 49 of file CalibratedSpacePoint.cxx.

49 {
50 return m_cov;
51 }

◆ dimension()

unsigned MuonR4::CalibratedSpacePoint::dimension ( ) const

Returns the local dimension of the measurement.

Definition at line 76 of file CalibratedSpacePoint.cxx.

76{ return measuresEta() + measuresPhi(); }
bool measuresEta() const
Returns whether the calibrated space point measures eta.
bool measuresPhi() const
Returns whether the calibrated space point measures phi.

◆ driftRadius()

double MuonR4::CalibratedSpacePoint::driftRadius ( ) const

: Returns the size of the drift radius

Definition at line 60 of file CalibratedSpacePoint.cxx.

60 {
61 return m_driftRadius;
62 }
double m_driftRadius
Calibrated drift radius.

◆ fitState()

CalibratedSpacePoint::State MuonR4::CalibratedSpacePoint::fitState ( ) const

Returns the state of the calibrated space point.

Definition at line 74 of file CalibratedSpacePoint.cxx.

74{ return m_state; }

◆ hasTime()

bool MuonR4::CalibratedSpacePoint::hasTime ( ) const

Returns whether the measurement carries time information.

Definition at line 52 of file CalibratedSpacePoint.cxx.

52{ return m_measuresTime; }
bool m_measuresTime
time flag (By default true for Mdt detectors)

◆ isStraw()

bool MuonR4::CalibratedSpacePoint::isStraw ( ) const

Returns whether the measurement is a Mdt.

Definition at line 55 of file CalibratedSpacePoint.cxx.

55 {
56 using enum xAOD::UncalibMeasType;
57 const auto t = type();
58 return t == MdtDriftCircleType || (t == Other && m_beamLine != nullptr);
59 }
xAOD::UncalibMeasType type() const
Returns the space point type.
std::shared_ptr< Amg::Vector3D > m_beamLine
Direction of the beamline (Beamspot constraint)
UncalibMeasType
Define the type of the uncalibrated measurement.

◆ localPosition()

const Amg::Vector3D & MuonR4::CalibratedSpacePoint::localPosition ( ) const

Definition at line 32 of file CalibratedSpacePoint.cxx.

32{ return m_posInChamber; }

◆ measuresEta()

bool MuonR4::CalibratedSpacePoint::measuresEta ( ) const

Returns whether the calibrated space point measures eta.

Definition at line 73 of file CalibratedSpacePoint.cxx.

73{ return !m_parent || m_parent->measuresEta(); }

◆ measuresLoc0()

bool MuonR4::CalibratedSpacePoint::measuresLoc0 ( ) const

Returns whether the measurement constains the non-bending direction.

Definition at line 53 of file CalibratedSpacePoint.cxx.

53{ return measuresPhi(); }

◆ measuresLoc1()

bool MuonR4::CalibratedSpacePoint::measuresLoc1 ( ) const

Returns whether the measurement constains the bending direction.

Definition at line 54 of file CalibratedSpacePoint.cxx.

54{ return measuresEta(); }

◆ measuresPhi()

bool MuonR4::CalibratedSpacePoint::measuresPhi ( ) const

Returns whether the calibrated space point measures phi.

Definition at line 72 of file CalibratedSpacePoint.cxx.

72{ return !m_parent || m_parent->measuresPhi(); }

◆ planeNormal()

const Amg::Vector3D & MuonR4::CalibratedSpacePoint::planeNormal ( ) const

Returns the vector pointing out of the measurement plane.

Definition at line 44 of file CalibratedSpacePoint.cxx.

44 {
45 static const Amg::Vector3D s_Dir{Amg::Vector3D::UnitZ()};
46 return m_parent ? m_parent->planeNormal() : (m_beamLine ? zero : s_Dir);
47 }
void zero(TH2 *h)
zero the contents of a 2d histogram
Eigen::Matrix< double, 3, 1 > Vector3D

◆ print()

void MuonR4::CalibratedSpacePoint::print ( std::ostream & ostr) const
private

Print function.

Definition at line 82 of file CalibratedSpacePoint.cxx.

82 {
84 ostr<<"Calibrated SP "<<spacePoint()->msSector()->idHelperSvc()->toString(spacePoint()->identify());
85 } else {
86 ostr<<"Auxiliary measurement";
87 }
88 ostr<<" ("<<toString(fitState())<<")";
89 ostr<<" @ "<<Amg::toString(localPosition());
91 ostr<<", wire: "<<Amg::toString(sensorDirection())<<", drift R: "<<driftRadius();
92 } else {
93 ostr<<", (dir/toNext/planeNormal): "<<Amg::toString(sensorDirection())
95 }
96 auto boolToStr = [](const bool B) -> std::string {
97 return B ? "yay" : "nay";
98 };
99 if (hasTime()) {
100 ostr<<", time: "<<time();
101 }
102 ostr<<", measures eta/phi/time: "<<boolToStr(measuresEta())
103 <<"/"<<boolToStr(measuresPhi())<<"/"<<boolToStr(hasTime());
104 ostr<<", covariance (eta/phi/time): ("<<m_cov[Acts::toUnderlying(CovIdx::etaCov)]<<", "
105 <<m_cov[Acts::toUnderlying(CovIdx::phiCov)]<<", "<<m_cov[Acts::toUnderlying(CovIdx::timeCov)]<<")";
106 }
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the IdHelpeSvc.
double driftRadius() const
: Returns the size of the drift radius
const Amg::Vector3D & toNextSensor() const
const Amg::Vector3D & sensorDirection() const
bool hasTime() const
Returns whether the measurement carries time information.
const Amg::Vector3D & planeNormal() const
Returns the vector pointing out of the measurement plane.
const Amg::Vector3D & localPosition() const
static std::string toString(const State s)
Converts the state enum into a string.
double time() const
Returns the measurement's recorded time.
const SpacePoint * spacePoint() const
The pointer to the space point out of which this space point has been built.
State fitState() const
Returns the state of the calibrated space point.
virtual std::string toString(const Identifier &id) const =0
print all fields to string
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.

◆ sensorDirection()

const Amg::Vector3D & MuonR4::CalibratedSpacePoint::sensorDirection ( ) const

Definition at line 33 of file CalibratedSpacePoint.cxx.

33 {
34 static const Amg::Vector3D s_Dir{Amg::Vector3D::UnitX()};
35 return m_parent? m_parent->sensorDirection() : (m_beamLine ? (*m_beamLine) : s_Dir);
36 }

◆ setBeamDirection()

void MuonR4::CalibratedSpacePoint::setBeamDirection ( Amg::Vector3D && beamDir)

Sets the beamline direction.

Definition at line 78 of file CalibratedSpacePoint.cxx.

78 {
79 m_beamLine = std::make_unique<Amg::Vector3D>(std::move(beamDir));
80 }

◆ setCovariance()

void MuonR4::CalibratedSpacePoint::setCovariance ( const Cov_t & cov)

Set the covariance matrix of the calibrated space point.

Definition at line 77 of file CalibratedSpacePoint.cxx.

◆ setDriftRadius()

void MuonR4::CalibratedSpacePoint::setDriftRadius ( const double r)

Update the drift radius of the space point measurement.

Parameters
rRadius to set

Definition at line 63 of file CalibratedSpacePoint.cxx.

63{ m_driftRadius = r; }
int r
Definition globals.cxx:22

◆ setFitState()

void MuonR4::CalibratedSpacePoint::setFitState ( State st)

Set the state of the calibrated space point.

Definition at line 75 of file CalibratedSpacePoint.cxx.

75{ m_state = st; }

◆ setTimeMeasurement()

void MuonR4::CalibratedSpacePoint::setTimeMeasurement ( double t)

Set the time measurement.

Parameters
tTime of Record

Definition at line 68 of file CalibratedSpacePoint.cxx.

68 {
69 m_time = t;
70 m_measuresTime = true;
71 }
double m_time
Calibrated time (Acts units)

◆ spacePoint()

const SpacePoint * MuonR4::CalibratedSpacePoint::spacePoint ( ) const

The pointer to the space point out of which this space point has been built.

Definition at line 31 of file CalibratedSpacePoint.cxx.

31{ return m_parent; }

◆ time()

double MuonR4::CalibratedSpacePoint::time ( ) const

Returns the measurement's recorded time.

Definition at line 67 of file CalibratedSpacePoint.cxx.

67{ return m_time; }

◆ toNextSensor()

const Amg::Vector3D & MuonR4::CalibratedSpacePoint::toNextSensor ( ) const

To calculate the residual only the sensor direction is needed. Set the planeNormal & toNextSensor to zero to avoid that the measurement is picked up by e.g. the fast line fitter

Definition at line 37 of file CalibratedSpacePoint.cxx.

37 {
38 static const Amg::Vector3D s_Dir{Amg::Vector3D::UnitY()};
42 return m_parent? m_parent->toNextSensor() : (m_beamLine ? zero : s_Dir);
43 }

◆ toString()

std::string MuonR4::CalibratedSpacePoint::toString ( const State s)
static

Converts the state enum into a string.

Definition at line 10 of file CalibratedSpacePoint.cxx.

10 {
11 switch (s){
12 case State::Valid:
13 return "valid";
14 case State::Outlier:
15 return "outlier";
16 case State::FailedCalib:
17 return "failed calibration";
18 case State::Duplicate:
19 return "duplicate";
20
21 }
22 return "unknown";
23 }

◆ type()

xAOD::UncalibMeasType MuonR4::CalibratedSpacePoint::type ( ) const

Returns the space point type.

If the calibrated space point is built without a valid point to a spacePoint, e.g. external beamspot constraint, Other is returned

Definition at line 64 of file CalibratedSpacePoint.cxx.

64 {
66 }

◆ operator<<

std::ostream & operator<< ( std::ostream & ostr,
const CalibratedSpacePoint & sp )
friend

Definition at line 93 of file CalibratedSpacePoint.h.

93 {
94 sp.print(ostr);
95 return ostr;
96 }
static Double_t sp

Member Data Documentation

◆ m_beamLine

std::shared_ptr<Amg::Vector3D> MuonR4::CalibratedSpacePoint::m_beamLine {}
private

Direction of the beamline (Beamspot constraint)

Definition at line 112 of file CalibratedSpacePoint.h.

112{};

◆ m_cov

Cov_t MuonR4::CalibratedSpacePoint::m_cov {Acts::filledArray<double, 3>(0.)}
private

Covariance array.

Definition at line 103 of file CalibratedSpacePoint.h.

103{Acts::filledArray<double, 3>(0.)};

◆ m_driftRadius

double MuonR4::CalibratedSpacePoint::m_driftRadius {0.}
private

Calibrated drift radius.

Definition at line 105 of file CalibratedSpacePoint.h.

105{0.};

◆ m_measuresTime

bool MuonR4::CalibratedSpacePoint::m_measuresTime {type() == xAOD::UncalibMeasType::MdtDriftCircleType}
private

time flag (By default true for Mdt detectors)

Definition at line 116 of file CalibratedSpacePoint.h.

◆ m_parent

const SpacePoint* MuonR4::CalibratedSpacePoint::m_parent {nullptr}
private

Uncalibrated space point from which this space point is constructed.

Definition at line 110 of file CalibratedSpacePoint.h.

110{nullptr};

◆ m_posInChamber

Amg::Vector3D MuonR4::CalibratedSpacePoint::m_posInChamber {Amg::Vector3D::Zero()}
private

Calibrated position.

Definition at line 101 of file CalibratedSpacePoint.h.

101{Amg::Vector3D::Zero()};

◆ m_state

State MuonR4::CalibratedSpacePoint::m_state {State::Valid}
private

Calibration state.

Definition at line 114 of file CalibratedSpacePoint.h.

114{State::Valid};

◆ m_time

double MuonR4::CalibratedSpacePoint::m_time {0.}
private

Calibrated time (Acts units)

Definition at line 107 of file CalibratedSpacePoint.h.

107{0.};

The documentation for this class was generated from the following files: