ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
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  State : uint8_t { State::Valid = 0, State::FailedCalib = 1, State::Outlier = 2 }
 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. More...
 
 ~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. More...
 
double time () const
 Returns the measurement's recorded time. More...
 
bool isStraw () const
 Returns whether the measurement is a Mdt. More...
 
bool hasTime () const
 Returns whether the measurement carries time information. More...
 
bool measuresLoc0 () const
 Returns whether the measurement constains the non-bending direction. More...
 
bool measuresLoc1 () const
 Returns whether the measurement constains the bending direction. More...
 
double driftRadius () const
 : Returns the size of the drift radius More...
 
const Cov_tcovariance () const
 Returns the covariance array. More...
 
void setCovariance (const Cov_t &cov)
 Set the covariance matrix of the calibrated space point. More...
 
void setDriftRadius (const double r)
 Update the drift radius of the space point measurement. More...
 
const SpacePointspacePoint () const
 The pointer to the space point out of which this space point has been built. More...
 
xAOD::UncalibMeasType type () const
 Returns the space point type. More...
 
void setTimeMeasurement (double t)
 Set the time measurement. More...
 
bool measuresPhi () const
 Returns whether the calibrated space point measures phi. More...
 
bool measuresEta () const
 Returns whether the calibrated space point measures eta. More...
 
State fitState () const
 Returns the state of the calibrated space point. More...
 
void setFitState (State st)
 Set the state of the calibrated space point. More...
 
unsigned dimension () const
 Returns the local dimension of the measurement. More...
 

Private Member Functions

void print (std::ostream &ostr) const
 

Private Attributes

const SpacePointm_parent {nullptr}
 
Amg::Vector3D m_posInChamber {Amg::Vector3D::Zero()}
 
double m_driftRadius {0.}
 
Cov_t m_cov {Acts::filledArray<double, 3>(0.)}
 
double m_time {0.}
 
bool m_measuresTime {type() == xAOD::UncalibMeasType::MdtDriftCircleType}
 By default the Mdt may measure time. More...
 
State m_state {State::Valid}
 

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

Definition at line 16 of file CalibratedSpacePoint.h.

◆ CovIdx

Definition at line 17 of file CalibratedSpacePoint.h.

Member Enumeration Documentation

◆ State

enum MuonR4::CalibratedSpacePoint::State : 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
Enumerator
Valid 
FailedCalib 
Outlier 

Definition at line 24 of file CalibratedSpacePoint.h.

24  : uint8_t {
25  Valid = 0,
26  FailedCalib = 1,
27  Outlier = 2,
28  };

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 8 of file CalibratedSpacePoint.cxx.

10  :
11  m_parent{uncalibSpacePoint},
12  m_posInChamber{posInChamber},
13  m_state{st} {
14  }

◆ ~CalibratedSpacePoint()

MuonR4::CalibratedSpacePoint::~CalibratedSpacePoint ( )
default

Member Function Documentation

◆ covariance()

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

Returns the covariance array.

Definition at line 30 of file CalibratedSpacePoint.cxx.

30  {
31  return m_cov;
32  }

◆ dimension()

unsigned MuonR4::CalibratedSpacePoint::dimension ( ) const

Returns the local dimension of the measurement.

Definition at line 53 of file CalibratedSpacePoint.cxx.

53 { return measuresEta() + measuresPhi(); }

◆ driftRadius()

double MuonR4::CalibratedSpacePoint::driftRadius ( ) const

: Returns the size of the drift radius

Definition at line 37 of file CalibratedSpacePoint.cxx.

37  {
38  return m_driftRadius;
39  }

◆ fitState()

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

Returns the state of the calibrated space point.

Definition at line 51 of file CalibratedSpacePoint.cxx.

51 { return m_state; }

◆ hasTime()

bool MuonR4::CalibratedSpacePoint::hasTime ( ) const

Returns whether the measurement carries time information.

Definition at line 33 of file CalibratedSpacePoint.cxx.

33 { return m_measuresTime; }

◆ isStraw()

bool MuonR4::CalibratedSpacePoint::isStraw ( ) const

Returns whether the measurement is a Mdt.

Definition at line 36 of file CalibratedSpacePoint.cxx.

◆ localPosition()

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

Definition at line 16 of file CalibratedSpacePoint.cxx.

16 { return m_posInChamber; }

◆ measuresEta()

bool MuonR4::CalibratedSpacePoint::measuresEta ( ) const

Returns whether the calibrated space point measures eta.

Definition at line 50 of file CalibratedSpacePoint.cxx.

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

