ATLAS Offline Software
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CoreClass.Draw_DetectEfficiency Class Reference
Inheritance diagram for CoreClass.Draw_DetectEfficiency:
Collaboration diagram for CoreClass.Draw_DetectEfficiency:

Public Member Functions

def __init__ (self, inHisto)
 
def getObject_1panel (self, config)
 
def getObject_1SectorLayer (self, config, sec_layer, temp_dic)
 
def getHist_1Panel (self, config)
 
def initialHist_1Panel (self, name_suffix, title_suffix, titles)
 
def getPanelEff_Dic (self, config)
 
def getSectorAndLayerEff_Dic (self, config)
 
def getContent (self, singleObj)
 
def parseHisto_allPanels (self)
 First level: sector - layer(dbR+gasGap) More...
 
def parseHisto_allSectorAndLayers (self)
 
def GetSummary_allSectorsAndLayers (self, config)
 
def GetSummary_eachSectorsAndLayers (self, config)
 
def GetHist1D_ySectorsAndLayers (self, config)
 
def GetHist1D_yPanels (self, config)
 
def GetHist2D_EtaPhi_allLayer (self, config, doSetZRange=True)
 
def decorateAllSectorSummary (self, dic_hist)
 
def decorateSummary_perSector (self, dic_hist)
 
def modifyXlabel (self, hist)
 
def SetPanelDic (self, dic_panels)
 
def SetLumiInfoDic (self, dic_lumiInfo)
 
def setOut_Panels (self, list_panelInds=[], list_panelNames=[])
 
def GetBadPanels (self)
 
def setHistnameVariable (self, config)
 
def getHist_1SectorLayer (self, config, sec_layer, temp_dic, titles)
 

Public Attributes

 doneParser_name_perSector
 
 doneParserPanel
 
 doneParserSectorAndLayer
 

Static Public Attributes

int T_chi2_sl = 15.
 
int T_p0_sl = 2e6
 
int Tlow_p1_sl = 5e3
 
int Tup_p1_sl = 15e6
 
int T_predRate = 30e6
 
int T_chi2_panel = 15.
 
int T_p0_panel = 2e5
 
int Tlow_p1_panel = 5e3
 
int Tup_p1_panel = 3e5
 
int T_predRate_panel = 30e6
 

Private Member Functions

def _prepareHisto (self)
 
def _post_allSectorAndLayers (self, temp_dic)
 

Private Attributes

 _out_htitle
 
 _nbins
 
 _low
 
 _up
 
 _dic_sectors_layers
 
 _in_hname
 
 _variable
 
 _full_panel
 
 _list_outPanelInds
 
 _list_outPanelNames
 
 _in_histo
 
 _dic_panels_detect
 
 _doSetZRange
 
 _PanelsProperties
 
 _Dic_LumiInfo
 

Static Private Attributes

dictionary _rangeOfVariables_perPanel
 
dictionary _rangeOfVariables_allPanels
 
dictionary _nbins_hist
 
dictionary _unitsOfVariables
 
dictionary _precision
 
dictionary _var_title
 
list _cut_variables = ["p0", "p1", "chi2", "predRate", "meanRate"]
 
dictionary _cuts_summaryHist_allSectorLayer
 
dictionary _cuts_summaryHist_perSectorLayer
 
bool _full_panel = True
 
list _list_outPanelInds = []
 
list _list_outPanelNames = []
 
list _hists_bad_panels = []
 

Detailed Description

Definition at line 974 of file CoreClass.py.

Constructor & Destructor Documentation

◆ __init__()

def CoreClass.Draw_DetectEfficiency.__init__ (   self,
  inHisto 
)

Reimplemented from CoreClass.Draw_Base.

Definition at line 977 of file CoreClass.py.

977  def __init__(self, inHisto):
978  super(Draw_DetectEfficiency, self).__init__(inHisto)
979  self.doneParser_name_perSector = ''
980 

Member Function Documentation

◆ _post_allSectorAndLayers()

def CoreClass.Draw_DetectEfficiency._post_allSectorAndLayers (   self,
  temp_dic 
)
private

Reimplemented from CoreClass.Draw_Base.

Definition at line 1030 of file CoreClass.py.

1030  def _post_allSectorAndLayers(self, temp_dic):
1031  self._dic_sectors_layers = {}
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 

◆ _prepareHisto()

def CoreClass.Draw_DetectEfficiency._prepareHisto (   self)
private

Reimplemented from CoreClass.Draw_Base.

Definition at line 982 of file CoreClass.py.

982  def _prepareHisto(self):
983  self._out_htitle = self._var_title[self._variable]
984 
985  self._nbins = 1
986  self._low = 0
987  self._up = 1
988 

