ATLAS Offline Software
MuonCalibTrackSummary.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCALIBTRACKSUMMARY_H
6 #define MUONCALIBTRACKSUMMARY_H
7 
8 #include <set>
9 #include <string>
10 #include <vector>
11 
14 
15 namespace MuonCalib {
16 
18  public:
20  struct Projection {
21  int nhits{0};
22  int nholes{0};
23  int noutliers{0};
24  int ndeltas{0};
25  };
26 
28 
30  bool isMdt() const { return chId.is_mdt(); }
31 
32  int nhits() const { return m_first.nhits + m_second.nhits; }
33  int nholes() const { return m_first.nholes + m_second.nholes; }
34  int noutliers() const { return m_first.noutliers + m_second.noutliers; }
35  int ndeltas() const { return m_first.ndeltas + m_second.ndeltas; }
36 
37  int netaHits() const { return isMdt() ? nhits() : m_first.nhits; }
38  int nphiHits() const { return isMdt() ? 0 : m_second.nhits; }
39 
40  int nMdtHitsMl1() const { return isMdt() ? m_first.nhits : 0; }
41  int nMdtHitsMl2() const { return isMdt() ? m_second.nhits : 0; }
42 
43  // before using make sure isMdt == false!
46  const Projection& etaProjection() const { return m_first; }
47  const Projection& phiProjection() const { return m_second; }
48 
49  private:
50  Projection m_first; //<! eta projections for cluster chambers, first multi layer for mdt chambers
51  Projection m_second; //<! phi projections for cluster chambers, first multi layer for mdt chambers
52  };
53 
54  unsigned int nhits{0};
55  unsigned int npixel{0};
56  unsigned int nsct{0};
57  unsigned int ntrtBarrel{0};
58  unsigned int ntrtEndcap{0};
59  unsigned int nhitsUpperHemisphere{0};
60  unsigned int nhitsLowerHemisphere{0};
61  unsigned int nscatters{0};
62  unsigned int nholes{0};
63  unsigned int noutliers{0};
64  unsigned int npseudo{0};
65  unsigned int ntubeHits{0};
66  unsigned int nmdtHits{0};
67  unsigned int nmdtHitsBelowADCCut{0};
68  unsigned int nrpcPhiHits{0};
69  unsigned int nrpcEtaHits{0};
70  unsigned int ntgcPhiHits{0};
71  unsigned int ntgcEtaHits{0};
72  unsigned int ncscPhiHits{0};
73  unsigned int ncscEtaHits{0};
74 
75  bool hasEndcapA{false};
76  bool hasEndcapC{false};
77  bool hasBarrel{false};
78 
81 
82  bool isTrack{false};
83 
85  unsigned int nmdtCh() const;
86  unsigned int nrpcCh(bool phi) const;
87  unsigned int ntgcCh(bool phi) const;
88  unsigned int ncscCh(bool phi) const;
89 
90  unsigned int nrpcEtaPhiCh() const;
91  unsigned int ntgcEtaPhiCh() const;
92  unsigned int ncscEtaPhiCh() const;
93 
94  unsigned int ntrt() const { return ntrtBarrel + ntrtEndcap; }
95 
97  unsigned int nphiTrigHits() const { return nrpcPhiHits + ntgcPhiHits; }
98  unsigned int netaTrigHits() const { return nrpcEtaHits + ntgcEtaHits; }
99 
101  unsigned int nmdtHitsPerMl(int ml) const;
102 
103  bool hasEndcap() const { return hasEndcapA || hasEndcapC; }
105  bool hasId() const { return npixel + nsct + ntrt() > 0; }
106 
107  std::vector<ChamberHitSummary> chamberHitSummary;
108 
110  std::set<MuonFixedIdManipulator::PhiStationIndex> phiStationLayers;
111 
113  std::set<MuonFixedIdManipulator::StationIndex> precisionStationLayers;
114 
116  std::set<MuonFixedIdManipulator::PhiStationIndex> phiEtaStationLayers;
117 
119  std::set<MuonFixedIdManipulator::StationIndex> goodPrecisionStationLayers;
120 
122  std::string dump() const;
123  };
124 } // namespace MuonCalib
125 
126 #endif
MuonCalib::MuonCalibTrackSummary::ncscEtaPhiCh
unsigned int ncscEtaPhiCh() const
Definition: MuonCalibTrackSummary.cxx:175
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::nhits
int nhits() const
Definition: MuonCalibTrackSummary.h:32
MuonCalib::MuonCalibTrackSummary::phiStationLayers
std::set< MuonFixedIdManipulator::PhiStationIndex > phiStationLayers
set of phi layers on the track
Definition: MuonCalibTrackSummary.h:110
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::nMdtHitsMl1
int nMdtHitsMl1() const
Definition: MuonCalibTrackSummary.h:40
MuonCalib::MuonCalibTrackSummary::ntgcPhiHits
unsigned int ntgcPhiHits
Definition: MuonCalibTrackSummary.h:70
MuonCalib::MuonCalibTrackSummary
Definition: MuonCalibTrackSummary.h:17
MuonCalib::MuonCalibTrackSummary::nphiTrigHits
unsigned int nphiTrigHits() const
access to number of eta/phi trigger hits
Definition: MuonCalibTrackSummary.h:97
MuonCalib::MuonCalibTrackSummary::netaTrigHits
unsigned int netaTrigHits() const
Definition: MuonCalibTrackSummary.h:98
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::ndeltas
int ndeltas() const
Definition: MuonCalibTrackSummary.h:35
MuonCalib::MuonCalibTrackSummary::hasEndcapC
bool hasEndcapC
Definition: MuonCalibTrackSummary.h:76
MuonCalib::MuonCalibTrackSummary::ntrtEndcap
unsigned int ntrtEndcap
Definition: MuonCalibTrackSummary.h:58
MuonCalib::MuonCalibTrackSummary::hasId
bool hasId() const
Definition: MuonCalibTrackSummary.h:105
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::Projection::nhits
int nhits
Definition: MuonCalibTrackSummary.h:21
MuonCalib::MuonFixedId::is_mdt
bool is_mdt() const
Definition: MuonFixedId.h:559
MuonCalib::MuonCalibTrackSummary::nmdtHits
unsigned int nmdtHits
Definition: MuonCalibTrackSummary.h:66
MuonCalib::MuonCalibTrackSummary::ntrtBarrel
unsigned int ntrtBarrel
Definition: MuonCalibTrackSummary.h:57
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::Projection
Definition: MuonCalibTrackSummary.h:20
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::netaHits
int netaHits() const
Definition: MuonCalibTrackSummary.h:37
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::m_second
Projection m_second
Definition: MuonCalibTrackSummary.h:51
MuonCalib::MuonCalibTrackSummary::ncscCh
unsigned int ncscCh(bool phi) const
Definition: MuonCalibTrackSummary.cxx:136
MuonCalib::MuonCalibTrackSummary::nrpcEtaHits
unsigned int nrpcEtaHits
Definition: MuonCalibTrackSummary.h:69
MuonCalib::MuonCalibTrackSummary::ntgcEtaPhiCh
unsigned int ntgcEtaPhiCh() const
Definition: MuonCalibTrackSummary.cxx:163
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::nholes
int nholes() const
Definition: MuonCalibTrackSummary.h:33
MuonCalib::MuonCalibTrackSummary::nhitsLowerHemisphere
unsigned int nhitsLowerHemisphere
Definition: MuonCalibTrackSummary.h:60
MuonCalib::MuonCalibTrackSummary::dump
std::string dump() const
dump counts to string
Definition: MuonCalibTrackSummary.cxx:14
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::m_first
Projection m_first
Definition: MuonCalibTrackSummary.h:50
MuonCalib::MuonCalibTrackSummary::phiEtaStationLayers
std::set< MuonFixedIdManipulator::PhiStationIndex > phiEtaStationLayers
set of phi layers which also have eta hits on the track
Definition: MuonCalibTrackSummary.h:116
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::nMdtHitsMl2
int nMdtHitsMl2() const
Definition: MuonCalibTrackSummary.h:41
MuonCalib::MuonCalibTrackSummary::nrpcEtaPhiCh
unsigned int nrpcEtaPhiCh() const
Definition: MuonCalibTrackSummary.cxx:151
MuonCalib::MuonCalibTrackSummary::hasEndcap
bool hasEndcap() const
Definition: MuonCalibTrackSummary.h:103
MuonCalib::MuonCalibTrackSummary::nmdtCh
unsigned int nmdtCh() const
access to number of chambers per technology on the track
Definition: MuonCalibTrackSummary.cxx:96
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::etaProjection
const Projection & etaProjection() const
Definition: MuonCalibTrackSummary.h:46
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::Projection::nholes
int nholes
Definition: MuonCalibTrackSummary.h:22
MuonCalib::MuonCalibTrackSummary::ncscEtaHits
unsigned int ncscEtaHits
Definition: MuonCalibTrackSummary.h:73
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::phiProjection
const Projection & phiProjection() const
Definition: MuonCalibTrackSummary.h:47
MuonCalib::MuonCalibTrackSummary::npixel
unsigned int npixel
Definition: MuonCalibTrackSummary.h:55
MuonCalib::MuonCalibTrackSummary::isTrack
bool isTrack
Definition: MuonCalibTrackSummary.h:82
MuonCalib::MuonCalibTrackSummary::nhitsUpperHemisphere
unsigned int nhitsUpperHemisphere
Definition: MuonCalibTrackSummary.h:59
MuonCalib::MuonCalibTrackSummary::ntgcEtaHits
unsigned int ntgcEtaHits
Definition: MuonCalibTrackSummary.h:71
MuonCalib::MuonCalibTrackSummary::ntgcCh
unsigned int ntgcCh(bool phi) const
Definition: MuonCalibTrackSummary.cxx:121
MuonCalib::MuonCalibTrackSummary::noutliers
unsigned int noutliers
Definition: MuonCalibTrackSummary.h:63
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary
Definition: MuonCalibTrackSummary.h:19
MuonCalib::MuonCalibTrackSummary::ntrt
unsigned int ntrt() const
Definition: MuonCalibTrackSummary.h:94
MuonCalib::MuonCalibTrackSummary::chamberHitSummary
std::vector< ChamberHitSummary > chamberHitSummary
Definition: MuonCalibTrackSummary.h:107
MuonCalib::MuonCalibTrackSummary::ntubeHits
unsigned int ntubeHits
Definition: MuonCalibTrackSummary.h:65
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::chId
MuonFixedId chId
Definition: MuonCalibTrackSummary.h:29
MuonCalib::MuonCalibTrackSummary::ncscPhiHits
unsigned int ncscPhiHits
Definition: MuonCalibTrackSummary.h:72
MuonCalib::MuonCalibTrackSummary::hasBarrel
bool hasBarrel
Definition: MuonCalibTrackSummary.h:77
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::nphiHits
int nphiHits() const
Definition: MuonCalibTrackSummary.h:38
MuonCalib::MuonCalibTrackSummary::nrpcPhiHits
unsigned int nrpcPhiHits
Definition: MuonCalibTrackSummary.h:68
MuonCalib::MuonCalibTrackSummary::precisionStationLayers
std::set< MuonFixedIdManipulator::StationIndex > precisionStationLayers
set of precision layers on the track
Definition: MuonCalibTrackSummary.h:113
MuonCalib::MuonCalibTrackSummary::nrpcCh
unsigned int nrpcCh(bool phi) const
Definition: MuonCalibTrackSummary.cxx:106
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::Projection::noutliers
int noutliers
Definition: MuonCalibTrackSummary.h:23
MuonCalib::MuonCalibTrackSummary::nsct
unsigned int nsct
Definition: MuonCalibTrackSummary.h:56
MuonCalib::MuonFixedId
Definition: MuonFixedId.h:50
MuonCalib::MuonCalibTrackSummary::nmdtHitsPerMl
unsigned int nmdtHitsPerMl(int ml) const
access to number of MDT hits per ml (ml=1,2)
Definition: MuonCalibTrackSummary.cxx:81
MuonCalib::MuonCalibTrackSummary::goodPrecisionStationLayers
std::set< MuonFixedIdManipulator::StationIndex > goodPrecisionStationLayers
set of precision layers with (MDT: two multi layers, CSC: at least 2 eta and phi hits) on the track
Definition: MuonCalibTrackSummary.h:119
MuonCalib::MuonCalibTrackSummary::nscatters
unsigned int nscatters
Definition: MuonCalibTrackSummary.h:61
MuonCalib::MuonCalibTrackSummary::nmdtHitsBelowADCCut
unsigned int nmdtHitsBelowADCCut
Definition: MuonCalibTrackSummary.h:67
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::etaProjection
Projection & etaProjection()
Definition: MuonCalibTrackSummary.h:44
MuonCalib::MuonCalibTrackSummary::nhits
unsigned int nhits
Definition: MuonCalibTrackSummary.h:54
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::ChamberHitSummary
ChamberHitSummary(MuonFixedId chID)
Definition: MuonCalibTrackSummary.h:27
MuonFixedIdManipulator.h
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::noutliers
int noutliers() const
Definition: MuonCalibTrackSummary.h:34
MuonCalib::MuonCalibTrackSummary::hasBarrelLayersWithRPC
bool hasBarrelLayersWithRPC
Definition: MuonCalibTrackSummary.h:80
MuonCalib::MuonCalibTrackSummary::npseudo
unsigned int npseudo
Definition: MuonCalibTrackSummary.h:64
MuonCalib::MuonCalibTrackSummary::hasEndcapA
bool hasEndcapA
Definition: MuonCalibTrackSummary.h:75
MuonCalib::MuonCalibTrackSummary::hasEndcapLayersWithTGC
bool hasEndcapLayersWithTGC
Definition: MuonCalibTrackSummary.h:79
MuonCalib::MuonCalibTrackSummary::hasMuon
bool hasMuon() const
Definition: MuonCalibTrackSummary.h:104
MuonFixedId.h
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::isMdt
bool isMdt() const
Definition: MuonCalibTrackSummary.h:30
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::Projection::ndeltas
int ndeltas
Definition: MuonCalibTrackSummary.h:24
MuonCalib::MuonCalibTrackSummary::ChamberHitSummary::phiProjection
Projection & phiProjection()
Definition: MuonCalibTrackSummary.h:45
MuonCalib::MuonCalibTrackSummary::nholes
unsigned int nholes
Definition: MuonCalibTrackSummary.h:62