◆ measuresLoc0()

bool MuonR4::CalibratedSpacePoint::measuresLoc0 ( ) const

Returns whether the measurement constains the non-bending direction.

Definition at line 34 of file CalibratedSpacePoint.cxx.

34 { return measuresPhi(); }

◆ measuresLoc1()

bool MuonR4::CalibratedSpacePoint::measuresLoc1 ( ) const

Returns whether the measurement constains the bending direction.

Definition at line 35 of file CalibratedSpacePoint.cxx.

35 { return measuresEta(); }

◆ measuresPhi()

bool MuonR4::CalibratedSpacePoint::measuresPhi ( ) const

Returns whether the calibrated space point measures phi.

Definition at line 49 of file CalibratedSpacePoint.cxx.

49 { 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 25 of file CalibratedSpacePoint.cxx.

25  {
26  static const Amg::Vector3D s_Dir{Amg::Vector3D::UnitZ()};
27  return m_parent? m_parent->planeNormal() : s_Dir;
28  }

◆ print()

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

Definition at line 56 of file CalibratedSpacePoint.cxx.

56  {
58  ostr<<"Calibrated SP "<<spacePoint()->msSector()->idHelperSvc()->toString(spacePoint()->identify());
59  } else {
60  ostr<<"Auxiliary measurement";
61  }
62  ostr<<" @ "<<Amg::toString(localPosition());
64  ostr<<", wire: "<<Amg::toString(sensorDirection())<<", drift R: "<<driftRadius();
65  } else {
66  ostr<<", (dir/toNext/planeNormal): "<<Amg::toString(sensorDirection())
68  }
69  auto boolToStr = [](const bool B) -> std::string {
70  return B ? "yay" : "nay";
71  };
72  if (hasTime()) {
73  ostr<<", time: "<<time();
74  }
75  ostr<<", measures eta/phi/time: "<<boolToStr(measuresEta())
76  <<"/"<<boolToStr(measuresPhi())<<"/"<<boolToStr(hasTime());
77  ostr<<", covariance (eta/phi/time): ("<<m_cov[Acts::toUnderlying(CovIdx::etaCov)]<<", "
78  <<m_cov[Acts::toUnderlying(CovIdx::phiCov)]<<", "<<m_cov[Acts::toUnderlying(CovIdx::timeCov)]<<")";
79  }

◆ sensorDirection()

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

Definition at line 17 of file CalibratedSpacePoint.cxx.

17  {
18  static const Amg::Vector3D s_Dir{Amg::Vector3D::UnitX()};
19  return m_parent? m_parent->sensorDirection() : s_Dir;
20  }

◆ setCovariance()

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

Set the covariance matrix of the calibrated space point.

Definition at line 54 of file CalibratedSpacePoint.cxx.

54 {m_cov = cov;}

◆ setDriftRadius()

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

Update the drift radius of the space point measurement.

Parameters
rRadius to set

Definition at line 40 of file CalibratedSpacePoint.cxx.

40 { m_driftRadius = r; }

◆ setFitState()

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

Set the state of the calibrated space point.

Definition at line 52 of file CalibratedSpacePoint.cxx.

52 { m_state = st; }

◆ setTimeMeasurement()

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

Set the time measurement.

Parameters
tTime of Record

Definition at line 45 of file CalibratedSpacePoint.cxx.

45  {
46  m_time = t;
47  m_measuresTime = true;
48  }

◆ 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 15 of file CalibratedSpacePoint.cxx.

15 { return m_parent; }

◆ time()

double MuonR4::CalibratedSpacePoint::time ( ) const

Returns the measurement's recorded time.

Definition at line 44 of file CalibratedSpacePoint.cxx.

44 { return m_time; }

◆ toNextSensor()

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

Definition at line 21 of file CalibratedSpacePoint.cxx.

21  {
22  static const Amg::Vector3D s_Dir{Amg::Vector3D::UnitY()};
23  return m_parent? m_parent->toNextSensor() : s_Dir;
24  }

◆ 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 41 of file CalibratedSpacePoint.cxx.

41  {
43  }

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 87 of file CalibratedSpacePoint.h.

87  {
88  sp.print(ostr);
89  return ostr;
90  }

Member Data Documentation

◆ m_cov

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

Definition at line 97 of file CalibratedSpacePoint.h.

◆ m_driftRadius

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

Definition at line 96 of file CalibratedSpacePoint.h.

◆ m_measuresTime

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

By default the Mdt may measure time.

Definition at line 101 of file CalibratedSpacePoint.h.

