ATLAS Offline Software
MuonMatch.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
13 
15 #ifndef MUIDEVENT_MUONMATCH_H
16 # define MUIDEVENT_MUONMATCH_H
17 
20 
21 namespace Trk
22 {
23  class RecVertex;
24  class Track;
25 }
26 
27 namespace Rec
28 {
29 class TrackParticle;
30 
31 class MuonMatch
32 {
33 public:
35  enum MatchType
36  {
38  Tight = 0,
39 
41  Inner = 1,
42 
44  Outer = 2,
45 
47  Simple = 3,
48 
50  Loose = 4,
51 
53  Vertex = 5,
54 
56  Unmatched = 6,
57 
59  };
60 
61  // copy constructor
62  MuonMatch (const MuonMatch&);
63 
64  // combined track constructor
67  const Trk::Track* indetTrack,
70  double innerMatchChi2 = 999999.,
71  int innerMatchDoF = 0,
72  double innerMatchProb = 0.,
73  double momentumBalanceSignificance = 0.,
74  double outerMatchChi2 = 999999.,
75  int outerMatchDoF = 0,
76  double outerMatchProb = 0.,
77  const ScatteringAngleSignificance& scatAngleSignificance = ScatteringAngleSignificance());
78 
79  // constructor for vertex associated track
83  const Trk::RecVertex* vertex,
85  const ScatteringAngleSignificance& scatAngleSignificance = ScatteringAngleSignificance());
86 
87  // "copy" constructor with steal of combined track
89 
90  // "assign" operator with steal of combined track
92 
93  // destructor
94  virtual ~MuonMatch();
95 
96  // EDM accessors
97  const Trk::Track* combinedTrack (void) const;
98  const Trk::Track* extrapolatedRefit (void) const;
99  const Trk::Track* extrapolatedTrack (void) const;
100  const TrackParticle* indetParticle (void) const;
101  const Trk::Track* indetTrack (void) const;
102  const TrackParticle* spectrometerParticle (void) const;
103  const Trk::Track* spectrometerTrack (void) const;
104  const Trk::RecVertex* vertex (void) const;
105 
106  // set and steal EDM methods
107  void extrapolatedRefit (const Trk::Track* refittedTrack);
109 
110  // other attributes (set and accessor methods)
111  bool bestMatch (void) const;
112  void bestMatch (bool);
113  void fieldIntegral (const FieldIntegral& value);
114  const FieldIntegral& fieldIntegral (void) const;
115  void innerMatch (double matchChi2, int matchDoF, double matchProb);
116  double innerMatchChi2 (void) const;
117  int innerMatchDoF (void) const;
118  double innerMatchProb (void) const;
119  bool isType (MatchType) const;
120  MatchType matchType (void) const;
121  void matchType (MatchType);
122  void momentumBalanceSignificance (double value);
123  double momentumBalanceSignificance (void) const;
124  void outerMatch (double matchChi2, int matchDoF, double matchProb);
125  double outerMatchChi2 (void) const;
126  int outerMatchDoF (void) const;
127  double outerMatchProb (void) const;
130 
131  // deprecated
132  bool looseMatch (void) const;
133  void looseMatch (bool);
134  bool simpleMatch (void) const;
135  void simpleMatch (bool);
136 
137 protected:
157 
158  // deprecated
161 
162 };
163 
164 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>>
165 
166 inline const Trk::Track*
168 { return m_combinedTrack; }
169 
170 inline const Trk::Track*
172 { return m_extrapolatedRefit; }
173 
174 inline const Trk::Track*
176 { return m_extrapolatedTrack; }
177 
178 inline const TrackParticle*
180 { return m_indetParticle; }
181 
182 inline const Trk::Track*
184 { return m_indetTrack; }
185 
186 inline const TrackParticle*
188 { return m_spectrometerParticle; }
189 
190 inline const Trk::Track*
192 { return m_spectrometerTrack; }
193 
194 inline const Trk::RecVertex*
195 MuonMatch::vertex (void) const
196 { return m_vertex; }
197 
198 inline bool
200 { return m_bestMatch; }
201 
202 inline void
204 { m_bestMatch = value; }
205 
206 inline const FieldIntegral&
208 { return m_fieldIntegral; }
209 
210 inline void
211 MuonMatch::innerMatch(double matchChi2, int matchDoF, double matchProb)
212 {
213  m_innerMatchChi2 = matchChi2;
214  m_innerMatchDoF = matchDoF;
215  m_innerMatchProb = matchProb;
216 }
217 
218 inline double
220 { return m_innerMatchChi2; }
221 
222 inline int
224 { return m_innerMatchDoF; }
225 
226 inline double
228 { return m_innerMatchProb; }
229 
230 inline bool
232 { return (m_matchType == type); }
233 
236 { return m_matchType; }
237 
238 inline double
241 
242 inline void
243 MuonMatch::outerMatch(double matchChi2, int matchDoF, double matchProb)
244 {
245  m_outerMatchChi2 = matchChi2;
246  m_outerMatchDoF = matchDoF;
247  m_outerMatchProb = matchProb;
248 }
249 
250 inline double
252 { return m_outerMatchChi2; }
253 
254 inline int
256 { return m_outerMatchDoF; }
257 
258 inline double
260 { return m_outerMatchProb; }
261 
262 inline const ScatteringAngleSignificance&
265 
266 inline bool
268 { return m_looseMatch; }
269 
270 inline void
272 { m_looseMatch = value; }
273 
274 inline bool
276 { return m_simpleMatch; }
277 
278 inline void
280 { m_simpleMatch = value; }
281 
282 } // end of namespace
283 
284 #endif // MUIDEVENT_MUONMATCH_H
285 
286 
Rec::MuonMatch::combinedTrack
const Trk::Track * combinedTrack(void) const
Definition: MuonMatch.h:167
Rec::MuonMatch::m_combinedTrack
const Trk::Track * m_combinedTrack
Definition: MuonMatch.h:138
Rec::MuonMatch::simpleMatch
bool simpleMatch(void) const
Definition: MuonMatch.h:275
Rec::MuonMatch::m_simpleMatch
bool m_simpleMatch
Definition: MuonMatch.h:160
FieldIntegral.h
Rec::MuonMatch::m_looseMatch
bool m_looseMatch
Definition: MuonMatch.h:159
Rec::MuonMatch::extrapolatedTrack
const Trk::Track * extrapolatedTrack(void) const
Definition: MuonMatch.h:175
Rec::MuonMatch::operator=
MuonMatch & operator=(MuonMatch &)
Definition: MuonMatch.cxx:123
Rec::MuonMatch::MatchType
MatchType
enum to describe the ranked match quality
Definition: MuonMatch.h:36
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Rec::MuonMatch::m_spectrometerTrack
const Trk::Track * m_spectrometerTrack
Definition: MuonMatch.h:144
Rec::MuonMatch::outerMatch
void outerMatch(double matchChi2, int matchDoF, double matchProb)
Definition: MuonMatch.h:243
Rec::MuonMatch::bestMatch
bool bestMatch(void) const
Definition: MuonMatch.h:199
Rec::MuonMatch::m_bestMatch
bool m_bestMatch
Definition: MuonMatch.h:146
Rec::MuonMatch::m_indetTrack
const Trk::Track * m_indetTrack
Definition: MuonMatch.h:142
Rec::MuonMatch::m_extrapolatedTrack
const Trk::Track * m_extrapolatedTrack
Definition: MuonMatch.h:140
Rec::MuonMatch::NumberOfMuonMatchTypes
@ NumberOfMuonMatchTypes
Definition: MuonMatch.h:58
Rec::MuonMatch::matchType
MatchType matchType(void) const
Definition: MuonMatch.h:235
Rec::MuonMatch::m_innerMatchDoF
int m_innerMatchDoF
Definition: MuonMatch.h:149
Rec::MuonMatch::Unmatched
@ Unmatched
Unmatched: no match found.
Definition: MuonMatch.h:56
athena.value
value
Definition: athena.py:124
Rec::MuonMatch
Definition: MuonMatch.h:32
Rec::MuonMatch::indetTrack
const Trk::Track * indetTrack(void) const
Definition: MuonMatch.h:183
Rec::MuonMatch::Vertex
@ Vertex
Vertex: matched to vertex rather than track.
Definition: MuonMatch.h:53
Rec::MuonMatch::outerMatchProb
double outerMatchProb(void) const
Definition: MuonMatch.h:259
Rec::MuonMatch::~MuonMatch
virtual ~MuonMatch()
Definition: MuonMatch.cxx:158
Rec::MuonMatch::indetParticle
const TrackParticle * indetParticle(void) const
Definition: MuonMatch.h:179
Rec::MuonMatch::vertex
const Trk::RecVertex * vertex(void) const
Definition: MuonMatch.h:195
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition: RecVertex.h:44
Rec::MuonMatch::innerMatchChi2
double innerMatchChi2(void) const
Definition: MuonMatch.h:219
Rec::ScatteringAngleSignificance
Definition: ScatteringAngleSignificance.h:22
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
Rec::MuonMatch::Inner
@ Inner
Inner: good inner match chi2.
Definition: MuonMatch.h:41
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
Rec::MuonMatch::isType
bool isType(MatchType) const
Definition: MuonMatch.h:231
Rec::MuonMatch::innerMatch
void innerMatch(double matchChi2, int matchDoF, double matchProb)
Definition: MuonMatch.h:211
Rec::MuonMatch::m_vertex
const Trk::RecVertex * m_vertex
Definition: MuonMatch.h:145
Rec::MuonMatch::MuonMatch
MuonMatch(const MuonMatch &)
Rec::MuonMatch::m_outerMatchDoF
int m_outerMatchDoF
Definition: MuonMatch.h:154
Rec::MuonMatch::outerMatchChi2
double outerMatchChi2(void) const
Definition: MuonMatch.h:251
Rec::MuonMatch::m_spectrometerParticle
const TrackParticle * m_spectrometerParticle
Definition: MuonMatch.h:143
Rec::MuonMatch::Simple
@ Simple
Simple: good simple (i.e.
Definition: MuonMatch.h:47
Rec::MuonMatch::momentumBalanceSignificance
double momentumBalanceSignificance(void) const
Definition: MuonMatch.h:239
Rec::MuonMatch::m_matchType
MatchType m_matchType
Definition: MuonMatch.h:151
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Rec::MuonMatch::innerMatchDoF
int innerMatchDoF(void) const
Definition: MuonMatch.h:223
ScatteringAngleSignificance.h
Rec::MuonMatch::m_innerMatchChi2
double m_innerMatchChi2
Definition: MuonMatch.h:148
Rec::MuonMatch::Outer
@ Outer
Outer: good outer match chi2.
Definition: MuonMatch.h:44
Rec::MuonMatch::m_extrapolatedRefit
const Trk::Track * m_extrapolatedRefit
Definition: MuonMatch.h:139
Rec::TrackParticle
Definition: Reconstruction/Particle/Particle/TrackParticle.h:47
Rec::MuonMatch::innerMatchProb
double innerMatchProb(void) const
Definition: MuonMatch.h:227
Rec::MuonMatch::m_indetParticle
const TrackParticle * m_indetParticle
Definition: MuonMatch.h:141
Rec::MuonMatch::fieldIntegral
const FieldIntegral & fieldIntegral(void) const
Definition: MuonMatch.h:207
Rec::FieldIntegral
Definition: FieldIntegral.h:22
Rec::MuonMatch::scatteringAngleSignificance
const ScatteringAngleSignificance & scatteringAngleSignificance(void) const
Definition: MuonMatch.h:263
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Rec::MuonMatch::m_scatteringAngleSignificance
ScatteringAngleSignificance m_scatteringAngleSignificance
Definition: MuonMatch.h:156
Rec::MuonMatch::m_innerMatchProb
double m_innerMatchProb
Definition: MuonMatch.h:150
Rec::MuonMatch::m_momentumBalanceSignificance
double m_momentumBalanceSignificance
Definition: MuonMatch.h:152
Rec::MuonMatch::looseMatch
bool looseMatch(void) const
Definition: MuonMatch.h:267
Rec::MuonMatch::spectrometerTrack
const Trk::Track * spectrometerTrack(void) const
Definition: MuonMatch.h:191
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
Rec::MuonMatch::extrapolatedRefit
const Trk::Track * extrapolatedRefit(void) const
Definition: MuonMatch.h:171
Rec::MuonMatch::m_fieldIntegral
FieldIntegral m_fieldIntegral
Definition: MuonMatch.h:147
Rec::MuonMatch::spectrometerParticle
const TrackParticle * spectrometerParticle(void) const
Definition: MuonMatch.h:187
Rec::MuonMatch::m_outerMatchProb
double m_outerMatchProb
Definition: MuonMatch.h:155
Rec::MuonMatch::m_outerMatchChi2
double m_outerMatchChi2
Definition: MuonMatch.h:153
Rec::MuonMatch::Loose
@ Loose
Loose: no good match chi2 of any flavour.
Definition: MuonMatch.h:50
Rec::MuonMatch::outerMatchDoF
int outerMatchDoF(void) const
Definition: MuonMatch.h:255
Rec::MuonMatch::Tight
@ Tight
Tight: good inner and outer match chi2.
Definition: MuonMatch.h:38