ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::TrackSegmentMatchResult Struct Reference

Class with matching return information. More...

#include <MuonTrackSegmentMatchResult.h>

Inheritance diagram for Muon::TrackSegmentMatchResult:
Collaboration diagram for Muon::TrackSegmentMatchResult:

Public Types

enum  CutType {
  PosXCut , PosYCut , PosXPullCut , PosYPullCut ,
  AngXCut , AngYCut , AngXPullCut , AngYPullCut ,
  MatchChiSquaredCut , NumberOfCutTypes
}
enum  Reason {
  Unknown , NoCutsApplied , PassedAllCuts , PassedMatchChiSquaredCut ,
  PassedPosAngleCuts , FailedCuts , SegmentMatching , NoSegmentPointer ,
  StereoAngleWithoutPhi , NoClosestPars , FieldNotOk , NoClosestSegment ,
  SegmentMatch , NoMomentumWithMagField , ExtrapolFailed , ExtrapolNoErrors ,
  NoMeasErrors , PredLocalAnglesFailed , AngleMeasErrFailed , AnglePredErrFailed ,
  CovarInverseFailed , LocalDirFailed , NumberOfReasons
}

Public Member Functions

 TrackSegmentMatchResult ()
virtual ~TrackSegmentMatchResult ()
virtual void clear ()
void resetCuts ()
 Reset all cuts (applied & passed)
void setCutPassed (CutType cut)
 Set cut applied and cut passed.
void setCutFailed (CutType cut)
 Set cut applied, but not cut passed.
bool passedCut (CutType cut) const
 Did it pass the cut?
bool failedCut (CutType cut) const
 Did it fail the cut?
bool appliedCut (CutType cut) const
 Was the cut applied ?
bool appliedAnyCut () const
 Was any cut applied ?
bool passedAllCuts () const
 Did all of the cuts that were applied pass?
std::string failedCutsString () const
 String with all cuts that were applied and failed.
std::string passedCutsString () const
 String with all cuts that were applied and passed.
std::string reasonString () const

Static Public Member Functions

static std::string cutString (CutType cut)
 turn enum CutType into a string
static std::string reasonString (Reason r)
 turn enum Reason into a string

Public Attributes

double localPosXDiff {}
double localPosYDiff {}
double localAngleXDiff {}
double localAngleYDiff {}
double posXMeasErr2 {}
double posYMeasErr2 {}
double posXPredErr2 {}
double posYPredErr2 {}
double posXAlignErr2 {}
double posYAlignErr2 {}
double posXTotalErr2 {}
double posYTotalErr2 {}
double angleXMeasErr2 {}
double angleYMeasErr2 {}
double angleXPredErr2 {}
double angleYPredErr2 {}
double angleXAlignErr2 {}
double angleYAlignErr2 {}
double angleXTotalErr2 {}
double angleYTotalErr2 {}
double matchChiSquared {}
Amg::MatrixX predictionCovariance
Amg::MatrixX measuredCovariance
Amg::MatrixX totalCovariance
Amg::VectorX diffVector
Identifier trackChamberId
Identifier segmentChamberId
const Trk::Tracktrack {}
const MuonSegmentsegment {}
Reason reason
bool havePosX {}
bool havePosY {}
bool havePosXError {}
bool havePosYError {}
bool haveAngleX {}
bool haveAngleY {}
bool haveAngleXError {}
bool haveAngleYError {}
bool haveMatchChiSquared {}
bool matchOK {}

Private Attributes

int m_failedCuts {}
int m_passedCuts {}

Detailed Description

Class with matching return information.

Definition at line 29 of file MuonTrackSegmentMatchResult.h.

Member Enumeration Documentation

◆ CutType

◆ Reason

Enumerator
Unknown 
NoCutsApplied 
PassedAllCuts 
PassedMatchChiSquaredCut 
PassedPosAngleCuts 
FailedCuts 
SegmentMatching 
NoSegmentPointer 
StereoAngleWithoutPhi 
NoClosestPars 
FieldNotOk 
NoClosestSegment 
SegmentMatch 
NoMomentumWithMagField 
ExtrapolFailed 
ExtrapolNoErrors 
NoMeasErrors 
PredLocalAnglesFailed 
AngleMeasErrFailed 
AnglePredErrFailed 
CovarInverseFailed 
LocalDirFailed 
NumberOfReasons 