◆ decorateAllSectorSummary()

def CoreClass.Draw_Base.decorateAllSectorSummary (   self,
  dic_hist 
)
inherited

Definition at line 517 of file CoreClass.py.

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 

◆ decorateSummary_perSector()

def CoreClass.Draw_Base.decorateSummary_perSector (   self,
  dic_hist 
)
inherited

Definition at line 548 of file CoreClass.py.

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 

◆ GetBadPanels()

def CoreClass.Draw_Base.GetBadPanels (   self)
inherited

Definition at line 620 of file CoreClass.py.

620  def GetBadPanels(self):
621  return self._hists_bad_panels
622 

◆ getContent()

def CoreClass.Draw_DetectEfficiency.getContent (   self,
  singleObj 
)

Reimplemented from CoreClass.Draw_Base.

Definition at line 1063 of file CoreClass.py.

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 

◆ GetHist1D_yPanels()

def CoreClass.Draw_Base.GetHist1D_yPanels (   self,
  config 
)
inherited

Definition at line 397 of file CoreClass.py.

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:
406  self.parseHisto_allPanels()
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 

◆ GetHist1D_ySectorsAndLayers()

def CoreClass.Draw_Base.GetHist1D_ySectorsAndLayers (   self,
  config 
)
inherited

Definition at line 365 of file CoreClass.py.

365  def GetHist1D_ySectorsAndLayers(self, config):
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:
374  self.parseHisto_allSectorAndLayers()
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 

◆ GetHist2D_EtaPhi_allLayer()

def CoreClass.Draw_Base.GetHist2D_EtaPhi_allLayer (   self,
  config,
  doSetZRange = True 
)
inherited

Definition at line 447 of file CoreClass.py.

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:
456  self.parseHisto_allPanels()
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
505  HistDecorate.setTitleOffset(h2, "TH2")
509 
510  HistDecorate.set_blankBox(h2, i_layer)
511 
512  list_hists.append(h2)
513 
514  return list_hists
515 

◆ getHist_1Panel()

def CoreClass.Draw_DetectEfficiency.getHist_1Panel (   self,
  config 
)

Reimplemented from CoreClass.Draw_Base.

Definition at line 1007 of file CoreClass.py.

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 

◆ getHist_1SectorLayer()

def CoreClass.Draw_Base.getHist_1SectorLayer (   self,
  config,
  sec_layer,
  temp_dic,
  titles 
)
inherited

Definition at line 637 of file CoreClass.py.

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 

◆ getObject_1panel()

def CoreClass.Draw_DetectEfficiency.getObject_1panel (   self,
  config 
)

Reimplemented from CoreClass.Draw_Base.

Definition at line 990 of file CoreClass.py.

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 

◆ getObject_1SectorLayer()

def CoreClass.Draw_DetectEfficiency.getObject_1SectorLayer (   self,
  config,
  sec_layer,
  temp_dic 
)

Reimplemented from CoreClass.Draw_Base.

Definition at line 1002 of file CoreClass.py.

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 

◆ getPanelEff_Dic()

def CoreClass.Draw_DetectEfficiency.getPanelEff_Dic (   self,
  config 
)

Definition at line 1043 of file CoreClass.py.

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:
1048  self.parseHisto_allPanels()
1049 
1050  return self._dic_panels_detect
1051 

◆ getSectorAndLayerEff_Dic()

def CoreClass.Draw_DetectEfficiency.getSectorAndLayerEff_Dic (   self,
  config 
)

Definition at line 1053 of file CoreClass.py.

1053  def getSectorAndLayerEff_Dic(self, config):
1054  self._in_hname = config[0]
1055  self._variable = config[1]
1056 
1057  if not self.doneParserSectorAndLayer == self._in_hname:
1058  self.parseHisto_allSectorAndLayers()
1059 
1060  return self._dic_sectors_layers
1061 

◆ GetSummary_allSectorsAndLayers()

def CoreClass.Draw_Base.GetSummary_allSectorsAndLayers (   self,
  config 
)
inherited

Definition at line 269 of file CoreClass.py.

269  def GetSummary_allSectorsAndLayers(self, config):
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:
278  self.parseHisto_allSectorAndLayers()
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 

◆ GetSummary_eachSectorsAndLayers()

def CoreClass.Draw_Base.GetSummary_eachSectorsAndLayers (   self,
  config 
)
inherited

Definition at line 303 of file CoreClass.py.

303  def GetSummary_eachSectorsAndLayers(self, config):
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:
312  self.parseHisto_allPanels()
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 

◆ initialHist_1Panel()

