20 {
21
22
23 if (!trackSummary && (
muon.muonType() != xAOD::Muon::MuonType::SegmentTagged &&
24 muon.muonType() != xAOD::Muon::MuonType::CaloTagged ) ) {
25
27 if (primTrk->
track()) {
29 }
30 }
31
34
37
41 case LayerIndex::Inner:
44 break;
45 case LayerIndex::Middle:
48 break;
49 case LayerIndex::Outer:
52 break;
53 case LayerIndex::Extended:
56 break;
57 case LayerIndex::BarrelExtended:
60 break;
61 case LayerIndex::LayerIndexMax:
62 case LayerIndex::LayerUnknown:
64 break;
65 }
66 };
67
68
69
72
75
78
81
84
87
90
93
94 auto incrementTrigSummary = [&](const Identifier& chId,
98 switch (phiIndex) {
99 case PhiIndex::BI1:
100 case PhiIndex::BM1:
101 case PhiIndex::T4:
102 case PhiIndex::CSC:
103 case PhiIndex::STGC1:
106 break;
107 case PhiIndex::BI2:
108 case PhiIndex::BM2:
109 case PhiIndex::T1:
110 case PhiIndex::STGC2:
113 break;
114 case PhiIndex::BO1:
115 case PhiIndex::T2:
118 break;
119 case PhiIndex::BO2:
120 case PhiIndex::T3:
123 break;
124
125 case PhiIndex::PhiIndexMax:
126 case PhiIndex::PhiUnknown:
128 break;
129 }
131 switch (phiIndex) {
132 case PhiIndex::PhiIndexMax:
133 case PhiIndex::PhiUnknown:
134 case PhiIndex::CSC:
136 break;
137 case PhiIndex::BI1:
138 case PhiIndex::BI2:
140 break;
141 case PhiIndex::BM1:
144 break;
145 case PhiIndex::BM2:
148 break;
149 case PhiIndex::BO1:
152 break;
153 case PhiIndex::BO2:
156 break;
157 case PhiIndex::T4:
160 break;
161 case PhiIndex::T1:
164 break;
165 case PhiIndex::T2:
168 break;
169 case PhiIndex::T3:
172 break;
173 case PhiIndex::STGC1:
176 break;
177 case PhiIndex::STGC2:
180 break;
181 }
182 };
183
184 uint8_t innerCloseHits{0}, middleCloseHits{0}, outerCloseHits{0}, extendedCloseHits{0};
185 uint8_t innerOutBoundsHits{0}, middleOutBoundsHits{0}, outerOutBoundsHits{0}, extendedOutBoundsHits{0};
186
187 uint8_t combinedTrackOutBoundsHits{0};
188
191
193
194
196
198
199
200
201 if (trackSummary) {
203 mainSector = secondSector =
summary.mainSector;
204
205 for (
auto sec :
summary.sectors) {
206 if (sec !=
summary.mainSector) {
207 secondSector = sec;
208 }
209 }
210
218
221
222 for (
auto layer :
summary.stationLayers) {
223 combinedTrackOutBoundsHits +=
layer.second.noutBoundsHits;
224 switch (
layer.first) {
225 case StIndex::BI:
226 case StIndex::EI:
227 innerCloseHits +=
layer.second.nprecisionCloseHits;
228 break;
229 case StIndex::BM:
230 case StIndex::EM:
231 middleCloseHits +=
layer.second.nprecisionCloseHits;
232 break;
233 case StIndex::BO:
234 case StIndex::EO:
235 outerCloseHits +=
layer.second.nprecisionCloseHits;
236 break;
237 case StIndex::BE:
238 case StIndex::EE:
239 extendedCloseHits +=
layer.second.nprecisionCloseHits;
240 break;
241 case StIndex::StUnknown:
242 case StIndex::StIndexMax:
244 break;
245 }
246 }
247
248
249 const xAOD::TrackParticle* MStrk =
muon.trackParticle(xAOD::Muon::TrackParticleType::MuonSpectrometerTrackParticle);
252 switch (
layer.first) {
253 case StIndex::BI:
254 case StIndex::EI:
255 innerOutBoundsHits +=
layer.second.noutBoundsHits;
256 break;
257 case StIndex::EM:
258 case StIndex::BM:
259 middleOutBoundsHits +=
layer.second.noutBoundsHits;
260 break;
261 case StIndex::EO:
262 case StIndex::BO:
263 outerOutBoundsHits +=
layer.second.noutBoundsHits;
264 break;
265 case StIndex::BE:
266 case StIndex::EE:
267 extendedOutBoundsHits +=
layer.second.noutBoundsHits;
268 break;
269 case StIndex::StUnknown:
270 case StIndex::StIndexMax:
272 break;
273 }
274 }
275 }
276
277 if (trackSummary->muonTrackSummary()) {
278 const Trk::MuonTrackSummary& mts = *trackSummary->muonTrackSummary();
279
280 for (
const Trk::MuonTrackSummary::ChamberHitSummary& summary : mts.
chamberHitSummary()) {
282 case TechnologyIndex::TechnologyUnknown:
283 case TechnologyIndex::TechnologyIndexMax:
285 break;
286 case TechnologyIndex::MDT:{
288 break;
289 } case TechnologyIndex::CSC:{
293 break;
294 } case TechnologyIndex::MM:{
298 break;
299 } case TechnologyIndex::STGC:{
301 incrementTrigSummary(
summary.chamberId(),
304 break;
305 } case TechnologyIndex::RPC:
306 case TechnologyIndex::TGC: {
307 incrementTrigSummary(
summary.chamberId(),
310 break;
311 }
312 }
313 }
314 }
315 }
316
324
335
344
349
354
359
364
369
374
379
384
389
394
399
404
405
406
409
412
415
418
419
422
427
432
434
437
440 }
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
const std::vector< ChamberHitSummary > & chamberHitSummary() const
access to the vector of chamber hit summaries on the track
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr).
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
PhiIndex
enum to classify the different phi layers in the muon spectrometer
bool isSmall(const ChIndex index)
Returns true if the chamber index is in a small sector.
const std::string & chName(ChIndex index)
convert ChIndex into a string
const std::string & phiName(PhiIndex index)
convert PhiIndex into a string
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
TrackParticle_v1 TrackParticle
Reference the current persistent version:
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].
@ numberOfTriggerEtaHoleLayers
layers with trigger eta holes but no hits [unit8_t].
@ numberOfPhiHoleLayers
layers with trigger phi holes but no hits [unit8_t].
@ numberOfTriggerEtaLayers
layers with trigger eta hits [unit8_t].
@ numberOfPhiLayers
layers with a trigger phi hit [unit8_t].
@ numberOfPrecisionHoleLayers
layers with holes AND no hits [unit8_t].
@ numberOfGoodPrecisionLayers
layers with at least 3 hits that are not deweighted [uint8_t]
@ phiLayer3TGCHoles
number of phi holes in the third TGC trigger layer (T2)
@ phiLayer3Hits
number of phi hits in the third trigger layer (BOL1 ot T2)
@ middleSmallHoles
number of precision holes in the middle small layer
@ cscEtaHits
number of CSC eta clusters on the track
@ etaLayer4RPCHits
number of eta hits in the fourth RPC trigger layer (BOL2)
@ phiLayer2TGCHits
number of phi hits in the second TGC trigger layer (T1)
@ outerSmallHits
number of precision hits in the outer small layer
@ etaLayer2TGCHoles
number of eta holes in the second TGC trigger layer (T1)
@ phiLayer1RPCHoles
number of phi holes in the first RPC trigger layer (BML1)
@ phiLayer2Hits
number of phi hits in the second trigger layer (BML2 ot T1)
@ phiLayer1TGCHits
number of phi hits in the first TGC trigger layer (T4)
@ middleSmallHits
number of precision hits in the middle small layer
@ etaLayer1RPCHits
number of eta hits in the first RPC trigger layer (BML1)
@ phiLayer2TGCHoles
number of phi holes in the second TGC trigger layer (T1)
@ phiLayer1RPCHits
number of phi hits in the first RPC trigger layer (BML1)
@ phiLayer4Holes
number of phi holes in the fourth trigger layer (T3)
@ middleClosePrecisionHits
number of close precision hits in the middle layer
@ etaLayer4RPCHoles
number of eta holes in the fourth RPC trigger layer (BOL2)
@ innerClosePrecisionHits
number of close precision hits in the inner layer
@ phiLayer4RPCHits
number of phi hits in the fourth RPC trigger layer (BOL2)
@ phiLayer2RPCHoles
number of phi holes in the second RPC trigger layer (BML2)
@ etaLayer3RPCHoles
number of eta holes in the third RPC trigger layer (BOL1)
@ etaLayer1TGCHits
number of eta hits in the first TGC trigger layer (T4)
@ phiLayer1Holes
number of phi holes in the first trigger layer (BML1 ot T4)
@ etaLayer2STGCHoles
number of eta holes in the second STGC trigger layer (STGC2)
@ outerLargeHits
number of precision hits in the outer large layer
@ phiLayer4RPCHoles
number of phi holes in the fourth RPC trigger layer (BOL2)
@ etaLayer2RPCHoles
number of eta holes in the second RPC trigger layer (BML2)
@ etaLayer4TGCHoles
number of eta holes in the fourth TGC trigger layer (T3)
@ phiLayer3RPCHoles
number of phi holes in the third RPC trigger layer (BOL1)
@ etaLayer1STGCHoles
number of eta holes in the first STGC trigger layer (STGC1)
@ primarySector
primary sector crossed by the muon
@ etaLayer3Hits
number of eta hits in the third trigger layer (BOL1 ot T2)
@ phiLayer1STGCHoles
number of phi holes in the first STGC trigger layer (STGC1)
@ etaLayer3Holes
number of eta holes in the third trigger layer (BOL1 ot T2)
@ secondarySector
secondary sector crossed by the muon (set to the primary if the muon only passed one sector)
@ middleLargeHits
number of precision hits in the middle large layer
@ outerClosePrecisionHits
number of close precision hits in the outer layer
@ etaLayer4TGCHits
number of eta hits in the fourth TGC trigger layer (T3)
@ etaLayer1RPCHoles
number of eta holes in the first RPC trigger layer (BML1)
@ phiLayer4TGCHoles
number of phi holes in the fourth TGC trigger layer (T3)
@ innerOutBoundsPrecisionHits
number of out-of-bounds hits in the inner 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)
@ etaLayer3RPCHits
number of eta hits in the third RPC trigger layer (BOL1)
@ phiLayer1Hits
number of phi hits in the first trigger layer (BML1 ot T4)
@ isSmallGoodSectors
if non-deweighted track chambers are small
@ 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
@ etaLayer1TGCHoles
number of eta holes in the first TGC trigger layer (T4)
@ phiLayer1TGCHoles
number of phi holes in the first TGC trigger layer (T4)
@ extendedLargeHits
number of precision hits in the extended large layer
@ etaLayer3TGCHits
number of eta hits in the third TGC trigger layer (T2)
@ phiLayer1STGCHits
number of phi hits in the first STGC trigger layer (STGC1)
@ 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
@ middleOutBoundsPrecisionHits
number of out-of-bounds hits in the middle layer
@ etaLayer2STGCHits
number of eta hits in the second STGC trigger layer (STGC2)
@ innerLargeHoles
number of precision holes in the inner large layer
@ phiLayer2RPCHits
number of phi hits in the second RPC trigger layer (BML2)
@ extendedClosePrecisionHits
number of close precision hits in the extended layer
@ etaLayer2RPCHits
number of eta hits in the second RPC trigger layer (BML2)
@ etaLayer4Hits
number of eta hits in the fourth trigger layer (T3)
@ etaLayer3TGCHoles
number of eta holes in the third TGC trigger layer (T2)
@ etaLayer1STGCHits
number of eta hits in the first STGC trigger layer (STGC1)
@ etaLayer2TGCHits
number of eta hits in the second TGC trigger layer (T1)
@ etaLayer2Holes
number of eta holes in the second trigger layer (BML2 ot T1)
@ phiLayer2STGCHits
number of phi hits in the second STGC trigger layer (STGC2)
@ phiLayer3RPCHits
number of phi hits in the third RPC trigger layer (BOL1)
@ etaLayer2Hits
number of eta hits in the second trigger layer (BML2 ot T1)
@ innerSmallHoles
number of precision holes in the inner small layer
@ phiLayer4TGCHits
number of phi hits in the fourth TGC trigger layer (T3)
@ etaLayer1Holes
number of eta holes in the first trigger layer (BML1 ot T4)
@ extendedLargeHoles
number of precision holes in the extended large layer
@ phiLayer3TGCHits
number of phi hits in the third TGC trigger layer (T2)
@ combinedTrackOutBoundsPrecisionHits
total out-of-bounds hits on the combined track
@ cscUnspoiledEtaHits
number of unspoiled CSC eta clusters on track
@ extendedOutBoundsPrecisionHits
number of out-of-bounds hits in the extended layer
@ outerOutBoundsPrecisionHits
number of out-of-bounds hits in the outer layer
@ phiLayer2STGCHoles
number of phi holes in the second STGC trigger layer (STGC2)
@ isEndcapGoodLayers
if non-deweighted track chambers are in endcap
@ outerSmallHoles
number of precision holes in the outer small layer
@ innerSmallHits
number of precision hits in the inner small layer