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_HitMultiplicity Class Reference
Inheritance diagram for CoreClass.Draw_HitMultiplicity:
Collaboration diagram for CoreClass.Draw_HitMultiplicity:

Public Member Functions

def __init__ (self, inHisto)
 
def GetGraphs_rate_perPanel (self)
 
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 GetHist1D_yMuon_wholeRPC (self, config)
 
def GetHist1D_yMuon_perSectorLayer (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

 list_hitMulti_perPanel
 
 doneParserSectorAndLayer
 
 doneParserPanel
 

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 _post_allSectorAndLayers (self, temp_dic)
 
def _prepareHisto (self)
 

Private Attributes

 _dic_sectors_layers
 
 _in_hname
 
 _variable
 
 _out_htitle
 
 _full_panel
 
 _list_outPanelInds
 
 _list_outPanelNames
 
 _in_histo
 
 _dic_panels_detect
 
 _nbins
 
 _low
 
 _up
 
 _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 875 of file CoreClass.py.

Constructor & Destructor Documentation

◆ __init__()

def CoreClass.Draw_HitMultiplicity.__init__ (   self,
  inHisto 
)

Reimplemented from CoreClass.Draw_Base.

Definition at line 878 of file CoreClass.py.

878  def __init__(self, inHisto):
879  super(Draw_HitMultiplicity, self).__init__(inHisto)
880 
881  self.list_hitMulti_perPanel = []
882 

Member Function Documentation

◆ _post_allSectorAndLayers()

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

Reimplemented from CoreClass.Draw_Base.

Definition at line 928 of file CoreClass.py.

928  def _post_allSectorAndLayers(self, temp_dic):
929  self._dic_sectors_layers = temp_dic
930 

◆ _prepareHisto()

def CoreClass.Draw_Base._prepareHisto (   self)
privateinherited

Reimplemented in CoreClass.Draw_HitOuttimeFraction, and CoreClass.Draw_DetectEfficiency.

Definition at line 202 of file CoreClass.py.

202  def _prepareHisto(self):
203  self._out_htitle = self._var_title[self._variable]
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 

◆ 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_HitMultiplicity.getContent (   self,
  singleObj 
)

Reimplemented from CoreClass.Draw_Base.

Definition at line 967 of file CoreClass.py.

967  def getContent(self, singleObj):
968  cont = singleObj.GetMean()
969  error = singleObj.GetMeanError()
970 
971  return (cont, error)
972 

◆ GetGraphs_rate_perPanel()

def CoreClass.Draw_HitMultiplicity.GetGraphs_rate_perPanel (   self)

Definition at line 884 of file CoreClass.py.

884  def GetGraphs_rate_perPanel(self):
885  return self.list_hitMulti_perPanel
886 

◆ GetHist1D_yMuon_perSectorLayer()

def CoreClass.Draw_HitMultiplicity.GetHist1D_yMuon_perSectorLayer (   self,
  config 
)

Definition at line 958 of file CoreClass.py.

958  def GetHist1D_yMuon_perSectorLayer(self, config):
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 

◆ GetHist1D_yMuon_wholeRPC()

def CoreClass.Draw_HitMultiplicity.GetHist1D_yMuon_wholeRPC (   self,
  config 
)

Definition at line 932 of file CoreClass.py.

932  def GetHist1D_yMuon_wholeRPC(self, config):
933  self._in_hname = config[0]
934  self._variable = config[1]
935  self._out_htitle = self._var_title[self._variable]
936 
937  out_hname = self._variable
938  out_htitle = self._out_htitle
939 
940  if not self.doneParserSectorAndLayer == self._in_hname:
941  self.parseHisto_allSectorAndLayers()
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 

◆ 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_HitMultiplicity.getHist_1Panel (   self,
  config 
)

Reimplemented from CoreClass.Draw_Base.

Definition at line 910 of file CoreClass.py.

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 

◆ 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_HitMultiplicity.getObject_1panel (   self,
  config 
)

Reimplemented from CoreClass.Draw_Base.

Definition at line 888 of file CoreClass.py.

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 

◆ getObject_1SectorLayer()

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

Reimplemented from CoreClass.Draw_Base.

Definition at line 905 of file CoreClass.py.

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 

◆ 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_HitMultiplicity.initialHist_1Panel (   self,
  name_suffix,
  title_suffix,
  titles 
)

Definition at line 923 of file CoreClass.py.

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 

◆ 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_HitMultiplicity._dic_sectors_layers
private

Definition at line 929 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_HitMultiplicity._in_hname
private

Definition at line 933 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_Base._low
privateinherited

Definition at line 207 of file CoreClass.py.

◆ _nbins

CoreClass.Draw_Base._nbins
privateinherited

Definition at line 206 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_HitMultiplicity._out_htitle
private

Definition at line 935 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_Base._up
privateinherited

Definition at line 208 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_HitMultiplicity._variable
private

Definition at line 934 of file CoreClass.py.

◆ doneParserPanel

CoreClass.Draw_Base.doneParserPanel
inherited

Definition at line 198 of file CoreClass.py.

◆ doneParserSectorAndLayer

CoreClass.Draw_HitMultiplicity.doneParserSectorAndLayer

Definition at line 940 of file CoreClass.py.

◆ list_hitMulti_perPanel

CoreClass.Draw_HitMultiplicity.list_hitMulti_perPanel

Definition at line 881 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
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
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
python.grid.Add
def Add(name)
Definition: grid.py:41
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