ATLAS Offline Software
Classes | 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:

Classes

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

Public Types

using MeasType = std::unique_ptr< CalibratedSpacePoint >
 Calibrated space point type. More...
 
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...
 
const HitSummarysummary () const
 Returns the hit summary. 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...
 
HitSummary m_summary {}
 Calculate the hit summary. 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

Calibrated space point type.

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

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

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()) {
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()) {
35  case sTgcIdHelper::sTgcChannelTypes::Strip:
38  m_summary.tech = meas->type();
39  break;
40  case sTgcIdHelper::sTgcChannelTypes::Pad:
43  break;
44  case sTgcIdHelper::sTgcChannelTypes::Wire:
46  break;
47  }
48  }
49  default:
50  break;
51  }
52  }
53  }

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; }

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

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

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

HitSummary MuonR4::Segment::m_summary {}
private

Calculate the hit summary.

Definition at line 102 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 files:
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
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
MuonR4::Segment::m_summary
HitSummary m_summary
Calculate the hit summary.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:102
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:45
MuonR4::Segment::HitSummary::tech
xAOD::UncalibMeasType tech
Precision technology.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:71
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
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:47
MuonR4::Segment::HitSummary::nEtaTrigHits
unsigned nEtaTrigHits
Number of good Rpc / Tgc eta hits.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:65
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
MuonR4::Segment::MeasType
std::unique_ptr< CalibratedSpacePoint > MeasType
Calibrated space point type.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:23
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:51
xAOD::Other
@ Other
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::CalibratedSpacePoint::State::Valid
@ Valid
MuonR4::Segment::HitSummary::nPrecHits
unsigned nPrecHits
Number of good Mdt / Mm / sTgc eta hits.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:63
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::HitSummary::nPrecOutlier
unsigned nPrecOutlier
Number of Mdt / Mm / sTGC eta outliers.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:69
MuonR4::Segment::HitSummary::nPhiHits
unsigned nPhiHits
Number of good Rpc / Tgc / sTgc phi hits.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:67
MuonR4::Segment::m_measurements
MeasVec m_measurements
List of associated measurements.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:90
xAOD::UncalibMeasType::RpcStripType
@ RpcStripType
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
MuonR4::SegmentSeed::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated chamber.
Definition: SegmentSeed.cxx:39
xAOD::sTgcMeasurement_v1
Definition: sTgcMeasurement_v1.h:21
MuonR4::Segment::m_globDir
Amg::Vector3D m_globDir
Global direction of the segment.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:86