ATLAS Offline Software
Loading...
Searching...
No Matches
MuonHitSummaryPlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9
10namespace Muon {
11
13 const std::string& sDir)
14 : PlotBase(pParent, sDir),
15
16 m_oMSHitPlots(this, ""),
17
18 innerSmallHits(this, "innersmallhits", "inner small hits", 0, 20),
19 innerLargeHits(this, "innerlargehits", "inner large hits", 0, 30),
20 middleSmallHits(this, "middlesmallhits", "middle small hits", 0, 20),
21 middleLargeHits(this, "middlelargehits", "middle large hits", 0, 20),
22 outerSmallHits(this, "outersmallhits", "outer small hits", 0, 15),
23 outerLargeHits(this, "outerlargehits", "outer large hits", 0, 20),
24 extendedSmallHits(this, "extendedsmallhits", "extended small hits", 0,
25 15),
26 extendedLargeHits(this, "extendedlargehits", "extended large hits", 0,
27 15),
28
29 phiLayer1Hits(this, "phiLayer1hits", "phi Layer 1 hits", 0, 10),
30 phiLayer2Hits(this, "phiLayer2hits", "phi Layer 2 hits", 0, 10),
31 phiLayer3Hits(this, "phiLayer3hits", "phi Layer 3 hits", 0, 10),
32 phiLayer4Hits(this, "phiLayer4hits", "phi Layer 4 hits", 0, 10),
33
34 etaLayer1Hits(this, "etaLayer1hits", "eta Layer 1 hits", 0, 10),
35 etaLayer2Hits(this, "etaLayer2hits", "eta Layer 2 hits", 0,
36 15), // more hits for this one
37 etaLayer3Hits(this, "etaLayer3hits", "eta Layer 3 hits", 0, 10),
38 etaLayer4Hits(this, "etaLayer4hits", "eta Layer 4 hits", 0, 10),
39
40 innerSmallHoles(this, "innersmallholes", "inner small holes", 0, 5),
41 innerLargeHoles(this, "innerlargeholes", "inner large holes", 0, 5),
42 middleSmallHoles(this, "middlesmallholes", "middle small holes", 0, 5),
43 middleLargeHoles(this, "middlelargeholes", "middle large holes", 0, 5),
44 outerSmallHoles(this, "outersmallholes", "outer small holes", 0, 5),
45 outerLargeHoles(this, "outerlargeholes", "outer large holes", 0, 5),
46 extendedSmallHoles(this, "extendedsmallholes", "extended small holes", 0,
47 5),
48 extendedLargeHoles(this, "extendedlargeholes", "extended large holes", 0,
49 5),
50
51 phiHoles(this, "phiHoles", "phi holes", 0, 5),
52 etaHoles(this, "etaHoles", "eta holes", 0, 5),
53 etaphiHoles(this, "etaphiHoles", "eta+phi holes", 0, 5)
54
55// phiLayer1Holes(this, "phiLayer1holes", "phi Layer 1 holes", 0, 5),
56// phiLayer2Holes(this, "phiLayer2holes", "phi Layer 2 holes", 0, 5),
57// phiLayer3Holes(this, "phiLayer3holes", "phi Layer 3 holes", 0, 5),
58// phiLayer4Holes(this, "phiLayer4holes", "phi Layer 4 holes", 0, 5),
59
60// etaLayer1Holes(this, "etaLayer1holes", "eta Layer 1 holes", 0, 5),
61// etaLayer2Holes(this, "etaLayer2holes", "eta Layer 2 holes", 0, 5),
62// etaLayer3Holes(this, "etaLayer3holes", "eta Layer 3 holes", 0, 5),
63// etaLayer4Holes(this, "etaLayer4holes", "eta Layer 4 holes", 0, 5)
64
65{}
66
67void MuonHitSummaryPlots::fill(const xAOD::Muon& muon, float weight) {
68
69 const xAOD::TrackParticle* tp =
70 (muon.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon)
71 ? muon.trackParticle(xAOD::Muon::CombinedTrackParticle)
72 : muon.trackParticle(xAOD::Muon::Primary);
73 if (tp) {
74 m_oMSHitPlots.fill(*tp);
75 }
76
93
102
103 int netaholes = 0, nphiholes = 0;
104 uint8_t hitval = 0;
105 if (muon.summaryValue(hitval, xAOD::etaLayer1Holes)) {
106 netaholes += (int)hitval;
107 }
108 if (muon.summaryValue(hitval, xAOD::etaLayer2Holes)) {
109 netaholes += (int)hitval;
110 }
111 if (muon.summaryValue(hitval, xAOD::etaLayer3Holes)) {
112 netaholes += (int)hitval;
113 }
114 if (muon.summaryValue(hitval, xAOD::etaLayer4Holes)) {
115 netaholes += (int)hitval;
116 }
117
118 if (muon.summaryValue(hitval, xAOD::phiLayer1Holes)) {
119 nphiholes += (int)hitval;
120 }
121 if (muon.summaryValue(hitval, xAOD::phiLayer2Holes)) {
122 nphiholes += (int)hitval;
123 }
124 if (muon.summaryValue(hitval, xAOD::phiLayer3Holes)) {
125 nphiholes += (int)hitval;
126 }
127 if (muon.summaryValue(hitval, xAOD::phiLayer4Holes)) {
128 nphiholes += (int)hitval;
129 }
130
131 etaHoles.fill(netaholes, muon.eta(), muon.phi(), weight);
132 phiHoles.fill(nphiholes, muon.eta(), muon.phi(), weight);
133 etaphiHoles.fill(netaholes + nphiholes, muon.eta(), muon.phi(), weight);
134
135 // fillPlot(phiLayer1Holes, xAOD::phiLayer1Holes, muon);
136 // fillPlot(phiLayer2Holes, xAOD::phiLayer2Holes, muon);
137 // fillPlot(phiLayer3Holes, xAOD::phiLayer3Holes, muon);
138 // fillPlot(phiLayer4Holes, xAOD::phiLayer4Holes, muon);
139 // fillPlot(etaLayer1Holes, xAOD::etaLayer1Holes, muon);
140 // fillPlot(etaLayer2Holes, xAOD::etaLayer2Holes, muon);
141 // //fillPlot(etaLayer3Holes, xAOD::etaLayer3Holes, muon);
142 // fillPlot(etaLayer4Holes, xAOD::etaLayer4Holes, muon);
143}
144
146 float weight) {
147
148 m_oMSHitPlots.fill(truthprt);
149
150 fillPlot(innerSmallHits, "innerSmallHits", truthprt, weight);
151 fillPlot(innerLargeHits, "innerLargeHits", truthprt, weight);
152 fillPlot(middleSmallHits, "middleSmallHits", truthprt, weight);
153 fillPlot(middleLargeHits, "middleLargeHits", truthprt, weight);
154 fillPlot(outerSmallHits, "outerSmallHits", truthprt, weight);
155 fillPlot(outerLargeHits, "outerLargeHits", truthprt, weight);
156 fillPlot(extendedSmallHits, "extendedSmallHits", truthprt, weight);
157 fillPlot(extendedLargeHits, "extendedLargeHits", truthprt, weight);
158 fillPlot(phiLayer1Hits, "phiLayer1Hits", truthprt, weight);
159 fillPlot(phiLayer2Hits, "phiLayer2Hits", truthprt, weight);
160 fillPlot(phiLayer3Hits, "phiLayer3Hits", truthprt, weight);
161 fillPlot(phiLayer4Hits, "phiLayer4Hits", truthprt, weight);
162 fillPlot(etaLayer1Hits, "etaLayer1Hits", truthprt, weight);
163 fillPlot(etaLayer2Hits, "etaLayer2Hits", truthprt, weight);
164 fillPlot(etaLayer3Hits, "etaLayer3Hits", truthprt, weight);
165 fillPlot(etaLayer4Hits, "etaLayer4Hits", truthprt, weight);
166}
167
170 const xAOD::Muon& muon, float weight) {
171 uint8_t hitval = 0;
172 if (!muon.summaryValue(hitval, info)) {
173 return;
174 }
175 hitPlots.fill(hitval, muon.eta(), muon.phi(), weight);
176}
177
179 const std::string& sInfo,
180 const xAOD::TruthParticle& truthprt,
181 float weight) {
183 if (!acc.isAvailable(truthprt)) {
184 return;
185 }
186 hitPlots.fill(acc(truthprt), truthprt.eta(), truthprt.phi(), weight);
187}
188
189} // namespace Muon
Helper class to provide constant type-safe access to aux data.
Trk::HitTypePlots innerLargeHoles
Trk::HitTypePlots outerSmallHoles
Trk::HitTypePlots middleLargeHoles
Trk::HitTypePlots middleSmallHoles
Trk::HitTypePlots innerSmallHoles
Trk::HitTypePlots extendedLargeHoles
void fill(const xAOD::Muon &muon, float weight=1.0)
MuonHitSummaryPlots(PlotBase *pParent, const std::string &sDir)
Trk::HitTypePlots extendedLargeHits
Trk::HitTypePlots middleSmallHits
Trk::HitTypePlots middleLargeHits
Trk::HitTypePlots outerLargeHoles
Trk::HitTypePlots extendedSmallHits
void fillPlot(Trk::HitTypePlots &hitPlots, xAOD::MuonSummaryType info, const xAOD::Muon &muon, float weight=1.0)
Trk::HitTypePlots extendedSmallHoles
PlotBase(PlotBase *parent, std::string_view sDir)
Definition PlotBase.cxx:29
Helper class to provide constant type-safe access to aux data.
void fill(int iHits, float fEta, float fPhi, float weight=1.0)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.
Muon_v1 Muon
Reference the current persistent version:
MuonSummaryType
Enumerates the different types of information stored in Summary.
@ phiLayer3Hits
number of phi hits in the third trigger layer (BOL1 ot T2)
@ middleSmallHoles
number of precision holes in the middle small layer
@ outerSmallHits
number of precision hits in the outer small layer
@ phiLayer2Hits
number of phi hits in the second trigger layer (BML2 ot T1)
@ middleSmallHits
number of precision hits in the middle small layer
@ phiLayer4Holes
number of phi holes in the fourth trigger layer (T3)
@ phiLayer1Holes
number of phi holes in the first trigger layer (BML1 ot T4)
@ outerLargeHits
number of precision hits in the outer large layer
@ etaLayer3Hits
number of eta hits in the third trigger layer (BOL1 ot T2)
@ etaLayer3Holes
number of eta holes in the third trigger layer (BOL1 ot T2)
@ middleLargeHits
number of precision hits in the middle large layer
@ etaLayer1Hits
number of eta hits in the first trigger layer (BML1 ot T4)
@ phiLayer2Holes
number of phi holes in the second trigger layer (BML2 ot T1)
@ phiLayer1Hits
number of phi hits in the first trigger layer (BML1 ot T4)
@ phiLayer3Holes
number of phi holes in the third trigger layer (BOL1 ot T2)
@ etaLayer4Holes
number of eta holes in the fourth trigger layer (T3)
@ extendedSmallHits
number of precision hits in the extended small layer
@ extendedLargeHits
number of precision hits in the extended large layer
@ phiLayer4Hits
number of phi hits in the fourth trigger layer (T3)
@ outerLargeHoles
number of precision holes in the outer large layer
@ extendedSmallHoles
number of precision holes in the extended small layer
@ innerLargeHits
number of precision hits in the inner large layer
@ middleLargeHoles
number of precision holes in the middle large layer
@ innerLargeHoles
number of precision holes in the inner large layer
@ etaLayer4Hits
number of eta hits in the fourth trigger layer (T3)
@ etaLayer2Holes
number of eta holes in the second trigger layer (BML2 ot T1)
@ etaLayer2Hits
number of eta hits in the second trigger layer (BML2 ot T1)
@ innerSmallHoles
number of precision holes in the inner small layer
@ etaLayer1Holes
number of eta holes in the first trigger layer (BML1 ot T4)
@ extendedLargeHoles
number of precision holes in the extended large layer
@ outerSmallHoles
number of precision holes in the outer small layer
@ innerSmallHits
number of precision hits in the inner small layer