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::SpectrometerSectormsSector () const
 Returns the associated MS sector. 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...
 
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 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()}
 Global position of the segment at the chamber centre. More...
 
Amg::Vector3D m_globDir {Amg::Vector3D::Zero()}
 Global direction of the segment. More...
 
const SegmentSeedm_parent {nullptr}
 Seed from which the segment is stemming. More...
 
MeasVec m_measurements {}
 List of associated measurements. More...
 
double m_chi2 {0.}
 
unsigned int m_nDoF {0}
 Number of degrees of freedom in the fit. More...
 
std::optional< double > m_t0 {std::nullopt}
 Fitted time of arrival at the chamber centre. More...
 
unsigned int m_nCalls {0}
 Number of calls to reach the minimum. More...
 
SegmentFit::Covariance m_cov {SegmentFit::Covariance::Identity()}
 Covariance matrix of the fit
More...
 

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 31 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

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

Member Function Documentation

◆ chi2()

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

Returns the chi2 of the segment fit.

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

51 { return m_chi2; }

◆ covariance()

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

Returns the uncertainties of the defining parameters.

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

59 { return m_cov; }

◆ direction()

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

Returns the global segment direction.

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

49 { return m_globDir; }

◆ hasTimeFit()

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

has the time been fitted

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

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

◆ measurements()

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

Returns the associated measurements.

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

55 { return m_measurements; }

◆ msSector()

const MuonGMR4::SpectrometerSector* MuonR4::Segment::msSector ( ) const
inline

Returns the associated MS sector.

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

45 { return m_parent->msSector(); }

◆ nDoF()

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

Returns the number of degrees of freedom.

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

53 { 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 61 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h.

61 { return m_nCalls; }

◆ parent()

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

Returns the seed out of which the segment was built.

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

57 { return m_parent; }

◆ position()

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

Returns the global segment position.

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

47 { return m_globPos; }

◆ segementT0()

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

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

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

65  {
66  return m_t0.value_or(0);
67  }

◆ setCallsToConverge()

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

Set how many iteration the fitter needed to reach convergence.

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

73  {
74  m_nCalls = nCalls;
75  }

◆ setParUncertainties()

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

Set the uncertainties from the fit.

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

77  {
78  m_cov = std::move(cov);
79  }

◆ setSegmentT0()

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

Sets the fitted segment time.

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

69  {
70  m_t0 = std::make_optional<double>(t0);
71  }

Member Data Documentation

◆ m_chi2

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

◆ m_cov

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

Covariance matrix of the fit

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

◆ m_globDir

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

Global direction of the segment.

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

◆ m_globPos

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

Global position of the segment at the chamber centre.

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

◆ m_measurements

MeasVec MuonR4::Segment::m_measurements {}
private

List of associated measurements.

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

◆ m_nCalls

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

Number of calls to reach the minimum.

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

◆ m_nDoF

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

Number of degrees of freedom in the fit.

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

◆ m_parent

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

Seed from which the segment is stemming.

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

◆ m_t0

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

Fitted time of arrival at the chamber centre.

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


The documentation for this class was generated from the following file:
MuonR4::Segment::m_parent
const SegmentSeed * m_parent
Seed from which the segment is stemming.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:88
MuonR4::Segment::m_nDoF
unsigned int m_nDoF
Number of degrees of freedom in the fit.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:94
MuonR4::Segment::m_globPos
Amg::Vector3D m_globPos
Global position of the segment at the chamber centre.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:84
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
MuonR4::Segment::m_cov
SegmentFit::Covariance m_cov
Covariance matrix of the fit
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:100
MuonR4::Segment::chi2
double chi2() const
Returns the chi2 of the segment fit.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:51
MuonR4::Segment::m_chi2
double m_chi2
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:92
MuonR4::Segment::nDoF
unsigned int nDoF() const
Returns the number of degrees of freedom.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:53
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:57
MuonR4::Segment::m_nCalls
unsigned int m_nCalls
Number of calls to reach the minimum.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:98
MuonR4::Segment::m_t0
std::optional< double > m_t0
Fitted time of arrival at the chamber centre.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:96
MuonR4::Segment::m_measurements
MeasVec m_measurements
List of associated measurements.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:90
MuonR4::SegmentSeed::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated chamber.
Definition: SegmentSeed.cxx:39
MuonR4::Segment::m_globDir
Amg::Vector3D m_globDir
Global direction of the segment.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:86