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

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

#include <Segment.h>

Collaboration diagram for MuonR4::Segment:

Classes

struct  HitSummary
 Helper struct to summarize the hit count. More...

Public Types

using MeasType = std::unique_ptr<CalibratedSpacePoint>
 Calibrated space point type.
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.
const MuonGMR4::SpectrometerSectormsSector () const
 Returns the associated MS sector.
const Amg::Vector3Dposition () const
 Returns the global segment position.
const Amg::Vector3Ddirection () const
 Returns the global segment direction.
double chi2 () const
 Returns the chi2 of the segment fit.
unsigned int nDoF () const
 Returns the number of degrees of freedom.
const MeasVecmeasurements () const
 Returns the associated measurements.
const SegmentSeedparent () const
 Returns the seed out of which the segment was built.
const SegmentFit::Covariancecovariance () const
 Returns the uncertainties of the defining parameters.
unsigned int nFitIterations () const
 Returns how many iterations the fitter needed to make the segment converge.
bool hasTimeFit () const
 has the time been fitted
double segementT0 () const
 Returns the fitted segment time, if there's any.
const HitSummarysummary () const
 Returns the hit summary.
void setSegmentT0 (double t0)
 Sets the fitted segment time.
void setCallsToConverge (unsigned int nCalls)
 Set how many iteration the fitter needed to reach convergence.
void setParUncertainties (SegmentFit::Covariance &&cov)
 Set the uncertainties from the fit.

Private Attributes

Amg::Vector3D m_globPos {Amg::Vector3D::Zero()}
 Global position of the segment at the chamber centre.
Amg::Vector3D m_globDir {Amg::Vector3D::Zero()}
 Global direction of the segment.
const SegmentSeedm_parent {nullptr}
 Seed from which the segment is stemming.
MeasVec m_measurements {}
 List of associated measurements.
double m_chi2 {0.}
unsigned int m_nDoF {0}
 Number of degrees of freedom in the fit.
std::optional< double > m_t0 {std::nullopt}
 Fitted time of arrival at the chamber centre.
unsigned int m_nCalls {0}
 Number of calls to reach the minimum.
SegmentFit::Covariance m_cov {SegmentFit::Covariance::Identity()}
 Covariance matrix of the fit.
HitSummary m_summary {}
 Calculate the hit summary.

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

Calibrated space point type.

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

◆ MeasVec

Constructor & Destructor Documentation

◆ Segment()

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

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 8 of file MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/src/Segment.cxx.

10 :
11 m_globPos{std::move(globPos)},
12 m_globDir{std::move(globDir)},
14 m_measurements{std::move(constMeas)},
15 m_chi2{chi2},
16 m_nDoF{nDoF}{
17
18 for (const MeasType& meas : m_measurements) {
19 switch(meas->type()) {
22 m_summary.nPrecHits += meas->fitState() == CalibratedSpacePoint::State::Valid;
23 m_summary.nPrecOutlier += (meas->fitState() != CalibratedSpacePoint::State::Valid);
24 m_summary.tech = meas->type();
25 break;
29 m_summary.nEtaTrigHits += meas->measuresEta();
30 m_summary.nPhiHits += meas->measuresPhi();
31 break;
33 auto* prd = static_cast<const xAOD::sTgcMeasurement*>(meas->spacePoint()->primaryMeasurement());
34 switch (prd->channelType()) {
36 m_summary.nPrecHits += meas->fitState() == CalibratedSpacePoint::State::Valid;
37 m_summary.nPrecOutlier += (meas->fitState() != CalibratedSpacePoint::State::Valid);
38 m_summary.tech = meas->type();
39 break;
41 ++m_summary.nEtaTrigHits;
42 ++m_summary.nPhiHits;
43 break;
45 ++m_summary.nPhiHits;
46 break;
47 }
48 }
49 default:
50 break;
51 }
52 }
53 }
unsigned int m_nDoF
Number of degrees of freedom in the fit.
unsigned int nDoF() const
Returns the number of degrees of freedom.
const SegmentSeed * parent() const
Returns the seed out of which the segment was built.
const SegmentSeed * m_parent
Seed from which the segment is stemming.
std::unique_ptr< CalibratedSpacePoint > MeasType
Calibrated space point type.
Amg::Vector3D m_globPos
Global position of the segment at the chamber centre.
sTgcMeasurement_v1 sTgcMeasurement

Member Function Documentation

◆ chi2()

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

Returns the chi2 of the segment fit.

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

45{ return m_chi2; }

◆ covariance()

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

Returns the uncertainties of the defining parameters.

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

53{ return m_cov; }

◆ direction()

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

Returns the global segment direction.

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

43{ return m_globDir; }

◆ hasTimeFit()

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

has the time been fitted

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

57{ return m_t0 != std::nullopt; }
std::optional< double > m_t0
Fitted time of arrival at the chamber centre.

◆ measurements()

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

Returns the associated measurements.

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

49{ return m_measurements; }

◆ msSector()

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

Returns the associated MS sector.

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

39{ return m_parent->msSector(); }

◆ nDoF()

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

Returns the number of degrees of freedom.

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

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

55{ return m_nCalls; }

◆ parent()

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

Returns the seed out of which the segment was built.

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

51{ return m_parent; }

◆ position()

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

Returns the global segment position.

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

41{ return m_globPos; }

◆ segementT0()

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

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

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

59{ return m_t0.value_or(0); }

◆ setCallsToConverge()

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

Set how many iteration the fitter needed to reach convergence.

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

60 {
61 m_nCalls = nCalls;
62 }

◆ setParUncertainties()

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

Set the uncertainties from the fit.

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

64 {
65 m_cov = std::move(cov);
66 }

◆ setSegmentT0()

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

Sets the fitted segment time.

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

56 {
57 m_t0 = std::make_optional<double>(t0);
58 }
static Double_t t0

◆ summary()

const HitSummary & MuonR4::Segment::summary ( ) const
inline

Returns the hit summary.

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

74{ return m_summary; }

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.

100{SegmentFit::Covariance::Identity()};

◆ 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.

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

◆ 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.

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

◆ 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.

90{};

◆ 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.

98{0};

◆ 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.

94{0};

◆ 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.

88{nullptr};

◆ m_summary

HitSummary MuonR4::Segment::m_summary {}
private

Calculate the hit summary.

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

102{};

◆ 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.

96{std::nullopt};

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