ATLAS Offline Software
TrigMuonHypoMonitoring.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
4 
5 def TrigMufastHypoMonitoring(flags, histPath):
6  montool = GenericMonitoringTool(flags, HistPath = histPath)
7  montool.defineHistogram('Pt', type='TH1F', path='EXPERT', title="P_{T} reconstruction from #muFast; P_{T} (GeV)",
8  xbins=200, xmin=-100, xmax=100)
9  montool.defineHistogram('PtFL', type='TH1F', path='EXPERT', title="P_{T} of not selected muons from #muFast; p_{T} (GeV)",
10  xbins=200, xmin=-100, xmax=100)
11  montool.defineHistogram('Eta , Phi', type='TH2F', path='EXPERT', title="Eta vs Phi reconstruction of #muFast; Eta; Phi",
12  xbins=50, xmin=-3.2, xmax=3.2, ybins=25, ymin=-3.15, ymax=3.15)
13  montool.defineHistogram('Eta', type='TH1F', path='EXPERT', title="Eta reconstruction from #muFast; Eta",
14  xbins=100, xmin=-3.2, xmax=3.2)
15  montool.defineHistogram('Phi', type='TH1F', path='EXPERT', title="Phi reconstruction from #muFast; Phi",
16  xbins=100, xmin=-3.15, xmax=3.15)
17  montool.defineHistogram('ZatSt, Phi', type='TH2F', path='EXPERT', title="Z vs Phi reconstructed in MIDDLE station; Z (cm); Phi (rad)",
18  xbins=50, xmin=-1200., xmax=1200., ybins=25, ymin=-3.2, ymax=3.2)
19  montool.defineHistogram('XatSt , YatSt', type='TH2F', path='EXPERT', title="Y vs X reconstructed in MIDDLE station; X (cm); Y(cm)",
20  xbins=50, xmin=-1200., xmax=1200., ybins=50, ymin=-1200., ymax=1200.)
21  montool.defineHistogram('ZatBe', type='TH1F', path='EXPERT', title="DCA along Z; Z (cm)",
22  xbins=100, xmin=-2100, xmax=2100)
23  montool.defineHistogram('XatBe', type='TH1F', path='EXPERT', title="DCA along X; X (cm)",
24  xbins=100, xmin=-1000, xmax=1000)
25  return montool
26 
27 
29  montool = TrigMufastHypoMonitoring(flags, histPath)
30  montool.defineHistogram('MufastError', type='TH1F', path='EXPERT', title="error in #muFast based overlap removal; error code",
31  xbins=10, xmin=0, xmax=10)
32  montool.defineHistogram('DR', type='TH1F', path='EXPERT', title="#muFast objects dR; dR",
33  xbins=108, xmin=-0.1, xmax=3.5)
34  montool.defineHistogram('Mass',type='TH1F', path='EXPERT', title="#muFast objects invMass; Mass (GeV)",
35  xbins=202, xmin=-1, xmax=100)
36  montool.defineHistogram('DRLog10', type='TH1F', path='EXPERT', title="#muFast objects Log10(dR); Log10(dR)",
37  xbins=102, xmin=-4.1, xmax=1.0)
38  montool.defineHistogram('MassLog10',type='TH1F', path='EXPERT', title="#muFast objects Log10(invMass); Log10(Mass (GeV))",
39  xbins=142, xmin=-4.1, xmax=3.0)
40  montool.defineHistogram('Mass , DR', type='TH2F', path='EXPERT', title="#muFast objects Mass vs DR; Mass; dR",
41  xbins=54, xmin=-0.1, xmax=3.5, ybins=101, ymin=-1, ymax=100)
42  montool.defineHistogram('NrAllEVs',type='TH1F', path='EXPERT', title="nr of all EVs received for #muFast removal; nr",
43  xbins=10, xmin=0, xmax=10)
44  montool.defineHistogram('NrActiveEVs',type='TH1F', path='EXPERT', title="nr of active EVs after #muFast removal ; nr",
45  xbins=10, xmin=0, xmax=10)
46  montool.defineHistogram('NrOverlapped',type='TH1F', path='EXPERT', title="nr of #muFast overlapped; nr",
47  xbins=10, xmin=0, xmax=10)
48  montool.defineHistogram('OverlappedEta , OverlappedPhi', type='TH2F', path='EXPERT', title="#muFast overlapped Eta vs Phi; Eta; Phi",
49  xbins=50, xmin=-3.2, xmax=3.2, ybins=25, ymin=-3.15, ymax=3.15)
50  montool.defineHistogram('OverlappedPt', type='TH1F', path='EXPERT', title="#muFast overlapped P_{T}; P_{T} (GeV)",
51  xbins=200, xmin=-100, xmax=100)
52  return montool
53 
54 
55 def TrigmuCombHypoMonitoring(flags, histPath):
56  montool = GenericMonitoringTool(flags, HistPath = histPath)
57  montool.defineHistogram('Pt', type='TH1F', path='EXPERT', title="p_{T} reconstruction from #muComb; p_{T} (GeV)",
58  xbins=210, xmin=-105, xmax=105)
59  montool.defineHistogram('PtFL', type='TH1F', path='EXPERT', title="p_{T} of not selected muons from #muComb; p_{T} (GeV)",
60  xbins=210, xmin=-105., xmax=105.)
61  montool.defineHistogram('StrategyFlag', type='TH1F', path='EXPERT', title="Combination Strategy from #muComb; Strategy Code",
62  xbins=12, xmin=-1.5, xmax=10.5)
63  montool.defineHistogram('Eta', type='TH1F', path='EXPERT', title="Eta reconstruction from #muComb; Eta",
64  xbins=108, xmin=-2.7, xmax=2.7)
65  montool.defineHistogram('Phi', type='TH1F', path='EXPERT', title="Phi reconstruction from #muComb; Phi (rad)",
66  xbins=96, xmin=-3.1416, xmax=3.1416)
67  montool.defineHistogram('Z0', type='TH1F', path='EXPERT', title="PCA along Z from ID track from #muComb; PCA(Z0) (mm)",
68  xbins=100, xmin=-200, xmax=200)
69  montool.defineHistogram('A0', type='TH1F', path='EXPERT', title="PCA along x-y from ID track from #muComb; PCA(A0) (mm)",
70  xbins=100, xmin=-0.6, xmax=0.6)
71  return montool
72 
73 
75  montool = TrigmuCombHypoMonitoring(flags, histPath)
76  montool.defineHistogram('MucombError', type='TH1F', path='EXPERT', title="error in #muComb based overlap removal; error code",
77  xbins=10, xmin=0, xmax=10)
78  montool.defineHistogram('DR', type='TH1F', path='EXPERT', title="#muComb objects dR; dR",
79  xbins=108, xmin=-0.1, xmax=3.5)
80  montool.defineHistogram('Mass',type='TH1F', path='EXPERT', title="#muComb objects invMass; Mass (GeV)",
81  xbins=202, xmin=-1, xmax=100)
82  montool.defineHistogram('DRLog10', type='TH1F', path='EXPERT', title="#muFast objects Log10(dR); Log10(dR)",
83  xbins=102, xmin=-4.1, xmax=1.0)
84  montool.defineHistogram('MassLog10',type='TH1F', path='EXPERT', title="#muFast objects Log10(invMass); Log10(Mass (GeV))",
85  xbins=142, xmin=-4.1, xmax=3.0)
86  montool.defineHistogram('Mass , DR', type='TH2F', path='EXPERT', title="#muComb objects Mass vs DR; Mass; dR",
87  xbins=54, xmin=-0.1, xmax=3.5, ybins=101, ymin=-1, ymax=100)
88  montool.defineHistogram('NrAllEVs',type='TH1F', path='EXPERT', title="nr of all EVs received for #muComb removal; nr",
89  xbins=10, xmin=0, xmax=10)
90  montool.defineHistogram('NrActiveEVs',type='TH1F', path='EXPERT', title="nr of active EVs after #muComb removal ; nr",
91  xbins=10, xmin=0, xmax=10)
92  montool.defineHistogram('NrOverlapped',type='TH1F', path='EXPERT', title="nr of #muComb overlapped; nr",
93  xbins=10, xmin=0, xmax=10)
94  montool.defineHistogram('OverlappedEta , OverlappedPhi', type='TH2F', path='EXPERT', title="#muComb overlapped Eta vs Phi; Eta; Phi",
95  xbins=50, xmin=-3.2, xmax=3.2, ybins=25, ymin=-3.15, ymax=3.15)
96  montool.defineHistogram('OverlappedPt', type='TH1F', path='EXPERT', title="#muComb overlapped P_{T}; P_{T} (GeV)",
97  xbins=200, xmin=-100, xmax=100)
98  return montool
99 
100 
101 def TrigMuonEFHypoMonitoring(flags, histPath):
102  montool = GenericMonitoringTool(flags, HistPath = histPath)
103  montool.defineHistogram('Pt', type='TH1F', path='EXPERT', title="P_{T} reconstruction from #TrigMuonEFHypo; P_{T} (GeV)",
104  xbins=200, xmin=-100, xmax=100)
105  montool.defineHistogram('Eta', type='TH1F', path='EXPERT', title="Eta reconstruction from #TrigMuonEFHypo; Eta",
106  xbins=100, xmin=-3.2, xmax=3.2)
107  montool.defineHistogram('Phi', type='TH1F', path='EXPERT', title="Phi reconstruction from #TrigMuonEFHypo; Phi",
108  xbins=100, xmin=-3.15, xmax=3.15)
109  montool.defineHistogram('Pt_sel', type='TH1F', path='EXPERT', title="Selected P_{T} reconstruction from #TrigMuonEFHypo; P_{T} (GeV)",
110  xbins=200, xmin=-100, xmax=100)
111  montool.defineHistogram('Eta_sel', type='TH1F', path='EXPERT', title="Selected Eta reconstruction from #TrigMuonEFHypo; Eta",
112  xbins=100, xmin=-3.2, xmax=3.2)
113  montool.defineHistogram('Phi_sel', type='TH1F', path='EXPERT', title="Selected Phi reconstruction from #TrigMuonEFHypo; Phi",
114  xbins=100, xmin=-3.15, xmax=3.15)
115  return montool
116 
117 
118 def TrigMuonEFInvMassHypoMonitoring(flags, histPath):
119  montool = GenericMonitoringTool(flags, HistPath = histPath)
120  montool.defineHistogram('Mass', type='TH1F', path='EXPERT', title="Dimuon mass from #TrigMuonEFInvMHypo; Mass (GeV)",
121  xbins=200, xmin=0, xmax=200)
122  montool.defineHistogram('Mass_sel', type='TH1F', path='EXPERT', title="Dimuon mass for selected events from #TrigMuonEFInvMHypo; Mass (GeV)",
123  xbins=200, xmin=0, xmax=200)
124  return montool
125 
126 
127 def TrigMuonEFIdtpHypoMonitoring(flags, histPath):
128  montool = GenericMonitoringTool(flags, HistPath = histPath)
129  montool.defineHistogram('SA_pt', type='TH1F', path='EXPERT', title="SA p_{T} at EFIdperfHypo; SA p_{T} (GeV); N entries",
130  xbins=50, xmin=0, xmax=100)
131  montool.defineHistogram('SA_eta', type='TH1F', path='EXPERT', title="SA #eta at EFIdperfHypo; SA #eta; N entries",
132  xbins=50, xmin=-3.2, xmax=3.2)
133  montool.defineHistogram('SA_phi', type='TH1F', path='EXPERT', title="SA #phi at EFIdperfHypo; SA #phi; N entries",
134  xbins=50, xmin=-3.15, xmax=3.15)
135  montool.defineHistogram('SA_pt_sel', type='TH1F', path='EXPERT', title="Selected SA p_{T} at EFIdperfHypo; p_{T} (GeV); N entries",
136  xbins=50, xmin=0, xmax=100)
137  montool.defineHistogram('SA_eta_sel', type='TH1F', path='EXPERT', title="Selected SA #eta at EFIdperfHypo; #eta; N entries",
138  xbins=50, xmin=-3.2, xmax=3.2)
139  montool.defineHistogram('SA_phi_sel', type='TH1F', path='EXPERT', title="Selected SA #phi at EFIdperfHypo; #phi; N entries",
140  xbins=50, xmin=-3.15, xmax=3.15)
141  return montool
142 
143 
145  montool = GenericMonitoringTool(flags, HistPath = histPath)
146  montool.defineHistogram('Mass', type='TH1F', path='EXPERT', title="Dimuon mass from IdperfInvMassHypo; Mass (GeV); N entries",
147  xbins=198, xmin=2, xmax=200)
148 
149  montool.defineHistogram('probe_pt', type='TH1F',path='EXPERT',title="Probe p_{T}; Probe p_{T} (GeV); N entries",
150  xbins=25, xmin=0, xmax=100)
151  montool.defineHistogram('probe_eta', type='TH1F',path='EXPERT',title="Probe #eta; Probe #eta; N entries",
152  xbins=30, xmin=-3.0, xmax=3.0)
153 
154  montool.defineHistogram('PT_dr', type='TH1F',path='EXPERT',title="#Delta R (PT track and ME track); #Delta R; N entries",
155  xbins=25, xmin=0, xmax=0.5)
156  montool.defineHistogram('PT_qovp', type='TH1F',path='EXPERT',title="Q/R difference significance (PT track and ME track); Q/R diff sig; N entries",
157  xbins=25, xmin=0, xmax=5.0)
158  montool.defineHistogram('FTF_dr', type='TH1F',path='EXPERT',title="#Delta R (FTF track and ME track); #Delta R; N entries",
159  xbins=25, xmin=0, xmax=0.5)
160  montool.defineHistogram('FTF_qovp',type='TH1F',path='EXPERT',title="Q/R difference significance (FTF track and ME track); Q/R diff sig; N entries",
161  xbins=25, xmin=0, xmax=5.0)
162 
163  montool.defineHistogram('PT_effi_pt0_eta0', type='TH1F', path='EXPERT', title="PT track efficiency for p_{T} < 20 GeV, |#eta|<1; PT found wrt MStrack; N entries",
164  xbins=2, xmin=0, xmax=2)
165  montool.defineHistogram('PT_effi_pt0_eta1', type='TH1F', path='EXPERT', title="PT track efficiency for p_{T} < 20 GeV, 1<|#eta|<2; PT found wrt MStrack; N entries",
166  xbins=2, xmin=0, xmax=2)
167  montool.defineHistogram('PT_effi_pt0_eta2', type='TH1F', path='EXPERT', title="PT track efficiency for p_{T} < 20 GeV, |#eta|>2; PT found wrt MStrack; N entries",
168  xbins=2, xmin=0, xmax=2)
169  montool.defineHistogram('PT_effi_pt1_eta0', type='TH1F', path='EXPERT', title="PT track efficiency for p_{T} > 20 GeV, |#eta|<1; PT found wrt MStrack; N entries",
170  xbins=2, xmin=0, xmax=2)
171  montool.defineHistogram('PT_effi_pt1_eta1', type='TH1F', path='EXPERT', title="PT track efficiency for p_{T} > 20 GeV, 1<|#eta|<2; PT found wrt MStrack; N entries",
172  xbins=2, xmin=0, xmax=2)
173  montool.defineHistogram('PT_effi_pt1_eta2', type='TH1F', path='EXPERT', title="PT track efficiency for p_{T} > 20 GeV, |#eta|>2; PT found wrt MStrack; N entries",
174  xbins=2, xmin=0, xmax=2)
175 
176  montool.defineHistogram('FTF_effi_pt0_eta0', type='TH1F', path='EXPERT', title="FTF track efficiency for p_{T} < 20 GeV, |#eta|<1; PT found wrt MStrack; N entries",
177  xbins=2, xmin=0, xmax=2)
178  montool.defineHistogram('FTF_effi_pt0_eta1', type='TH1F', path='EXPERT', title="FTF track efficiency for p_{T} < 20 GeV, 1<|#eta|<2; PT found wrt MStrack; N entries",
179  xbins=2, xmin=0, xmax=2)
180  montool.defineHistogram('FTF_effi_pt0_eta2', type='TH1F', path='EXPERT', title="FTF track efficiency for p_{T} < 20 GeV, |#eta|>2; PT found wrt MStrack; N entries",
181  xbins=2, xmin=0, xmax=2)
182  montool.defineHistogram('FTF_effi_pt1_eta0', type='TH1F', path='EXPERT', title="FTF track efficiency for p_{T} > 20 GeV, |#eta|<1; PT found wrt MStrack; N entries",
183  xbins=2, xmin=0, xmax=2)
184  montool.defineHistogram('FTF_effi_pt1_eta1', type='TH1F', path='EXPERT', title="FTF track efficiency for p_{T} > 20 GeV, 1<|#eta|<2; PT found wrt MStrack; N entries",
185  xbins=2, xmin=0, xmax=2)
186  montool.defineHistogram('FTF_effi_pt1_eta2', type='TH1F', path='EXPERT', title="FTF track efficiency for p_{T} > 20 GeV, |#eta|>2; PT found wrt MStrack; N entries",
187  xbins=2, xmin=0, xmax=2)
188 
189  # test
190  montool.defineHistogram('probePhiEfficiency, FTFfound', type='TProfile', path='EXPERT', title="FTF Efficiency Profile wrt Probe SA muon Phi; probe SA muon #phi",
191  xbins=9, xmin=-3.14, xmax=3.14, ymin=-0.1, ymax=1.1)
192  montool.defineHistogram('probeEtaEfficiency, FTFfound', type='TProfile', path='EXPERT', title="FTF Efficiency Profile wrt Probe SA muon Eta; probe SA muon #eta",
193  xbins=15, xmin=-3, xmax=3, ymin=-0.1, ymax=1.1)
194  montool.defineHistogram('probePhiEfficiency, PTfound', type='TProfile', path='EXPERT', title="PT Efficiency Profile wrt Probe SA muon Phi; probe SA muon #phi",
195  xbins=9, xmin=-3.14, xmax=3.14, ymin=-0.1, ymax=1.1)
196  montool.defineHistogram('probeEtaEfficiency, PTfound', type='TProfile', path='EXPERT', title="PT Efficiency Profile wrt Probe SA muon Eta; probe SA muon #eta",
197  xbins=15, xmin=-3, xmax=3, ymin=-0.1, ymax=1.1)
198  montool.defineHistogram('PTphi, PTpixelFound', type='TProfile', path='EXPERT', title="Expected && Found hit (IBL) for PT vs phi; #phi",
199  xbins=14, xmin=-3.14, xmax=3.14, ymin=-0.1, ymax=1.1)
200  montool.defineHistogram('PTphi, PTpixelNextToFound', type='TProfile', path='EXPERT', title="Next to innermost layer of detector - Expected && Found hit (L0) for PT vs phi; #phi",
201  xbins=22, xmin=-3.14, xmax=3.14, ymin=-0.1, ymax=1.1)
202 
203  return montool
204 
205 
206 def TrigMuonTLAHypoMonitoring(flags, histPath):
207  montool = GenericMonitoringTool(flags, HistPath = histPath)
208  montool.defineHistogram('Pt', type='TH1F', path='EXPERT', title="P_{T} reconstruction from #TrigMuonTLAHypo; q*P_{T} (GeV)",
209  xbins=200, xmin=-100, xmax=100)
210  montool.defineHistogram('Eta', type='TH1F', path='EXPERT', title="Eta reconstruction from #TrigMuonTLAHypo; Eta",
211  xbins=100, xmin=-3.2, xmax=3.2)
212  montool.defineHistogram('Phi', type='TH1F', path='EXPERT', title="Phi reconstruction from #TrigMuonTLAHypo; Phi",
213  xbins=100, xmin=-3.15, xmax=3.15)
214  montool.defineHistogram('Author', type='TH1F', path='EXPERT', title="Author reconstruction from #TrigMuonTLAHypo; Author",
215  xbins=7, xmin=0, xmax=7) # MuidCo(1), MuidSA(5), MuGirl(6)
216  montool.defineHistogram('Nmuon', type='TH1F', path='EXPERT', title="Number of copied muons/event in #TrigMuonTLAHypo; N. muons/event",
217  xbins=50, xmin=0, xmax=50)
218  return montool
219 
221  montool = GenericMonitoringTool(flags, HistPath = histPath)
222  montool.defineHistogram('PtCone03', type = 'TH1F', path='EXPERT', title = "PtCone03 from #TrigMuonEFHypo; P_{T} Cone(0.3) [GeV]",
223  xbins=40, xmin=0.0, xmax=20.0)
224  montool.defineHistogram('PtConeRel03', type = 'TH1F', path='EXPERT', title = "PtCone03/Pt from #TrigMuonEFHypo; P_{T} Cone(0.3)/P_{T}",
225  xbins=20, xmin=0.0, xmax=0.5)
226  return montool
TrigMuonHypoMonitoring.TrigMuonEFIdtpHypoMonitoring
def TrigMuonEFIdtpHypoMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:127
TrigMuonHypoMonitoring.TrigMuonTLAHypoMonitoring
def TrigMuonTLAHypoMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:206
TrigMuonHypoMonitoring.TrigL2MuonOverlapRemoverMonitoringMucomb
def TrigL2MuonOverlapRemoverMonitoringMucomb(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:74
TrigMuonHypoMonitoring.TrigMuonEFHypoMonitoring
def TrigMuonEFHypoMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:101
GenericMonitoringTool
Definition: GenericMonitoringTool.py:1
TrigMuonHypoMonitoring.TrigL2MuonOverlapRemoverMonitoringMufast
def TrigL2MuonOverlapRemoverMonitoringMufast(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:28
TrigMuonHypoMonitoring.TrigmuCombHypoMonitoring
def TrigmuCombHypoMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:55
TrigMuonHypoMonitoring.TrigMuonEFIdtpInvMassHypoMonitoring
def TrigMuonEFIdtpInvMassHypoMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:144
TrigMuonHypoMonitoring.TrigMuonEFInvMassHypoMonitoring
def TrigMuonEFInvMassHypoMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:118
TrigMuonHypoMonitoring.TrigMufastHypoMonitoring
def TrigMufastHypoMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:5
TrigMuonHypoMonitoring.TrigMuonEFTrackIsolationMonitoring
def TrigMuonEFTrackIsolationMonitoring(flags, histPath)
Definition: TrigMuonHypoMonitoring.py:220