ATLAS Offline Software
MuonTrackPerformanceAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONTRACKPERFORMANCEALG_H
6 #define MUONTRACKPERFORMANCEALG_H
7 
8 #include <fstream>
9 #include <iostream>
10 #include <set>
11 #include <string>
12 #include <vector>
13 
15 #include "GaudiKernel/ServiceHandle.h"
16 #include "GaudiKernel/ToolHandle.h"
33 #include "xAODMuon/MuonContainer.h"
34 
35 class TFile;
36 class TruthTrajectory;
37 
39 
40 namespace Trk {
41  class Track;
42  class TrackSummary;
43 } // namespace Trk
44 
45 namespace Muon {
46  class MuonSegmentCombination;
47  class MuonSegment;
48 } // namespace Muon
49 
51 public:
52  struct ChamberData {
54  std::set<Identifier> hits;
55  };
56 
57  struct TrackData {
59  truthTrack(nullptr),
60  motherPdg(-1),
61  chi2Ndof(0.),
62  productionVertex(nullptr),
63  momentumAtProduction(nullptr),
64  truthTrajectory(nullptr),
65  trackPars(nullptr),
66  trackSummary(nullptr) {}
67 
69  delete trackPars;
70  delete trackSummary;
71  delete truthTrack;
72  delete truthTrajectory;
73  delete productionVertex;
74  delete momentumAtProduction;
75  }
76 
78  motherPdg = data.motherPdg;
79  chi2Ndof = data.chi2Ndof;
80  trackPars = data.trackPars ? new Trk::Perigee(*data.trackPars) : 0;
81  trackSummary = data.trackSummary ? new Trk::TrackSummary(*data.trackSummary) : 0;
82  truthTrack = data.truthTrack ? new TrackRecord(*data.truthTrack) : 0;
83  productionVertex = data.productionVertex ? new Amg::Vector3D(*data.productionVertex) : 0;
84  momentumAtProduction = data.momentumAtProduction ? new Amg::Vector3D(*data.momentumAtProduction) : 0;
85  }
86  // no copying
87  TrackData& operator=(const TrackData&) = delete;
88 
90  int motherPdg{};
91  double chi2Ndof{};
97 
98  std::vector<ChamberData> missingChambers;
99  std::vector<ChamberData> wrongChambers;
100 
101  std::set<Muon::MuonStationIndex::StIndex> layers;
102  std::set<Muon::MuonStationIndex::StIndex> missingLayers;
103  std::set<Muon::MuonStationIndex::StIndex> missingCscLayers;
104  std::set<Muon::MuonStationIndex::StIndex> wrongLayers;
105 
106  std::set<Muon::MuonStationIndex::StIndex> layersTrigger;
107  std::set<Muon::MuonStationIndex::StIndex> missingLayersTrigger;
108  std::set<Muon::MuonStationIndex::StIndex> wrongLayersTrigger;
109 
110  bool isEndcapSLTrack() const {
111  if (layers.size() == 1 && layers.count(Muon::MuonStationIndex::EM)) return true;
112  if (layers.size() == 2 && layers.count(Muon::MuonStationIndex::EM) && layers.count(Muon::MuonStationIndex::EO)) return true;
113  return false;
114  }
115 
116  bool hasMissingChambers() const { return !missingChambers.empty(); }
117 
118  bool hasWrongChambers() const { return !wrongChambers.empty(); }
119 
120  bool hasMissingLayers() const { return !missingLayers.empty(); }
121 
122  bool hasWrongLayers() const { return !wrongLayers.empty(); }
123 
124  bool hasMissingLayersTrigger() const { return !missingLayersTrigger.empty(); }
125 
126  bool hasWrongLayersTrigger() const { return !wrongLayersTrigger.empty(); }
127 
128  bool isMissingInner() const {
130  return false;
131  }
132 
133  bool hasWrongInner() const {
135  return false;
136  }
137 
138  bool allOk() const {
139  if (!missingChambers.empty() || !wrongChambers.empty()) return false;
140  if (!missingLayers.empty() || !wrongLayers.empty()) return false;
141  if (!missingLayersTrigger.empty() || !wrongLayersTrigger.empty()) return false;
142  return true;
143  }
144 
145  private:
146 
147  };
148 
149  struct EventData {
150  unsigned int eventNumber{};
151  unsigned int eventPosition{};
152  std::vector<TrackData*> missingTruthTracks;
153  std::vector<TrackData*> missingTruthTracksOneStation;
154 
155  std::vector<TrackData*> missingStationMomLoss;
156 
157  std::vector<TrackData*> missingStationLayer;
158  std::vector<TrackData*> missingCscStationLayer;
159  std::vector<TrackData*> missingStation;
160 
161  std::vector<TrackData*> wrongStationLayer;
162  std::vector<TrackData*> wrongStation;
163 
164  std::vector<TrackData*> missingStationLayerTrigger;
165  std::vector<TrackData*> wrongStationLayerTrigger;
166 
167  std::vector<TrackData*> fakeTracks;
168  std::vector<TrackData*> fakeTracksLowPt;
169  std::vector<TrackData*> fakeTracksSL;
170 
171  bool goodEvent() const {
172  return missingTruthTracks.empty() && missingTruthTracksOneStation.empty() && missingStationMomLoss.empty() &&
173  missingStationLayer.empty() && missingStation.empty() && wrongStationLayer.empty() && wrongStation.empty() &&
174  fakeTracks.empty() && fakeTracksLowPt.empty() && fakeTracksSL.empty();
175  }
176  };
177 
178  MuonTrackPerformanceAlg(const std::string& name, ISvcLocator* pSvcLocator);
179 
180 public:
181  virtual ~MuonTrackPerformanceAlg();
182 
183  virtual StatusCode initialize() override;
184  virtual StatusCode execute() override;
185  virtual StatusCode finalize() override;
186 
187  virtual unsigned int cardinality() const override final { return 1;}
188 
189 private:
190  void extractEtaPhiCounts(const std::set<Identifier>& ids, int& neta, int& nphi, int& netaCh, int& nphiCh) const;
191 
192  bool handleTracks();
193  bool handleTrackTruth(const TrackCollection& trackCollection);
194 
196 
197  void doSummary(const TrackCollection& tracks) const;
198  void doSummary(const Muon::IMuonTrackTruthTool::TruthTree& truthTracks) const;
199 
200  std::string print(const Muon::IMuonTrackTruthTool::TruthTreeEntry& trackTruth) const;
201 
202  std::string eventInfo() const;
203  int eventNumber() const;
204 
205  void printMissingChambers() const;
206  void printMissingTracks() const;
207  void printFakeTracks() const;
208 
210  std::pair<int, int> countHitsInChamber(const Identifier& chId, const std::set<Identifier>& hitIds) const;
211 
213  bool insertChamber(const Identifier& chId, const std::set<Identifier>& hits, int minEtaHits, int minPhiHits,
214  ChamberData& chamberData) const;
215 
217  bool insertTechnology(const std::set<Identifier>& chIds, const std::set<Identifier>& hits, int minEtaHits, int minPhiHits,
218  std::vector<ChamberData>& chamberData) const;
219 
221  bool insertStationLayers(const std::set<Identifier>& chIds, const std::set<Muon::MuonStationIndex::StIndex>& exclusionList,
222  std::set<Muon::MuonStationIndex::StIndex>& layers) const;
223 
225  bool insertStationLayers(const std::vector<ChamberData>& chambers, const std::set<Muon::MuonStationIndex::StIndex>& exclusionList,
226  std::set<Muon::MuonStationIndex::StIndex>& layers, bool usePrecision) const;
227 
229  TrackData* evaluateTrackTruthOverlap(const Muon::MuonTrackTruth& truthTrack) const;
230 
233 
234  void addTrackToTrackData(const Trk::Track& track, TrackData& trackData) const;
235 
237  std::string print(const TrackData& trackData) const;
238 
239  std::string print(const EventData& event, const std::vector<TrackData*>& tracks, const std::string& message) const;
240  std::string print(const EventData& event, const std::vector<const Trk::Track*>& tracks, const std::string& message) const;
241 
243  std::string printTrackCounters(bool doSecondaries = true) const;
244 
245  void clearTracks(std::vector<const Trk::Track*> tracks);
246  void clearTracks(std::vector<TrackData*> tracks);
247  void clearEvent(EventData& event);
248 
251 
253  bool isSecondary(const Muon::MuonTrackTruth& truthTrack) const;
255  bool isSecondary(const TruthTrajectory& truthTrajectory) const;
256 
257  bool selectPdg(int pdg) const { return m_selectedPdgs.count(pdg); }
258 
259  SG::ReadHandleKey<TrackCollection> m_trackKey{this, "TrackInputLocation", "MuonSpectrometerTracks",
260  "input tracks"};
261  SG::ReadHandleKey<xAOD::MuonContainer> m_muons{this, "MuonLocation", "Muons", "input muons"}; // muons for cases other than MS tracks
262  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo", "EventInfo key"};
264 
265  // truth readHandles
266  SG::ReadHandleKey<McEventCollection> m_mcEventColl{this, "McEventCollectionKey", "TruthEvent", "McEventCollection"};
268  this, "MuonSimDataNames", {"MDT_SDO", "RPC_SDO", "TGC_SDO", "sTGC_SDO", "MM_SDO"}, "Muon SDO maps"};
269  SG::ReadHandleKey<CscSimDataCollection> m_cscSimData{this, "CSC_SDO_Container", "CSC_SDO", "CSC SDO"};
270  SG::ReadHandleKey<TrackRecordCollection> m_trackRecord{this, "TrackRecord", "MuonEntryLayerFilter", "Track Record Collection"};
271 
272  // member set by Joboptions
273  int m_doSummary{};
276  bool m_doTruth{};
277  bool m_doHistos{};
279  double m_momentumCut{};
280  bool m_usePtCut{};
281  bool m_isCombined{};
282  bool m_doSegments{};
284  bool m_doStau{};
285 
286  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
287 
288  PublicToolHandle<Muon::MuonEDMPrinterTool> m_printer{this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
289 
290  ServiceHandle<Muon::IMuonEDMHelperSvc> m_edmHelperSvc{this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
291  "Handle to the service providing the IMuonEDMHelperSvc interface"};
292 
293 
294  ToolHandle<Muon::IMuonTrackTruthTool> m_truthTool{this, "TrackTruthTool",""};
295  ToolHandle<Trk::ITrackSummaryHelperTool> m_summaryHelperTool{this, "SummaryHelperTool", ""};
299 
310 
311  unsigned int m_nevents{};
312  unsigned int m_ntracks{};
313 
314  unsigned int m_nmatchedTracks{};
316  unsigned int m_nmatchedFakeTracks{};
317 
318  unsigned int m_nfakeTracks{};
319  unsigned int m_nfakeTracksHighPt{};
320  unsigned int m_nfakeTracksLowPt{};
321  unsigned int m_nfakeTracksSL{};
322 
323  unsigned int m_nmissedTracks{};
325 
326  unsigned int m_nmissedTracksSecondary{};
328 
329  unsigned int m_nmissingStationMomLoss{};
330  unsigned int m_nmissingStationLayer{};
333  unsigned int m_nmissingStation{};
334 
335  unsigned int m_nwrongStationLayer{};
337  unsigned int m_nwrongStation{};
338 
339  unsigned int m_ntruthTracks{};
340  unsigned int m_ntruthTracksSecondary{};
341 
342  struct TrackSummary {
343  std::string trackPars;
344  std::string chambers;
345  std::vector<std::string> missingChambers;
346  };
347 
348  struct EventSummary {
349  std::string eventNumber;
350  std::vector<TrackSummary> trackSummary;
351  };
352 
353  void printSummary(const std::vector<EventSummary>& summary, std::string typeName) const;
354 
355  std::vector<EventData> m_badEvents;
356 
358  std::string m_fileName;
359 
361  std::ofstream m_fileOutput;
362 
363  IntegerArrayProperty m_pdgsToBeConsidered;
364  std::set<int> m_selectedPdgs; // set storing particle PDG's considered for matching
365 
366  // type of track (based on enum defined in Muon_v1.h)
367  int m_trackType{};
368  std::string m_trackTypeString;
369 };
370 
371 #endif // MUONTRACKPERFORMANCEALG_H
MuonTrackPerformanceAlg::TrackData::hasWrongLayers
bool hasWrongLayers() const
Definition: MuonTrackPerformanceAlg.h:122
MuonTrackPerformanceAlg::TrackData::hasWrongInner
bool hasWrongInner() const
Definition: MuonTrackPerformanceAlg.h:133
MuonTrackPerformanceAlg::EventData::eventNumber
unsigned int eventNumber
Definition: MuonTrackPerformanceAlg.h:150
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
MuonTrackPerformanceAlg::EventData::fakeTracksSL
std::vector< TrackData * > fakeTracksSL
Definition: MuonTrackPerformanceAlg.h:169
MuonTrackPerformanceAlg::m_mcEventColl
SG::ReadHandleKey< McEventCollection > m_mcEventColl
Definition: MuonTrackPerformanceAlg.h:266
MuonTrackPerformanceAlg::m_nmissedTracksOneStation
unsigned int m_nmissedTracksOneStation
Definition: MuonTrackPerformanceAlg.h:324
MuonTrackPerformanceAlg::EventData::missingStationLayer
std::vector< TrackData * > missingStationLayer
Definition: MuonTrackPerformanceAlg.h:157
MuonTrackPerformanceAlg::m_nwrongStationLayer
unsigned int m_nwrongStationLayer
Definition: MuonTrackPerformanceAlg.h:335
MuonTrackPerformanceAlg::m_doEventListMissed
int m_doEventListMissed
Definition: MuonTrackPerformanceAlg.h:296
MuonTrackPerformanceAlg::m_momentumCut
double m_momentumCut
Definition: MuonTrackPerformanceAlg.h:279
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MuonTrackPerformanceAlg::m_minMdtHits
int m_minMdtHits
Definition: MuonTrackPerformanceAlg.h:300
Muon::MuonSegmentCombination
Definition: MuonSegmentCombination.h:30
MuonTrackPerformanceAlg::EventData::missingStationMomLoss
std::vector< TrackData * > missingStationMomLoss
Definition: MuonTrackPerformanceAlg.h:155
MuonTrackPerformanceAlg::TrackData::~TrackData
~TrackData()
Definition: MuonTrackPerformanceAlg.h:68
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MuonTrackPerformanceAlg::evaluateTrackTruthOverlap
TrackData * evaluateTrackTruthOverlap(const Muon::MuonTrackTruth &truthTrack) const
evaluate track/truth overlap and create the corresponding overlap description object
Definition: MuonTrackPerformanceAlg.cxx:1082
MuonTrackPerformanceAlg::m_nmissedTracksSecondary
unsigned int m_nmissedTracksSecondary
Definition: MuonTrackPerformanceAlg.h:326
MuonTrackPerformanceAlg::m_doEventListFake
int m_doEventListFake
Definition: MuonTrackPerformanceAlg.h:298
MuonTrackPerformanceAlg::m_momentumCutSim
double m_momentumCutSim
Definition: MuonTrackPerformanceAlg.h:278
TrackParameters.h
MuonTrackPerformanceAlg::TrackData::isEndcapSLTrack
bool isEndcapSLTrack() const
Definition: MuonTrackPerformanceAlg.h:110
MuonTrackSummary.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
MuonEDMPrinterTool.h
MuonTrackPerformanceAlg::m_usePtCut
bool m_usePtCut
Definition: MuonTrackPerformanceAlg.h:280
MuonTrackPerformanceAlg::printTrackCounters
std::string printTrackCounters(bool doSecondaries=true) const
print all the track counters to a string to provide a summary
Definition: MuonTrackPerformanceAlg.cxx:924
MuonTrackPerformanceAlg::eventNumber
int eventNumber() const
Definition: MuonTrackPerformanceAlg.cxx:591
Muon::MuonStationIndex::EO
@ EO
Definition: MuonStationIndex.h:26
MuonTrackPerformanceAlg::m_isCombined
bool m_isCombined
Definition: MuonTrackPerformanceAlg.h:281
MuonTrackPerformanceAlg::TrackData::missingLayers
std::set< Muon::MuonStationIndex::StIndex > missingLayers
Definition: MuonTrackPerformanceAlg.h:102
MuonTrackPerformanceAlg::TrackData::operator=
TrackData & operator=(const TrackData &)=delete
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
MuonTrackPerformanceAlg::TrackData::missingCscLayers
std::set< Muon::MuonStationIndex::StIndex > missingCscLayers
Definition: MuonTrackPerformanceAlg.h:103
MuonTrackPerformanceAlg::TrackData::truthTrajectory
TruthTrajectory * truthTrajectory
Definition: MuonTrackPerformanceAlg.h:94
CscSimDataCollection.h
MuonTrackPerformanceAlg::m_nmissingCscStationLayer
unsigned int m_nmissingCscStationLayer
Definition: MuonTrackPerformanceAlg.h:331
MuonTrackPerformanceAlg::TrackData::truthTrack
TrackRecord * truthTrack
Definition: MuonTrackPerformanceAlg.h:89
MuonTrackPerformanceAlg::printMissingTracks
void printMissingTracks() const
Definition: MuonTrackPerformanceAlg.cxx:856
MuonTrackPerformanceAlg::TrackData::momentumAtProduction
Amg::Vector3D * momentumAtProduction
Definition: MuonTrackPerformanceAlg.h:93
MuonTrackPerformanceAlg::handleTrackTruth
bool handleTrackTruth(const TrackCollection &trackCollection)
Definition: MuonTrackPerformanceAlg.cxx:252
MuonTrackPerformanceAlg::TrackData::layersTrigger
std::set< Muon::MuonStationIndex::StIndex > layersTrigger
Definition: MuonTrackPerformanceAlg.h:106
MuonTrackPerformanceAlg::m_doTrackDebug
int m_doTrackDebug
Definition: MuonTrackPerformanceAlg.h:275
MuonTrackPerformanceAlg::m_minTgcPhiHits
int m_minTgcPhiHits
Definition: MuonTrackPerformanceAlg.h:306
MuonTrackPerformanceAlg::m_fileOutput
std::ofstream m_fileOutput
output file
Definition: MuonTrackPerformanceAlg.h:361
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
MuonTrackPerformanceAlg::m_ntruthTracks
unsigned int m_ntruthTracks
Definition: MuonTrackPerformanceAlg.h:339
MuonTrackPerformanceAlg::EventData::goodEvent
bool goodEvent() const
Definition: MuonTrackPerformanceAlg.h:171
MuonTrackPerformanceAlg::m_truthTool
ToolHandle< Muon::IMuonTrackTruthTool > m_truthTool
Definition: MuonTrackPerformanceAlg.h:294
MuonTrackPerformanceAlg::insertTechnology
bool insertTechnology(const std::set< Identifier > &chIds, const std::set< Identifier > &hits, int minEtaHits, int minPhiHits, std::vector< ChamberData > &chamberData) const
insert set of chambers into chamber data if hits counts pass cuts, returns true if anything was inser...
Definition: MuonTrackPerformanceAlg.cxx:1041
Muon::MuonTrackTruth
Definition: IMuonTrackTruthTool.h:40
MuonTrackPerformanceAlg::EventData::fakeTracksLowPt
std::vector< TrackData * > fakeTracksLowPt
Definition: MuonTrackPerformanceAlg.h:168
MuonTrackPerformanceAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonTrackPerformanceAlg.h:286
MuonTrackPerformanceAlg::m_badEvents
std::vector< EventData > m_badEvents
Definition: MuonTrackPerformanceAlg.h:355
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
GenParticle_fwd.h
Muon::MuonStationIndex::BI
@ BI
Definition: MuonStationIndex.h:25
MuonTrackPerformanceAlg::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonTrackPerformanceAlg.h:290
MuonTrackPerformanceAlg::m_writeToFile
bool m_writeToFile
Definition: MuonTrackPerformanceAlg.h:283
MuonTrackPerformanceAlg::m_minCscEtaHits
int m_minCscEtaHits
Definition: MuonTrackPerformanceAlg.h:301
MuonTrackPerformanceAlg::TrackData::hasMissingLayersTrigger
bool hasMissingLayersTrigger() const
Definition: MuonTrackPerformanceAlg.h:124
MuonTrackPerformanceAlg::cardinality
virtual unsigned int cardinality() const override final
Definition: MuonTrackPerformanceAlg.h:187
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
MuonTrackPerformanceAlg::m_minRpcPhiHits
int m_minRpcPhiHits
Definition: MuonTrackPerformanceAlg.h:304
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
MuonTrackPerformanceAlg::m_fileName
std::string m_fileName
name of external file to write statistics
Definition: MuonTrackPerformanceAlg.h:358
Trk::Perigee
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
Definition: Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:33
xAOD::MuonSegment
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/MuonSegment.h:13
ReweightUtils.message
message
Definition: ReweightUtils.py:15
MuonTrackPerformanceAlg::m_trackKey
SG::ReadHandleKey< TrackCollection > m_trackKey
Location of the input tracks.
Definition: MuonTrackPerformanceAlg.h:259
MuonTrackPerformanceAlg::EventData::missingTruthTracksOneStation
std::vector< TrackData * > missingTruthTracksOneStation
Definition: MuonTrackPerformanceAlg.h:153
MuonTrackPerformanceAlg::TrackData::hasWrongLayersTrigger
bool hasWrongLayersTrigger() const
Definition: MuonTrackPerformanceAlg.h:126
MuonTrackPerformanceAlg::EventData::wrongStationLayer
std::vector< TrackData * > wrongStationLayer
Definition: MuonTrackPerformanceAlg.h:161
MuonTrackPerformanceAlg::addTrackToTrackData
void addTrackToTrackData(const Trk::Track &track, TrackData &trackData) const
Definition: MuonTrackPerformanceAlg.cxx:1244
MuonTrackPerformanceAlg::TrackData::trackSummary
Trk::TrackSummary * trackSummary
Definition: MuonTrackPerformanceAlg.h:96
MuonTrackPerformanceAlg::execute
virtual StatusCode execute() override
Definition: MuonTrackPerformanceAlg.cxx:112
MuonTrackPerformanceAlg::isSecondary
bool isSecondary(const Muon::MuonTrackTruth &truthTrack) const
Definition: MuonTrackPerformanceAlg.cxx:1406
MuonTrackPerformanceAlg::m_minMMEtaHits
int m_minMMEtaHits
Definition: MuonTrackPerformanceAlg.h:309
MuonTrackPerformanceAlg::m_muonSimData
SG::ReadHandleKeyArray< MuonSimDataCollection > m_muonSimData
Definition: MuonTrackPerformanceAlg.h:267
MuonTrackPerformanceAlg::clearTracks
void clearTracks(std::vector< const Trk::Track * > tracks)
Definition: MuonTrackPerformanceAlg.cxx:1352
AthAlgorithm.h
MuonTrackPerformanceAlg::TrackSummary::chambers
std::string chambers
Definition: MuonTrackPerformanceAlg.h:344
MuonTrackPerformanceAlg::EventData::missingStation
std::vector< TrackData * > missingStation
Definition: MuonTrackPerformanceAlg.h:159
MuonTrackPerformanceAlg::m_ntracks
unsigned int m_ntracks
Definition: MuonTrackPerformanceAlg.h:312
MuonTrackPerformanceAlg::m_nmatchedFakeTracks
unsigned int m_nmatchedFakeTracks
Definition: MuonTrackPerformanceAlg.h:316
MuonTrackPerformanceAlg::doSummary
void doSummary(const TrackCollection &tracks) const
Definition: MuonTrackPerformanceAlg.cxx:598
MuonTrackPerformanceAlg::m_doSegments
bool m_doSegments
Definition: MuonTrackPerformanceAlg.h:282
MuonTrackPerformanceAlg::extractEtaPhiCounts
void extractEtaPhiCounts(const std::set< Identifier > &ids, int &neta, int &nphi, int &netaCh, int &nphiCh) const
MuonTrackPerformanceAlg::printSummary
void printSummary(const std::vector< EventSummary > &summary, std::string typeName) const
MuonTrackPerformanceAlg::createTrackData
TrackData * createTrackData(const Muon::IMuonTrackTruthTool::TruthTreeEntry &trackTruth) const
create track data object for truth track
Definition: MuonTrackPerformanceAlg.cxx:1257
MuonTrackPerformanceAlg::m_pdgsToBeConsidered
IntegerArrayProperty m_pdgsToBeConsidered
Definition: MuonTrackPerformanceAlg.h:363
MuonTrackPerformanceAlg::EventData::wrongStation
std::vector< TrackData * > wrongStation
Definition: MuonTrackPerformanceAlg.h:162
MuonTrackPerformanceAlg::TrackData::motherPdg
int motherPdg
Definition: MuonTrackPerformanceAlg.h:90
MuonTrackPerformanceAlg::ChamberData
Definition: MuonTrackPerformanceAlg.h:52
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
McEventCollection.h
MuonTrackPerformanceAlg::TrackData::layers
std::set< Muon::MuonStationIndex::StIndex > layers
Definition: MuonTrackPerformanceAlg.h:101
MuonTrackPerformanceAlg::TrackData::wrongChambers
std::vector< ChamberData > wrongChambers
Definition: MuonTrackPerformanceAlg.h:99
MuonTrackPerformanceAlg::m_nmissingStationLayerTrigger
unsigned int m_nmissingStationLayerTrigger
Definition: MuonTrackPerformanceAlg.h:332
MuonTrackPerformanceAlg::EventSummary
Definition: MuonTrackPerformanceAlg.h:348
MuonTrackPerformanceAlg::m_nwrongStationLayerTrigger
unsigned int m_nwrongStationLayerTrigger
Definition: MuonTrackPerformanceAlg.h:336
MuonTrackPerformanceAlg::TrackData::TrackData
TrackData()
Definition: MuonTrackPerformanceAlg.h:58
MuonTrackPerformanceAlg::clearEvent
void clearEvent(EventData &event)
Definition: MuonTrackPerformanceAlg.cxx:1366
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonTrackPerformanceAlg::m_nwrongStation
unsigned int m_nwrongStation
Definition: MuonTrackPerformanceAlg.h:337
MuonTrackPerformanceAlg::m_summaryHelperTool
ToolHandle< Trk::ITrackSummaryHelperTool > m_summaryHelperTool
Definition: MuonTrackPerformanceAlg.h:295
Muon::MuonStationIndex::EI
@ EI
Definition: MuonStationIndex.h:26
MuonTrackPerformanceAlg::m_nmissingStation
unsigned int m_nmissingStation
Definition: MuonTrackPerformanceAlg.h:333
MuonTrackPerformanceAlg::TrackData::missingChambers
std::vector< ChamberData > missingChambers
Definition: MuonTrackPerformanceAlg.h:98
MuonTrackPerformanceAlg::m_minTgcEtaHits
int m_minTgcEtaHits
Definition: MuonTrackPerformanceAlg.h:305
TrackCollection.h
MuonTrackPerformanceAlg::m_eventInfo
const xAOD::EventInfo * m_eventInfo
pointer to the event info
Definition: MuonTrackPerformanceAlg.h:263
MuonTrackPerformanceAlg::m_selectedPdgs
std::set< int > m_selectedPdgs
Definition: MuonTrackPerformanceAlg.h:364
MuonTrackPerformanceAlg::m_trackType
int m_trackType
Definition: MuonTrackPerformanceAlg.h:367
MuonTrackPerformanceAlg::EventData
Definition: MuonTrackPerformanceAlg.h:149
MuonTrackPerformanceAlg::printFakeTracks
void printFakeTracks() const
Definition: MuonTrackPerformanceAlg.cxx:885
TrackSummary.h
MuonTrackPerformanceAlg::TrackSummary::trackPars
std::string trackPars
Definition: MuonTrackPerformanceAlg.h:343
MuonTrackPerformanceAlg::m_nmissingStationMomLoss
unsigned int m_nmissingStationMomLoss
Definition: MuonTrackPerformanceAlg.h:329
IMuonTrackTruthTool.h
MuonTrackPerformanceAlg::m_doHitResiduals
int m_doHitResiduals
Definition: MuonTrackPerformanceAlg.h:274
MuonTrackPerformanceAlg::TrackData
Definition: MuonTrackPerformanceAlg.h:57
MuonTrackPerformanceAlg::TrackData::chi2Ndof
double chi2Ndof
Definition: MuonTrackPerformanceAlg.h:91
DataVector< Trk::Track >
MuonTrackPerformanceAlg::handleTracks
bool handleTracks()
Definition: MuonTrackPerformanceAlg.cxx:155
MuonTrackPerformanceAlg::EventData::eventPosition
unsigned int eventPosition
Definition: MuonTrackPerformanceAlg.h:151
AthAlgorithm
Definition: AthAlgorithm.h:47
MuonTrackPerformanceAlg::m_nfakeTracksHighPt
unsigned int m_nfakeTracksHighPt
Definition: MuonTrackPerformanceAlg.h:319
MuonTrackPerformanceAlg::EventData::fakeTracks
std::vector< TrackData * > fakeTracks
Definition: MuonTrackPerformanceAlg.h:167
MuonTrackPerformanceAlg::TrackData::trackPars
Trk::Perigee * trackPars
Definition: MuonTrackPerformanceAlg.h:95
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
MuonTrackPerformanceAlg::m_nmissedTracksOneStationSecondary
unsigned int m_nmissedTracksOneStationSecondary
Definition: MuonTrackPerformanceAlg.h:327
MuonTrackPerformanceAlg::TrackData::allOk
bool allOk() const
Definition: MuonTrackPerformanceAlg.h:138
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
IMuonEDMHelperSvc.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
MuonTrackPerformanceAlg::m_doHistos
bool m_doHistos
Definition: MuonTrackPerformanceAlg.h:277
MuonTrackPerformanceAlg::m_muons
SG::ReadHandleKey< xAOD::MuonContainer > m_muons
Definition: MuonTrackPerformanceAlg.h:261
TruthTrajectory
Definition: TruthTrajectory.h:26
MuonTrackPerformanceAlg::EventData::missingStationLayerTrigger
std::vector< TrackData * > missingStationLayerTrigger
Definition: MuonTrackPerformanceAlg.h:164
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
TrackRecordCollection.h
MuonTrackPerformanceAlg::EventData::missingCscStationLayer
std::vector< TrackData * > missingCscStationLayer
Definition: MuonTrackPerformanceAlg.h:158
MuonTrackPerformanceAlg::TrackSummary::missingChambers
std::vector< std::string > missingChambers
Definition: MuonTrackPerformanceAlg.h:345
MuonTrackPerformanceAlg::m_nfakeTracksLowPt
unsigned int m_nfakeTracksLowPt
Definition: MuonTrackPerformanceAlg.h:320
MuonTrackPerformanceAlg::m_nmissingStationLayer
unsigned int m_nmissingStationLayer
Definition: MuonTrackPerformanceAlg.h:330
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonTrackPerformanceAlg::m_minsTgcPhiHits
int m_minsTgcPhiHits
Definition: MuonTrackPerformanceAlg.h:308
MuonTrackPerformanceAlg::TrackData::hasMissingLayers
bool hasMissingLayers() const
Definition: MuonTrackPerformanceAlg.h:120
MuonTrackPerformanceAlg::m_nmatchedTracks
unsigned int m_nmatchedTracks
Definition: MuonTrackPerformanceAlg.h:314
TrackRecord
Definition: TrackRecord.h:12
EventInfo.h
MuonTrackPerformanceAlg::EventSummary::trackSummary
std::vector< TrackSummary > trackSummary
Definition: MuonTrackPerformanceAlg.h:350
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
MuonTrackPerformanceAlg::m_minCscPhiHits
int m_minCscPhiHits
Definition: MuonTrackPerformanceAlg.h:302
MuonContainer.h
MuonTrackPerformanceAlg::finalize
virtual StatusCode finalize() override
Definition: MuonTrackPerformanceAlg.cxx:563
MuonTrackPerformanceAlg::m_nmissedTracks
unsigned int m_nmissedTracks
Definition: MuonTrackPerformanceAlg.h:323
MuonTrackPerformanceAlg::TrackData::productionVertex
Amg::Vector3D * productionVertex
Definition: MuonTrackPerformanceAlg.h:92
ITrackSummaryHelperTool.h
MuonTrackPerformanceAlg::ChamberData::hits
std::set< Identifier > hits
Definition: MuonTrackPerformanceAlg.h:54
Muon::IMuonTrackTruthTool::TruthTreeEntry
Definition: IMuonTrackTruthTool.h:75
MuonTrackPerformanceAlg::selectPdg
bool selectPdg(int pdg) const
Definition: MuonTrackPerformanceAlg.h:257
MuonTrackPerformanceAlg::TrackData::TrackData
TrackData(const TrackData &data)
Definition: MuonTrackPerformanceAlg.h:77
MuonTrackPerformanceAlg::m_minsTgcEtaHits
int m_minsTgcEtaHits
Definition: MuonTrackPerformanceAlg.h:307
Muon::IMuonTrackTruthTool::TruthTree
std::map< int, TruthTreeEntry > TruthTree
Definition: IMuonTrackTruthTool.h:93
MuonTrackPerformanceAlg::m_ntruthTracksSecondary
unsigned int m_ntruthTracksSecondary
Definition: MuonTrackPerformanceAlg.h:340
MuonTrackPerformanceAlg::initialize
virtual StatusCode initialize() override
Definition: MuonTrackPerformanceAlg.cxx:77
MuonTrackPerformanceAlg::MuonTrackPerformanceAlg
MuonTrackPerformanceAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MuonTrackPerformanceAlg.cxx:18
MuonTrackPerformanceAlg::m_nevents
unsigned int m_nevents
Definition: MuonTrackPerformanceAlg.h:311
MuonTrackPerformanceAlg::ChamberData::chId
Identifier chId
Definition: MuonTrackPerformanceAlg.h:53
MuonTrackPerformanceAlg::TrackSummary
Definition: MuonTrackPerformanceAlg.h:342
MuonTrackPerformanceAlg::~MuonTrackPerformanceAlg
virtual ~MuonTrackPerformanceAlg()
Definition: MuonTrackPerformanceAlg.cxx:75
MuonTrackPerformanceAlg::m_trackRecord
SG::ReadHandleKey< TrackRecordCollection > m_trackRecord
Definition: MuonTrackPerformanceAlg.h:270
MuonTrackPerformanceAlg::printMissingChambers
void printMissingChambers() const
Definition: MuonTrackPerformanceAlg.cxx:776
MuonTrackPerformanceAlg::TrackData::hasWrongChambers
bool hasWrongChambers() const
Definition: MuonTrackPerformanceAlg.h:118
MuonTrackPerformanceAlg::insertStationLayers
bool insertStationLayers(const std::set< Identifier > &chIds, const std::set< Muon::MuonStationIndex::StIndex > &exclusionList, std::set< Muon::MuonStationIndex::StIndex > &layers) const
insert station layers into layer set if they are not in exclusion list
Definition: MuonTrackPerformanceAlg.cxx:1053
MuonTrackPerformanceAlg::countHitsInChamber
std::pair< int, int > countHitsInChamber(const Identifier &chId, const std::set< Identifier > &hitIds) const
counts number of eta (first number) and phi (second number in pair) hits in the set of hit IDs in the...
Definition: MuonTrackPerformanceAlg.cxx:997
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
MuonTrackPerformanceAlg::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: MuonTrackPerformanceAlg.h:262
MuonTrackPerformanceAlg::TrackData::wrongLayersTrigger
std::set< Muon::MuonStationIndex::StIndex > wrongLayersTrigger
Definition: MuonTrackPerformanceAlg.h:108
MuonTrackPerformanceAlg::m_nfakeTracksSL
unsigned int m_nfakeTracksSL
Definition: MuonTrackPerformanceAlg.h:321
MuonTrackPerformanceAlg::insertChamber
bool insertChamber(const Identifier &chId, const std::set< Identifier > &hits, int minEtaHits, int minPhiHits, ChamberData &chamberData) const
insert chamber information into ChamberData if hits counts pass cuts, returns true if anything was in...
Definition: MuonTrackPerformanceAlg.cxx:1015
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
MuonTrackPerformanceAlg::m_doStau
bool m_doStau
Definition: MuonTrackPerformanceAlg.h:284
TruthTrajectory.h
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
MuonTrackPerformanceAlg::m_doTruth
bool m_doTruth
Definition: MuonTrackPerformanceAlg.h:276
MuonTrackPerformanceAlg::m_doEventListIncomplete
int m_doEventListIncomplete
Definition: MuonTrackPerformanceAlg.h:297
MuonTrackPerformanceAlg::EventData::missingTruthTracks
std::vector< TrackData * > missingTruthTracks
Definition: MuonTrackPerformanceAlg.h:152
MuonTrackPerformanceAlg::m_nmatchedTracksSecondary
unsigned int m_nmatchedTracksSecondary
Definition: MuonTrackPerformanceAlg.h:315
MuonTrackPerformanceAlg
Definition: MuonTrackPerformanceAlg.h:50
MuonSimDataCollection.h
MuonTrackPerformanceAlg::eventInfo
std::string eventInfo() const
Definition: MuonTrackPerformanceAlg.cxx:596
MuonTrackPerformanceAlg::m_nfakeTracks
unsigned int m_nfakeTracks
Definition: MuonTrackPerformanceAlg.h:318
MuonTrackPerformanceAlg::EventSummary::eventNumber
std::string eventNumber
Definition: MuonTrackPerformanceAlg.h:349
MuonTrackPerformanceAlg::handleSegmentCombi
bool handleSegmentCombi(const Muon::MuonSegmentCombination &combi)
Definition: MuonTrackPerformanceAlg.cxx:127
MuonTrackPerformanceAlg::TrackData::wrongLayers
std::set< Muon::MuonStationIndex::StIndex > wrongLayers
Definition: MuonTrackPerformanceAlg.h:104
MuonTrackPerformanceAlg::getMother
HepMC::ConstGenParticlePtr getMother(const TruthTrajectory &traj) const
Definition: MuonTrackPerformanceAlg.cxx:1382
MuonTrackPerformanceAlg::m_doSummary
int m_doSummary
Definition: MuonTrackPerformanceAlg.h:273
MuonTrackPerformanceAlg::TrackData::missingLayersTrigger
std::set< Muon::MuonStationIndex::StIndex > missingLayersTrigger
Definition: MuonTrackPerformanceAlg.h:107
xAOD::TrackSummary
TrackSummary_v1 TrackSummary
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackSummary.h:10
IMuonIdHelperSvc.h
MuonTrackPerformanceAlg::goodTruthTrack
bool goodTruthTrack(const Muon::IMuonTrackTruthTool::TruthTreeEntry &entry) const
Definition: MuonTrackPerformanceAlg.cxx:235
Muon::MuonStationIndex::EM
@ EM
Definition: MuonStationIndex.h:26
MuonTrackPerformanceAlg::EventData::wrongStationLayerTrigger
std::vector< TrackData * > wrongStationLayerTrigger
Definition: MuonTrackPerformanceAlg.h:165
MuonTrackPerformanceAlg::TrackData::hasMissingChambers
bool hasMissingChambers() const
Definition: MuonTrackPerformanceAlg.h:116
MuonTrackPerformanceAlg::getInitialState
HepMC::ConstGenParticlePtr getInitialState(const TruthTrajectory &traj) const
Definition: MuonTrackPerformanceAlg.cxx:1391
MuonTrackPerformanceAlg::m_minRpcEtaHits
int m_minRpcEtaHits
Definition: MuonTrackPerformanceAlg.h:303
MuonTrackPerformanceAlg::m_trackTypeString
std::string m_trackTypeString
Definition: MuonTrackPerformanceAlg.h:368
MuonTrackPerformanceAlg::m_cscSimData
SG::ReadHandleKey< CscSimDataCollection > m_cscSimData
Definition: MuonTrackPerformanceAlg.h:269
MuonTrackPerformanceAlg::print
std::string print(const Muon::IMuonTrackTruthTool::TruthTreeEntry &trackTruth) const
Definition: MuonTrackPerformanceAlg.cxx:642
ServiceHandle< Muon::IMuonIdHelperSvc >
MuonTrackPerformanceAlg::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonTrackPerformanceAlg.h:288
Identifier
Definition: IdentifierFieldParser.cxx:14
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65
MuonTrackPerformanceAlg::TrackData::isMissingInner
bool isMissingInner() const
Definition: MuonTrackPerformanceAlg.h:128