ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
MuonR4::Segment Class Reference

Placeholder for what will later be the muon segment EDM representation. More...

#include <Segment.h>

Collaboration diagram for MuonR4::Segment:

Public Types

using MeasType = std::unique_ptr< CalibratedSpacePoint >
 
using MeasVec = std::vector< MeasType >
 

Public Member Functions

 Segment (Amg::Vector3D &&globPos, Amg::Vector3D &&globDir, const SegmentSeed *parent, MeasVec &&constMeas, double chi2, unsigned int nDoF)
 Segment constructor. More...
 
const MuonGMR4::MuonChamberchamber () const
 Returns the associated chamber. More...
 
const Amg::Vector3Dposition () const
 Returns the global segment position. More...
 
const Amg::Vector3Ddirection () const
 Returns the global segment direction. More...
 
double chi2 () const
 Returns the chi2 of the segment fit. More...
 
unsigned int nDoF () const
 Returns the number of degrees of freedom. More...
 
const MeasVecmeasurements () const
 Returns the associated measurements. More...
 
const SegmentSeedparent () const
 Returns the seed out of which the segment was built. More...
 
const SegmentFit::Covariancecovariance () const
 Returns the uncertainties of the defining parameters. More...
 
const std::vector< double > & chi2PerMeasurement () const
 Returns the chi2 per measurement vector. More...
 
unsigned int nFitIterations () const
 Returns how many iterations the fitter needed to make the segment converge. More...
 
bool hasTimeFit () const
 has the time been fitted More...
 
double segementT0 () const
 Returns the fitted segment time, if there's any. More...
 
void setSegmentT0 (double t0)
 Sets the fitted segment time. More...
 
void setChi2PerMeasurement (std::vector< double > &&chi2vals)
 Set the chi2 per measurement. More...
 
void setCallsToConverge (unsigned int nCalls)
 Set how many iteration the fitter needed to reach convergence. More...
 
void setParUncertainties (SegmentFit::Covariance &&cov)
 Set the uncertainties from the fit. More...
 

Private Attributes

Amg::Vector3D m_globPos {Amg::Vector3D::Zero()}
 
Amg::Vector3D m_globDir {Amg::Vector3D::Zero()}
 
const SegmentSeedm_parent {nullptr}
 
MeasVec m_measurements {}
 
double m_chi2 {0.}
 
unsigned int m_nDoF {0}
 
std::optional< double > m_t0 {std::nullopt}
 
const MuonGMR4::MuonChamberm_chamber {m_parent->chamber()}
 
std::vector< double > m_chi2PerMeasurement {}
 
unsigned int m_nCalls {0}
 
SegmentFit::Covariance m_cov {SegmentFit::Covariance::Identity()}
 

Detailed Description

Placeholder for what will later be the muon segment EDM representation.

For now, just a plain storage for the dummy fit result, to test the implementation of residuals

Definition at line 19 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

Member Typedef Documentation

◆ MeasType

◆ MeasVec

using MuonR4::Segment::MeasVec = std::vector<MeasType>

Constructor & Destructor Documentation

◆ Segment()

MuonR4::Segment::Segment ( Amg::Vector3D &&  globPos,
Amg::Vector3D &&  globDir,
const SegmentSeed parent,
MeasVec &&  constMeas,
double  chi2,
unsigned int  nDoF 
)
inline

Segment constructor.

Parameters
globPosGlobal position of the segment expressed at the associated chamber centre
globDirGlobal direction of the segment
parentSeed out of which the segment has been built
constMeasMeasurements building up the segment
chi2Chi2 of the segment fit
nDoFDegrees of freedom

Definition at line 32 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

37  :
38  m_globPos{std::move(globPos)},
39  m_globDir{std::move(globDir)},
41  m_measurements{std::move(constMeas)},
42  m_chi2{chi2},
43  m_nDoF{nDoF}{}

Member Function Documentation

◆ chamber()

const MuonGMR4::MuonChamber* MuonR4::Segment::chamber ( ) const
inline

Returns the associated chamber.

Definition at line 46 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

46 { return m_chamber; }

◆ chi2()

double MuonR4::Segment::chi2 ( ) const
inline

Returns the chi2 of the segment fit.

Definition at line 52 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

52 { return m_chi2; }

◆ chi2PerMeasurement()

const std::vector<double>& MuonR4::Segment::chi2PerMeasurement ( ) const
inline

Returns the chi2 per measurement vector.

Definition at line 62 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

62 { return m_chi2PerMeasurement; }

◆ covariance()

const SegmentFit::Covariance& MuonR4::Segment::covariance ( ) const
inline

Returns the uncertainties of the defining parameters.

Definition at line 60 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

60 { return m_cov; }

◆ direction()

const Amg::Vector3D& MuonR4::Segment::direction ( ) const
inline

Returns the global segment direction.

Definition at line 50 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

50 { return m_globDir; }

◆ hasTimeFit()