Definition at line 49 of file MuonTrackSegmentMatchResult.h.

49 {
50 Unknown,
73 };

Constructor & Destructor Documentation

◆ TrackSegmentMatchResult()

Muon::TrackSegmentMatchResult::TrackSegmentMatchResult ( )

Definition at line 22 of file MuonTrackSegmentMatchResult.cxx.

◆ ~TrackSegmentMatchResult()

Muon::TrackSegmentMatchResult::~TrackSegmentMatchResult ( )
virtual

Member Function Documentation

◆ appliedAnyCut()

bool Muon::TrackSegmentMatchResult::appliedAnyCut ( ) const
inline

◆ appliedCut()

bool Muon::TrackSegmentMatchResult::appliedCut ( CutType cut) const
inline

Was the cut applied ?

Definition at line 149 of file MuonTrackSegmentMatchResult.h.

149{ return (m_passedCuts & (1 << cut)) || (m_failedCuts & (1 << cut)); }
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.

◆ clear()

void Muon::TrackSegmentMatchResult::clear ( )
virtual

Reimplemented in Muon::MooCandidateMatchingTool::MooTrackSegmentMatchResult.

Definition at line 29 of file MuonTrackSegmentMatchResult.cxx.

29 {
30 localPosXDiff = 0.0;
31 localPosYDiff = 0.0;
32 localAngleXDiff = 0.0;
33 localAngleYDiff = 0.0;
34 posXMeasErr2 = 0.0;
35 posXPredErr2 = 0.0;
36 posXAlignErr2 = 0.0;
37 posXTotalErr2 = 0.0;
38 posYMeasErr2 = 0.0;
39 posYPredErr2 = 0.0;
40 posYAlignErr2 = 0.0;
41 posYTotalErr2 = 0.0;
42 angleXMeasErr2 = 0.0;
43 angleXPredErr2 = 0.0;
44 angleXAlignErr2 = 0.0;
45 angleXTotalErr2 = 0.0;
46 angleYMeasErr2 = 0.0;
47 angleYPredErr2 = 0.0;
48 angleYAlignErr2 = 0.0;
49 angleYTotalErr2 = 0.0;
50 matchChiSquared = 0.0;
51 trackChamberId = Identifier();
52 segmentChamberId = Identifier();
53 predictionCovariance.setZero();
54 measuredCovariance.setZero();
55 totalCovariance.setZero();
56 diffVector.setZero();
57 track = nullptr;
58 segment = nullptr;
59 havePosX = false;
60 havePosY = false;
61 haveAngleX = false;
62 haveAngleY = false;
63 havePosXError = false;
64 havePosYError = false;
65 haveAngleXError = false;
66 haveAngleYError = false;
67 haveMatchChiSquared = false;
68 matchOK = true;
70 }

◆ cutString()

std::string Muon::TrackSegmentMatchResult::cutString ( CutType cut)
static

turn enum CutType into a string

Definition at line 72 of file MuonTrackSegmentMatchResult.cxx.

72 {
73 if (static_cast<int>(cut) < 0 || static_cast<int>(cut) >= static_cast<int>(NumberOfCutTypes)) { return "CutTypeOutOfRange"; }
74
75 switch (cut) {
76 case PosXCut: return "PosXCut";
77 case PosYCut: return "PosYCut";
78 case AngXCut: return "AngleXCut";
79 case AngYCut: return "AngleYCut";
80 case PosXPullCut: return "PosXPullCut";
81 case PosYPullCut: return "PosYPullCut";
82 case AngXPullCut: return "AngleXPullCut";
83 case AngYPullCut: return "AngleYPullCut";
84 case MatchChiSquaredCut: return "ChiSquaredMatchCut";
85 default: return "CutTypeNotInList";
86 }
87
88 return "";
89 }

◆ failedCut()

bool Muon::TrackSegmentMatchResult::failedCut ( CutType cut) const
inline

Did it fail the cut?

Returns true if cut was applied and failed

Definition at line 146 of file MuonTrackSegmentMatchResult.h.

146{ return (m_failedCuts & (1 << cut)); }

◆ failedCutsString()

std::string Muon::TrackSegmentMatchResult::failedCutsString ( ) const

String with all cuts that were applied and failed.

Definition at line 120 of file MuonTrackSegmentMatchResult.cxx.