def CoreClass.Draw_DetectEfficiency.initialHist_1Panel (   self,
  name_suffix,
  title_suffix,
  titles 
)

Definition at line 1025 of file CoreClass.py.

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 

◆ modifyXlabel()

def CoreClass.Draw_Base.modifyXlabel (   self,
  hist 
)
inherited

Definition at line 586 of file CoreClass.py.

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 

◆ parseHisto_allPanels()

def CoreClass.Draw_Base.parseHisto_allPanels (   self)
inherited

First level: sector - layer(dbR+gasGap)

Second level: dbPhi - meanPhi Third level: etaStation - dbZ

Definition at line 211 of file CoreClass.py.

211  def parseHisto_allPanels(self):
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 

◆ parseHisto_allSectorAndLayers()

def CoreClass.Draw_Base.parseHisto_allSectorAndLayers (   self)
inherited

Definition at line 251 of file CoreClass.py.

251  def parseHisto_allSectorAndLayers(self):
252  self.doneParserSectorAndLayer = self._in_hname
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 

◆ setHistnameVariable()

def CoreClass.Draw_Base.setHistnameVariable (   self,
  config 
)
inherited

Definition at line 624 of file CoreClass.py.

624  def setHistnameVariable(self, config):
625  self._in_hname = config[0]
626  self._variable = config[1]
627 

◆ SetLumiInfoDic()

def CoreClass.Draw_Base.SetLumiInfoDic (   self,
  dic_lumiInfo 
)
inherited

Definition at line 606 of file CoreClass.py.

606  def SetLumiInfoDic(self, dic_lumiInfo):
607  self._Dic_LumiInfo = dic_lumiInfo
608 

◆ setOut_Panels()

def CoreClass.Draw_Base.setOut_Panels (   self,
  list_panelInds = [],
  list_panelNames = [] 
)
inherited

Definition at line 610 of file CoreClass.py.

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 

◆ SetPanelDic()

def CoreClass.Draw_Base.SetPanelDic (   self,
  dic_panels 
)
inherited

Definition at line 602 of file CoreClass.py.

602  def SetPanelDic(self, dic_panels):
603  self._PanelsProperties = dic_panels
604 

Member Data Documentation

◆ _cut_variables

list CoreClass.Draw_Base._cut_variables = ["p0", "p1", "chi2", "predRate", "meanRate"]
staticprivateinherited

Definition at line 155 of file CoreClass.py.

◆ _cuts_summaryHist_allSectorLayer

dictionary CoreClass.Draw_Base._cuts_summaryHist_allSectorLayer
staticprivateinherited
Initial value:
= {
"p0" : 2.e7,
"p1" : 0.,
"chi2" : 30. ,
"predRate" : 3.e7,
"meanRate" : 3.e7
}

Definition at line 157 of file CoreClass.py.

◆ _cuts_summaryHist_perSectorLayer

dictionary CoreClass.Draw_Base._cuts_summaryHist_perSectorLayer
staticprivateinherited
Initial value:
= {
"p0" : 5.e4,
"p1" : 0.,
"chi2" : 25. ,
"predRate" : 1.e6,
"meanRate" : 8.e5
}

Definition at line 165 of file CoreClass.py.

◆ _Dic_LumiInfo

CoreClass.Draw_Base._Dic_LumiInfo
privateinherited

Definition at line 607 of file CoreClass.py.

◆ _dic_panels_detect

CoreClass.Draw_Base._dic_panels_detect
privateinherited

Definition at line 197 of file CoreClass.py.

◆ _dic_sectors_layers

CoreClass.Draw_DetectEfficiency._dic_sectors_layers
private

Definition at line 1031 of file CoreClass.py.

◆ _doSetZRange

CoreClass.Draw_Base._doSetZRange
privateinherited

Definition at line 458 of file CoreClass.py.

◆ _full_panel [1/2]

bool CoreClass.Draw_Base._full_panel = True
staticprivateinherited

Definition at line 175 of file CoreClass.py.

◆ _full_panel [2/2]

CoreClass.Draw_Base._full_panel
privateinherited

Definition at line 615 of file CoreClass.py.

◆ _hists_bad_panels

list CoreClass.Draw_Base._hists_bad_panels = []
staticprivateinherited

Definition at line 178 of file CoreClass.py.

◆ _in_histo

CoreClass.Draw_Base._in_histo
privateinherited

Definition at line 196 of file CoreClass.py.

◆ _in_hname

CoreClass.Draw_DetectEfficiency._in_hname
private

Definition at line 1044 of file CoreClass.py.

◆ _list_outPanelInds [1/2]