◆ m_parent

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

Definition at line 93 of file CalibratedSpacePoint.h.

◆ m_posInChamber

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

Definition at line 94 of file CalibratedSpacePoint.h.

◆ m_state

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

Definition at line 102 of file CalibratedSpacePoint.h.

◆ m_time

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

Definition at line 99 of file CalibratedSpacePoint.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:672
MuonR4::SpacePoint::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:84
xAOD::identify
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:82
MuonR4::CalibratedSpacePoint::toNextSensor
const Amg::Vector3D & toNextSensor() const
Definition: CalibratedSpacePoint.cxx:21
MuonR4::SpacePoint::type
xAOD::UncalibMeasType type() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:88
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:558
MuonR4::SpacePoint::planeNormal
const Amg::Vector3D & planeNormal() const
Returns the vector pointing out of the measurement plane.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:53
MuonR4::SpacePoint::CovIdx::timeCov
@ timeCov
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:200
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonR4::SpacePoint::CovIdx::etaCov
@ etaCov
MuonR4::CalibratedSpacePoint::localPosition
const Amg::Vector3D & localPosition() const
Definition: CalibratedSpacePoint.cxx:16
MuonR4::SpacePoint::measuresPhi
bool measuresPhi() const
: Does the space point contain a phi measurement
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:91
MuonR4::CalibratedSpacePoint::m_posInChamber
Amg::Vector3D m_posInChamber
Definition: CalibratedSpacePoint.h:94
MuonR4::CalibratedSpacePoint::m_cov
Cov_t m_cov
Definition: CalibratedSpacePoint.h:97
MuonR4::CalibratedSpacePoint::m_measuresTime
bool m_measuresTime
By default the Mdt may measure time.
Definition: CalibratedSpacePoint.h:101
MuonR4::CalibratedSpacePoint::measuresPhi
bool measuresPhi() const
Returns whether the calibrated space point measures phi.
Definition: CalibratedSpacePoint.cxx:49
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonR4::CalibratedSpacePoint::hasTime
bool hasTime() const
Returns whether the measurement carries time information.
Definition: CalibratedSpacePoint.cxx:33
python.getProblemFolderFromLogs.st
st
Definition: getProblemFolderFromLogs.py:68
MuonR4::CalibratedSpacePoint::m_driftRadius
double m_driftRadius
Definition: CalibratedSpacePoint.h:96
xAOD::Other
@ Other
MuonR4::CalibratedSpacePoint::type
xAOD::UncalibMeasType type() const
Returns the space point type.
Definition: CalibratedSpacePoint.cxx:41
MuonGMR4::SpectrometerSector::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the IdHelpeSvc.
Definition: SpectrometerSector.cxx:61
MuonR4::SpacePoint::CovIdx::phiCov
@ phiCov
MuonR4::SpacePoint::toNextSensor
const Amg::Vector3D & toNextSensor() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:52
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4::CalibratedSpacePoint::m_state
State m_state
Definition: CalibratedSpacePoint.h:102
Muon::IMuonIdHelperSvc::toString
virtual std::string toString(const Identifier &id) const =0
print all fields to string
MuonR4::SpacePoint::measuresEta
bool measuresEta() const
: Does the space point contain an eta measurement
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:94
MuonR4::CalibratedSpacePoint::m_time
double m_time
Definition: CalibratedSpacePoint.h:99
MuonR4::CalibratedSpacePoint::planeNormal
const Amg::Vector3D & planeNormal() const
Returns the vector pointing out of the measurement plane.
Definition: CalibratedSpacePoint.cxx:25
OfflineHitType::Outlier
@ Outlier
MuonR4::CalibratedSpacePoint::sensorDirection
const Amg::Vector3D & sensorDirection() const
Definition: CalibratedSpacePoint.cxx:17
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:15
MuonR4::CalibratedSpacePoint::driftRadius
double driftRadius() const
: Returns the size of the drift radius
Definition: CalibratedSpacePoint.cxx:37
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
MuonR4::CalibratedSpacePoint::time
double time() const
Returns the measurement's recorded time.
Definition: CalibratedSpacePoint.cxx:44
MuonR4::SpacePoint::sensorDirection
const Amg::Vector3D & sensorDirection() const
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:51
MuonR4::CalibratedSpacePoint::m_parent
const SpacePoint * m_parent
Definition: CalibratedSpacePoint.h:93
MuonR4::CalibratedSpacePoint::measuresEta
bool measuresEta() const
Returns whether the calibrated space point measures eta.
Definition: CalibratedSpacePoint.cxx:50