120 {
121 std::string failedStr;
122 for (int i = 0; i < (int)NumberOfCutTypes; ++i) {
123 CutType cut = static_cast<CutType>(i);
124 if (appliedCut(cut) && failedCut(cut)) {
125 if (!failedStr.empty()) failedStr += ",";
126 failedStr += TrackSegmentMatchResult::cutString(cut);
127 }
128 }
129 return failedStr;
130 }
bool failedCut(CutType cut) const
Did it fail the cut?
bool appliedCut(CutType cut) const
Was the cut applied ?
static std::string cutString(CutType cut)
turn enum CutType into a string

◆ passedAllCuts()

bool Muon::TrackSegmentMatchResult::passedAllCuts ( ) const
inline

Did all of the cuts that were applied pass?

Definition at line 155 of file MuonTrackSegmentMatchResult.h.

155{ return !m_failedCuts; }

◆ passedCut()

bool Muon::TrackSegmentMatchResult::passedCut ( CutType cut) const
inline

Did it pass the cut?

Returns true if cut was not applied or passed

Definition at line 143 of file MuonTrackSegmentMatchResult.h.

143{ return !(m_failedCuts & (1 << cut)); }

◆ passedCutsString()

std::string Muon::TrackSegmentMatchResult::passedCutsString ( ) const

String with all cuts that were applied and passed.

Definition at line 133 of file MuonTrackSegmentMatchResult.cxx.

133 {
134 std::string passedStr;
135 for (int i = 0; i < (int)NumberOfCutTypes; ++i) {
136 CutType cut = static_cast<CutType>(i);
137 if (appliedCut(cut) && passedCut(cut)) {
138 if (!passedStr.empty()) passedStr += ",";
139 passedStr += cutString(cut);
140 }
141 }
142 return passedStr;
143 }
bool passedCut(CutType cut) const
Did it pass the cut?

◆ reasonString() [1/2]

std::string Muon::TrackSegmentMatchResult::reasonString ( ) const

Definition at line 145 of file MuonTrackSegmentMatchResult.cxx.

◆ reasonString() [2/2]

std::string Muon::TrackSegmentMatchResult::reasonString ( Reason r)
static

turn enum Reason into a string

Definition at line 91 of file MuonTrackSegmentMatchResult.cxx.

91 {
92 if (static_cast<int>(r) < 0 || static_cast<int>(r) >= static_cast<int>(NumberOfReasons)) { return "ReasonOutOfRange"; }
93 switch (r) {
94 case Unknown: return "Unknown";
95 case NoCutsApplied: return "NoCutsApplied";
96 case PassedAllCuts: return "PassedAllCuts";
97 case PassedMatchChiSquaredCut: return "PassedMatchChiSquaredCut";
98 case PassedPosAngleCuts: return "PassedPosAngleCuts";
99 case FailedCuts: return "FailedCuts";
100 case SegmentMatching: return "SegmentMatching";
101 case NoSegmentPointer: return "NoSegmentPointer";
102 case StereoAngleWithoutPhi: return "StereoAngleWithoutPhi";
103 case NoClosestPars: return "NoClosestPars";
104 case FieldNotOk: return "FieldNotOk";
105 case NoClosestSegment: return "NoClosestSegment";
106 case SegmentMatch: return "SegmentMatch";
107 case NoMomentumWithMagField: return "NoMomentumWithMagField";
108 case ExtrapolFailed: return "ExtrapolationFailed";
109 case ExtrapolNoErrors: return "ExtrapolationNoErrors";
110 case NoMeasErrors: return "NoMeasErrors";
111 case AngleMeasErrFailed: return "AngleMeasErrFailed";
112 case AnglePredErrFailed: return "AnglePredErrFailed";
113 case LocalDirFailed: return "LocalDirFailed";
114
115 default: return "ReasonNotInList";
116 }
117 }
int r
Definition globals.cxx:22

◆ resetCuts()

void Muon::TrackSegmentMatchResult::resetCuts ( )
inline

Reset all cuts (applied & passed)

Definition at line 131 of file MuonTrackSegmentMatchResult.h.

131 {
132 m_failedCuts = 0;
133 m_passedCuts = 0;
134 }

◆ setCutFailed()

void Muon::TrackSegmentMatchResult::setCutFailed ( CutType cut)
inline