list CoreClass.Draw_Base._list_outPanelInds = []
staticprivateinherited

Definition at line 176 of file CoreClass.py.

◆ _list_outPanelInds [2/2]

CoreClass.Draw_Base._list_outPanelInds
privateinherited

Definition at line 611 of file CoreClass.py.

◆ _list_outPanelNames [1/2]

list CoreClass.Draw_Base._list_outPanelNames = []
staticprivateinherited

Definition at line 177 of file CoreClass.py.

◆ _list_outPanelNames [2/2]

CoreClass.Draw_Base._list_outPanelNames
privateinherited

Definition at line 612 of file CoreClass.py.

◆ _low

CoreClass.Draw_DetectEfficiency._low
private

Definition at line 986 of file CoreClass.py.

◆ _nbins

CoreClass.Draw_DetectEfficiency._nbins
private

Definition at line 985 of file CoreClass.py.

◆ _nbins_hist

dictionary CoreClass.Draw_Base._nbins_hist
staticprivateinherited
Initial value:
= {
"p0" : 20,
"p1" : 20,
"chi2" : 20,
"predRate" : 20,
"meanRate" : 20,
"extrapMuons" : 20,
"detEff" : 20,
"detEffError" : 20,
"hitMultiplicity" : 10,
"averageClusterSize" : 30,
"outTimeHitFrac" : 20,
"outTimeHitFrac_onTrack" : 20,
"outTimeHitFracError" : 20
}

Definition at line 81 of file CoreClass.py.

◆ _out_htitle

CoreClass.Draw_DetectEfficiency._out_htitle
private

Definition at line 983 of file CoreClass.py.

◆ _PanelsProperties

CoreClass.Draw_Base._PanelsProperties
privateinherited

Definition at line 603 of file CoreClass.py.

◆ _precision

dictionary CoreClass.Draw_Base._precision
staticprivateinherited
Initial value:
= {
"p0" : -3,
"p1" : -3,
"chi2" : 2,
"predRate" : -3,
"meanRate" : -3,
"extrapMuons" : 0,
"detEff" : 4,
"detEffError" : 4,
"hitMultiplicity" : 2,
"averageClusterSize" : 3,
"outTimeHitFrac" : 4,
"outTimeHitFrac_onTrack" : 4,
"outTimeHitFracError" : 4
}

Definition at line 118 of file CoreClass.py.

◆ _rangeOfVariables_allPanels

dictionary CoreClass.Draw_Base._rangeOfVariables_allPanels
staticprivateinherited
Initial value:
= {
"p0" : (0., 20e6),
"p1" : (0., 20e6),
"chi2" : (0., 100.),
"predRate" : (0., 30e6),
"meanRate" : (0., 30e6),
"extrapMuons" : (0., 2000),
"detEff" : (0., 1.),
"detEffError" : (0., 0.1),
"hitMultiplicity" : (-0.5, 10.5),
"averageClusterSize" : (1, 4),
"outTimeHitFrac" : (0., 1.),
"outTimeHitFrac_onTrack" : (0., 1.),
"outTimeHitFracError" : (0., 0.1)
}

Definition at line 65 of file CoreClass.py.

◆ _rangeOfVariables_perPanel

dictionary CoreClass.Draw_Base._rangeOfVariables_perPanel
staticprivateinherited
Initial value:
= {
"p0" : (0., 1e5),
"p1" : (0., 5e5),
"chi2" : (0., 100.),
"predRate" : (0., 1e6),
"meanRate" : (0., 1e6),
"extrapMuons" : (0., 2000),
"detEff" : (0., 1.),
"detEffError" : (0., 0.1),
"hitMultiplicity" : (-0.5, 10.5),
"averageClusterSize" : (1, 4),
"outTimeHitFrac" : (0., 1.),
"outTimeHitFrac_onTrack" : (0., 1.),
"outTimeHitFracError" : (0., 0.1)
}

Definition at line 49 of file CoreClass.py.

◆ _unitsOfVariables

dictionary CoreClass.Draw_Base._unitsOfVariables
staticprivateinherited
Initial value:
= {
"p0" : 'Hz',
"p1" : 'Hz/(10^{34} cm^{-2}s^{-1})',
"chi2" : '',
"prdhits" : '',
"muon_Z_num" : '',
"muon_Z_den" : '',
"muon_all_num" : '',
"muon_all_den" : '',
"predRate" : 'Hz',
"meanRate" : 'Hz',
"extrapMuons" : '',
"detEff" : '',
"detEffError" : '',
"hitMultiplicity" : '',
"averageClusterSize" : '',
"outTimeHitFrac" : '',
"outTimeHitFrac_onTrack" : '',
"outTimeHitFracError" : ''
}

