ATLAS Offline Software
Loading...
Searching...
No Matches
CoreClass.py
Go to the documentation of this file.
2#Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3#
4
5import ROOT
6
7
8import math
9# import numpy
10# import abc
11
12
13import RpcRawDataMonitoring.RPCRawDataMonUtils as RPCRawDataMonUtils
14import RpcRawDataMonitoring.HistDecorate as HistDecorate
15
16colors = [ROOT.kBlack, ROOT.kPink-6, ROOT.kOrange-9, ROOT.kRed, ROOT.kAzure+7, ROOT.kCyan-3, ROOT.kGreen+2, ROOT.kYellow, ROOT.kBlack, ROOT.kBlue]
17markers= [20, 24, 21, 25, 22, 26, 23, 32, 33, 27]
18
19# _type1_sectors = [-16,-15,-13,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,13,15,16]
20# _type2_sectors = [-14,-12,12,14]
21
22layerNames = {1:"BM-Confirm-Gasgap1", 2:"BM-Confirm-Gasgap2", 3:"BM-Pivot-Gasgap1", 4:"BM-Pivot-Gasgap2", 5:"BO-Confirm-Gasgap1", 6:"BO-Confirm-Gasgap2", 7:"BOF_BOG-dR2-Gasgap1", 8:"BOF_BOG-dR2-Gasgap2"}
23isMeasPhiNames = ["#eta view", "#phi view"]
24
25Bin_EtaDbZ = {
26 # (etaStation, dbZ): bin
27 (-8, 2): 1, (-8, 1): 2,
28 (-7, 2): 3, (-7, 1): 4,
29 (-6, 2): 5, (-6, 1): 6,
30 (-5, 2): 7, (-5, 1): 8,
31 (-4, 3): 9, (-4, 2): 10, (-4, 1): 11,
32 (-3, 2): 12, (-3, 1): 13,
33 (-2, 3): 14, (-2, 2): 15, (-2, 1): 16,
34 (-1, 2): 17, (-1, 1): 18,
35 ( 0, 2): 19, ( 0, 1): 20,
36 ( 1, 1): 21, ( 1, 2): 22,
37 ( 2, 1): 23, ( 2, 2): 24, ( 2, 3): 25,
38 ( 3, 1): 26, ( 3, 2): 27,
39 ( 4, 1): 28, ( 4, 2): 29, ( 4, 3): 30,
40 ( 5, 1): 31, ( 5, 2): 32,
41 ( 6, 1): 33, ( 6, 2): 34,
42 ( 7, 1): 35, ( 7, 2): 36,
43 ( 8, 1): 37, ( 8, 2): 38,
44}
45
46
48
49 _rangeOfVariables_perPanel = {
50 "p0" : (0., 1e5),
51 "p1" : (0., 5e5),
52 "chi2" : (0., 100.),
53 "predRate" : (0., 1e6),
54 "meanRate" : (0., 1e6),
55 "extrapMuons" : (0., 2000),
56 "detEff" : (0., 1.),
57 "detEffError" : (0., 0.1),
58 "hitMultiplicity" : (-0.5, 10.5),
59 "averageClusterSize" : (1, 4),
60 "outTimeHitFrac" : (0., 1.),
61 "outTimeHitFrac_onTrack" : (0., 1.),
62 "outTimeHitFracError" : (0., 0.1)
63 }
64
65 _rangeOfVariables_allPanels = {
66 "p0" : (0., 20e6),
67 "p1" : (0., 20e6),
68 "chi2" : (0., 100.),
69 "predRate" : (0., 30e6),
70 "meanRate" : (0., 30e6),
71 "extrapMuons" : (0., 2000),
72 "detEff" : (0., 1.),
73 "detEffError" : (0., 0.1),
74 "hitMultiplicity" : (-0.5, 10.5),
75 "averageClusterSize" : (1, 4),
76 "outTimeHitFrac" : (0., 1.),
77 "outTimeHitFrac_onTrack" : (0., 1.),
78 "outTimeHitFracError" : (0., 0.1)
79 }
80
81 _nbins_hist = {
82 "p0" : 20,
83 "p1" : 20,
84 "chi2" : 20,
85 "predRate" : 20,
86 "meanRate" : 20,
87 "extrapMuons" : 20,
88 "detEff" : 20,
89 "detEffError" : 20,
90 "hitMultiplicity" : 10,
91 "averageClusterSize" : 30,
92 "outTimeHitFrac" : 20,
93 "outTimeHitFrac_onTrack" : 20,
94 "outTimeHitFracError" : 20
95 }
96
97 _unitsOfVariables = {
98 "p0" : 'Hz',
99 "p1" : 'Hz/(10^{34} cm^{-2}s^{-1})',
100 "chi2" : '',
101 "prdhits" : '',
102 "muon_Z_num" : '',
103 "muon_Z_den" : '',
104 "muon_all_num" : '',
105 "muon_all_den" : '',
106 "predRate" : 'Hz',
107 "meanRate" : 'Hz',
108 "extrapMuons" : '',
109 "detEff" : '',
110 "detEffError" : '',
111 "hitMultiplicity" : '',
112 "averageClusterSize" : '',
113 "outTimeHitFrac" : '',
114 "outTimeHitFrac_onTrack" : '',
115 "outTimeHitFracError" : ''
116 }
117
118 _precision = {
119 "p0" : -3,
120 "p1" : -3,
121 "chi2" : 2,
122 "predRate" : -3,
123 "meanRate" : -3,
124 "extrapMuons" : 0,
125 "detEff" : 4,
126 "detEffError" : 4,
127 "hitMultiplicity" : 2,
128 "averageClusterSize" : 3,
129 "outTimeHitFrac" : 4,
130 "outTimeHitFrac_onTrack" : 4,
131 "outTimeHitFracError" : 4
132 }
133
134 _var_title = {
135 "p0" : "p0" ,
136 "p1" : "p1" ,
137 "chi2" : "Chi2/ndf" ,
138 "prdhits" : "Hits" ,
139 "muon_Z_num" : "Muons(Z) extrapolated to individual RPC panels with hits",
140 "muon_Z_den" : "Muons(Z) extrapolated to individual RPC panels",
141 "muon_all_num" : "Muons(All) extrapolated to individual RPC panels with hits",
142 "muon_all_den" : "Muons(All) extrapolated to individual RPC panels",
143 "predRate" : "Predicted hit rate" ,
144 "meanRate" : "Mean actual hit rate" ,
145 "extrapMuons" : "Extrapolated muons",
146 "detEff" : "Muon detection efficiency",
147 "detEffError" : "Muon detection efficiency error",
148 "hitMultiplicity" : "RPC hit multiplicity",
149 "averageClusterSize" : "Average cluster size",
150 "outTimeHitFrac" : "Fraction of RPC hits with |t|>12.5 ns",
151 "outTimeHitFrac_onTrack" : "Fraction of RPC on-track hits with |t|>12.5 ns",
152 "outTimeHitFracError" : "Error of fraction of RPC hits with |t|>12.5 ns"
153 }
154
155 _cut_variables = ["p0", "p1", "chi2", "predRate", "meanRate"]
156
157 _cuts_summaryHist_allSectorLayer = {
158 "p0" : 2.e7,
159 "p1" : 0.,
160 "chi2" : 30. ,
161 "predRate" : 3.e7,
162 "meanRate" : 3.e7
163 }
164
165 _cuts_summaryHist_perSectorLayer = {
166 "p0" : 5.e4,
167 "p1" : 0.,
168 "chi2" : 25. ,
169 "predRate" : 1.e6,
170 "meanRate" : 8.e5
171 }
172
173 _in_hname = ''
174
175 _full_panel = True
176 _list_outPanelInds = []
177 _list_outPanelNames = []
178 _hists_bad_panels = []
179
180 # Threshold for sector&layer
181 T_chi2_sl = 15.
182 T_p0_sl = 2e6
183 Tlow_p1_sl = 5e3
184 Tup_p1_sl = 15e6
185 T_predRate = 30e6
186
187 # Threshold for panels
188 T_chi2_panel = 15.
189 T_p0_panel = 2e5
190 Tlow_p1_panel = 5e3
191 Tup_p1_panel = 3e5
192 T_predRate_panel = 30e6
193
194 # -----------------------------------------------------------------------
195 def __init__(self, inHisto):
196 self._in_histo = inHisto
200
201 # -----------------------------------------------------------------------
202 def _prepareHisto(self):
204
205 nbins_X = self._in_histo.GetNbinsX()
206 self._nbins = nbins_X
207 self._low = self._in_histo.GetXaxis().GetXmin()
208 self._up = self._in_histo.GetXaxis().GetXmax()
209
210 # -----------------------------------------------------------------------
212 self.doneParserPanel = self._in_hname
213 self._prepareHisto()
214
215 for p_ind, i_panel in self._PanelsProperties.items():
216 panel_name = i_panel.getPanelName()
217 panelLocalPar = i_panel.getLocalPos()
218 sec_layer = i_panel.getSector()
219 i_etaSta = panelLocalPar[0]
220 i_dbZ = panelLocalPar[1]
221 i_dbPhi = panelLocalPar[2]
222 i_measPhi = panelLocalPar[3]
223
224
227 try:
228 sec_layer_detect = self._dic_panels_detect[sec_layer]
229 except KeyError:
230 self._dic_panels_detect[sec_layer] = {}
231 sec_layer_detect = self._dic_panels_detect[sec_layer]
232
233
236 try:
237 dbPhi_meas_detect = sec_layer_detect[(i_dbPhi, i_measPhi)]
238 except KeyError:
239 sec_layer_detect[(i_dbPhi, i_measPhi)] = {}
240 dbPhi_meas_detect = sec_layer_detect[(i_dbPhi, i_measPhi)]
241
242
245 config = [p_ind, panel_name, sec_layer, (i_dbPhi, i_measPhi), (i_etaSta, i_dbZ)]
246 dbPhi_meas_detect[(i_etaSta, i_dbZ)] = self.getObject_1panel(config)
247
248 del i_panel
249
250 # -----------------------------------------------------------------------
253 self._prepareHisto()
254
255 temp_dic_sectors_layers = {}
256 for p_ind, i_panel in self._PanelsProperties.items():
257 panel_name = i_panel.getPanelName()
258 sec_layer = i_panel.getSector()
259 i_measPhi = i_panel.measPhi
260
261 self.getObject_1SectorLayer([p_ind, panel_name, i_measPhi], sec_layer, temp_dic_sectors_layers)
262 self._post_allSectorAndLayers(temp_dic_sectors_layers)
263
264 # -----------------------------------------------------------------------
265 def _post_allSectorAndLayers(self, temp_dic):
266 print ("_post_allSectorAndLayers - do nothing")
267
268 # -----------------------------------------------------------------------
270 self._in_hname = config[0]
271 self._variable = config[1]
272 self._out_htitle = self._var_title[self._variable]
273
274 out_hname = self._variable
275 out_htitle = self._out_htitle
276
277 if not self.doneParserSectorAndLayer == self._in_hname:
279
280 y_unit = self._unitsOfVariables[self._variable]
281 y_title = out_htitle
282 if y_unit != '':
283 y_title = out_htitle+'['+y_unit+']'
284
285 dic_hist = {}
286 for i_layer in range(1, 9): # 1, 2, ..., 8
287 h_name = "Summary_layer"+str(i_layer)+"_"+out_hname
288 h_title = "Summary of "+out_htitle.lower()+'('+layerNames[i_layer]+')'
289
290 h1_all = ROOT.TH1F(h_name, h_title+";Sector;"+y_title, 33, -16.5, 16.5)
291 dic_hist[i_layer] = h1_all
292
293 for sec_lay, obj_perSecLay in self._dic_sectors_layers.items():
294 contentAndErr = self.getContent(obj_perSecLay)
295 i_bin = sec_lay[0] + 17
296
297 dic_hist[sec_lay[1]].SetBinContent(i_bin, contentAndErr[0])
298 dic_hist[sec_lay[1]].SetBinError(i_bin, contentAndErr[1])
299
300 return self.decorateAllSectorSummary(dic_hist)
301
302 # -----------------------------------------------------------------------
304 self._in_hname = config[0]
305 self._variable = config[1]
306 self._out_htitle = self._var_title[self._variable]
307
308 out_hname = self._variable
309 out_htitle = self._out_htitle
310
311 if not self.doneParserPanel == self._in_hname:
313
314 y_unit = self._unitsOfVariables[self._variable]
315 y_title = self._out_htitle
316 if y_unit != '':
317 y_title = self._out_htitle+'['+y_unit+']'
318
319 list_hists = []
320 sectors = list(range(-16, 0)) + list(range(1, 17)) # -16, -15, ..., 2, 1, 1, 2, ..., 15, 16
321 for i_sector in sectors:
322 for i_layer in range(1, 9): # 1, 2, ..., 8
323 if not (i_sector, i_layer) in self._dic_panels_detect:
324 continue
325
326 dic_perSecLayer = self._dic_panels_detect[(i_sector, i_layer)]
327
328 dic_hist = {}
329 sector_layer_name = ("Summary_Sector%d_Layer%d" %(i_sector, i_layer))
330 sector_layer_title = "Summary of "+out_htitle.lower()+" of panels in sector"+str(i_sector)+'-'+layerNames[i_layer]
331
332 for i_dbPhi in [1,2]:
333 for i_measPhi in [0,1]:
334
335 if not (i_dbPhi, i_measPhi) in dic_perSecLayer:
336 continue
337
338 dic_dbPhi_meas = dic_perSecLayer[(i_dbPhi, i_measPhi)]
339
340 h_name = sector_layer_name+("_dbPhi%d_measPhi%d" %(i_dbPhi, i_measPhi))+"_"+out_hname
341 h_title = sector_layer_title+"-dbPhi"+str(i_dbPhi)+'-'+isMeasPhiNames[i_measPhi]
342 hist = ROOT.TH1F(h_name, h_title+";(#eta station, dbZ);"+y_title, 19, 0, 19)
343
344 for i_eta_dbZ, object_perPanel in dic_dbPhi_meas.items():
345 if i_eta_dbZ[0] > 4:
346 x_bin = (i_eta_dbZ[0]-1)*2+i_eta_dbZ[1]+3
347 elif i_eta_dbZ[0] > 2:
348 x_bin = (i_eta_dbZ[0]-1)*2+i_eta_dbZ[1]+2
349 else:
350 x_bin = (i_eta_dbZ[0]-1)*2+i_eta_dbZ[1]+1
351
352 cont_error = self.getContent(object_perPanel)
353
354 hist.SetBinContent(x_bin, cont_error[0])
355 hist.SetBinError(x_bin, cont_error[1])
356
357 self.modifyXlabel(hist)
358 dic_hist[(i_dbPhi, i_measPhi)] = hist
359
360 list_hists += self.decorateSummary_perSector(dic_hist)
361
362 return list_hists
363
364 # -----------------------------------------------------------------------
366 self._in_hname = config[0]
367 self._variable = config[1]
368 self._out_htitle = self._var_title[self._variable]
369
370 out_hname = self._variable
371 out_htitle = self._out_htitle
372
373 if not self.doneParserSectorAndLayer == self._in_hname:
375
376 x_unit = self._unitsOfVariables[self._variable]
377 x_title = out_htitle
378 if x_unit != '':
379 x_title = out_htitle+'['+x_unit+']'
380
381 nbins = self._nbins_hist[self._variable]
382 x_min = self._rangeOfVariables_allPanels[self._variable][0]
383 x_max = self._rangeOfVariables_allPanels[self._variable][1]
384
385 h_name = out_hname+"_per_sectors_per_layers"
386 h_title = out_htitle+" per sectors per layers"
387
388 all_hist = ROOT.TH1F(h_name+"_etaAndPhiPanels", h_title+"(#eta & #phi view)"+";" +x_title+";N_{sectors*layers}", nbins, x_min, x_max)
389 all_hist.GetXaxis().SetRange(0, nbins+1)
390 for sec_lay, obj_perSecLay in self._dic_sectors_layers.items():
391 contentAndErr = self.getContent(obj_perSecLay)
392 all_hist.Fill(contentAndErr[0])
393
394 return [all_hist]
395
396 # -----------------------------------------------------------------------
397 def GetHist1D_yPanels(self, config):
398 self._in_hname = config[0]
399 self._variable = config[1]
400 self._out_htitle = self._var_title[self._variable]
401
402 out_hname = self._variable
403 out_htitle = self._out_htitle
404
405 if not self.doneParserPanel == self._in_hname:
407
408 x_unit = self._unitsOfVariables[self._variable]
409 x_title = self._out_htitle
410 if x_unit != '':
411 x_title = self._out_htitle+'['+x_unit+']'
412
413 nbins = self._nbins_hist[self._variable]
414 x_min = self._rangeOfVariables_perPanel[self._variable][0]
415 x_max = self._rangeOfVariables_perPanel[self._variable][1]
416
417 h_name = out_hname+"_per_panel"
418 h_title = out_htitle+" per panel"
419
420 h_name_all = h_name+"_etaAndPhiView"
421 h_name_eta = h_name+"_etaView"
422 h_name_phi = h_name+"_phiView"
423 h_title_all = h_title + "(#eta & #phi view)"
424 h_title_eta = h_title + "(#eta view)"
425 h_title_phi = h_title + "(#phi view)"
426
427 hist_allPanels = ROOT.TH1F(h_name_all, h_title_all+";"+x_title+";N_{panels}", nbins, x_min, x_max)
428 hist_allPanels_eta = ROOT.TH1F(h_name_eta, h_title_eta+";"+x_title+";N_{panels}", nbins, x_min, x_max)
429 hist_allPanels_phi = ROOT.TH1F(h_name_phi, h_title_phi+";"+x_title+";N_{panels}", nbins, x_min, x_max)
430 hist_allPanels. GetXaxis().SetRange(0, nbins+1)
431 hist_allPanels_eta.GetXaxis().SetRange(0, nbins+1)
432 hist_allPanels_phi.GetXaxis().SetRange(0, nbins+1)
433
434 for i_sector, dic_perSecLayer in self._dic_panels_detect.items():
435 for i_dbPhi_meas, dic_dbPhi_meas in dic_perSecLayer.items():
436 for i_eta_dbZ, object_perPanel in dic_dbPhi_meas.items():
437 cont_error = self.getContent(object_perPanel)
438 hist_allPanels.Fill(cont_error[0])
439 if i_dbPhi_meas[1] == 0:
440 hist_allPanels_eta.Fill(cont_error[0])
441 else:
442 hist_allPanels_phi.Fill(cont_error[0])
443
444 return [hist_allPanels, hist_allPanels_eta, hist_allPanels_phi]
445
446 # -----------------------------------------------------------------------
447 def GetHist2D_EtaPhi_allLayer(self, config, doSetZRange = True):
448 self._in_hname = config[0]
449 self._variable = config[1]
450 self._out_htitle = self._var_title[self._variable]
451
452 out_hname = self._variable
453 out_htitle = self._out_htitle
454
455 if not self.doneParserPanel == self._in_hname:
457
458 self._doSetZRange = doSetZRange
459
460 z_unit = self._unitsOfVariables[self._variable]
461 z_title = self._out_htitle
462 if z_unit != '':
463 z_title = self._out_htitle+'['+z_unit+']'
464
465 if self._doSetZRange:
466 z_min = self._rangeOfVariables_perPanel[self._variable][0]
467 z_max = self._rangeOfVariables_perPanel[self._variable][1]
468
469 dic_hists = {}
470 for i_layer in range(1, 9): # 1,2,...,8
471 for i_measPhi in [0, 1]:
472 h2_name = out_hname+"_layer"+str(i_layer)+"_measPhi"+str(i_measPhi)
473 h2_title = out_htitle+"("+layerNames[i_layer]+"-"+isMeasPhiNames[i_measPhi]+")"
474 h2_temp = ROOT.TH2D(h2_name, h2_title+";#eta index;#phi sector;"+z_title, 38, -19, 19, 32, 0, 32)
475 dic_hists[(i_layer, i_measPhi)] = h2_temp
476
477 for i_sector, dic_perSecLayer in self._dic_panels_detect.items():
478 i_layer = i_sector[1]
479
480 for i_dbPhi_meas, dic_dbPhi_meas in dic_perSecLayer.items():
481 h2_temp = dic_hists[(i_layer, i_dbPhi_meas[1])]
482 y_bin = (abs(i_sector[0])-1)*2+i_dbPhi_meas[0]
483
484 side = 1
485 if i_sector[0] < 0:
486 side = -1
487
488 for i_eta_dbZ, object_perPanel in dic_dbPhi_meas.items():
489 x_bin = Bin_EtaDbZ[(i_eta_dbZ[0]*side, i_eta_dbZ[1])]
490 (content, error) = self.getContent(object_perPanel)
491
492 h2_temp.SetBinContent(x_bin, y_bin, content)
493
494 list_hists = []
495 for i_layer in range(1, 9): # 1,2,...,8
496 for i_measPhi in [0, 1]:
497 h2 = dic_hists[(i_layer, i_measPhi)]
498
499 if self._doSetZRange:
500 h2.SetMinimum(z_min)
501 h2.SetMaximum(z_max)
502 h2.GetZaxis().SetRangeUser(z_min, z_max)
503
504 # decorate histgram
509
510 HistDecorate.set_blankBox(h2, i_layer)
511
512 list_hists.append(h2)
513
514 return list_hists
515
516 # -----------------------------------------------------------------------
517 def decorateAllSectorSummary(self, dic_hist):
518 minY = 1e6
519 maxY = 0.
520 for i_layer in range(1, 9): # 1, 2, ..., 8
521 ind = i_layer-1
522 i_histo = dic_hist[i_layer]
523 i_histo.SetMarkerSize(1.0)
524 i_histo.SetMarkerStyle(markers[ind])
525 i_histo.SetMarkerColor(colors[ind])
526 i_histo.SetLineColor(colors[ind])
527 i_histo.SetLineWidth(2)
528
529 minY = min(i_histo.GetMinimum(), minY)
530 maxY = max(i_histo.GetMaximum(), maxY)
531
532 diffMaxMin = maxY-minY
533 list_hist = []
534 for i_layer in range(1, 9): # 1, 2, ..., 8
535 i_histo = dic_hist[i_layer]
536 i_histo.GetXaxis().SetTitleOffset(1.0)
537 i_histo.GetYaxis().SetTitleOffset(1.0)
538 i_histo.GetYaxis().SetRangeUser(minY-0.2*diffMaxMin, maxY+1.5*diffMaxMin)
539
540 if self._variable in self._cut_variables:
541 self.setCutLine(i_histo, 0)
542
543 list_hist.append(i_histo)
544
545 return list_hist
546
547 # -----------------------------------------------------------------------
548 def decorateSummary_perSector(self, dic_hist):
549 ind = 0
550 minY = 1e10
551 maxY = 0.
552 for i_dbPhi_meas, i_histo in dic_hist.items():
553 i_histo.SetMarkerSize(1.0)
554 i_histo.SetMarkerStyle(markers[ind])
555 i_histo.SetMarkerColor(colors[ind])
556 i_histo.SetLineColor(colors[ind])
557 i_histo.SetLineWidth(2)
558 i_histo.GetXaxis().SetTitleOffset(1.0)
559 i_histo.GetYaxis().SetTitleOffset(1.2)
560
561 ind += 1
562 minY = min(i_histo.GetMinimum(), minY)
563 maxY = max(i_histo.GetMaximum(), maxY)
564
565 diffMaxMin = maxY-minY
566
567 ind = 0
568 list_hist = []
569 for i_dbPhi in [1,2]:
570 for i_measPhi in [0,1]:
571 try:
572 i_histo = dic_hist[(i_dbPhi, i_measPhi)]
573 except KeyError:
574 continue
575
576 i_histo.GetYaxis().SetRangeUser(minY-0.2*diffMaxMin, maxY+1.3*diffMaxMin)
577
578 if self._variable in self._cut_variables:
579 self.setCutLine(i_histo, 1)
580
581 list_hist.append(i_histo)
582
583 return list_hist
584
585 # -----------------------------------------------------------------------
586 def modifyXlabel(self, hist):
587 etaStation_dbZ = [
588 '(0,1)',
589 '(1,1)', '(1,2)',
590 '(2,1)', '(2,2)', '(2,3)',
591 '(3,1)', '(3,2)',
592 '(4,1)', '(4,2)', '(4,3)',
593 '(5,1)', '(5,2)',
594 '(6,1)', '(6,2)',
595 '(7,1)', '(7,2)',
596 '(8,1)', '(8,2)']
597
598 for i_bin in range(1, 20): # 1, 2, ..., 18, 19
599 hist.GetXaxis().SetBinLabel(i_bin, etaStation_dbZ[i_bin-1])
600
601 # -----------------------------------------------------------------------
602 def SetPanelDic(self, dic_panels):
603 self._PanelsProperties = dic_panels
604
605 # -----------------------------------------------------------------------
606 def SetLumiInfoDic(self, dic_lumiInfo):
607 self._Dic_LumiInfo = dic_lumiInfo
608
609 # -----------------------------------------------------------------------
610 def setOut_Panels(self, list_panelInds = [], list_panelNames = []):
611 self._list_outPanelInds = list_panelInds
612 self._list_outPanelNames = list_panelNames
613
614 if len(list_panelInds) > 8000 or len(list_panelNames) > 8000 :
615 self._full_panel = True
616 else:
617 self._full_panel = False
618
619 # -----------------------------------------------------------------------
620 def GetBadPanels(self):
621 return self._hists_bad_panels
622
623 # -----------------------------------------------------------------------
624 def setHistnameVariable(self, config):
625 self._in_hname = config[0]
626 self._variable = config[1]
627
628 # --- parseHisto_allPanels ----------------------------------------------
629 def getObject_1panel(self, config):
630 raise NotImplementedError
631
632 # --- plotHist_allSectorsAndLayers --------------------------------------
633 def getObject_1SectorLayer(self, config, sec_layer, temp_dic):
634 raise NotImplementedError
635
636 # --- for occupancy and hit multiplicity --------------------------------------
637 def getHist_1SectorLayer(self, config, sec_layer, temp_dic, titles):
638 h_temp = self.getHist_1Panel(config)
639
640 if sec_layer in temp_dic:
641 temp_dic[sec_layer].Add(h_temp)
642 else:
643 all_name_suffix = ("_Sector%d_Layer%d" %(sec_layer[0], sec_layer[1]))
644 all_title_suffix = "(Sector"+str(sec_layer[0])+'-'+layerNames[sec_layer[1]]+")"
645 all_hist = self.initialHist_1Panel(all_name_suffix, all_title_suffix, titles)
646
647 temp_dic[sec_layer] = all_hist
648 temp_dic[sec_layer].Add(h_temp)
649
650 del h_temp
651
652 # --- Get histo for 1 panel of one sector ------------------------------
653 def getHist_1Panel(self, config):
654 raise NotImplementedError
655
656 # --- Get content for plot function ------------------------------------
657 def getContent(self, singleObj):
658 raise NotImplementedError
659
660
662
663 # -----------------------------------------------------------------------
664 def __init__(self, inHisto):
665 super(Draw_Occupancy, self).__init__(inHisto)
666 self.__refInstLumi = 2. # 2*10^{34} [cm^{-2}s^{-1}]
668
669 self._NEvtScale = False
670
671 # -----------------------------------------------------------------------
672 def __getTimeScale(self):
673 timeScale = 100e-9
674 return timeScale
675
676 # -----------------------------------------------------------------------
677 def genGraph_LB2Lumi(self, h_LB):
678 h_name = h_LB.GetName()
679 h_title = h_LB.GetTitle()
680 g_name = h_name.replace('LB', 'Lumi')
681 g_title = h_title.replace('LB', 'Lumi')
682 g_Xtitle = 'Inst luminosity [10^{34} cm^{-2}s^{-1}]'
683 g_Ytitle = 'RPC hit rate[Hz]'
684
685 if self._NEvtScale:
686 timeScale = self.__getTimeScale()
687
688 x = []
689 y = []
690 y_err = []
691 for LB, lbInfo in self._Dic_LumiInfo.items():
692 if lbInfo['AtlasPhysics'] == 'false' or float(lbInfo['Duration'])<50.:
693 continue
694
695 hit_content = round(h_LB.GetBinContent(LB), 2)
696 hit_err = round(h_LB.GetBinError(LB),2)
697
698 hit_y = hit_content
699 hit_y_err = hit_err
700
701 if hit_content < 1 :
702 continue
703
704 if self._NEvtScale:
705 evt_content = round(self.__h_NEvt_LB.GetBinContent(LB),2)
706 evt_error = round(self.__h_NEvt_LB.GetBinError(LB),2)
707 if evt_content < 1 :
708 continue
709 hit_rate = hit_content/(evt_content*timeScale)
710
711 err_temp1 = pow(hit_err/evt_content,2)
712 err_temp2 = pow(evt_error*hit_content/pow(evt_content,2), 2)
713 hitRate_err = math.sqrt(err_temp1+err_temp2)/timeScale
714 hit_y = hit_rate
715 hit_y_err = hitRate_err
716
717 x.append( float(lbInfo['InstLumi']) )
718 y.append( hit_y )
719 y_err.append( hit_y_err )
720 x_err = [0]*len(x)
721
722 if x == []:
723 null_graph = ROOT.TGraph()
724 return null_graph
725
726 return RPCRawDataMonUtils.creatGraph(x, y, x_err, y_err, g_name, g_title, g_Xtitle, g_Ytitle)
727
728 # -----------------------------------------------------------------------
729 def doNEvtScale(self, h_NEvt_LB):
730 self._NEvtScale = True
731 self.__h_NEvt_LB = h_NEvt_LB
732
733 # -----------------------------------------------------------------------
735 return self.list_graphs_rate_panel
736
737 # -----------------------------------------------------------------------
738 def getObject_1panel(self, config):
739 panelInd = config[0]
740 panelName= config[1]
741
742 g_name = self._in_hname.split('Panels')[0]+panelName
743 g_title = g_name
744 g_Xtitle = 'Inst luminosity [10^{34} cm^{-2}s^{-1}]'
745 g_Ytitle = 'RPC hit rate[Hz]'
746
747 if self._NEvtScale:
748 timeScale = self.__getTimeScale()
749
750 x = []
751 y = []
752 y_err = []
753 for LB, lbInfo in self._Dic_LumiInfo.items():
754 if lbInfo['AtlasPhysics'] == 'false' or float(lbInfo['Duration'])<50. :
755 continue
756
757 hit_content = self._in_histo.GetBinContent(LB, panelInd+1)
758 hit_err = self._in_histo.GetBinError(LB, panelInd+1)
759 hit_y = hit_content
760 hit_y_err = hit_err
761 if hit_content < 1 :
762 continue
763
764 if self._NEvtScale:
765 evt_content = self.__h_NEvt_LB.GetBinContent(LB)
766 evt_error = self.__h_NEvt_LB.GetBinError(LB)
767 if evt_content < 1 :
768 continue
769 hit_rate = hit_content/(evt_content*timeScale)
770
771 err_temp1 = pow(hit_err/evt_content,2)
772 err_temp2 = pow(evt_error*hit_content/pow(evt_content,2), 2)
773 hitRate_err = math.sqrt(err_temp1+err_temp2)/timeScale
774 hit_y = hit_rate
775 hit_y_err = hitRate_err
776
777 x.append( float(lbInfo['InstLumi']) )
778 y.append( hit_y )
779 y_err.append( hit_y_err )
780 x_err = [0]*len(x)
781
782 len_LB = len(y)
783 fit_able = 0
784 is_good = True
785
786 if len_LB == 0 :
787 fit_able = 3
788 is_good = False
789 fitRe_g1 = {"p0": 0, "p0_err":0, "p1": -1, "p1_err":-1, "chi2":-1, "mean":0, "mean_err":0}
790 out_dic = {'fit_able':fit_able, 'is_good':is_good, 'hit_rate':0}
791 else:
792 gr = RPCRawDataMonUtils.creatGraph(x, y, x_err, y_err, g_name, g_title, g_Xtitle, g_Ytitle)
793 (fit_able, fitRe_g1) = RPCRawDataMonUtils.linearFit(gr)
794 out_dic = {'fit_able':fit_able, 'is_good':is_good, 'hit_rate':gr}
795 self.list_graphs_rate_panel.append(gr)
796
797 out_dic['N_selLBs'] = len_LB
798
799 if (not out_dic['is_good']) or (fitRe_g1["p1"] < self.Tlow_p1_panel) or (fitRe_g1["chi2"] > self.T_chi2_panel):
800 out_dic['is_good'] = False
801 self._hists_bad_panels.append(out_dic)
802
803 return fitRe_g1
804
805 # -----------------------------------------------------------------------
806 def getObject_1SectorLayer(self, config, sec_layer, temp_dic):
807 name_pre = self._in_hname.split("_")[0]
808 titles = [name_pre+"_LB", name_pre+" vs LB", "LB", "N_{hits}"]
809 self.getHist_1SectorLayer(config, sec_layer, temp_dic, titles)
810
811 # -----------------------------------------------------------------------
812 def getHist_1Panel(self, config):
813 panelInd = config[0]
814
815 h_temp = ROOT.TH1F("h_temp"+str(panelInd), "h_temp"+str(panelInd), self._nbins, self._low, self._up)
816 for i_bin in range(1, self._nbins+1):
817 hit_content = self._in_histo.GetBinContent(i_bin, panelInd+1)
818 hit_err = self._in_histo.GetBinError(i_bin, panelInd+1)
819
820 h_temp.SetBinContent(i_bin, hit_content)
821 h_temp.SetBinError(i_bin, hit_err)
822 return h_temp
823
824 # -----------------------------------------------------------------------
825 def initialHist_1Panel(self, name_suffix, title_suffix, titles):
826 hist = ROOT.TH1F(titles[0]+name_suffix, titles[1]+title_suffix+";"+titles[2]+";"+titles[3], self._nbins, self._low, self._up)
827 return hist
828
829 # -----------------------------------------------------------------------
830 def getContent(self, singleObj):
831 if self._variable == 'predRate':
832 cont = singleObj['p0']+self.__refInstLumi*singleObj['p1']
833 error = singleObj['p0_err']+self.__refInstLumi*singleObj['p1_err']
834 elif self._variable == 'meanRate':
835 cont = singleObj['mean']
836 error = singleObj['mean_err']
837 else:
838 cont = singleObj[self._variable]
839 if self._variable == 'chi2':
840 error = 0.01 # non-sense value
841 else:
842 error = singleObj[self._variable+"_err"]
843
844 return (cont, error)
845
846 # -----------------------------------------------------------------------
847 def _post_allSectorAndLayers(self, temp_dic):
849
850 for sec_layer, hist in temp_dic.items():
851 grs = self.genGraph_LB2Lumi(hist)
853
854 self._dic_sectors_layers[sec_layer] = fitRe[1]
855
856 # -----------------------------------------------------------------------
857 def setCutLine(self, i_histo, index = 0):
858 if index == 0:
860 minX = -16.5
861 maxX = 16.5
862 else:
864 minX = 0.
865 maxX = 19.
866
867 line = ROOT.TLine(minX, y, maxX, y)
868 line.SetLineStyle(2)
869 line.SetLineWidth(1)
870 line.SetLineColor(ROOT.kBlue)
871
872 i_histo.GetListOfFunctions().Add(line)
873
874
876
877 # -----------------------------------------------------------------------
878 def __init__(self, inHisto):
879 super(Draw_HitMultiplicity, self).__init__(inHisto)
880
882
883 # -----------------------------------------------------------------------
885 return self.list_hitMulti_perPanel
886
887 # -----------------------------------------------------------------------
888 def getObject_1panel(self, config):
889 panelInd = config[0]
890 panelName = config[1]
891 nbins = self._nbins
892 low = self._low
893 up = self._up
894
895 h1_temp = ROOT.TH1F(self._variable+"_"+panelName, self._out_htitle+"("+panelName+");"+self._out_htitle+";Muon entries", nbins, low, up)
896
897 for i_bin in range(1, nbins+1):
898 h1_temp.SetBinContent(i_bin, self._in_histo.GetBinContent(i_bin, panelInd+1))
899 h1_temp.SetBinError(i_bin, self._in_histo.GetBinError(i_bin, panelInd+1))
900
901 self.list_hitMulti_perPanel.append(h1_temp)
902 return h1_temp
903
904 # -----------------------------------------------------------------------
905 def getObject_1SectorLayer(self, config, sec_layer, temp_dic):
906 titles = [self._variable, self._out_htitle, self._out_htitle, "muon entries"]
907 self.getHist_1SectorLayer(config, sec_layer, temp_dic, titles)
908
909 # -----------------------------------------------------------------------
910 def getHist_1Panel(self, config):
911 panelInd = config[0]
912
913 h_temp = ROOT.TH1F("h_temp"+str(panelInd), "h_temp"+str(panelInd), self._nbins, self._low, self._up)
914 for i_bin in range(1, self._nbins+1):
915 hit_content = self._in_histo.GetBinContent(i_bin, panelInd+1)
916 hit_err = self._in_histo.GetBinError(i_bin, panelInd+1)
917
918 h_temp.SetBinContent(i_bin, hit_content)
919 h_temp.SetBinError(i_bin, hit_err)
920 return h_temp
921
922 # -----------------------------------------------------------------------
923 def initialHist_1Panel(self, name_suffix, title_suffix, titles):
924 hist = ROOT.TH1F(titles[0]+name_suffix, titles[1]+title_suffix+";"+titles[2]+";"+titles[3], self._nbins, self._low, self._up)
925 return hist
926
927 # -----------------------------------------------------------------------
928 def _post_allSectorAndLayers(self, temp_dic):
929 self._dic_sectors_layers = temp_dic
930
931 # -----------------------------------------------------------------------
932 def GetHist1D_yMuon_wholeRPC(self, config):
933 self._in_hname = config[0]
934 self._variable = config[1]
936
937 out_hname = self._variable
938 out_htitle = self._out_htitle
939
942
943 all_hist = ROOT.TH1F(out_hname+"_wholeRPC", out_htitle+" of whole RPC;" +self._out_htitle+";muon entries", self._nbins, self._low, self._up)
944 eta_hist = ROOT.TH1F(out_hname+"_etaView", out_htitle+" in "+isMeasPhiNames[0]+";"+self._out_htitle+";muon entries", self._nbins, self._low, self._up)
945 phi_hist = ROOT.TH1F(out_hname+"_phiView", out_htitle+" in "+isMeasPhiNames[1]+";"+self._out_htitle+";muon entries", self._nbins, self._low, self._up)
946 all_hist.GetXaxis().SetRange(0, self._nbins+1)
947 eta_hist.GetXaxis().SetRange(0, self._nbins+1)
948 phi_hist.GetXaxis().SetRange(0, self._nbins+1)
949 for sec_layer, hists_eta_phi in self._dic_sectors_layers.items():
950 all_hist.Add(hists_eta_phi[0])
951 all_hist.Add(hists_eta_phi[1])
952 eta_hist.Add(hists_eta_phi[0])
953 phi_hist.Add(hists_eta_phi[1])
954
955 return [all_hist, eta_hist, phi_hist]
956
957 # -----------------------------------------------------------------------
959 list_hist = []
960 for sec_layer, hists_eta_phi in self._dic_sectors_layers.items():
961 for i_hist in hists_eta_phi:
962 list_hist.append(i_hist)
963
964 return list_hist
965
966 # -----------------------------------------------------------------------
967 def getContent(self, singleObj):
968 cont = singleObj.GetMean()
969 error = singleObj.GetMeanError()
970
971 return (cont, error)
972
973
975
976 # -----------------------------------------------------------------------
977 def __init__(self, inHisto):
978 super(Draw_DetectEfficiency, self).__init__(inHisto)
980
981 # -----------------------------------------------------------------------
982 def _prepareHisto(self):
984
985 self._nbins = 1
986 self._low = 0
987 self._up = 1
988
989 # -----------------------------------------------------------------------
990 def getObject_1panel(self, config):
991 panelInd = config[0]
992 # panelName= config[1]
993
994 err_low = self._in_histo.GetEfficiencyErrorLow(panelInd+1)
995 err_up = self._in_histo.GetEfficiencyErrorUp(panelInd+1)
996 cont = self._in_histo.GetEfficiency(panelInd+1)
997 if (cont+err_up) > 1:
998 err_up = 1. - cont
999 return (cont, err_low, err_up)
1000
1001 # -----------------------------------------------------------------------
1002 def getObject_1SectorLayer(self, config, sec_layer, temp_dic):
1003 titles = [self._variable, self._out_htitle, "", "#epsilon"]
1004 self.getHist_1SectorLayer(config, sec_layer, temp_dic, titles)
1005
1006 # -----------------------------------------------------------------------
1007 def getHist_1Panel(self, config):
1008 panelInd = config[0]
1009
1010 num_hist = self._in_histo.GetPassedHistogram()
1011 den_hist = self._in_histo.GetTotalHistogram()
1012
1013 h_num_temp = ROOT.TH1F("h_effNum"+str(panelInd), "h_effNum"+str(panelInd), 1, 0., 1.)
1014 h_den_temp = ROOT.TH1F("h_effDen"+str(panelInd), "h_effDen"+str(panelInd), 1, 0., 1.)
1015 num = num_hist.GetBinContent(panelInd+1); num_err = num_hist.GetBinError(panelInd+1)
1016 den = den_hist.GetBinContent(panelInd+1); den_err = den_hist.GetBinError(panelInd+1)
1017 h_num_temp.SetBinContent(1, num); h_num_temp.SetBinError(1, num_err)
1018 h_den_temp.SetBinContent(1, den); h_den_temp.SetBinError(1, den_err)
1019
1020 h_temp = ROOT.TEfficiency(h_num_temp, h_den_temp)
1021
1022 return h_temp
1023
1024 # -----------------------------------------------------------------------
1025 def initialHist_1Panel(self, name_suffix, title_suffix, titles):
1026 hist = ROOT.TEfficiency(titles[0]+name_suffix, titles[1]+title_suffix+";"+titles[2]+";"+titles[3], self._nbins, self._low, self._up)
1027 return hist
1028
1029 # -----------------------------------------------------------------------
1030 def _post_allSectorAndLayers(self, temp_dic):
1032
1033 for sec_layer, hist in temp_dic.items():
1034 # con_err1 = [hist[0].GetEfficiency(1), hist[0].GetEfficiencyErrorLow(1), hist[0].GetEfficiencyErrorUp(1)]
1035 # con_err2 = [hist[1].GetEfficiency(1), hist[1].GetEfficiencyErrorLow(1), hist[1].GetEfficiencyErrorUp(1)]
1036 # con_err = (con_err1, con_err2)
1037
1038 con_err = [hist.GetEfficiency(1), hist.GetEfficiencyErrorLow(1), hist.GetEfficiencyErrorUp(1)]
1039
1040 self._dic_sectors_layers[sec_layer] = con_err
1041
1042 # -----------------------------------------------------------------------
1043 def getPanelEff_Dic(self, config):
1044 self._in_hname = config[0]
1045 self._variable = config[1]
1046
1047 if not self.doneParserPanel == self._in_hname:
1049
1050 return self._dic_panels_detect
1051
1052 # -----------------------------------------------------------------------
1053 def getSectorAndLayerEff_Dic(self, config):
1054 self._in_hname = config[0]
1055 self._variable = config[1]
1056
1059
1060 return self._dic_sectors_layers
1061
1062 # -----------------------------------------------------------------------
1063 def getContent(self, singleObj):
1064 if self._variable == "extrapMuons" or self._variable == "detEff":
1065 content = singleObj[0]
1066 error = singleObj[1]
1067 elif self._variable == "detEffError":
1068 content = singleObj[1]
1069 error = 0
1070 return (content, error)
1071
1072
1074 # -----------------------------------------------------------------------
1075 def __init__(self,inHisto):
1076 super(Draw_HitOuttimeFraction, self).__init__(inHisto)
1077
1078 # -----------------------------------------------------------------------
1079 def _prepareHisto(self):
1081
1082 self._nbins = 1
1083 self._low = 0
1084 self._up = 1
1085
1086 # -----------------------------------------------------------------------
1087 def getObject_1panel(self, config):
1088 panelInd = config[0]
1089
1090 frac_cont = self._in_histo.GetEfficiency(panelInd+1)
1091 frac_err_low = self._in_histo.GetEfficiencyErrorLow(panelInd+1)
1092 frac_err_up = self._in_histo.GetEfficiencyErrorUp(panelInd+1)
1093
1094 if (frac_cont+frac_err_up) > 1:
1095 frac_err_up = 1. - frac_cont
1096 return (frac_cont, frac_err_low, frac_err_up)
1097
1098 # -----------------------------------------------------------------------
1099 def getObject_1SectorLayer(self, config, sec_layer, temp_dic):
1100 titles = [self._variable, self._out_htitle, '', '']
1101 self.getHist_1SectorLayer(config, sec_layer, temp_dic, titles)
1102
1103 # -----------------------------------------------------------------------
1104 def getHist_1Panel(self, config):
1105 panelInd = config[0]
1106
1107 num_hist = self._in_histo.GetPassedHistogram()
1108 den_hist = self._in_histo.GetTotalHistogram()
1109
1110 h_num_temp = ROOT.TH1F("h_effNum"+str(panelInd), "h_effNum"+str(panelInd), 1, 0., 1.)
1111 h_den_temp = ROOT.TH1F("h_effDen"+str(panelInd), "h_effDen"+str(panelInd), 1, 0., 1.)
1112 num = num_hist.GetBinContent(panelInd+1); num_err = num_hist.GetBinError(panelInd+1)
1113 den = den_hist.GetBinContent(panelInd+1); den_err = den_hist.GetBinError(panelInd+1)
1114 h_num_temp.SetBinContent(1, num); h_num_temp.SetBinError(1, num_err)
1115 h_den_temp.SetBinContent(1, den); h_den_temp.SetBinError(1, den_err)
1116
1117 h_temp = ROOT.TEfficiency(h_num_temp, h_den_temp)
1118 return h_temp
1119
1120 # -----------------------------------------------------------------------
1121 def initialHist_1Panel(self, name_suffix, title_suffix, titles):
1122 hist = ROOT.TEfficiency(titles[0]+name_suffix, titles[1]+title_suffix+";"+titles[2]+";"+titles[3], self._nbins, self._low, self._up)
1123 return hist
1124
1125 # -----------------------------------------------------------------------
1126 def _post_allSectorAndLayers(self, temp_dic):
1128 for sec_layer, hist in temp_dic.items():
1129 # con_err1 = [hist[0].GetEfficiency(1), hist[0].GetEfficiencyErrorLow(1), hist[0].GetEfficiencyErrorUp(1)]
1130 # con_err2 = [hist[1].GetEfficiency(1), hist[1].GetEfficiencyErrorLow(1), hist[1].GetEfficiencyErrorUp(1)]
1131 # con_err = (con_err1, con_err2)
1132 con_err = [hist.GetEfficiency(1), hist.GetEfficiencyErrorLow(1), hist.GetEfficiencyErrorUp(1)]
1133
1134 self._dic_sectors_layers[sec_layer] = con_err
1135
1136 # -----------------------------------------------------------------------
1137 def getContent(self, singleObj):
1138 if self._variable.find("Error")>-1:
1139 content = singleObj[1]
1140 error = 0
1141 else:
1142 content = singleObj[0]
1143 error = singleObj[1]
1144
1145 return (content, error)
1146
1147
1149
1150 # -----------------------------------------------------------------------
1151 def __init__(self, inHisto):
1152 super(Draw_2DCount, self).__init__(inHisto)
1153
1154 # -----------------------------------------------------------------------
1155 def getObject_1panel(self, config):
1156 panelInd = config[0]
1157 cont_err = (self._in_histo.GetBinContent(panelInd+1), self._in_histo.GetBinError(panelInd+1))
1158
1159 return cont_err
1160
1161 # -----------------------------------------------------------------------
1162 def getContent(self, singleObj):
1163 return singleObj
1164
1165
1166
1167if __name__ == '__main__':
1168 print ("CoreClass: Hello, World !")
constexpr int pow(int base, int exp) noexcept
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
getContent(self, singleObj)
getObject_1panel(self, config)
__init__(self, inHisto)
SetLumiInfoDic(self, dic_lumiInfo)
Definition CoreClass.py:606
SetPanelDic(self, dic_panels)
Definition CoreClass.py:602
modifyXlabel(self, hist)
Definition CoreClass.py:586
dict _rangeOfVariables_allPanels
Definition CoreClass.py:65
GetHist1D_ySectorsAndLayers(self, config)
Definition CoreClass.py:365
setOut_Panels(self, list_panelInds=[], list_panelNames=[])
Definition CoreClass.py:610
GetHist1D_yPanels(self, config)
Definition CoreClass.py:397
getContent(self, singleObj)
Definition CoreClass.py:657
GetHist2D_EtaPhi_allLayer(self, config, doSetZRange=True)
Definition CoreClass.py:447
getObject_1SectorLayer(self, config, sec_layer, temp_dic)
Definition CoreClass.py:633
getHist_1Panel(self, config)
Definition CoreClass.py:653
decorateSummary_perSector(self, dic_hist)
Definition CoreClass.py:548
_post_allSectorAndLayers(self, temp_dic)
Definition CoreClass.py:265
__init__(self, inHisto)
Definition CoreClass.py:195
decorateAllSectorSummary(self, dic_hist)
Definition CoreClass.py:517
GetSummary_allSectorsAndLayers(self, config)
Definition CoreClass.py:269
getHist_1SectorLayer(self, config, sec_layer, temp_dic, titles)
Definition CoreClass.py:637
setHistnameVariable(self, config)
Definition CoreClass.py:624
parseHisto_allSectorAndLayers(self)
Definition CoreClass.py:251
getObject_1panel(self, config)
Definition CoreClass.py:629
dict _cuts_summaryHist_perSectorLayer
Definition CoreClass.py:165
dict _cuts_summaryHist_allSectorLayer
Definition CoreClass.py:157
dict _rangeOfVariables_perPanel
Definition CoreClass.py:49
GetSummary_eachSectorsAndLayers(self, config)
Definition CoreClass.py:303
getObject_1SectorLayer(self, config, sec_layer, temp_dic)
getSectorAndLayerEff_Dic(self, config)
initialHist_1Panel(self, name_suffix, title_suffix, titles)
_post_allSectorAndLayers(self, temp_dic)
_post_allSectorAndLayers(self, temp_dic)
Definition CoreClass.py:928
getContent(self, singleObj)
Definition CoreClass.py:967
GetHist1D_yMuon_perSectorLayer(self, config)
Definition CoreClass.py:958
GetHist1D_yMuon_wholeRPC(self, config)
Definition CoreClass.py:932
getObject_1SectorLayer(self, config, sec_layer, temp_dic)
Definition CoreClass.py:905
initialHist_1Panel(self, name_suffix, title_suffix, titles)
Definition CoreClass.py:923
getObject_1SectorLayer(self, config, sec_layer, temp_dic)
initialHist_1Panel(self, name_suffix, title_suffix, titles)
_post_allSectorAndLayers(self, temp_dic)
getContent(self, singleObj)
Definition CoreClass.py:830
_post_allSectorAndLayers(self, temp_dic)
Definition CoreClass.py:847
genGraph_LB2Lumi(self, h_LB)
Definition CoreClass.py:677
getObject_1SectorLayer(self, config, sec_layer, temp_dic)
Definition CoreClass.py:806
setCutLine(self, i_histo, index=0)
Definition CoreClass.py:857
getObject_1panel(self, config)
Definition CoreClass.py:738
initialHist_1Panel(self, name_suffix, title_suffix, titles)
Definition CoreClass.py:825
doNEvtScale(self, h_NEvt_LB)
Definition CoreClass.py:729
getHist_1Panel(self, config)
Definition CoreClass.py:812
__init__(self, inHisto)
Definition CoreClass.py:664
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:138
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177
set_verticalGrid(hist2d)
set_blankBox(hist_2d, layer)
setAxisLabel_EtaPhi(hist2d)
set_horizonGrid(hist2d)
setTitleOffset(hist, instance="")
creatGraph(xs, ys, x_errs, y_errs, g_name, g_title, g_Xtitle, g_Ytitle)
linearFit(h_temp, opt="QNS+")
return type values: 1 : normal 0 : fit fail or (Not exist this quantity of certain panel) -1 : number...