Set cut applied, but not cut passed.

Definition at line 140 of file MuonTrackSegmentMatchResult.h.

140{ m_failedCuts |= (1 << cut); }

◆ setCutPassed()

void Muon::TrackSegmentMatchResult::setCutPassed ( CutType cut)
inline

Set cut applied and cut passed.

Definition at line 137 of file MuonTrackSegmentMatchResult.h.

137{ m_passedCuts |= (1 << cut); }

Member Data Documentation

◆ angleXAlignErr2

double Muon::TrackSegmentMatchResult::angleXAlignErr2 {}

Definition at line 97 of file MuonTrackSegmentMatchResult.h.

97{};

◆ angleXMeasErr2

double Muon::TrackSegmentMatchResult::angleXMeasErr2 {}

Definition at line 93 of file MuonTrackSegmentMatchResult.h.

93{};

◆ angleXPredErr2

double Muon::TrackSegmentMatchResult::angleXPredErr2 {}

Definition at line 95 of file MuonTrackSegmentMatchResult.h.

95{};

◆ angleXTotalErr2

double Muon::TrackSegmentMatchResult::angleXTotalErr2 {}

Definition at line 99 of file MuonTrackSegmentMatchResult.h.

99{}; // measured + predicted + alignment

◆ angleYAlignErr2

double Muon::TrackSegmentMatchResult::angleYAlignErr2 {}

Definition at line 98 of file MuonTrackSegmentMatchResult.h.

98{};

◆ angleYMeasErr2

double Muon::TrackSegmentMatchResult::angleYMeasErr2 {}

Definition at line 94 of file MuonTrackSegmentMatchResult.h.

94{};

◆ angleYPredErr2

double Muon::TrackSegmentMatchResult::angleYPredErr2 {}

Definition at line 96 of file MuonTrackSegmentMatchResult.h.

96{};

◆ angleYTotalErr2

double Muon::TrackSegmentMatchResult::angleYTotalErr2 {}

Definition at line 100 of file MuonTrackSegmentMatchResult.h.

100{}; // measured + predicted + alignment

◆ diffVector

Amg::VectorX Muon::TrackSegmentMatchResult::diffVector

Definition at line 105 of file MuonTrackSegmentMatchResult.h.

◆ haveAngleX

bool Muon::TrackSegmentMatchResult::haveAngleX {}

Definition at line 115 of file MuonTrackSegmentMatchResult.h.

115{}; // have X angle difference available

◆ haveAngleXError

bool Muon::TrackSegmentMatchResult::haveAngleXError {}

Definition at line 117 of file MuonTrackSegmentMatchResult.h.

117{}; // have total error on X angle difference available

◆ haveAngleY

bool Muon::TrackSegmentMatchResult::haveAngleY {}

Definition at line 116 of file MuonTrackSegmentMatchResult.h.

116{}; // have Y angle difference available

◆ haveAngleYError

bool Muon::TrackSegmentMatchResult::haveAngleYError {}

Definition at line 118 of file MuonTrackSegmentMatchResult.h.

118{}; // have total error on X angle difference available

◆ haveMatchChiSquared

bool Muon::TrackSegmentMatchResult::haveMatchChiSquared {}

Definition at line 119 of file MuonTrackSegmentMatchResult.h.

119{}; // have total match chi-squared available

◆ havePosX

bool Muon::TrackSegmentMatchResult::havePosX {}

Definition at line 111 of file MuonTrackSegmentMatchResult.h.

111{}; // have X position difference available

◆ havePosXError

bool Muon::TrackSegmentMatchResult::havePosXError {}

Definition at line 113 of file MuonTrackSegmentMatchResult.h.

113{}; // have total error on X position difference available

◆ havePosY

bool Muon::TrackSegmentMatchResult::havePosY {}

Definition at line 112 of file MuonTrackSegmentMatchResult.h.

112{}; // have Y position difference available

◆ havePosYError

bool Muon::TrackSegmentMatchResult::havePosYError {}

Definition at line 114 of file MuonTrackSegmentMatchResult.h.

114{}; // have total error on Y position difference available

◆ localAngleXDiff

double Muon::TrackSegmentMatchResult::localAngleXDiff {}

Definition at line 83 of file MuonTrackSegmentMatchResult.h.

83{};

◆ localAngleYDiff