Definition at line 97 of file CoreClass.py.

◆ _up

CoreClass.Draw_DetectEfficiency._up
private

Definition at line 987 of file CoreClass.py.

◆ _var_title

dictionary CoreClass.Draw_Base._var_title
staticprivateinherited
Initial value:
= {
"p0" : "p0" ,
"p1" : "p1" ,
"chi2" : "Chi2/ndf" ,
"prdhits" : "Hits" ,
"muon_Z_num" : "Muons(Z) extrapolated to individual RPC panels with hits",
"muon_Z_den" : "Muons(Z) extrapolated to individual RPC panels",
"muon_all_num" : "Muons(All) extrapolated to individual RPC panels with hits",
"muon_all_den" : "Muons(All) extrapolated to individual RPC panels",
"predRate" : "Predicted hit rate" ,
"meanRate" : "Mean actual hit rate" ,
"extrapMuons" : "Extrapolated muons",
"detEff" : "Muon detection efficiency",
"detEffError" : "Muon detection efficiency error",
"hitMultiplicity" : "RPC hit multiplicity",
"averageClusterSize" : "Average cluster size",
"outTimeHitFrac" : "Fraction of RPC hits with |t|>12.5 ns",
"outTimeHitFrac_onTrack" : "Fraction of RPC on-track hits with |t|>12.5 ns",
"outTimeHitFracError" : "Error of fraction of RPC hits with |t|>12.5 ns"
}

Definition at line 134 of file CoreClass.py.

◆ _variable

CoreClass.Draw_DetectEfficiency._variable
private

Definition at line 1045 of file CoreClass.py.

◆ doneParser_name_perSector

CoreClass.Draw_DetectEfficiency.doneParser_name_perSector

Definition at line 979 of file CoreClass.py.

◆ doneParserPanel

CoreClass.Draw_DetectEfficiency.doneParserPanel

Definition at line 1047 of file CoreClass.py.

◆ doneParserSectorAndLayer

CoreClass.Draw_DetectEfficiency.doneParserSectorAndLayer

Definition at line 1057 of file CoreClass.py.

◆ T_chi2_panel

int CoreClass.Draw_Base.T_chi2_panel = 15.
staticinherited

Definition at line 188 of file CoreClass.py.

◆ T_chi2_sl

int CoreClass.Draw_Base.T_chi2_sl = 15.
staticinherited

Definition at line 181 of file CoreClass.py.

◆ T_p0_panel

int CoreClass.Draw_Base.T_p0_panel = 2e5
staticinherited

Definition at line 189 of file CoreClass.py.

◆ T_p0_sl

int CoreClass.Draw_Base.T_p0_sl = 2e6
staticinherited

Definition at line 182 of file CoreClass.py.

◆ T_predRate

int CoreClass.Draw_Base.T_predRate = 30e6
staticinherited

Definition at line 185 of file CoreClass.py.

◆ T_predRate_panel

int CoreClass.Draw_Base.T_predRate_panel = 30e6
staticinherited

Definition at line 192 of file CoreClass.py.

◆ Tlow_p1_panel

int CoreClass.Draw_Base.Tlow_p1_panel = 5e3
staticinherited

Definition at line 190 of file CoreClass.py.

◆ Tlow_p1_sl

int CoreClass.Draw_Base.Tlow_p1_sl = 5e3
staticinherited

Definition at line 183 of file CoreClass.py.

◆ Tup_p1_panel

int CoreClass.Draw_Base.Tup_p1_panel = 3e5
staticinherited

Definition at line 191 of file CoreClass.py.

◆ Tup_p1_sl

int CoreClass.Draw_Base.Tup_p1_sl = 15e6
staticinherited

Definition at line 184 of file CoreClass.py.


The documentation for this class was generated from the following file:
HistDecorate.set_verticalGrid
def set_verticalGrid(hist2d)
Definition: HistDecorate.py:188
max
#define max(a, b)
Definition: cfImp.cxx:41
HistDecorate.set_horizonGrid
def set_horizonGrid(hist2d)
Definition: HistDecorate.py:211
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
min
#define min(a, b)
Definition: cfImp.cxx:40
HistDecorate.set_blankBox
def set_blankBox(hist_2d, layer)
Definition: HistDecorate.py:228
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
HistDecorate.setTitleOffset
def setTitleOffset(hist, instance="")
Definition: HistDecorate.py:173
str
Definition: BTagTrackIpAccessor.cxx:11
HistDecorate.setAxisLabel_EtaPhi
def setAxisLabel_EtaPhi(hist2d)
Definition: HistDecorate.py:275