ATLAS Offline Software
TrackMatchingLookup.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETTRACKPERFMON_TRACKMATCHINGLOOKUP_H
6 #define INDETTRACKPERFMON_TRACKMATCHINGLOOKUP_H
7 
19 
21 #include <unordered_map>
22 
23 // local includes
24 #include "ITrackMatchingLookup.h"
25 
26 namespace IDTPM {
27 
31  template< typename T, typename R=T >
33 
34  public:
35 
37  typedef std::unordered_map< const T*, const R* > mapTtoR_t;
38  typedef std::unordered_map< const R*, std::vector<const T*> > mapRtoT_t;
39  typedef std::unordered_map< const T*, float > mapTtoDist_t;
40 
42  TrackMatchingLookupBase( const std::string& anaTag_s );
43 
46 
49 
51  unsigned getMapsSize() const { return m_mapTestToRef.size(); }
52 
54  const R* getMatchedRef( const T& t ) const;
55 
57  const std::vector<const T*>& getMatchedTest( const R& r ) const;
58 
60  float getDist( const T& t ) const;
61 
63  bool isTestInMaps( const T& t ) const;
64 
66  bool isRefInMaps( const R& r ) const;
67 
69  StatusCode updateMaps( const T& t, const R& r, float dist = 0. );
70 
72  void clearMaps();
73 
75  std::string printMaps( const std::vector<const T*>& testVec,
76  const std::vector<const R*>& refVec,
77  std::string_view chainRoiName_s ) const;
78 
79  private:
80 
82  std::string m_anaTag;
83 
86 
89 
92 
94  std::vector<const T*> m_nullTest{};
95 
96  }; // class TrackMatchingLookupBase
97 
98 
103  public TrackMatchingLookupBase< xAOD::TrackParticle >,
104  public virtual ITrackMatchingLookup {
105 
106  public:
107 
109  TrackMatchingLookup_trk( const std::string& anaTag_s ) :
110  TrackMatchingLookupBase< xAOD::TrackParticle >( anaTag_s ) {
111  anaTag( anaTag_s );
112  }
113 
116 
118  virtual unsigned getNmatches() const override { return getMapsSize(); }
119 
122  const xAOD::TrackParticle& t ) const override { return getMatchedRef(t); }
123 
125  const xAOD::TruthParticle& ) const override {
126  ATH_MSG_WARNING( "getMatchedRefTrack: Truth->Track disabled" );
127  return nullptr;
128  }
129 
131  const xAOD::TrackParticle& ) const override {
132  ATH_MSG_WARNING( "getMatchedRefTruth: Track->Truth disabled" );
133  return nullptr;
134  }
135 
137  virtual const std::vector< const xAOD::TrackParticle* >& getMatchedTestTracks(
138  const xAOD::TrackParticle& r ) const override { return getMatchedTest(r); }
139 
140  virtual const std::vector< const xAOD::TrackParticle* >& getMatchedTestTracks(
141  const xAOD::TruthParticle& ) const override {
142  ATH_MSG_WARNING( "getMatchedTestTracks: Tracks<-Truth disabled" );
143  return m_nullTrackVec;
144  }
145 
146  virtual const std::vector< const xAOD::TruthParticle* >& getMatchedTestTruths(
147  const xAOD::TrackParticle& ) const override {
148  ATH_MSG_WARNING( "getMatchedTestTruths: Truths<-Track disabled" );
149  return m_nullTruthVec;
150  }
151 
153  virtual bool isTestMatched( const xAOD::TrackParticle& t ) const override {
154  return isTestInMaps(t);
155  }
156 
157  virtual bool isTestMatched( const xAOD::TruthParticle& ) const override {
158  ATH_MSG_WARNING( "isTestMatched: Truth->X disabled" );
159  return false;
160  }
161 
163  virtual bool isRefMatched( const xAOD::TrackParticle& r ) const override {
164  return isRefInMaps(r);
165  }
166 
167  virtual bool isRefMatched( const xAOD::TruthParticle& ) const override {
168  ATH_MSG_WARNING( "isRefMatched: X<-Truth disabled" );
169  return false;
170  }
171 
174  const xAOD::TrackParticle& r,
175  float dist ) override {
176  ATH_CHECK( updateMaps( t, r, dist ) );
177  return StatusCode::SUCCESS;
178  }
179 
181  const xAOD::TruthParticle&,
182  float ) override {
183  ATH_MSG_WARNING( "update: Track->Truth disabled" );
184  return StatusCode::SUCCESS;
185  }
186 
188  const xAOD::TrackParticle&,
189  float ) override {
190  return StatusCode::SUCCESS;
191  ATH_MSG_WARNING( "update: Truth->Track disabled" );
192  }
193 
195  virtual void clear() override {
196  ATH_MSG_DEBUG( "Deleting whole cache..." );
197  chainRoiName("");
198  clearMaps();
199  }
200 
202  virtual std::string printInfo(
203  const std::vector< const xAOD::TrackParticle* >& testVec,
204  const std::vector< const xAOD::TrackParticle* >& refVec ) const override {
205  return printMaps( testVec, refVec, chainRoiName() );
206  }
207 
208  virtual std::string printInfo(
209  const std::vector< const xAOD::TrackParticle* >&,
210  const std::vector< const xAOD::TruthParticle* >& ) const override {
211  ATH_MSG_WARNING( "printInfo: Track->Truth matches disabled" );
212  return std::string("--> No matches found");
213  }
214 
215  virtual std::string printInfo(
216  const std::vector< const xAOD::TruthParticle* >&,
217  const std::vector< const xAOD::TrackParticle* >& ) const override {
218  ATH_MSG_WARNING( "printInfo: Truth->Track matches disabled" );
219  return std::string("--> No matches found");
220  }
221 
222  }; // class TrackMatchingLookup_trk
223 
224 
229  public TrackMatchingLookupBase< xAOD::TrackParticle, xAOD::TruthParticle >,
230  public virtual ITrackMatchingLookup {
231 
232  public:
233 
235  TrackMatchingLookup_trkTruth( const std::string& anaTag_s ) :
237  anaTag( anaTag_s );
238  }
239 
242 
244  virtual unsigned getNmatches() const override { return getMapsSize(); }
245 
248  const xAOD::TrackParticle& ) const override {
249  ATH_MSG_WARNING( "getMatchedRefTrack: Track->Track disabled" );
250  return nullptr;
251  }
252 
254  const xAOD::TruthParticle& ) const override {
255  ATH_MSG_WARNING( "getMatchedRefTrack: Truth->Track disabled" );
256  return nullptr;
257  }
258 
260  const xAOD::TrackParticle& t) const override { return getMatchedRef(t); }
261 
263  virtual const std::vector< const xAOD::TrackParticle* >& getMatchedTestTracks(
264  const xAOD::TrackParticle& ) const override {
265  ATH_MSG_WARNING( "getMatchedTestTracks: Track<-Track disabled" );
266  return m_nullTrackVec;
267  }
268 
269  virtual const std::vector< const xAOD::TrackParticle* >& getMatchedTestTracks(
270  const xAOD::TruthParticle& r ) const override { return getMatchedTest(r); }
271 
272  virtual const std::vector< const xAOD::TruthParticle* >& getMatchedTestTruths(
273  const xAOD::TrackParticle& ) const override {
274  ATH_MSG_WARNING( "getMatchedTestTruths: Truths<-Track disabled" );
275  return m_nullTruthVec;
276  }
277 
279  virtual bool isTestMatched( const xAOD::TrackParticle& t ) const override {
280  return isTestInMaps(t);
281  }
282 
283  virtual bool isTestMatched( const xAOD::TruthParticle& ) const override {
284  ATH_MSG_WARNING( "isTestMatched: Truth->X disabled" );
285  return false;
286  }
287 
289  virtual bool isRefMatched( const xAOD::TrackParticle& ) const override {
290  ATH_MSG_WARNING( "isRefMatched: X<-Track disabled" );
291  return false;
292  }
293 
294  virtual bool isRefMatched( const xAOD::TruthParticle& r ) const override {
295  return isRefInMaps(r);
296  }
297 
300  const xAOD::TrackParticle&,
301  float ) override {
302  ATH_MSG_WARNING( "update: Track->Track disabled" );
303  return StatusCode::SUCCESS;
304  }
305 
307  const xAOD::TruthParticle& r,
308  float dist ) override {
309  ATH_CHECK( updateMaps( t, r, dist ) );
310  return StatusCode::SUCCESS;
311  }
312 
314  const xAOD::TrackParticle&,
315  float ) override {
316  return StatusCode::SUCCESS;
317  ATH_MSG_WARNING( "update: Truth->Track disabled" );
318  }
319 
321  virtual void clear() override {
322  ATH_MSG_DEBUG( "Deleting whole cache..." );
323  chainRoiName("");
324  clearMaps();
325  }
326 
328  virtual std::string printInfo(
329  const std::vector< const xAOD::TrackParticle* >&,
330  const std::vector< const xAOD::TrackParticle* >& ) const override {
331  ATH_MSG_WARNING( "printInfo: Track->Track matches disabled" );
332  return std::string("--> No matches found");
333  }
334 
335  virtual std::string printInfo(
336  const std::vector< const xAOD::TrackParticle* >& testVec,
337  const std::vector< const xAOD::TruthParticle* >& refVec ) const override {
338  return printMaps( testVec, refVec, chainRoiName() );
339  }
340 
341  virtual std::string printInfo(
342  const std::vector< const xAOD::TruthParticle* >&,
343  const std::vector< const xAOD::TrackParticle* >& ) const override {
344  ATH_MSG_WARNING( "printInfo: Truth->Track matches disabled" );
345  return std::string("--> No matches found");
346  }
347 
348  }; // class TrackMatchingLookup_trkTruth
349 
350 
355  public TrackMatchingLookupBase< xAOD::TruthParticle, xAOD::TrackParticle >,
356  public virtual ITrackMatchingLookup {
357 
358  public:
359 
361  TrackMatchingLookup_truthTrk( const std::string& anaTag_s ) :
363  anaTag( anaTag_s );
364  }
365 
368 
370  virtual unsigned getNmatches() const override { return getMapsSize(); }
371 
374  const xAOD::TrackParticle& ) const override {
375  ATH_MSG_WARNING( "getMatchedRefTrack: Track->Track disabled" );
376  return nullptr;
377  }
378 
380  const xAOD::TruthParticle& t ) const override { return getMatchedRef(t); }
381 
383  const xAOD::TrackParticle& ) const override {
384  ATH_MSG_WARNING( "getMatchedRefTruth: Track->Truth disabled" );
385  return nullptr;
386  }
387 
389  virtual const std::vector< const xAOD::TrackParticle* >& getMatchedTestTracks(
390  const xAOD::TrackParticle& ) const override {
391  ATH_MSG_WARNING( "getMatchedTestTruths: Track<-Track disabled" );
392  return m_nullTrackVec;
393  }
394 
395  virtual const std::vector< const xAOD::TrackParticle* >& getMatchedTestTracks(
396  const xAOD::TruthParticle& ) const override {
397  ATH_MSG_WARNING( "getMatchedTestTracks: Tracks<-Truth disabled" );
398  return m_nullTrackVec;
399  }
400 
401  virtual const std::vector< const xAOD::TruthParticle* >& getMatchedTestTruths(
402  const xAOD::TrackParticle& r ) const override { return getMatchedTest(r); }
403 
405  virtual bool isTestMatched( const xAOD::TrackParticle& ) const override {
406  ATH_MSG_WARNING( "isTestMatched: Track->X disabled" );
407  return false;
408  }
409 
410  virtual bool isTestMatched( const xAOD::TruthParticle& t ) const override {
411  return isTestInMaps(t);
412  }
413 
415  virtual bool isRefMatched( const xAOD::TrackParticle& r ) const override {
416  return isRefInMaps(r);
417  }
418 
419  virtual bool isRefMatched( const xAOD::TruthParticle& ) const override {
420  ATH_MSG_WARNING( "isRefMatched: X<-Truth disabled" );
421  return false;
422  }
423 
426  const xAOD::TrackParticle&,
427  float ) override {
428  return StatusCode::SUCCESS;
429  ATH_MSG_WARNING( "update: Track->Track disabled" );
430  }
431 
433  const xAOD::TruthParticle&,
434  float ) override {
435  ATH_MSG_WARNING( "update: Track->Truth disabled" );
436  return StatusCode::SUCCESS;
437  }
438 
440  const xAOD::TrackParticle& r,
441  float dist ) override {
442  ATH_CHECK( updateMaps( t, r, dist ) );
443  return StatusCode::SUCCESS;
444  }
445 
447  virtual void clear() override {
448  ATH_MSG_DEBUG( "Deleting whole cache..." );
449  chainRoiName("");
450  clearMaps();
451  }
452 
454  virtual std::string printInfo(
455  const std::vector< const xAOD::TrackParticle* >&,
456  const std::vector< const xAOD::TrackParticle* >& ) const override {
457  ATH_MSG_WARNING( "printInfo: Track->Track matches disabled" );
458  return std::string("--> No matches found");
459  }
460 
461  virtual std::string printInfo(
462  const std::vector< const xAOD::TrackParticle* >&,
463  const std::vector< const xAOD::TruthParticle* >& ) const override {
464  ATH_MSG_WARNING( "printInfo: Track->Truth matches disabled" );
465  return std::string("--> No matches found");
466  }
467 
468  virtual std::string printInfo(
469  const std::vector< const xAOD::TruthParticle* >& testVec,
470  const std::vector< const xAOD::TrackParticle* >& refVec ) const override {
471  return printMaps( testVec, refVec, chainRoiName() );
472  }
473 
474  }; // class TrackMatchingLookup_truthTrk
475 
476 } // namespace IDTPM
477 
478 #include "TrackMatchingLookup.icc"
479 
480 #endif // > !INDETTRACKPERFMON_TRACKMATCHINGLOOKUP_H
IDTPM::TrackMatchingLookup_trk::getMatchedTestTruths
virtual const std::vector< const xAOD::TruthParticle * > & getMatchedTestTruths(const xAOD::TrackParticle &) const override
vec Truth <- Track
Definition: TrackMatchingLookup.h:146
IDTPM::TrackMatchingLookup_trkTruth::printInfo
virtual std::string printInfo(const std::vector< const xAOD::TruthParticle * > &, const std::vector< const xAOD::TrackParticle * > &) const override
Truth -> Track.
Definition: TrackMatchingLookup.h:341
beamspotman.r
def r
Definition: beamspotman.py:676
IDTPM::TrackMatchingLookup_trk::printInfo
virtual std::string printInfo(const std::vector< const xAOD::TrackParticle * > &testVec, const std::vector< const xAOD::TrackParticle * > &refVec) const override
printInfo
Definition: TrackMatchingLookup.h:202
IDTPM::TrackMatchingLookup_truthTrk::isRefMatched
virtual bool isRefMatched(const xAOD::TrackParticle &r) const override
isRefMatched
Definition: TrackMatchingLookup.h:415
IDTPM::TrackMatchingLookupBase::m_mapTestToRef
mapTtoR_t m_mapTestToRef
Mapping test to its uniquely associated reference.
Definition: TrackMatchingLookup.h:85
IDTPM::TrackMatchingLookup_trkTruth::getNmatches
virtual unsigned getNmatches() const override
getNmatches
Definition: TrackMatchingLookup.h:244
IDTPM::TrackMatchingLookup_truthTrk::getMatchedRefTruth
virtual const xAOD::TruthParticle * getMatchedRefTruth(const xAOD::TrackParticle &) const override
Track -> Truth.
Definition: TrackMatchingLookup.h:382
IDTPM::TrackMatchingLookup_truthTrk::getMatchedRefTrack
virtual const xAOD::TrackParticle * getMatchedRefTrack(const xAOD::TrackParticle &) const override
getMatchedRefTrack
Definition: TrackMatchingLookup.h:373
IDTPM::TrackMatchingLookup_trk::isRefMatched
virtual bool isRefMatched(const xAOD::TrackParticle &r) const override
isRefMatched
Definition: TrackMatchingLookup.h:163
IDTPM::TrackMatchingLookup_trk::getMatchedTestTracks
virtual const std::vector< const xAOD::TrackParticle * > & getMatchedTestTracks(const xAOD::TrackParticle &r) const override
getMatchedTestTracks
Definition: TrackMatchingLookup.h:137
IDTPM::TrackMatchingLookupBase::getDist
float getDist(const T &t) const
get distance parameter for matched test
AthCheckMacros.h
IDTPM::TrackMatchingLookup_trk::isTestMatched
virtual bool isTestMatched(const xAOD::TrackParticle &t) const override
isTestMatched
Definition: TrackMatchingLookup.h:153
IDTPM::TrackMatchingLookup_trkTruth
Definition: TrackMatchingLookup.h:230
IDTPM::TrackMatchingLookup_trk::update
virtual StatusCode update(const xAOD::TrackParticle &t, const xAOD::TrackParticle &r, float dist) override
update
Definition: TrackMatchingLookup.h:173
IDTPM::TrackMatchingLookup_truthTrk::getMatchedTestTracks
virtual const std::vector< const xAOD::TrackParticle * > & getMatchedTestTracks(const xAOD::TruthParticle &) const override
vec Track <- Truth
Definition: TrackMatchingLookup.h:395
IDTPM::TrackMatchingLookupBase::isRefInMaps
bool isRefInMaps(const R &r) const
return true if reference is matched
IDTPM::ITrackMatchingLookup::m_nullTrackVec
std::vector< const xAOD::TrackParticle * > m_nullTrackVec
null vectors
Definition: ITrackMatchingLookup.h:150
IDTPM::TrackMatchingLookup_trkTruth::getMatchedTestTracks
virtual const std::vector< const xAOD::TrackParticle * > & getMatchedTestTracks(const xAOD::TruthParticle &r) const override
vec Track <- Truth
Definition: TrackMatchingLookup.h:269
IDTPM::TrackMatchingLookup_trkTruth::getMatchedRefTruth
virtual const xAOD::TruthParticle * getMatchedRefTruth(const xAOD::TrackParticle &t) const override
Track -> Truth.
Definition: TrackMatchingLookup.h:259
IDTPM::TrackMatchingLookup_trkTruth::~TrackMatchingLookup_trkTruth
~TrackMatchingLookup_trkTruth()=default
Destructor.
IDTPM::TrackMatchingLookupBase::m_mapTestToDist
mapTtoDist_t m_mapTestToDist
Mapping test to its uniquely associated reference.
Definition: TrackMatchingLookup.h:91
IDTPM::TrackMatchingLookup_trkTruth::update
virtual StatusCode update(const xAOD::TrackParticle &, const xAOD::TrackParticle &, float) override
update
Definition: TrackMatchingLookup.h:299
IDTPM::TrackMatchingLookup_trkTruth::getMatchedRefTrack
virtual const xAOD::TrackParticle * getMatchedRefTrack(const xAOD::TrackParticle &) const override
getMatchedRefTrack
Definition: TrackMatchingLookup.h:247
IDTPM::TrackMatchingLookup_trk::getMatchedRefTrack
virtual const xAOD::TrackParticle * getMatchedRefTrack(const xAOD::TrackParticle &t) const override
getMatchedRefTrack
Definition: TrackMatchingLookup.h:121
IDTPM::TrackMatchingLookup_trkTruth::TrackMatchingLookup_trkTruth
TrackMatchingLookup_trkTruth(const std::string &anaTag_s)
Constructor.
Definition: TrackMatchingLookup.h:235
IDTPM::TrackMatchingLookup_truthTrk::getMatchedTestTracks
virtual const std::vector< const xAOD::TrackParticle * > & getMatchedTestTracks(const xAOD::TrackParticle &) const override
getMatchedTestTracks
Definition: TrackMatchingLookup.h:389
IDTPM::TrackMatchingLookupBase::updateMaps
StatusCode updateMaps(const T &t, const R &r, float dist=0.)
update maps with a new entry
TruthParticle
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h:58
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
IDTPM::TrackMatchingLookup_trk::update
virtual StatusCode update(const xAOD::TruthParticle &, const xAOD::TrackParticle &, float) override
Truth -> Track.
Definition: TrackMatchingLookup.h:187
IDTPM::TrackMatchingLookup_trk::getMatchedRefTrack
virtual const xAOD::TrackParticle * getMatchedRefTrack(const xAOD::TruthParticle &) const override
Truth -> Track.
Definition: TrackMatchingLookup.h:124
IDTPM::TrackMatchingLookupBase::m_nullTest
std::vector< const T * > m_nullTest
null Vectors
Definition: TrackMatchingLookup.h:94
IDTPM::ITrackMatchingLookup::chainRoiName
const std::string & chainRoiName() const
Definition: ITrackMatchingLookup.h:45
IDTPM::TrackMatchingLookup_truthTrk::TrackMatchingLookup_truthTrk
TrackMatchingLookup_truthTrk(const std::string &anaTag_s)
Constructor.
Definition: TrackMatchingLookup.h:361
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
IDTPM::TrackMatchingLookup_trk::isTestMatched
virtual bool isTestMatched(const xAOD::TruthParticle &) const override
Definition: TrackMatchingLookup.h:157
IDTPM::TrackMatchingLookup_trk::TrackMatchingLookup_trk
TrackMatchingLookup_trk(const std::string &anaTag_s)
Constructor.
Definition: TrackMatchingLookup.h:109
IDTPM::TrackMatchingLookupBase::operator=
TrackMatchingLookupBase & operator=(const TrackMatchingLookupBase< T, R > &)=delete
= operator (disabled)
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
IDTPM::ITrackMatchingLookup::anaTag
const std::string & anaTag() const
matching properties
Definition: ITrackMatchingLookup.h:41
TrackMatchingLookup.icc
IDTPM::TrackMatchingLookup_trkTruth::isRefMatched
virtual bool isRefMatched(const xAOD::TrackParticle &) const override
isRefMatched
Definition: TrackMatchingLookup.h:289
IDTPM::TrackMatchingLookup_trk::printInfo
virtual std::string printInfo(const std::vector< const xAOD::TruthParticle * > &, const std::vector< const xAOD::TrackParticle * > &) const override
Truth -> Track.
Definition: TrackMatchingLookup.h:215
IDTPM::TrackMatchingLookupBase::getMatchedTest
const std::vector< const T * > & getMatchedTest(const R &r) const
get matched test vector from map
IDTPM::ITrackMatchingLookup::m_nullTruthVec
std::vector< const xAOD::TruthParticle * > m_nullTruthVec
Definition: ITrackMatchingLookup.h:151
IDTPM::TrackMatchingLookupBase::isTestInMaps
bool isTestInMaps(const T &t) const
return true if test is matched
IDTPM::TrackMatchingLookup_trkTruth::printInfo
virtual std::string printInfo(const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::TrackParticle * > &) const override
printInfo
Definition: TrackMatchingLookup.h:328
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IDTPM::TrackMatchingLookupBase::mapRtoT_t
std::unordered_map< const R *, std::vector< const T * > > mapRtoT_t
Definition: TrackMatchingLookup.h:38
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
IDTPM::TrackMatchingLookup_trkTruth::update
virtual StatusCode update(const xAOD::TrackParticle &t, const xAOD::TruthParticle &r, float dist) override
Track -> Truth.
Definition: TrackMatchingLookup.h:306
IDTPM::TrackMatchingLookup_trk::~TrackMatchingLookup_trk
~TrackMatchingLookup_trk()=default
Destructor.
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
IDTPM::TrackMatchingLookupBase::getMatchedRef
const R * getMatchedRef(const T &t) const
get matched reference from map
IDTPM::TrackMatchingLookupBase::TrackMatchingLookupBase
TrackMatchingLookupBase(const std::string &anaTag_s)
Constructor.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ITrackMatchingLookup.h
Interace for TrackMatchingLookup objects (templated)
IDTPM::TrackMatchingLookup_trk::update
virtual StatusCode update(const xAOD::TrackParticle &, const xAOD::TruthParticle &, float) override
Track -> Truth.
Definition: TrackMatchingLookup.h:180
IDTPM::TrackMatchingLookup_trk::getMatchedRefTruth
virtual const xAOD::TruthParticle * getMatchedRefTruth(const xAOD::TrackParticle &) const override
Track -> Truth.
Definition: TrackMatchingLookup.h:130
IDTPM::TrackMatchingLookupBase::mapTtoDist_t
std::unordered_map< const T *, float > mapTtoDist_t
Definition: TrackMatchingLookup.h:39
IDTPM::TrackMatchingLookup_trkTruth::isRefMatched
virtual bool isRefMatched(const xAOD::TruthParticle &r) const override
Definition: TrackMatchingLookup.h:294
IDTPM::TrackMatchingLookup_trk::getNmatches
virtual unsigned getNmatches() const override
getNmatches
Definition: TrackMatchingLookup.h:118
IDTPM::TrackMatchingLookupBase::printMaps
std::string printMaps(const std::vector< const T * > &testVec, const std::vector< const R * > &refVec, std::string_view chainRoiName_s) const
print info about matching and reverse matchings
IDTPM::TrackMatchingLookupBase::m_anaTag
std::string m_anaTag
analysis tag
Definition: TrackMatchingLookup.h:82
IDTPM::TrackMatchingLookup_trkTruth::update
virtual StatusCode update(const xAOD::TruthParticle &, const xAOD::TrackParticle &, float) override
Truth -> Track.
Definition: TrackMatchingLookup.h:313
IDTPM::TrackMatchingLookup_trk::printInfo
virtual std::string printInfo(const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::TruthParticle * > &) const override
Track -> Truth.
Definition: TrackMatchingLookup.h:208
IDTPM::TrackMatchingLookupBase::m_mapRefToTest
mapRtoT_t m_mapRefToTest
Mapping reference to its (possibly multiple) associated test(s)
Definition: TrackMatchingLookup.h:88
IDTPM::TrackMatchingLookupBase::mapTtoR_t
std::unordered_map< const T *, const R * > mapTtoR_t
useful typedefs
Definition: TrackMatchingLookup.h:37
IDTPM::TrackMatchingLookup_truthTrk::update
virtual StatusCode update(const xAOD::TruthParticle &t, const xAOD::TrackParticle &r, float dist) override
Truth -> Track.
Definition: TrackMatchingLookup.h:439
IDTPM::TrackMatchingLookup_truthTrk
Definition: TrackMatchingLookup.h:356
IDTPM::TrackMatchingLookup_truthTrk::printInfo
virtual std::string printInfo(const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::TrackParticle * > &) const override
printInfo
Definition: TrackMatchingLookup.h:454
IDTPM::TrackMatchingLookup_trkTruth::getMatchedTestTruths
virtual const std::vector< const xAOD::TruthParticle * > & getMatchedTestTruths(const xAOD::TrackParticle &) const override
vec Truth <- Track
Definition: TrackMatchingLookup.h:272
IDTPM::TrackMatchingLookup_truthTrk::update
virtual StatusCode update(const xAOD::TrackParticle &, const xAOD::TruthParticle &, float) override
Track -> Truth.
Definition: TrackMatchingLookup.h:432
IDTPM::TrackMatchingLookup_trkTruth::isTestMatched
virtual bool isTestMatched(const xAOD::TrackParticle &t) const override
isTestMatched
Definition: TrackMatchingLookup.h:279
IDTPM::TrackMatchingLookup_trkTruth::isTestMatched
virtual bool isTestMatched(const xAOD::TruthParticle &) const override
Definition: TrackMatchingLookup.h:283
IDTPM::TrackMatchingLookup_trk::getMatchedTestTracks
virtual const std::vector< const xAOD::TrackParticle * > & getMatchedTestTracks(const xAOD::TruthParticle &) const override
vec Track <- Truth
Definition: TrackMatchingLookup.h:140
IDTPM::TrackMatchingLookup_truthTrk::isRefMatched
virtual bool isRefMatched(const xAOD::TruthParticle &) const override
Definition: TrackMatchingLookup.h:419
IDTPM::TrackMatchingLookup_truthTrk::getNmatches
virtual unsigned getNmatches() const override
getNmatches
Definition: TrackMatchingLookup.h:370
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
IDTPM::TrackMatchingLookup_truthTrk::getMatchedRefTrack
virtual const xAOD::TrackParticle * getMatchedRefTrack(const xAOD::TruthParticle &t) const override
Truth -> Track.
Definition: TrackMatchingLookup.h:379
IDTPM::TrackMatchingLookup_truthTrk::isTestMatched
virtual bool isTestMatched(const xAOD::TrackParticle &) const override
isTestMatched
Definition: TrackMatchingLookup.h:405
IDTPM::TrackMatchingLookup_trkTruth::getMatchedRefTrack
virtual const xAOD::TrackParticle * getMatchedRefTrack(const xAOD::TruthParticle &) const override
Truth -> Track.
Definition: TrackMatchingLookup.h:253
IDTPM::TrackMatchingLookup_trk
Definition: TrackMatchingLookup.h:104
AthMessaging.h
IDTPM::TrackMatchingLookup_truthTrk::getMatchedTestTruths
virtual const std::vector< const xAOD::TruthParticle * > & getMatchedTestTruths(const xAOD::TrackParticle &r) const override
vec Truth <- Track
Definition: TrackMatchingLookup.h:401
IDTPM::TrackMatchingLookup_trk::clear
virtual void clear() override
clear
Definition: TrackMatchingLookup.h:195
IDTPM::TrackMatchingLookup_truthTrk::isTestMatched
virtual bool isTestMatched(const xAOD::TruthParticle &t) const override
Definition: TrackMatchingLookup.h:410
IDTPM::TrackMatchingLookup_truthTrk::printInfo
virtual std::string printInfo(const std::vector< const xAOD::TruthParticle * > &testVec, const std::vector< const xAOD::TrackParticle * > &refVec) const override
Truth -> Track.
Definition: TrackMatchingLookup.h:468
IDTPM::TrackMatchingLookup_truthTrk::update
virtual StatusCode update(const xAOD::TrackParticle &, const xAOD::TrackParticle &, float) override
update
Definition: TrackMatchingLookup.h:425
IDTPM::TrackMatchingLookup_truthTrk::clear
virtual void clear() override
clear
Definition: TrackMatchingLookup.h:447
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
IDTPM::TrackMatchingLookupBase::clearMaps
void clearMaps()
clear lookup tables
IDTPM::TrackMatchingLookup_trk::isRefMatched
virtual bool isRefMatched(const xAOD::TruthParticle &) const override
Definition: TrackMatchingLookup.h:167
IDTPM::ITrackMatchingLookup
Definition: ITrackMatchingLookup.h:30
IDTPM
Athena include(s).
Definition: IPlotsDefinitionSvc.h:25
IDTPM::TrackMatchingLookup_trkTruth::clear
virtual void clear() override
clear
Definition: TrackMatchingLookup.h:321
IDTPM::TrackMatchingLookup_truthTrk::~TrackMatchingLookup_truthTrk
~TrackMatchingLookup_truthTrk()=default
Destructor.
IDTPM::TrackMatchingLookup_trkTruth::printInfo
virtual std::string printInfo(const std::vector< const xAOD::TrackParticle * > &testVec, const std::vector< const xAOD::TruthParticle * > &refVec) const override
Track -> Truth.
Definition: TrackMatchingLookup.h:335
IDTPM::TrackMatchingLookup_truthTrk::printInfo
virtual std::string printInfo(const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::TruthParticle * > &) const override
Track -> Truth.
Definition: TrackMatchingLookup.h:461
IDTPM::TrackMatchingLookupBase::~TrackMatchingLookupBase
~TrackMatchingLookupBase()=default
Destructor.
IDTPM::TrackMatchingLookupBase::getMapsSize
unsigned getMapsSize() const
get the overall number of matches
Definition: TrackMatchingLookup.h:51
IDTPM::TrackMatchingLookupBase
Definition: TrackMatchingLookup.h:32
IDTPM::TrackMatchingLookup_trkTruth::getMatchedTestTracks
virtual const std::vector< const xAOD::TrackParticle * > & getMatchedTestTracks(const xAOD::TrackParticle &) const override
getMatchedTestTracks
Definition: TrackMatchingLookup.h:263