double Muon::TrackSegmentMatchResult::localAngleYDiff {}

Definition at line 84 of file MuonTrackSegmentMatchResult.h.

84{};

◆ localPosXDiff

double Muon::TrackSegmentMatchResult::localPosXDiff {}

Definition at line 81 of file MuonTrackSegmentMatchResult.h.

81{};

◆ localPosYDiff

double Muon::TrackSegmentMatchResult::localPosYDiff {}

Definition at line 82 of file MuonTrackSegmentMatchResult.h.

82{};

◆ m_failedCuts

int Muon::TrackSegmentMatchResult::m_failedCuts {}
private

Definition at line 169 of file MuonTrackSegmentMatchResult.h.

169{}; // bitpattern with failed cuts (bits given by enum CutType)

◆ m_passedCuts

int Muon::TrackSegmentMatchResult::m_passedCuts {}
private

Definition at line 170 of file MuonTrackSegmentMatchResult.h.

170{}; // bitpattern with passed cuts (bits given by enum CutType)

◆ matchChiSquared

double Muon::TrackSegmentMatchResult::matchChiSquared {}

Definition at line 101 of file MuonTrackSegmentMatchResult.h.

101{};

◆ matchOK

bool Muon::TrackSegmentMatchResult::matchOK {}

Definition at line 120 of file MuonTrackSegmentMatchResult.h.

120{}; // Final result: was the match OK or not

◆ measuredCovariance

Amg::MatrixX Muon::TrackSegmentMatchResult::measuredCovariance

Definition at line 103 of file MuonTrackSegmentMatchResult.h.

◆ posXAlignErr2

double Muon::TrackSegmentMatchResult::posXAlignErr2 {}

Definition at line 89 of file MuonTrackSegmentMatchResult.h.

89{};

◆ posXMeasErr2

double Muon::TrackSegmentMatchResult::posXMeasErr2 {}

Definition at line 85 of file MuonTrackSegmentMatchResult.h.

85{};

◆ posXPredErr2

double Muon::TrackSegmentMatchResult::posXPredErr2 {}

Definition at line 87 of file MuonTrackSegmentMatchResult.h.

87{};

◆ posXTotalErr2

double Muon::TrackSegmentMatchResult::posXTotalErr2 {}

Definition at line 91 of file MuonTrackSegmentMatchResult.h.

91{}; // measured + predicted + alignment

◆ posYAlignErr2

double Muon::TrackSegmentMatchResult::posYAlignErr2 {}

Definition at line 90 of file MuonTrackSegmentMatchResult.h.

90{};

◆ posYMeasErr2

double Muon::TrackSegmentMatchResult::posYMeasErr2 {}

Definition at line 86 of file MuonTrackSegmentMatchResult.h.

86{};

◆ posYPredErr2

double Muon::TrackSegmentMatchResult::posYPredErr2 {}

Definition at line 88 of file MuonTrackSegmentMatchResult.h.

88{};

◆ posYTotalErr2

double Muon::TrackSegmentMatchResult::posYTotalErr2 {}

Definition at line 92 of file MuonTrackSegmentMatchResult.h.

92{}; // measured + predicted + alignment

◆ predictionCovariance

Amg::MatrixX Muon::TrackSegmentMatchResult::predictionCovariance

Definition at line 102 of file MuonTrackSegmentMatchResult.h.

◆ reason

Reason Muon::TrackSegmentMatchResult::reason

Definition at line 110 of file MuonTrackSegmentMatchResult.h.

◆ segment

const MuonSegment* Muon::TrackSegmentMatchResult::segment {}

Definition at line 109 of file MuonTrackSegmentMatchResult.h.

109{};

◆ segmentChamberId

Identifier Muon::TrackSegmentMatchResult::segmentChamberId

Definition at line 107 of file MuonTrackSegmentMatchResult.h.

◆ totalCovariance

Amg::MatrixX Muon::TrackSegmentMatchResult::totalCovariance

Definition at line 104 of file MuonTrackSegmentMatchResult.h.

◆ track

const Trk::Track* Muon::TrackSegmentMatchResult::track {}

Definition at line 108 of file MuonTrackSegmentMatchResult.h.

108{};

◆ trackChamberId

Identifier Muon::TrackSegmentMatchResult::trackChamberId

Definition at line 106 of file MuonTrackSegmentMatchResult.h.


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