ATLAS Offline Software
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 
8 
9 namespace Muon{
10 
12 PlotBase(pParent, sDir),
13 
14 m_oMSHitPlots(this, ""),
15 
16 innerSmallHits(this, "innersmallhits", "inner small hits", 0, 20),
17 innerLargeHits(this, "innerlargehits", "inner large hits", 0, 30),
18 middleSmallHits(this, "middlesmallhits", "middle small hits", 0, 20),
19 middleLargeHits(this, "middlelargehits", "middle large hits", 0, 20),
20 outerSmallHits(this, "outersmallhits", "outer small hits", 0, 15),
21 outerLargeHits(this, "outerlargehits", "outer large hits", 0, 20),
22 extendedSmallHits(this, "extendedsmallhits", "extended small hits", 0, 15),
23 extendedLargeHits(this, "extendedlargehits", "extended large hits", 0, 15),
24 
25 phiLayer1Hits(this, "phiLayer1hits", "phi Layer 1 hits", 0, 10),
26 phiLayer2Hits(this, "phiLayer2hits", "phi Layer 2 hits", 0, 10),
27 phiLayer3Hits(this, "phiLayer3hits", "phi Layer 3 hits", 0, 10),
28 phiLayer4Hits(this, "phiLayer4hits", "phi Layer 4 hits", 0, 10),
29 
30 etaLayer1Hits(this, "etaLayer1hits", "eta Layer 1 hits", 0, 10),
31 etaLayer2Hits(this, "etaLayer2hits", "eta Layer 2 hits", 0, 15), //more hits for this one
32 etaLayer3Hits(this, "etaLayer3hits", "eta Layer 3 hits", 0, 10),
33 etaLayer4Hits(this, "etaLayer4hits", "eta Layer 4 hits", 0, 10),
34 
35 innerSmallHoles(this, "innersmallholes", "inner small holes", 0, 5),
36 innerLargeHoles(this, "innerlargeholes", "inner large holes", 0, 5),
37 middleSmallHoles(this, "middlesmallholes", "middle small holes", 0, 5),
38 middleLargeHoles(this, "middlelargeholes", "middle large holes", 0, 5),
39 outerSmallHoles(this, "outersmallholes", "outer small holes", 0, 5),
40 outerLargeHoles(this, "outerlargeholes", "outer large holes", 0, 5),
41 extendedSmallHoles(this, "extendedsmallholes", "extended small holes", 0, 5),
42 extendedLargeHoles(this, "extendedlargeholes", "extended large holes", 0, 5),
43 
44 phiHoles(this, "phiHoles", "phi holes", 0, 5),
45 etaHoles(this, "etaHoles", "eta holes", 0, 5),
46 etaphiHoles(this, "etaphiHoles", "eta+phi holes", 0, 5)
47 
48 // phiLayer1Holes(this, "phiLayer1holes", "phi Layer 1 holes", 0, 5),
49 // phiLayer2Holes(this, "phiLayer2holes", "phi Layer 2 holes", 0, 5),
50 // phiLayer3Holes(this, "phiLayer3holes", "phi Layer 3 holes", 0, 5),
51 // phiLayer4Holes(this, "phiLayer4holes", "phi Layer 4 holes", 0, 5),
52 
53 // etaLayer1Holes(this, "etaLayer1holes", "eta Layer 1 holes", 0, 5),
54 // etaLayer2Holes(this, "etaLayer2holes", "eta Layer 2 holes", 0, 5),
55 // etaLayer3Holes(this, "etaLayer3holes", "eta Layer 3 holes", 0, 5),
56 // etaLayer4Holes(this, "etaLayer4holes", "eta Layer 4 holes", 0, 5)
57 
58 { }
59 
60 
62 
63  const xAOD::TrackParticle *tp = (muon.muonType()==xAOD::Muon::SiliconAssociatedForwardMuon)? muon.trackParticle(xAOD::Muon::CombinedTrackParticle) : muon.trackParticle(xAOD::Muon::Primary);
64  if (tp) m_oMSHitPlots.fill(*tp);
65 
82 
91 
92  int netaholes=0, nphiholes=0;
93  uint8_t hitval = 0;
94  if (muon.summaryValue(hitval,xAOD::etaLayer1Holes)) netaholes+=(int)hitval;
95  if (muon.summaryValue(hitval,xAOD::etaLayer2Holes)) netaholes+=(int)hitval;
96  if (muon.summaryValue(hitval,xAOD::etaLayer3Holes)) netaholes+=(int)hitval;
97  if (muon.summaryValue(hitval,xAOD::etaLayer4Holes)) netaholes+=(int)hitval;
98 
99  if (muon.summaryValue(hitval,xAOD::phiLayer1Holes)) nphiholes+=(int)hitval;
100  if (muon.summaryValue(hitval,xAOD::phiLayer2Holes)) nphiholes+=(int)hitval;
101  if (muon.summaryValue(hitval,xAOD::phiLayer3Holes)) nphiholes+=(int)hitval;
102  if (muon.summaryValue(hitval,xAOD::phiLayer4Holes)) nphiholes+=(int)hitval;
103 
104  etaHoles.fill(netaholes, muon.eta(), muon.phi(), weight);
105  phiHoles.fill(nphiholes, muon.eta(), muon.phi(), weight);
106  etaphiHoles.fill(netaholes+nphiholes, muon.eta(), muon.phi(), weight);
107 
108  // fillPlot(phiLayer1Holes, xAOD::phiLayer1Holes, muon);
109  // fillPlot(phiLayer2Holes, xAOD::phiLayer2Holes, muon);
110  // fillPlot(phiLayer3Holes, xAOD::phiLayer3Holes, muon);
111  // fillPlot(phiLayer4Holes, xAOD::phiLayer4Holes, muon);
112  // fillPlot(etaLayer1Holes, xAOD::etaLayer1Holes, muon);
113  // fillPlot(etaLayer2Holes, xAOD::etaLayer2Holes, muon);
114  // //fillPlot(etaLayer3Holes, xAOD::etaLayer3Holes, muon);
115  // fillPlot(etaLayer4Holes, xAOD::etaLayer4Holes, muon);
116 
117 }
118 
120 
121  m_oMSHitPlots.fill(truthprt);
122 
123  fillPlot(innerSmallHits, "innerSmallHits", truthprt, weight);
124  fillPlot(innerLargeHits, "innerLargeHits", truthprt, weight);
125  fillPlot(middleSmallHits, "middleSmallHits", truthprt, weight);
126  fillPlot(middleLargeHits, "middleLargeHits", truthprt, weight);
127  fillPlot(outerSmallHits, "outerSmallHits", truthprt, weight);
128  fillPlot(outerLargeHits, "outerLargeHits", truthprt, weight);
129  fillPlot(extendedSmallHits, "extendedSmallHits", truthprt, weight);
130  fillPlot(extendedLargeHits, "extendedLargeHits", truthprt, weight);
131  fillPlot(phiLayer1Hits, "phiLayer1Hits", truthprt, weight);
132  fillPlot(phiLayer2Hits, "phiLayer2Hits", truthprt, weight);
133  fillPlot(phiLayer3Hits, "phiLayer3Hits", truthprt, weight);
134  fillPlot(phiLayer4Hits, "phiLayer4Hits", truthprt, weight);
135  fillPlot(etaLayer1Hits, "etaLayer1Hits", truthprt, weight);
136  fillPlot(etaLayer2Hits, "etaLayer2Hits", truthprt, weight);
137  fillPlot(etaLayer3Hits, "etaLayer3Hits", truthprt, weight);
138  fillPlot(etaLayer4Hits, "etaLayer4Hits", truthprt, weight);
139 }
140 
142  uint8_t hitval = 0;
143  if (!muon.summaryValue(hitval,info)) return;
144  hitPlots.fill(hitval, muon.eta(), muon.phi(),weight);
145 }
146 
147  void MuonHitSummaryPlots::fillPlot(Trk::HitTypePlots& hitPlots, const std::string& sInfo, const xAOD::TruthParticle& truthprt, float weight){
149  if (!acc.isAvailable(truthprt)) return;
150  hitPlots.fill(acc(truthprt), truthprt.eta(), truthprt.phi(), weight);
151 }
152 
153 
154 }
grepfile.info
info
Definition: grepfile.py:38
Muon::MuonHitSummaryPlots::outerSmallHits
Trk::HitTypePlots outerSmallHits
Definition: MuonHitSummaryPlots.h:31
xAOD::phiLayer1Hits
@ phiLayer1Hits
number of phi hits in the first trigger layer (BML1 ot T4)
Definition: TrackingPrimitives.h:348
Muon::MuonHitSummaryPlots::phiLayer2Hits
Trk::HitTypePlots phiLayer2Hits
Definition: MuonHitSummaryPlots.h:37
Muon::MuonHitSummaryPlots::middleLargeHoles
Trk::HitTypePlots middleLargeHoles
Definition: MuonHitSummaryPlots.h:49
Muon::MuonHitSummaryPlots::phiLayer3Hits
Trk::HitTypePlots phiLayer3Hits
Definition: MuonHitSummaryPlots.h:38
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
Muon::MuonHitSummaryPlots::etaLayer4Hits
Trk::HitTypePlots etaLayer4Hits
Definition: MuonHitSummaryPlots.h:44
xAOD::etaLayer1Hits
@ etaLayer1Hits
number of eta hits in the first trigger layer (BML1 ot T4)
Definition: TrackingPrimitives.h:353
Muon::MuonHitSummaryPlots::outerLargeHoles
Trk::HitTypePlots outerLargeHoles
Definition: MuonHitSummaryPlots.h:51
xAOD::phiLayer3Hits
@ phiLayer3Hits
number of phi hits in the third trigger layer (BOL1 ot T2)
Definition: TrackingPrimitives.h:350
xAOD::phiLayer2Holes
@ phiLayer2Holes
number of phi holes in the second trigger layer (BML2 ot T1)
Definition: TrackingPrimitives.h:359
xAOD::phiLayer4Hits
@ phiLayer4Hits
number of phi hits in the fourth trigger layer (T3)
Definition: TrackingPrimitives.h:351
PlotBase
Definition: PlotBase.h:33
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Muon::MuonHitSummaryPlots::phiLayer4Hits
Trk::HitTypePlots phiLayer4Hits
Definition: MuonHitSummaryPlots.h:39
xAOD::etaLayer3Holes
@ etaLayer3Holes
number of eta holes in the third trigger layer (BOL1 ot T2)
Definition: TrackingPrimitives.h:365
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
Muon::MuonHitSummaryPlots::etaLayer3Hits
Trk::HitTypePlots etaLayer3Hits
Definition: MuonHitSummaryPlots.h:43
xAOD::extendedSmallHoles
@ extendedSmallHoles
number of precision holes in the extended small layer
Definition: TrackingPrimitives.h:345
Muon::MuonHitSummaryPlots::innerLargeHits
Trk::HitTypePlots innerLargeHits
Definition: MuonHitSummaryPlots.h:28
ParticleTest.tp
tp
Definition: ParticleTest.py:25
Muon::MuonHitSummaryPlots::innerSmallHoles
Trk::HitTypePlots innerSmallHoles
Definition: MuonHitSummaryPlots.h:46
xAOD::middleLargeHoles
@ middleLargeHoles
number of precision holes in the middle large layer
Definition: TrackingPrimitives.h:342
Muon::MuonHitSummaryPlots::extendedLargeHoles
Trk::HitTypePlots extendedLargeHoles
Definition: MuonHitSummaryPlots.h:53
xAOD::etaLayer2Holes
@ etaLayer2Holes
number of eta holes in the second trigger layer (BML2 ot T1)
Definition: TrackingPrimitives.h:364
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
MuonHitSummaryPlots.h
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
xAOD::outerLargeHoles
@ outerLargeHoles
number of precision holes in the outer large layer
Definition: TrackingPrimitives.h:344
xAOD::MuonSummaryType
MuonSummaryType
Enumerates the different types of information stored in Summary.
Definition: TrackingPrimitives.h:324
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
xAOD::innerLargeHits
@ innerLargeHits
number of precision hits in the inner large layer
Definition: TrackingPrimitives.h:331
xAOD::etaLayer3Hits
@ etaLayer3Hits
number of eta hits in the third trigger layer (BOL1 ot T2)
Definition: TrackingPrimitives.h:355
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
xAOD::middleLargeHits
@ middleLargeHits
number of precision hits in the middle large layer
Definition: TrackingPrimitives.h:333
Muon::MuonHitSummaryPlots::phiHoles
Trk::HitTypePlots phiHoles
Definition: MuonHitSummaryPlots.h:55
InDet::ExclusiveOrigin::Primary
@ Primary
Definition: InDetTrackTruthOriginDefs.h:163
Muon::MuonHitSummaryPlots::outerLargeHits
Trk::HitTypePlots outerLargeHits
Definition: MuonHitSummaryPlots.h:32
xAOD::outerSmallHoles
@ outerSmallHoles
number of precision holes in the outer small layer
Definition: TrackingPrimitives.h:343
xAOD::phiLayer3Holes
@ phiLayer3Holes
number of phi holes in the third trigger layer (BOL1 ot T2)
Definition: TrackingPrimitives.h:360
xAOD::phiLayer2Hits
@ phiLayer2Hits
number of phi hits in the second trigger layer (BML2 ot T1)
Definition: TrackingPrimitives.h:349
Muon::MuonHitSummaryPlots::extendedLargeHits
Trk::HitTypePlots extendedLargeHits
Definition: MuonHitSummaryPlots.h:34
Muon::MuonHitSummaryPlots::middleLargeHits
Trk::HitTypePlots middleLargeHits
Definition: MuonHitSummaryPlots.h:30
xAOD::etaLayer2Hits
@ etaLayer2Hits
number of eta hits in the second trigger layer (BML2 ot T1)
Definition: TrackingPrimitives.h:354
xAOD::innerLargeHoles
@ innerLargeHoles
number of precision holes in the inner large layer
Definition: TrackingPrimitives.h:340
xAOD::extendedLargeHits
@ extendedLargeHits
number of precision hits in the extended large layer
Definition: TrackingPrimitives.h:337
Trk::HitTypePlots::fill
void fill(int iHits, float fEta, float fPhi, float weight=1.0)
Definition: HitTypePlots.cxx:32
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
xAOD::middleSmallHoles
@ middleSmallHoles
number of precision holes in the middle small layer
Definition: TrackingPrimitives.h:341
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
Trk::HitTypePlots
Definition: HitTypePlots.h:12
Muon::MuonHitSummaryPlots::innerSmallHits
Trk::HitTypePlots innerSmallHits
Definition: MuonHitSummaryPlots.h:27
Muon::MuonHitSummaryPlots::middleSmallHits
Trk::HitTypePlots middleSmallHits
Definition: MuonHitSummaryPlots.h:29
xAOD::etaLayer1Holes
@ etaLayer1Holes
number of eta holes in the first trigger layer (BML1 ot T4)
Definition: TrackingPrimitives.h:363
xAOD::middleSmallHits
@ middleSmallHits
number of precision hits in the middle small layer
Definition: TrackingPrimitives.h:332
xAOD::innerSmallHoles
@ innerSmallHoles
number of precision holes in the inner small layer
Definition: TrackingPrimitives.h:339
Muon::MuonHitSummaryPlots::etaLayer2Hits
Trk::HitTypePlots etaLayer2Hits
Definition: MuonHitSummaryPlots.h:42
xAOD::phiLayer1Holes
@ phiLayer1Holes
number of phi holes in the first trigger layer (BML1 ot T4)
Definition: TrackingPrimitives.h:358
Muon::MuonHitSummaryPlots::m_oMSHitPlots
Trk::MSHitPlots m_oMSHitPlots
Definition: MuonHitSummaryPlots.h:25
Muon::MuonHitSummaryPlots::extendedSmallHoles
Trk::HitTypePlots extendedSmallHoles
Definition: MuonHitSummaryPlots.h:52
xAOD::outerSmallHits
@ outerSmallHits
number of precision hits in the outer small layer
Definition: TrackingPrimitives.h:334
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:174
Muon::MuonHitSummaryPlots::etaLayer1Hits
Trk::HitTypePlots etaLayer1Hits
Definition: MuonHitSummaryPlots.h:41
Muon::MuonHitSummaryPlots::innerLargeHoles
Trk::HitTypePlots innerLargeHoles
Definition: MuonHitSummaryPlots.h:47
xAOD::outerLargeHits
@ outerLargeHits
number of precision hits in the outer large layer
Definition: TrackingPrimitives.h:335
xAOD::extendedLargeHoles
@ extendedLargeHoles
number of precision holes in the extended large layer
Definition: TrackingPrimitives.h:346
xAOD::TruthParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: TruthParticle_v1.cxx:181
Muon::MuonHitSummaryPlots::MuonHitSummaryPlots
MuonHitSummaryPlots(PlotBase *pParent, const std::string &sDir)
Definition: MuonHitSummaryPlots.cxx:11
xAOD::etaLayer4Holes
@ etaLayer4Holes
number of eta holes in the fourth trigger layer (T3)
Definition: TrackingPrimitives.h:366
Muon::MuonHitSummaryPlots::phiLayer1Hits
Trk::HitTypePlots phiLayer1Hits
Definition: MuonHitSummaryPlots.h:36
Muon::MuonHitSummaryPlots::fill
void fill(const xAOD::Muon &muon, float weight=1.0)
Definition: MuonHitSummaryPlots.cxx:61
xAOD::phiLayer4Holes
@ phiLayer4Holes
number of phi holes in the fourth trigger layer (T3)
Definition: TrackingPrimitives.h:361
Muon::MuonHitSummaryPlots::fillPlot
void fillPlot(Trk::HitTypePlots &hitPlots, xAOD::MuonSummaryType info, const xAOD::Muon &muon, float weight=1.0)
Definition: MuonHitSummaryPlots.cxx:141
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Trk::MSHitPlots::fill
void fill(const xAOD::TrackParticle &trkprt, float weight=1.0)
Definition: MSHitPlots.cxx:18
xAOD::extendedSmallHits
@ extendedSmallHits
number of precision hits in the extended small layer
Definition: TrackingPrimitives.h:336
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
xAOD::innerSmallHits
@ innerSmallHits
number of precision hits in the inner small layer
Definition: TrackingPrimitives.h:330
Muon::MuonHitSummaryPlots::etaphiHoles
Trk::HitTypePlots etaphiHoles
Definition: MuonHitSummaryPlots.h:57
Muon::MuonHitSummaryPlots::outerSmallHoles
Trk::HitTypePlots outerSmallHoles
Definition: MuonHitSummaryPlots.h:50
TrackingPrimitives.h
Muon::MuonHitSummaryPlots::extendedSmallHits
Trk::HitTypePlots extendedSmallHits
Definition: MuonHitSummaryPlots.h:33
xAOD::etaLayer4Hits
@ etaLayer4Hits
number of eta hits in the fourth trigger layer (T3)
Definition: TrackingPrimitives.h:356
Muon::MuonHitSummaryPlots::etaHoles
Trk::HitTypePlots etaHoles
Definition: MuonHitSummaryPlots.h:56
Muon::MuonHitSummaryPlots::middleSmallHoles
Trk::HitTypePlots middleSmallHoles
Definition: MuonHitSummaryPlots.h:48