ATLAS Offline Software
Loading...
Searching...
No Matches
L2MuonSAMonConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2
3import ROOT
4
5from TriggerMenuMT.HLT.Muon.TrigMuonKeys import muonNames
6muNames = muonNames().getNames('RoI')
7
8def L2MuonSAMonConfig(helper, isPhaseII=False, **kwargs):
9
10 from AthenaConfiguration.ComponentFactory import CompFactory
11
12 GroupName = 'L2MuonSA'
13
14 from MuonSelectorTools.MuonSelectorToolsConfig import MuonLoosenedNonCalibratedSelectionToolCfg
15 from .MuonMatchingToolConfig import MuonMatchingToolConfig
16
17 # Set the offline muon container
18 kwargs.setdefault("MuonContainerName", "Muons")
19
20 monAlg = helper.addAlgorithm(CompFactory.L2MuonSAMon,'L2MuonSAMon',
21 MuonSelectionTool = helper.result().popToolsAndMerge(MuonLoosenedNonCalibratedSelectionToolCfg(helper.flags,
22 MuQuality=1)),
23 MuonMatchingTool = helper.result().popToolsAndMerge(MuonMatchingToolConfig(helper.flags,
24 isPhaseII=isPhaseII,
25 MuonContainerName=kwargs["MuonContainerName"])),
26 **kwargs)
27
28 from TrigConfigSvc.TriggerConfigAccess import getHLTMenuAccess, getHLTMonitoringAccess
29 isR4Menu = "run4" in getHLTMenuAccess(helper.flags).name()
30
31 # Set containers names
32 monAlg.L2StandAloneMuonContainerName = muNames.L2SAMuons
33 monAlg.EFFastRecoSAContainerName = muNames.L2SAMuonsPhII if isR4Menu and isPhaseII else ""
34
35
36 moniAccess = getHLTMonitoringAccess(helper.flags)
37 Chains = moniAccess.monitoredChains(signatures="muonMon",monLevels=["shifter","t0","val"])
38 monAlg.MonitoredChains = [c for c in Chains if ('mu24' in c) or ('2mu14' in c)]
39 # adding lower pt chains, if menu is not pp collisions
40 if len(monAlg.MonitoredChains) == 0:
41 monAlg.MonitoredChains = [c for c in Chains if ('mu6' in c) or ('mu8' in c) or ('2mu4' in c)]
42
43 # if mon groups not found fall back to hard-coded trigger monitoring list for pp and HI
44 if len(monAlg.MonitoredChains) == 0:
45 monAlg.MonitoredChains = ['HLT_mu6_L1MU3V', 'HLT_mu8_L1MU8F', 'HLT_2m4_L12MU3V','HLT_mu6_L1MU5VF','HLT_mu24_ivarmedium_L1MU14FCH', 'HLT_2mu14_L12MU8F']
46
47 monAlg.Group = GroupName
48
49 # configuration of etaphi2D and Ratio plots for non-specific chain
50 histGroupNonSpecificChain = helper.addGroup(monAlg, GroupName, 'HLT/MuonMon/')
51
52 histGroupNonSpecificChain.defineHistogram('L2SAEta,L2SAPhi;L2MuonSA_Eta_vs_Phi',
53 title='L2MuonSA Eta vs Phi ;#eta;#phi',
54 type='TH2F', path='etaphi2D',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
55
56 histGroupNonSpecificChain.defineHistogram('L2SAAboveCut,LB;L2MuonSA_Over_OfflineSA_4GeV_Cut',
57 title='L2MuonSA Over OfflineSA 4GeV Cut;LB;Ratio',
58 type='TEfficiency', path='Ratio',xbins=400,xmin=1.,xmax=801.)
59
60
61 # configration for specific chain
62 for chain in monAlg.MonitoredChains:
63
64 histGroup = helper.addGroup(monAlg, GroupName+'_'+chain, 'HLT/MuonMon/L2MuonSA/'+chain)
65
66
67 # basic EDM variables
68 histGroup.defineHistogram(chain+'_Pt;L2MuonSA_Pt',
69 title='L2MuonSA Pt '+chain+';p_{T} [GeV];Events',
70 type='TH1F', path='',xbins=210,xmin=-105.,xmax=105.)
71
72 histGroup.defineHistogram(chain+'_Pt;L2MuonSA_Pt_Barrel',
73 title='L2MuonSA Pt Barrel '+chain+';p_{T} [GeV];Events',
74 cutmask=chain+'_isBarrel',
75 type='TH1F', path='',xbins=210,xmin=-105.,xmax=105.)
76
77 histGroup.defineHistogram(chain+'_Pt;L2MuonSA_Pt_Endcap',
78 title='L2MuonSA Pt Endcap '+chain+';p_{T} [GeV];Events',
79 cutmask=chain+'_isEndcap',
80 type='TH1F', path='',xbins=210,xmin=-105.,xmax=105.)
81
82 histGroup.defineHistogram(chain+'_Eta;L2MuonSA_Eta',
83 title='L2MuonSA Eta '+chain+';#eta;Events',
84 type='TH1F', path='',xbins=108,xmin=-2.7,xmax=2.7)
85
86 histGroup.defineHistogram(chain+'_Phi;L2MuonSA_Phi',
87 title='L2MuonSA Phi '+chain+';#phi;Events',
88 type='TH1F', path='',xbins=96,xmin=-ROOT.TMath.Pi(),xmax=ROOT.TMath.Pi())
89
90 histGroup.defineHistogram(chain+'_Phi;L2MuonSA_Phi_Barrel',
91 title='L2MuonSA Phi Barrel '+chain+';#phi;Events',
92 cutmask=chain+'_isBarrel',
93 type='TH1F', path='',xbins=96,xmin=-ROOT.TMath.Pi(),xmax=ROOT.TMath.Pi())
94
95 histGroup.defineHistogram(chain+'_Phi;L2MuonSA_Phi_Endcap',
96 title='L2MuonSA Phi Endcap '+chain+';#phi;Events',
97 cutmask=chain+'_isEndcap',
98 type='TH1F', path='',xbins=96,xmin=-ROOT.TMath.Pi(),xmax=ROOT.TMath.Pi())
99
100 histGroup.defineHistogram(chain+'_Eta,'+chain+'_Phi;L2MuonSA_Eta_vs_Phi',
101 title='L2MuonSA Eta vs Phi '+chain+';#eta;#phi',
102 type='TH2F', path='',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
103
104
105
106 # position and superpoint
107 histGroup.defineHistogram(chain+'_saddr;L2MuonSA_saddr',
108 title='L2MuonSA station address '+chain+';address;Events',
109 type='TH1I', path='',xbins=6,xmin=-1,xmax=5)
110
111 histGroup.defineHistogram(chain+'_MDTpoints_z,'+chain+'_MDTpoints_r;L2MuonSA_MDTpoints_z_vs_r',
112 title='L2MuonSA MDT superpoint Z vs R (mm) '+chain+';Z[mm];R[mm]',
113 type='TH2F', path='',xbins=200,xmin=-24000,xmax=24000, ybins=200,ymin=-14000,ymax=14000)
114
115
116
117 # L1 RoI eta vs. phi in case mF failed
118 histGroup.defineHistogram(chain+'_roiEta,'+chain+'_roiPhi;L2MuonSA_failed_L1_eta_vs_phi',
119 title='L1 RoI Eta vs. Phi in case of L2MuonSA failure '+chain+';#eta;#phi',
120 cutmask=chain+'_mf_failure',
121 type='TH2F', path='',xbins=108,xmin=-2.7,xmax=2.7, ybins=96,ymin=-ROOT.TMath.Pi(),ymax=ROOT.TMath.Pi())
122
123
124
125 # MuonFeatureDetails
126 # process floe
127 histGroup.defineHistogram(chain+'_proc_flow;L2MuonSA_proc_flow',
128 title='L2MuonSA process flow '+chain+';;Events',
129 type='TH1I', path='',xbins=6,xmin=1,xmax=7,
130 xlabels=["input","n L1 hits > 0","L1 emu ok at trigger layer","n MDT hits > 0 at middle layer","MDT fit ok at middle layer","MDT fit ok at >= 2 layers"])
131
132
133 # RPC
134 histGroup.defineHistogram(chain+'_RPC_Pad_N;L2MuonSA_RPC_Pad_N',
135 title='L2MuonSA RPC number of hits '+chain+';RPC number of hits;Events',
136 cutmask=chain+'_isBarrel',
137 type='TH1I', path='',xbins=20,xmin=0,xmax=20)
138
139
140 # TGC
141 histGroup.defineHistogram(chain+'_TGC_Mid_rho_chi2;L2MuonSA_TGC_Mid_rho_chi2',
142 title='L2MuonSA TGC big wheel rho fit chi2 '+chain+';chi2;Events',
143 cutmask=chain+'_isEndcap',
144 type='TH1F', path='',xbins=100,xmin=0,xmax=10)
145
146 histGroup.defineHistogram(chain+'_TGC_Mid_phi_chi2;L2MuonSA_TGC_Mid_phi_chi2',
147 title='L2MuonSA TGC big wheel phi fit chi2 '+chain+';chi2;Events',
148 cutmask=chain+'_isEndcap',
149 type='TH1F', path='',xbins=100,xmin=0,xmax=10)
150
151 histGroup.defineHistogram(chain+'_TGC_Mid_rho_N;L2MuonSA_TGC_Mid_rho_N',
152 title='L2MuonSA TGC big wheel number of hits in rho '+chain+';TGC BW rho nhits;Events',
153 cutmask=chain+'_isEndcap',
154 type='TH1I', path='',xbins=20,xmin=0,xmax=20)
155
156 histGroup.defineHistogram(chain+'_TGC_Mid_phi_N;L2MuonSA_TGC_Mid_phi_N',
157 title='L2MuonSA TGC big wheel number of hits in phi '+chain+';TGC BW phi nhits;Events',
158 cutmask=chain+'_isEndcap',
159 type='TH1I', path='',xbins=20,xmin=0,xmax=20)
160
161
162 # MDT
163 histGroup.defineHistogram(chain+'_MDT_Inn_fit_chi2;L2MuonSA_MDT_Inn_fit_chi2_barrel',
164 title='L2MuonSA barrel MDT Inner station fit chi2 '+chain+';chi2;Events',
165 cutmask=chain+'_isBarrel',
166 type='TH1F', path='',xbins=100,xmin=0,xmax=10)
167
168 histGroup.defineHistogram(chain+'_MDT_Mid_fit_chi2;L2MuonSA_MDT_Mid_fit_chi2_barrel',
169 title='L2MuonSA barrel MDT Middle station fit chi2 '+chain+';chi2;Events',
170 cutmask=chain+'_isBarrel',
171 type='TH1F', path='',xbins=100,xmin=0,xmax=10)
172
173 histGroup.defineHistogram(chain+'_MDT_Out_fit_chi2;L2MuonSA_MDT_Out_fit_chi2_barrel',
174 title='L2MuonSA barrel MDT Outer station fit chi2 '+chain+';chi2;Events',
175 cutmask=chain+'_isBarrel',
176 type='TH1F', path='',xbins=100,xmin=0,xmax=10)
177
178 histGroup.defineHistogram(chain+'_MDT_Inn_fit_chi2;L2MuonSA_MDT_Inn_fit_chi2_endcap',
179 title='L2MuonSA endcap MDT Inner station fit chi2 '+chain+';chi2;Events',
180 cutmask=chain+'_isEndcap',
181 type='TH1F', path='',xbins=100,xmin=0,xmax=10)
182
183 histGroup.defineHistogram(chain+'_MDT_Mid_fit_chi2;L2MuonSA_MDT_Mid_fit_chi2_endcap',
184 title='L2MuonSA endcap MDT Middle station fit chi2 '+chain+';chi2;Events',
185 cutmask=chain+'_isEndcap',
186 type='TH1F', path='',xbins=100,xmin=0,xmax=10)
187
188 histGroup.defineHistogram(chain+'_MDT_Out_fit_chi2;L2MuonSA_MDT_Out_fit_chi2_endcap',
189 title='L2MuonSA endcap MDT Outer station fit chi2 '+chain+';chi2;Events',
190 cutmask=chain+'_isEndcap',
191 type='TH1F', path='',xbins=100,xmin=0,xmax=10)
192
193 histGroup.defineHistogram(chain+'_MDT_N;L2MuonSA_MDT_N_barrel',
194 title='L2MuonSA barrel MDT number of hits '+chain+';MDT nhits;Events',
195 cutmask=chain+'_isBarrel',
196 type='TH1I', path='',xbins=40,xmin=0,xmax=40)
197
198 histGroup.defineHistogram(chain+'_MDT_Inn_N;L2MuonSA_MDT_Inn_N_barrel',
199 title='L2MuonSA barrel MDT Inner number of hits '+chain+';MDT nhits Inner;Events',
200 cutmask=chain+'_isBarrel',
201 type='TH1I', path='',xbins=40,xmin=0,xmax=40)
202
203 histGroup.defineHistogram(chain+'_MDT_Mid_N;L2MuonSA_MDT_Mid_N_barrel',
204 title='L2MuonSA barrel MDT Middle number of hits '+chain+';MDT nhits Middle;Events',
205 cutmask=chain+'_isBarrel',
206 type='TH1I', path='',xbins=40,xmin=0,xmax=40)
207
208 histGroup.defineHistogram(chain+'_MDT_Out_N;L2MuonSA_MDT_Out_N_barrel',
209 title='L2MuonSA barrel MDT Outer number of hits '+chain+';MDT nhits Outer;Events',
210 cutmask=chain+'_isBarrel',
211 type='TH1I', path='',xbins=40,xmin=0,xmax=40)
212
213 histGroup.defineHistogram(chain+'_MDT_N;L2MuonSA_MDT_N_endcap',
214 title='L2MuonSA endcap MDT number of hits '+chain+';MDT nhits;Events',
215 cutmask=chain+'_isEndcap',
216 type='TH1I', path='',xbins=40,xmin=0,xmax=40)
217
218 histGroup.defineHistogram(chain+'_MDT_Inn_N;L2MuonSA_MDT_Inn_N_endcap',
219 title='L2MuonSA endcap MDT Inner number of hits '+chain+';MDT nhits Inner;Events',
220 cutmask=chain+'_isEndcap',
221 type='TH1I', path='',xbins=40,xmin=0,xmax=40)
222
223 histGroup.defineHistogram(chain+'_MDT_Mid_N;L2MuonSA_MDT_Mid_N_endcap',
224 title='L2MuonSA endcap MDT Middle number of hits '+chain+';MDT nhits Middle;Events',
225 cutmask=chain+'_isEndcap',
226 type='TH1I', path='',xbins=40,xmin=0,xmax=40)
227
228 histGroup.defineHistogram(chain+'_MDT_Out_N;L2MuonSA_MDT_Out_N_endcap',
229 title='L2MuonSA endcap MDT Outer number of hits '+chain+';MDT nhits Outer;Events',
230 cutmask=chain+'_isEndcap',
231 type='TH1I', path='',xbins=40,xmin=0,xmax=40)
232
233 histGroup.defineHistogram(chain+'_MDT_Inn_residual;L2MuonSA_MDT_Inn_residual_barrel',
234 title='L2MuonSA barrel MDT Inner station residual '+chain+';MDT Inner barrel residual [cm];Events',
235 cutmask=chain+'_isBarrel',
236 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
237
238 histGroup.defineHistogram(chain+'_MDT_Mid_residual;L2MuonSA_MDT_Mid_residual_barrel',
239 title='L2MuonSA barrel MDT Middle station residual '+chain+';MDT Middle barrel residual [cm];Events',
240 cutmask=chain+'_isBarrel',
241 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
242
243 histGroup.defineHistogram(chain+'_MDT_Out_residual;L2MuonSA_MDT_Out_residual_barrel',
244 title='L2MuonSA barrel MDT Outer station residual '+chain+';MDT Outer barrel residual [cm];Events',
245 cutmask=chain+'_isBarrel',
246 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
247
248 histGroup.defineHistogram(chain+'_MDT_Inn_residual_OffMatch;L2MuonSA_MDT_Inn_residual_barrel_OffMatch',
249 title='L2MuonSA barrel MDT Inner station residual matched with Offline '+chain+';MDT Inner barrel residual [cm];Events',
250 cutmask=chain+'_isBarrel',
251 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
252
253 histGroup.defineHistogram(chain+'_MDT_Mid_residual_OffMatch;L2MuonSA_MDT_Mid_residual_barrel_OffMatch',
254 title='L2MuonSA barrel MDT Middle station residual matched with Offline '+chain+';MDT Middle barrel residual [cm];Events',
255 cutmask=chain+'_isBarrel',
256 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
257
258 histGroup.defineHistogram(chain+'_MDT_Out_residual_OffMatch;L2MuonSA_MDT_Out_residual_barrel_OffMatch',
259 title='L2MuonSA barrel MDT Outer station residual matched with Offline '+chain+';MDT Outer barrel residual [cm];Events',
260 cutmask=chain+'_isBarrel',
261 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
262
263 histGroup.defineHistogram(chain+'_LB,'+chain+'_MDT_Inn_residual;L2MuonSA_MDT_Inn_residual_barrel_vs_LB',
264 title='L2MuonSA barrel MDT Inner station residual vs LB '+chain+';LB;MDT Inner barrel residual [cm]',
265 cutmask=chain+'_isBarrel',
266 type='TH2F', path='',xbins=750,xmin=1.,xmax=1501.,ybins=80,ymin=-20,ymax=20)
267
268 histGroup.defineHistogram(chain+'_LB,'+chain+'_MDT_Mid_residual;L2MuonSA_MDT_Mid_residual_barrel_vs_LB',
269 title='L2MuonSA barrel MDT Middle station residual vs LB '+chain+';LB;MDT Middle barrel residual [cm]',
270 cutmask=chain+'_isBarrel',
271 type='TH2F', path='',xbins=750,xmin=1.,xmax=1501.,ybins=80,ymin=-20,ymax=20)
272
273 histGroup.defineHistogram(chain+'_LB,'+chain+'_MDT_Out_residual;L2MuonSA_MDT_Out_residual_barrel_vs_LB',
274 title='L2MuonSA barrel MDT Outer station residual vs LB '+chain+';LB;MDT Outer barrel residual [cm]',
275 cutmask=chain+'_isBarrel',
276 type='TH2F', path='',xbins=750,xmin=1.,xmax=1501.,ybins=80,ymin=-20,ymax=20)
277
278 histGroup.defineHistogram(chain+'_MDT_Inn_residual;L2MuonSA_MDT_Inn_residual_endcap',
279 title='L2MuonSA endcap MDT Inner station residual '+chain+';MDT Inner endcap residual [cm];Events',
280 cutmask=chain+'_isEndcap',
281 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
282
283 histGroup.defineHistogram(chain+'_MDT_Mid_residual;L2MuonSA_MDT_Mid_residual_endcap',
284 title='L2MuonSA endcap MDT Middle station residual '+chain+';MDT Middle endcap residual [cm];Events',
285 cutmask=chain+'_isEndcap',
286 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
287
288 histGroup.defineHistogram(chain+'_MDT_Out_residual;L2MuonSA_MDT_Out_residual_endcap',
289 title='L2MuonSA endcap MDT Outer station residual '+chain+';MDT Outer endcap residual [cm];Events',
290 cutmask=chain+'_isEndcap',
291 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
292
293 histGroup.defineHistogram(chain+'_MDT_Inn_residual_OffMatch;L2MuonSA_MDT_Inn_residual_endcap_OffMatch',
294 title='L2MuonSA endcap MDT Inner station residual matched with Offline '+chain+';MDT Inner endcap residual [cm];Events',
295 cutmask=chain+'_isEndcap',
296 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
297
298 histGroup.defineHistogram(chain+'_MDT_Mid_residual_OffMatch;L2MuonSA_MDT_Mid_residual_endcap_OffMatch',
299 title='L2MuonSA endcap MDT Middle station residual matched with Offline '+chain+';MDT Middle endcap residual [cm];Events',
300 cutmask=chain+'_isEndcap',
301 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
302
303 histGroup.defineHistogram(chain+'_MDT_Out_residual_OffMatch;L2MuonSA_MDT_Out_residual_endcap_OffMatch',
304 title='L2MuonSA endcap MDT Outer station residual matched with Offline '+chain+';MDT Outer endcap residual [cm];Events',
305 cutmask=chain+'_isEndcap',
306 type='TH1F', path='',xbins=100,xmin=-20,xmax=20)
307
308 histGroup.defineHistogram(chain+'_LB,'+chain+'_MDT_Inn_residual;L2MuonSA_MDT_Inn_residual_endcap_vs_LB',
309 title='L2MuonSA endcap MDT Inner station residual vs LB '+chain+';LB;MDT Inner endcap residual [cm]',
310 cutmask=chain+'_isEndcap',
311 type='TH2F', path='',xbins=750,xmin=1.,xmax=1501.,ybins=80,ymin=-20,ymax=20)
312
313 histGroup.defineHistogram(chain+'_LB,'+chain+'_MDT_Mid_residual;L2MuonSA_MDT_Mid_residual_endcap_vs_LB',
314 title='L2MuonSA endcap MDT Middle station residual vs LB '+chain+';LB;MDT Middle endcap residual [cm]',
315 cutmask=chain+'_isEndcap',
316 type='TH2F', path='',xbins=750,xmin=1.,xmax=1501.,ybins=80,ymin=-20,ymax=20)
317
318 histGroup.defineHistogram(chain+'_LB,'+chain+'_MDT_Out_residual;L2MuonSA_MDT_Out_residual_endcap_vs_LB',
319 title='L2MuonSA endcap MDT Outer station residual vs LB '+chain+';LB;MDT Outer endcap residual [cm]',
320 cutmask=chain+'_isEndcap',
321 type='TH2F', path='',xbins=750,xmin=1.,xmax=1501.,ybins=80,ymin=-20,ymax=20)
322
323
324
325 # Comparison to Offline
326 # dR wrt Offline
327 histGroup.defineHistogram(chain+'_dRmin;L2MuonSA_dR_toRecMuonCB',
328 title='dR between L2MuonSA and Offline '+chain+';#DeltaR;Events',
329 type='TH1F', path='',xbins=100,xmin=0,xmax=2)
330
331
332 # L1 RoI wrt offline
333 histGroup.defineHistogram(chain+'_initialRoI_dR;L2MuonSA_initialRoI_dR_toRecMuonCB',
334 title='L2MuonSA initialRoI dR wrt offline CB '+chain+';dR(initialRoI vs offl CB);Events',
335 type='TH1F', path='',xbins=100,xmin=0.,xmax=0.5)
336
337 histGroup.defineHistogram(chain+'_offEta,'+chain+'_initialRoI_dEta;L2MuonSA_initialRoI_dEta_vs_Eta_toRecMuonCB',
338 title='L2MuonSA initialRoI wrt Offline CB muon, d#eta '+chain+';offl CB #eta;d#eta(initialRoI vs offl CB)',
339 type='TH2F', path='',xbins=54,xmin=-2.7,xmax=2.7, ybins=60,ymin=-0.3,ymax=0.3)
340
341 histGroup.defineHistogram(chain+'_offEta,'+chain+'_initialRoI_dPhi;L2MuonSA_initialRoI_dPhi_vs_Eta_toRecMuonCB',
342 title='L2MuonSA initialRoI wrt Offline CB muon, d#phi '+chain+';offl CB #eta;d#phi(initialRoI vs offl CB)',
343 type='TH2F', path='',xbins=54,xmin=-2.7,xmax=2.7, ybins=44,ymin=-0.2,ymax=0.2)
344
345
346 # pt resolution (barrel, endcap1, endcap2, or endcap3) (A-side or C-side)
347 histGroup.defineHistogram(chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB',
348 title='L2MuonSA pT resolution wrt Offline '+chain+';p_{T} resol;Events',
349 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
350
351 histGroup.defineHistogram(chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_BR',
352 title='L2MuonSA pT resolution wrt Offline Barrel '+chain+';p_{T} resol;Events',
353 cutmask=chain+'_isBarrel',
354 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
355
356 histGroup.defineHistogram(chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_EC1',
357 title='L2MuonSA pT resolution wrt Offline Endcap1 '+chain+';p_{T} resol;Events',
358 cutmask=chain+'_isEndcap1',
359 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
360
361 histGroup.defineHistogram(chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_EC2',
362 title='L2MuonSA pT resolution wrt Offline Endcap2 '+chain+';p_{T} resol;Events',
363 cutmask=chain+'_isEndcap2',
364 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
365
366 histGroup.defineHistogram(chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_EC3',
367 title='L2MuonSA pT resolution wrt Offline Endcap3 '+chain+';p_{T} resol;Events',
368 cutmask=chain+'_isEndcap3',
369 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
370
371
372 histGroup.defineHistogram(chain+'_offPt_signed,'+chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_pt_barrel_A',
373 title='L2MuonSA barrel A pT resolution wrt Offline in pt '+chain+';p_{T} [GeV/c];p_{T} resol',
374 cutmask=chain+'_isBarrelA',
375 type='TH2F', path='',xbins=104,xmin=-52.,xmax=52.,ybins=100,ymin=-2.,ymax=2.)
376
377 histGroup.defineHistogram(chain+'_offPt_signed,'+chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_pt_barrel_C',
378 title='L2MuonSA barrel C pT resolution wrt Offline in pt '+chain+';p_{T} [GeV/c];p_{T} resol',
379 cutmask=chain+'_isBarrelC',
380 type='TH2F', path='',xbins=104,xmin=-52.,xmax=52.,ybins=100,ymin=-2.,ymax=2.)
381
382 histGroup.defineHistogram(chain+'_offPt_signed,'+chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_pt_endcap_A',
383 title='L2MuonSA endcap A pT resolution wrt Offline in pt '+chain+';p_{T} [GeV/c];p_{T} resol',
384 cutmask=chain+'_isEndcapA',
385 type='TH2F', path='',xbins=104,xmin=-52.,xmax=52.,ybins=100,ymin=-2.,ymax=2.)
386
387 histGroup.defineHistogram(chain+'_offPt_signed,'+chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_pt_endcap_C',
388 title='L2MuonSA endcap C pT resolution wrt Offline in pt '+chain+';p_{T} [GeV/c];p_{T} resol',
389 cutmask=chain+'_isEndcapC',
390 type='TH2F', path='',xbins=104,xmin=-52.,xmax=52.,ybins=100,ymin=-2.,ymax=2.)
391
392
393 histGroup.defineHistogram(chain+'_offEta,'+chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_eta',
394 title='L2MuonSA pT resolution wrt Offline in eta '+chain+';#eta;p_{T} resol',
395 type='TH2F', path='',xbins=27,xmin=-2.7,xmax=2.7,ybins=100,ymin=-2.,ymax=2.)
396
397 histGroup.defineHistogram(chain+'_offEta,'+chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_eta_pT4_6',
398 title='L2MuonSA pT resolution wrt Offline in eta (pT4GeV-6GeV) '+chain+';#eta;p_{T} resol',
399 cutmask=chain+'_pt4to6',
400 type='TH2F', path='',xbins=27,xmin=-2.7,xmax=2.7,ybins=100,ymin=-2.,ymax=2.)
401
402 histGroup.defineHistogram(chain+'_offEta,'+chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_eta_pT6_8',
403 title='L2MuonSA pT resolution wrt Offline in eta (pT6GeV-8GeV) '+chain+';#eta;p_{T} resol',
404 cutmask=chain+'_pt6to8',
405 type='TH2F', path='',xbins=27,xmin=-2.7,xmax=2.7,ybins=100,ymin=-2.,ymax=2.)
406
407 histGroup.defineHistogram(chain+'_offEta,'+chain+'_ptresol;L2MuonSA_ptresol_toRecMuonCB_eta_pT8_x',
408 title='L2MuonSA pT resolution wrt Offline in eta (pT over 8GeV) '+chain+';#eta;p_{T} resol',
409 cutmask=chain+'_ptover8',
410 type='TH2F', path='',xbins=27,xmin=-2.7,xmax=2.7,ybins=100,ymin=-2.,ymax=2.)
411
412
413 # inverse pt resolution (positive or negative muon) (A-side or C-side) (barrel, endcap1, endcap2, or endcap3)
414 histGroup.defineHistogram(chain+'_invptresol_pos;L2MuonSA_invptresol_toRecMuonCB_pos',
415 title='L2MuonSA pT resolution wrt Offline positive muons '+chain+';1/p_{T} resol;Events',
416 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
417
418 histGroup.defineHistogram(chain+'_invptresol_neg;L2MuonSA_invptresol_toRecMuonCB_neg',
419 title='L2MuonSA pT resolution wrt Offline negative muons '+chain+';1/p_{T} resol;Events',
420 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
421
422
423 histGroup.defineHistogram(chain+'_invptresol_pos;L2MuonSA_invptresol_toRecMuonCB_pos_BR_A',
424 title='L2MuonSA pT resolution wrt Offline pos muons Barrel A-side '+chain+';1/p_{T} resol;Events',
425 cutmask=chain+'_isBarrelA',
426 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
427
428 histGroup.defineHistogram(chain+'_invptresol_neg;L2MuonSA_invptresol_toRecMuonCB_neg_BR_A',
429 title='L2MuonSA pT resolution wrt Offline neg muons Barrel A-side '+chain+';1/p_{T} resol;Events',
430 cutmask=chain+'_isBarrelA',
431 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
432
433 histGroup.defineHistogram(chain+'_invptresol_pos;L2MuonSA_invptresol_toRecMuonCB_pos_EC1_A',
434 title='L2MuonSA pT resolution wrt Offline pos muons EndCap1 A-side '+chain+';1/p_{T} resol;Events',
435 cutmask=chain+'_isEndcap1A',
436 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
437
438 histGroup.defineHistogram(chain+'_invptresol_neg;L2MuonSA_invptresol_toRecMuonCB_neg_EC1_A',
439 title='L2MuonSA pT resolution wrt Offline neg muons EndCap1 A-side '+chain+';1/p_{T} resol;Events',
440 cutmask=chain+'_isEndcap1A',
441 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
442
443 histGroup.defineHistogram(chain+'_invptresol_pos;L2MuonSA_invptresol_toRecMuonCB_pos_EC2_A',
444 title='L2MuonSA pT resolution wrt Offline pos muons EndCap2 A-side '+chain+';1/p_{T} resol;Events',
445 cutmask=chain+'_isEndcap2A',
446 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
447
448 histGroup.defineHistogram(chain+'_invptresol_neg;L2MuonSA_invptresol_toRecMuonCB_neg_EC2_A',
449 title='L2MuonSA pT resolution wrt Offline neg muons EndCap2 A-side '+chain+';1/p_{T} resol;Events',
450 cutmask=chain+'_isEndcap2A',
451 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
452
453 histGroup.defineHistogram(chain+'_invptresol_pos;L2MuonSA_invptresol_toRecMuonCB_pos_EC3_A',
454 title='L2MuonSA pT resolution wrt Offline pos muons EndCap3 A-side '+chain+';1/p_{T} resol;Events',
455 cutmask=chain+'_isEndcap3A',
456 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
457
458 histGroup.defineHistogram(chain+'_invptresol_neg;L2MuonSA_invptresol_toRecMuonCB_neg_EC3_A',
459 title='L2MuonSA pT resolution wrt Offline neg muons EndCap3 A-side '+chain+';1/p_{T} resol;Events',
460 cutmask=chain+'_isEndcap3A',
461 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
462
463
464 histGroup.defineHistogram(chain+'_invptresol_pos;L2MuonSA_invptresol_toRecMuonCB_pos_BR_C',
465 title='L2MuonSA pT resolution wrt Offline pos muons Barrel C-side '+chain+';1/p_{T} resol;Events',
466 cutmask=chain+'_isBarrelC',
467 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
468
469 histGroup.defineHistogram(chain+'_invptresol_neg;L2MuonSA_invptresol_toRecMuonCB_neg_BR_C',
470 title='L2MuonSA pT resolution wrt Offline neg muons Barrel C-side '+chain+';1/p_{T} resol;Events',
471 cutmask=chain+'_isBarrelC',
472 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
473
474 histGroup.defineHistogram(chain+'_invptresol_pos;L2MuonSA_invptresol_toRecMuonCB_pos_EC1_C',
475 title='L2MuonSA pT resolution wrt Offline pos muons EndCap1 C-side '+chain+';1/p_{T} resol;Events',
476 cutmask=chain+'_isEndcap1C',
477 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
478
479 histGroup.defineHistogram(chain+'_invptresol_neg;L2MuonSA_invptresol_toRecMuonCB_neg_EC1_C',
480 title='L2MuonSA pT resolution wrt Offline neg muons EndCap1 C-side '+chain+';1/p_{T} resol;Events',
481 cutmask=chain+'_isEndcap1C',
482 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
483
484 histGroup.defineHistogram(chain+'_invptresol_pos;L2MuonSA_invptresol_toRecMuonCB_pos_EC2_C',
485 title='L2MuonSA pT resolution wrt Offline pos muons EndCap2 C-side '+chain+';1/p_{T} resol;Events',
486 cutmask=chain+'_isEndcap2C',
487 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
488
489 histGroup.defineHistogram(chain+'_invptresol_neg;L2MuonSA_invptresol_toRecMuonCB_neg_EC2_C',
490 title='L2MuonSA pT resolution wrt Offline neg muons EndCap2 C-side '+chain+';1/p_{T} resol;Events',
491 cutmask=chain+'_isEndcap2C',
492 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
493
494 histGroup.defineHistogram(chain+'_invptresol_pos;L2MuonSA_invptresol_toRecMuonCB_pos_EC3_C',
495 title='L2MuonSA pT resolution wrt Offline pos muons EndCap3 C-side '+chain+';1/p_{T} resol;Events',
496 cutmask=chain+'_isEndcap3C',
497 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
498
499 histGroup.defineHistogram(chain+'_invptresol_neg;L2MuonSA_invptresol_toRecMuonCB_neg_EC3_C',
500 title='L2MuonSA pT resolution wrt Offline neg muons EndCap3 C-side '+chain+';1/p_{T} resol;Events',
501 cutmask=chain+'_isEndcap3C',
502 type='TH1F', path='',xbins=100,xmin=-2.,xmax=2.)
503
504
505 return