ATLAS Offline Software
DeltaRMatchingTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 #include "DeltaRMatchingTool.h"
13 #include "TrackMatchingLookup.h"
14 
15 
21  TrackAnalysisCollections& trkAnaColls,
22  const std::string& chainRoIName,
23  const std::string& roiStr ) const
24 {
26  bool doMatch = trkAnaColls.updateChainRois( chainRoIName, roiStr );
27 
29  if( not doMatch ) {
30  ATH_MSG_WARNING( "Matching for " << chainRoIName <<
31  " was already done. Skipping" );
32  return StatusCode::SUCCESS;
33  }
34 
39  trkAnaColls.matches() ) );
40 
41  ATH_MSG_DEBUG( trkAnaColls.printMatchInfo() );
42 
43  return StatusCode::SUCCESS;
44 }
45 
46 
52  TrackAnalysisCollections& trkAnaColls,
53  const std::string& chainRoIName,
54  const std::string& roiStr ) const
55 {
57  bool doMatch = trkAnaColls.updateChainRois( chainRoIName, roiStr );
58 
60  if( not doMatch ) {
61  ATH_MSG_WARNING( "Matching for " << chainRoIName <<
62  " was already done. Skipping" );
63  return StatusCode::SUCCESS;
64  }
65 
70  trkAnaColls.matches() ) );
71 
72  ATH_MSG_DEBUG( trkAnaColls.printMatchInfo() );
73 
74  return StatusCode::SUCCESS;
75 }
76 
77 
83  TrackAnalysisCollections& trkAnaColls,
84  const std::string& chainRoIName,
85  const std::string& roiStr ) const
86 {
88  bool doMatch = trkAnaColls.updateChainRois( chainRoIName, roiStr );
89 
91  if( not doMatch ) {
92  ATH_MSG_WARNING( "Matching for " << chainRoIName <<
93  " was already done. Skipping" );
94  return StatusCode::SUCCESS;
95  }
96 
101  trkAnaColls.matches() ) );
102 
103  ATH_MSG_DEBUG( trkAnaColls.printMatchInfo() );
104 
105  return StatusCode::SUCCESS;
106 }
IDTPM::TrackAnalysisCollections
Definition: TrackAnalysisCollections.h:46
IDTPM::TrackAnalysisCollections::updateChainRois
bool updateChainRois(const std::string &chainRoi, const std::string &roiStr)
update chainRois map
Definition: TrackAnalysisCollections.cxx:1155
TrackAnalysisCollections.h
Class to hold for each event collections needed in the TrkAnalsis.
IDTPM::TrackAnalysisCollections::printMatchInfo
std::string printMatchInfo()
print track matching information
Definition: TrackAnalysisCollections.cxx:1137
IDTPM::TrackAnalysisCollections::testTrackVec
const std::vector< const xAOD::TrackParticle * > & testTrackVec(Stage stage=FULL)
TEST = Track.
Definition: TrackAnalysisCollections.cxx:789
TrackMatchingLookup.h
Look-up table (templated) class to store (internally to IDTPM) all the matches between test and refer...
IDTPM::DeltaRMatchingTool_truthTrk::match
virtual StatusCode match(TrackAnalysisCollections &trkAnaColls, const std::string &chainRoIName, const std::string &roiStr) const override
General matching method, via TrackAnalysisCollections.
Definition: DeltaRMatchingTool.cxx:82
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::TrackAnalysisCollections::matches
ITrackMatchingLookup & matches()
get track matching information
Definition: TrackAnalysisCollections.h:261
IDTPM::DeltaRMatchingTool_trk::match
virtual StatusCode match(TrackAnalysisCollections &trkAnaColls, const std::string &chainRoIName, const std::string &roiStr) const override
General matching method, via TrackAnalysisCollections.
Definition: DeltaRMatchingTool.cxx:20
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DeltaRMatchingTool.h
Tool to perform matching of tracks and/or truth particles based on their ditance in DeltaR or in thei...
IDTPM::TrackAnalysisCollections::refTrackVec
const std::vector< const xAOD::TrackParticle * > & refTrackVec(Stage stage=FULL)
TEST = Track.
Definition: TrackAnalysisCollections.cxx:819
IDTPM::DeltaRMatchingTool_trkTruth::match
virtual StatusCode match(TrackAnalysisCollections &trkAnaColls, const std::string &chainRoIName, const std::string &roiStr) const override
General matching method, via TrackAnalysisCollections.
Definition: DeltaRMatchingTool.cxx:51
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
IDTPM::TrackAnalysisCollections::InRoI
@ InRoI
Definition: TrackAnalysisCollections.h:54
IDTPM::TrackAnalysisCollections::testTruthVec
const std::vector< const xAOD::TruthParticle * > & testTruthVec(Stage stage=FULL)
get TEST track vectors
Definition: TrackAnalysisCollections.cxx:776
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
IDTPM::TrackAnalysisCollections::refTruthVec
const std::vector< const xAOD::TruthParticle * > & refTruthVec(Stage stage=FULL)
get REFERENCE track vectors
Definition: TrackAnalysisCollections.cxx:806