ATLAS Offline Software
MuonHitDiffSummaryPlots.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 innerSmallHits(this, "diff_innersmallhits", "diff(reco - truth) inner small hits", -10, 10),
13 innerLargeHits(this, "diff_innerlargehits", "diff(reco - truth) inner large hits", -10, 10),
14 middleSmallHits(this, "diff_middlesmallhits", "diff(reco - truth) middle small hits", -10, 10),
15 middleLargeHits(this, "diff_middlelargehits", "diff(reco - truth) middle large hits", -10, 10),
16 outerSmallHits(this, "diff_outersmallhits", "diff(reco - truth) outer small hits", -10, 10),
17 outerLargeHits(this, "diff_outerlargehits", "diff(reco - truth) outer large hits", -10, 10),
18 extendedSmallHits(this, "diff_extendedsmallhits", "diff(reco - truth) extended small hits", -10, 10),
19 extendedLargeHits(this, "diff_extendedlargehits", "diff(reco - truth) extended large hits", -10, 10),
20 
21 phiLayer1Hits(this, "diff_phiLayer1hits", "diff(reco - truth) phi Layer 1 hits", -10, 10),
22 phiLayer2Hits(this, "diff_phiLayer2hits", "diff(reco - truth) phi Layer 2 hits", -10, 10),
23 phiLayer3Hits(this, "diff_phiLayer3hits", "diff(reco - truth) phi Layer 3 hits", -10, 10),
24 phiLayer4Hits(this, "diff_phiLayer4hits", "diff(reco - truth) phi Layer 4 hits", -10, 10),
25 
26 etaLayer1Hits(this, "diff_etaLayer1hits", "diff(reco - truth) eta Layer 1 hits", -10, 10),
27 etaLayer2Hits(this, "diff_etaLayer2hits", "diff(reco - truth) eta Layer 2 hits", -10, 10),
28 etaLayer3Hits(this, "diff_etaLayer3hits", "diff(reco - truth) eta Layer 3 hits", -10, 10),
29 etaLayer4Hits(this, "diff_etaLayer4hits", "diff(reco - truth) eta Layer 4 hits", -10, 10)
30 {
31 }
32 
34  fillPlot(innerSmallHits, xAOD::innerSmallHits, muon, "innerSmallHits", truthprt, weight);
35  fillPlot(innerLargeHits, xAOD::innerLargeHits, muon, "innerLargeHits", truthprt, weight);
36  fillPlot(middleSmallHits, xAOD::middleSmallHits, muon, "middleSmallHits", truthprt, weight);
37  fillPlot(middleLargeHits, xAOD::middleLargeHits, muon, "middleLargeHits", truthprt, weight);
38  fillPlot(outerSmallHits, xAOD::outerSmallHits, muon, "outerSmallHits", truthprt, weight);
39  fillPlot(outerLargeHits, xAOD::outerLargeHits, muon, "outerLargeHits", truthprt, weight);
40  fillPlot(extendedSmallHits, xAOD::extendedSmallHits, muon, "extendedSmallHits", truthprt, weight);
41  fillPlot(extendedLargeHits, xAOD::extendedLargeHits, muon, "extendedLargeHits", truthprt, weight);
42  fillPlot(phiLayer1Hits, xAOD::phiLayer1Hits, muon, "phiLayer1Hits", truthprt, weight);
43  fillPlot(phiLayer2Hits, xAOD::phiLayer2Hits, muon, "phiLayer2Hits", truthprt, weight);
44  fillPlot(phiLayer3Hits, xAOD::phiLayer3Hits, muon, "phiLayer3Hits", truthprt, weight);
45  fillPlot(phiLayer4Hits, xAOD::phiLayer4Hits, muon, "phiLayer4Hits", truthprt, weight);
46  fillPlot(etaLayer1Hits, xAOD::etaLayer1Hits, muon, "etaLayer1Hits", truthprt, weight);
47  fillPlot(etaLayer2Hits, xAOD::etaLayer2Hits, muon, "etaLayer2Hits", truthprt, weight);
48  fillPlot(etaLayer3Hits, xAOD::etaLayer3Hits, muon, "etaLayer3Hits", truthprt, weight);
49  fillPlot(etaLayer4Hits, xAOD::etaLayer4Hits, muon, "etaLayer4Hits", truthprt, weight);
50 }
51 
52  void MuonHitDiffSummaryPlots::fillPlot(Trk::HitTypePlots& hitPlots, xAOD::MuonSummaryType info, const xAOD::Muon& muon, const std::string& sInfo, const xAOD::TruthParticle& truthprt, float weight){
53  uint8_t hitval = 0;
54  if (!muon.summaryValue(hitval,info)) return;
55  static const SG::ConstAccessor<uint8_t> acc (sInfo);
56  if (!acc.isAvailable(truthprt)) return;
57  hitPlots.fill(hitval - acc(truthprt), muon.eta(), muon.phi(), weight);
58 }
59 
60 }
grepfile.info
info
Definition: grepfile.py:38
xAOD::phiLayer1Hits
@ phiLayer1Hits
number of phi hits in the first trigger layer (BML1 ot T4)
Definition: TrackingPrimitives.h:348
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
xAOD::etaLayer1Hits
@ etaLayer1Hits
number of eta hits in the first trigger layer (BML1 ot T4)
Definition: TrackingPrimitives.h:353
xAOD::phiLayer3Hits
@ phiLayer3Hits
number of phi hits in the third trigger layer (BOL1 ot T2)
Definition: TrackingPrimitives.h:350
xAOD::phiLayer4Hits
@ phiLayer4Hits
number of phi hits in the fourth trigger layer (T3)
Definition: TrackingPrimitives.h:351
PlotBase
Definition: PlotBase.h:34
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
Muon::MuonHitDiffSummaryPlots::middleSmallHits
Trk::HitTypePlots middleSmallHits
Definition: MuonHitDiffSummaryPlots.h:23
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
Muon::MuonHitDiffSummaryPlots::phiLayer3Hits
Trk::HitTypePlots phiLayer3Hits
Definition: MuonHitDiffSummaryPlots.h:32
Muon::MuonHitDiffSummaryPlots::innerSmallHits
Trk::HitTypePlots innerSmallHits
Definition: MuonHitDiffSummaryPlots.h:21
Muon::MuonHitDiffSummaryPlots::etaLayer4Hits
Trk::HitTypePlots etaLayer4Hits
Definition: MuonHitDiffSummaryPlots.h:38
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
Muon::MuonHitDiffSummaryPlots::phiLayer2Hits
Trk::HitTypePlots phiLayer2Hits
Definition: MuonHitDiffSummaryPlots.h:31
Muon::MuonHitDiffSummaryPlots::innerLargeHits
Trk::HitTypePlots innerLargeHits
Definition: MuonHitDiffSummaryPlots.h:22
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
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
Muon::MuonHitDiffSummaryPlots::phiLayer1Hits
Trk::HitTypePlots phiLayer1Hits
Definition: MuonHitDiffSummaryPlots.h:30
Muon::MuonHitDiffSummaryPlots::outerLargeHits
Trk::HitTypePlots outerLargeHits
Definition: MuonHitDiffSummaryPlots.h:26
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:189
xAOD::middleLargeHits
@ middleLargeHits
number of precision hits in the middle large layer
Definition: TrackingPrimitives.h:333
Muon::MuonHitDiffSummaryPlots::extendedLargeHits
Trk::HitTypePlots extendedLargeHits
Definition: MuonHitDiffSummaryPlots.h:28
xAOD::phiLayer2Hits
@ phiLayer2Hits
number of phi hits in the second trigger layer (BML2 ot T1)
Definition: TrackingPrimitives.h:349
xAOD::etaLayer2Hits
@ etaLayer2Hits
number of eta hits in the second trigger layer (BML2 ot T1)
Definition: TrackingPrimitives.h:354
Muon::MuonHitDiffSummaryPlots::outerSmallHits
Trk::HitTypePlots outerSmallHits
Definition: MuonHitDiffSummaryPlots.h:25
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:37
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
Muon::MuonHitDiffSummaryPlots::extendedSmallHits
Trk::HitTypePlots extendedSmallHits
Definition: MuonHitDiffSummaryPlots.h:27
Trk::HitTypePlots
Definition: HitTypePlots.h:12
xAOD::middleSmallHits
@ middleSmallHits
number of precision hits in the middle small layer
Definition: TrackingPrimitives.h:332
xAOD::outerSmallHits
@ outerSmallHits
number of precision hits in the outer small layer
Definition: TrackingPrimitives.h:334
xAOD::outerLargeHits
@ outerLargeHits
number of precision hits in the outer large layer
Definition: TrackingPrimitives.h:335
MuonHitDiffSummaryPlots.h
Muon::MuonHitDiffSummaryPlots::fill
void fill(const xAOD::Muon &muon, const xAOD::TruthParticle &truthprt, float weight=1.0)
Definition: MuonHitDiffSummaryPlots.cxx:33
Muon::MuonHitDiffSummaryPlots::etaLayer2Hits
Trk::HitTypePlots etaLayer2Hits
Definition: MuonHitDiffSummaryPlots.h:36
Muon::MuonHitDiffSummaryPlots::fillPlot
void fillPlot(Trk::HitTypePlots &hitPlots, xAOD::MuonSummaryType info, const xAOD::Muon &muon, const std::string &sInfo, const xAOD::TruthParticle &truthprt, float weight=1.0)
Definition: MuonHitDiffSummaryPlots.cxx:52
Muon::MuonHitDiffSummaryPlots::MuonHitDiffSummaryPlots
MuonHitDiffSummaryPlots(PlotBase *pParent, const std::string &sDir)
Definition: MuonHitDiffSummaryPlots.cxx:11
Muon::MuonHitDiffSummaryPlots::etaLayer3Hits
Trk::HitTypePlots etaLayer3Hits
Definition: MuonHitDiffSummaryPlots.h:37
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::MuonHitDiffSummaryPlots::phiLayer4Hits
Trk::HitTypePlots phiLayer4Hits
Definition: MuonHitDiffSummaryPlots.h:33
Muon::MuonHitDiffSummaryPlots::etaLayer1Hits
Trk::HitTypePlots etaLayer1Hits
Definition: MuonHitDiffSummaryPlots.h:35
TrackingPrimitives.h
xAOD::etaLayer4Hits
@ etaLayer4Hits
number of eta hits in the fourth trigger layer (T3)
Definition: TrackingPrimitives.h:356
Muon::MuonHitDiffSummaryPlots::middleLargeHits
Trk::HitTypePlots middleLargeHits
Definition: MuonHitDiffSummaryPlots.h:24