ATLAS Offline Software
IMuonHitSummaryTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUON_IMUONHITSUMMARYTOOL_H
6 #define MUON_IMUONHITSUMMARYTOOL_H
7 
8 #include <iostream>
9 #include <map>
10 #include <set>
11 
12 #include "GaudiKernel/IAlgTool.h"
14 
15 namespace Trk {
16  class Track;
17  class TrackSummary;
18  class MuonTrackSummary;
19  class MeasurementBase;
20 } // namespace Trk
21 
22 static const InterfaceID IID_IMuonHitSummaryTool("Muon::IMuonHitSummaryTool", 1, 0);
23 
24 namespace Muon {
25  class MuonSegment;
26 
28  class IMuonHitSummaryTool : virtual public IAlgTool {
29  public:
30  struct HitSummary {
32  nprecisionHits(0),
35  nphiLayers(0),
36  netaPhiLayers(0),
37  nprecisionHoles(0),
39  nphiHoleLayers(0),
42  noutBoundsHits(0),
43  isEndcap(false),
44  isSmall(false) {}
45 
47  unsigned int nprecisionHits;
48  unsigned int nprecisionGoodHits;
49  unsigned int netaTriggerLayers;
50  unsigned int nphiLayers;
51  unsigned int netaPhiLayers;
54  unsigned int nprecisionHoles;
55  unsigned int netaTriggerHoleLayers;
56  unsigned int nphiHoleLayers;
59  unsigned int nprecisionOutliers;
60  unsigned int nprecisionCloseHits;
61  unsigned int noutBoundsHits;
63  // some basic info
64  bool isEndcap;
65  bool isSmall;
66 
67  std::string dump() const;
68  };
69 
70  struct CompactSummary {
72  mainSector(-1),
74  nphiLayers(0),
75  ntrigEtaLayers(0),
78  nphiHoleLayers(0),
80  isEndcap(false),
81  isSmall(false) {}
82 
84  unsigned int nprecisionLayers;
85  unsigned int nphiLayers;
86  unsigned int ntrigEtaLayers;
87  unsigned int nprecisionHoleLayers;
88  unsigned int ntrigEtaHoleLayers;
89  unsigned int nphiHoleLayers;
90  unsigned int nprecisionGoodLayers;
91  bool isEndcap;
92  bool isSmall;
94  std::set<int> sectors;
95  std::map<MuonStationIndex::StIndex, HitSummary> stationLayers;
96  std::set<MuonStationIndex::PhiIndex> phiLayers;
97 
98  std::string dump() const;
99  };
100 
101  public:
103  static const InterfaceID& interfaceID();
104 
109  virtual CompactSummary summary(const Trk::Track& track) const = 0;
110 
115  virtual CompactSummary summary(const Trk::TrackSummary& summary) const = 0;
116 
122 
127  virtual CompactSummary summary(const Muon::MuonSegment& segment) const = 0;
128 
133  virtual CompactSummary summary(const std::vector<const Muon::MuonSegment*>& segments) const = 0;
134 
139  virtual CompactSummary summary(const std::vector<const Trk::MeasurementBase*>& measurements) const = 0;
140  };
141 
142  inline const InterfaceID& IMuonHitSummaryTool::interfaceID() { return IID_IMuonHitSummaryTool; }
143 
144  inline std::string IMuonHitSummaryTool::CompactSummary::dump() const {
145  std::ostringstream sout;
146  sout << " IMuonHitSummaryTool::CompactSummary: sectors " << sectors.size() << std::endl << " sector indices: ";
147  for (std::set<int>::const_iterator it = sectors.begin(); it != sectors.end(); ++it) sout << " " << *it;
148 
149  sout << std::endl << " StationLayers " << stationLayers.size();
150  for (std::map<MuonStationIndex::StIndex, HitSummary>::const_iterator it = stationLayers.begin(); it != stationLayers.end(); ++it) {
151  sout << std::endl << " " << MuonStationIndex::stName(it->first) << " " << it->second.dump();
152  }
153  sout << std::endl << " Phi layers " << phiLayers.size();
154  for (std::set<MuonStationIndex::PhiIndex>::const_iterator it = phiLayers.begin(); it != phiLayers.end(); ++it)
155  sout << " " << MuonStationIndex::phiName(*it);
156  return sout.str();
157  }
158 
159  inline std::string IMuonHitSummaryTool::HitSummary::dump() const {
160  std::ostringstream sout;
161  sout << " precHits " << nprecisionHits << " etaTrigLay " << netaTriggerLayers << " phiLay " << nphiLayers << " etaPhiLay "
162  << netaPhiLayers << " precHoles " << nprecisionHoles << " etaTrigHoleLay " << netaTriggerHoleLayers << " phiHoleLay "
163  << nphiHoleLayers << " isEndcap " << isEndcap << " isSmall " << isSmall;
164  return sout.str();
165  }
166 
167 } // namespace Muon
168 
169 #endif // IMuonHitSummaryTool_H
Muon::IMuonHitSummaryTool::CompactSummary::nphiHoleLayers
unsigned int nphiHoleLayers
number of eta trigger layer holes
Definition: IMuonHitSummaryTool.h:89
Muon::IMuonHitSummaryTool::HitSummary::nprecisionOutliers
unsigned int nprecisionOutliers
number of phi layer holes
Definition: IMuonHitSummaryTool.h:59
Muon::IMuonHitSummaryTool::CompactSummary::ntrigEtaHoleLayers
unsigned int ntrigEtaHoleLayers
number of precision holes
Definition: IMuonHitSummaryTool.h:88
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Muon::IMuonHitSummaryTool::CompactSummary::nprecisionLayers
unsigned int nprecisionLayers
Definition: IMuonHitSummaryTool.h:84
Muon::IMuonHitSummaryTool::HitSummary::nprecisionCloseHits
unsigned int nprecisionCloseHits
number of outliers hits
Definition: IMuonHitSummaryTool.h:60
Muon::IMuonHitSummaryTool::HitSummary::nphiLayers
unsigned int nphiLayers
number of eta trigger layers
Definition: IMuonHitSummaryTool.h:50
Muon::IMuonHitSummaryTool
Interface for tools calculating hit count summaries for track.
Definition: IMuonHitSummaryTool.h:28
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Muon::IMuonHitSummaryTool::CompactSummary::isEndcap
bool isEndcap
number of precision layers not deweighted
Definition: IMuonHitSummaryTool.h:91
Muon::IMuonHitSummaryTool::CompactSummary::ntrigEtaLayers
unsigned int ntrigEtaLayers
number of phi layers
Definition: IMuonHitSummaryTool.h:86
Muon::IMuonHitSummaryTool::CompactSummary
Definition: IMuonHitSummaryTool.h:70
Muon::IMuonHitSummaryTool::summary
virtual CompactSummary summary(const Trk::Track &track) const =0
Calculate compact summary.
Muon::IMuonHitSummaryTool::CompactSummary::nprecisionHoleLayers
unsigned int nprecisionHoleLayers
number of eta trigger layers
Definition: IMuonHitSummaryTool.h:87
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
xAOD::MuonSegment
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/MuonSegment.h:13
Muon::IMuonHitSummaryTool::HitSummary::noutBoundsHits
unsigned int noutBoundsHits
number of close hits hits
Definition: IMuonHitSummaryTool.h:61
Muon::IMuonHitSummaryTool::CompactSummary::mainSector
int mainSector
Definition: IMuonHitSummaryTool.h:83
Muon::IMuonHitSummaryTool::CompactSummary::isSmall
bool isSmall
true if non-deweighted chambers are in endcap
Definition: IMuonHitSummaryTool.h:92
Muon::IMuonHitSummaryTool::CompactSummary::CompactSummary
CompactSummary()
Definition: IMuonHitSummaryTool.h:71
Muon::IMuonHitSummaryTool::HitSummary::nphiHoleLayers
unsigned int nphiHoleLayers
number of eta trigger layer holes
Definition: IMuonHitSummaryTool.h:56
Muon::IMuonHitSummaryTool::CompactSummary::nphiLayers
unsigned int nphiLayers
number of precision layers
Definition: IMuonHitSummaryTool.h:85
Muon::IMuonHitSummaryTool::HitSummary::netaPhiLayers
unsigned int netaPhiLayers
number of phi layers
Definition: IMuonHitSummaryTool.h:51
Muon::IMuonHitSummaryTool::interfaceID
static const InterfaceID & interfaceID()
IAlgTool interface.
Definition: IMuonHitSummaryTool.h:142
Muon::IMuonHitSummaryTool::CompactSummary::stationLayers
std::map< MuonStationIndex::StIndex, HitSummary > stationLayers
Definition: IMuonHitSummaryTool.h:95
Muon::MuonStationIndex::phiName
static const std::string & phiName(PhiIndex index)
convert PhiIndex into a string
Definition: MuonStationIndex.cxx:124
Muon::IMuonHitSummaryTool::HitSummary::netaTriggerHoleLayers
unsigned int netaTriggerHoleLayers
number of precision holes
Definition: IMuonHitSummaryTool.h:55
Trk::MuonTrackSummary
Detailed track summary for the muon system Give access to hit counts per chamber.
Definition: MuonTrackSummary.h:26
Muon::IMuonHitSummaryTool::HitSummary::dump
std::string dump() const
Definition: IMuonHitSummaryTool.h:159
Muon::IMuonHitSummaryTool::CompactSummary::dump
std::string dump() const
Definition: IMuonHitSummaryTool.h:144
Muon::IMuonHitSummaryTool::summary
virtual CompactSummary summary(const Muon::MuonSegment &segment) const =0
Calculate compact summary.
Muon::IMuonHitSummaryTool::HitSummary::isEndcap
bool isEndcap
number of out of bounds hits
Definition: IMuonHitSummaryTool.h:64
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Muon::IMuonHitSummaryTool::HitSummary::HitSummary
HitSummary()
Definition: IMuonHitSummaryTool.h:31
Muon::IMuonHitSummaryTool::summary
virtual CompactSummary summary(const Trk::TrackSummary &summary) const =0
Calculate compact summary.
Muon::IMuonHitSummaryTool::summary
virtual CompactSummary summary(const std::vector< const Muon::MuonSegment * > &segments) const =0
Calculate compact summary.
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
Muon::IMuonHitSummaryTool::HitSummary
Definition: IMuonHitSummaryTool.h:30
Muon::IMuonHitSummaryTool::CompactSummary::sectors
std::set< int > sectors
true if non-deweighted chambers are small
Definition: IMuonHitSummaryTool.h:94
Muon::IMuonHitSummaryTool::HitSummary::isSmall
bool isSmall
Definition: IMuonHitSummaryTool.h:65
Muon::IMuonHitSummaryTool::HitSummary::nprecisionHits
unsigned int nprecisionHits
hit counts
Definition: IMuonHitSummaryTool.h:47
Muon::IMuonHitSummaryTool::summary
virtual CompactSummary summary(const Trk::MuonTrackSummary &summary) const =0
Calculate compact summary.
Muon::IMuonHitSummaryTool::HitSummary::netaTriggerLayers
unsigned int netaTriggerLayers
number of precision hits that are not deweighted
Definition: IMuonHitSummaryTool.h:49
Muon::MuonStationIndex::stName
static const std::string & stName(StIndex index)
convert StIndex into a string
Definition: MuonStationIndex.cxx:141
Muon::IMuonHitSummaryTool::HitSummary::nprecisionHoles
unsigned int nprecisionHoles
number of paired eta/phi trigger layers
Definition: IMuonHitSummaryTool.h:54
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
MuonStationIndex.h
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
Muon::IMuonHitSummaryTool::CompactSummary::nprecisionGoodLayers
unsigned int nprecisionGoodLayers
number of phi layer holes
Definition: IMuonHitSummaryTool.h:90
Muon::IMuonHitSummaryTool::summary
virtual CompactSummary summary(const std::vector< const Trk::MeasurementBase * > &measurements) const =0
Calculate compact summary.
xAOD::TrackSummary
TrackSummary_v1 TrackSummary
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackSummary.h:10
Muon::IMuonHitSummaryTool::CompactSummary::phiLayers
std::set< MuonStationIndex::PhiIndex > phiLayers
Definition: IMuonHitSummaryTool.h:96
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
Muon::IMuonHitSummaryTool::HitSummary::nprecisionGoodHits
unsigned int nprecisionGoodHits
number of precision hits
Definition: IMuonHitSummaryTool.h:48