bool MuonR4::Segment::hasTimeFit ( ) const
inline

has the time been fitted

Definition at line 66 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

66 { return m_t0 != std::nullopt; }

◆ measurements()

const MeasVec& MuonR4::Segment::measurements ( ) const
inline

Returns the associated measurements.

Definition at line 56 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

56 { return m_measurements; }

◆ nDoF()

unsigned int MuonR4::Segment::nDoF ( ) const
inline

Returns the number of degrees of freedom.

Definition at line 54 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

54 { return m_nDoF; }

◆ nFitIterations()

unsigned int MuonR4::Segment::nFitIterations ( ) const
inline

Returns how many iterations the fitter needed to make the segment converge.

Definition at line 64 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

64 { return m_nCalls; }

◆ parent()

const SegmentSeed* MuonR4::Segment::parent ( ) const
inline

Returns the seed out of which the segment was built.

Definition at line 58 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

58 { return m_parent; }

◆ position()

const Amg::Vector3D& MuonR4::Segment::position ( ) const
inline

Returns the global segment position.

Definition at line 48 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

48 { return m_globPos; }

◆ segementT0()

double MuonR4::Segment::segementT0 ( ) const
inline

Returns the fitted segment time, if there's any.

Definition at line 68 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

68  {
69  return m_t0.value_or(0);
70  }

◆ setCallsToConverge()

void MuonR4::Segment::setCallsToConverge ( unsigned int  nCalls)
inline

Set how many iteration the fitter needed to reach convergence.

Definition at line 80 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

80  {
81  m_nCalls = nCalls;
82  }

◆ setChi2PerMeasurement()

void MuonR4::Segment::setChi2PerMeasurement ( std::vector< double > &&  chi2vals)
inline

Set the chi2 per measurement.

Definition at line 76 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

76  {
77  m_chi2PerMeasurement = chi2vals;
78  }

◆ setParUncertainties()

void MuonR4::Segment::setParUncertainties ( SegmentFit::Covariance &&  cov)
inline

Set the uncertainties from the fit.

Definition at line 84 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

84  {
85  m_cov = std::move(cov);
86  }

◆ setSegmentT0()

void MuonR4::Segment::setSegmentT0 ( double  t0)
inline

Sets the fitted segment time.

Definition at line 72 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

72  {
73  m_t0 = std::make_optional<double>(t0);
74  }

Member Data Documentation

◆ m_chamber

const MuonGMR4::MuonChamber* MuonR4::Segment::m_chamber {m_parent->chamber()}
private

◆ m_chi2

double MuonR4::Segment::m_chi2 {0.}
private

◆ m_chi2PerMeasurement

std::vector<double> MuonR4::Segment::m_chi2PerMeasurement {}
private

◆ m_cov

SegmentFit::Covariance MuonR4::Segment::m_cov {SegmentFit::Covariance::Identity()}
private

◆ m_globDir

Amg::Vector3D MuonR4::Segment::m_globDir {Amg::Vector3D::Zero()}
private

◆ m_globPos

Amg::Vector3D MuonR4::Segment::m_globPos {Amg::Vector3D::Zero()}
private

◆ m_measurements

MeasVec MuonR4::Segment::m_measurements {}
private

◆ m_nCalls

unsigned int MuonR4::Segment::m_nCalls {0}
private

◆ m_nDoF

unsigned int MuonR4::Segment::m_nDoF {0}
private

◆ m_parent

const SegmentSeed* MuonR4::Segment::m_parent {nullptr}
private

◆ m_t0

std::optional<double> MuonR4::Segment::m_t0 {std::nullopt}
private

The documentation for this class was generated from the following file:
MuonR4::Segment::m_parent
const SegmentSeed * m_parent
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:92
MuonR4::Segment::m_chamber
const MuonGMR4::MuonChamber * m_chamber
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:99
MuonR4::Segment::m_nDoF
unsigned int m_nDoF
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:95
MuonR4::Segment::m_globPos
Amg::Vector3D m_globPos
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:90
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
MuonR4::Segment::m_cov
SegmentFit::Covariance m_cov
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:102
MuonR4::Segment::chi2
double chi2() const
Returns the chi2 of the segment fit.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:52
MuonR4::Segment::m_chi2
double m_chi2
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:94
MuonR4::Segment::nDoF
unsigned int nDoF() const
Returns the number of degrees of freedom.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:54
MuonR4::Segment::m_chi2PerMeasurement
std::vector< double > m_chi2PerMeasurement
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:100
MuonR4::Segment::parent
const SegmentSeed * parent() const
Returns the seed out of which the segment was built.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:58
MuonR4::Segment::m_nCalls
unsigned int m_nCalls
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:101
MuonR4::Segment::m_t0
std::optional< double > m_t0
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:97
MuonR4::Segment::m_measurements
MeasVec m_measurements
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:93
MuonR4::Segment::m_globDir
Amg::Vector3D m_globDir
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:91