Belle II Software  release-08-00-04
MakePlots Class Reference
Inheritance diagram for MakePlots:
Collaboration diagram for MakePlots:

Public Member Functions

def set_descr (self, histogram, description, check)
 
def set_style (self, histogram, xtitle, ytitle)
 
def get_relative (self, hist1, hist2, title, particle, trgbit)
 
def initialize (self)
 
def beginRun (self)
 
def event (self)
 
def endRun (self)
 
def terminate (self)
 

Public Attributes

 tfile
 
 Nevent
 
 hist_inbit
 validation histogram
 
 hist_outbit
 validation histogram
 
 h_E_ECL
 validation histogram
 
 h_Esum_ECL
 validation histogram
 
 h_theta_ECL
 validation histogram
 
 h_thetaID_ECL
 validation histogram
 
 h_phi_ECL
 validation histogram
 
 h_sector_BKLM
 validation histogram
 
 h_sector_EKLM
 validation histogram
 
 hist_inbit_expert
 validation histogram for experts
 
 hist_outbit_expert
 validation histogram for experts
 
 d_w
 validation histogram
 
 d_w_2
 
 d_phi
 validation histogram
 
 d_phi_2
 
 d_phi_3
 
 d_z0_3d
 validation histogram
 
 d_z0_nn
 validation histogram
 
 d_E_ECL
 validation histogram
 

Detailed Description

Make validation histograms for trg ecl/cdc/klm

Definition at line 365 of file TRGValidation.py.

Member Function Documentation

◆ get_relative()

def get_relative (   self,
  hist1,
  hist2,
  title,
  particle,
  trgbit 
)
Get relative ratio between two hists.
:param hist1 numerator
:param hist2 denominator
:param title new histogram title

Definition at line 400 of file TRGValidation.py.

400  def get_relative(self, hist1, hist2, title, particle, trgbit):
401  '''
402  Get relative ratio between two hists.
403  :param hist1 numerator
404  :param hist2 denominator
405  :param title new histogram title
406  '''
407 
408  bin1 = hist1.GetXaxis().GetNbins()
409  bin2 = hist2.GetXaxis().GetNbins()
410  Xmin1 = hist1.GetXaxis().GetXmin()
411  Xmax1 = hist1.GetXaxis().GetXmax()
412  Xmin2 = hist2.GetXaxis().GetXmin()
413  Xmax2 = hist2.GetXaxis().GetXmax()
414  if bin1 != bin2 or Xmin1 != Xmin2 or Xmax1 != Xmax2:
415  print("warning: two histograms cannot be compared!!")
416  return 0
417 
418  teff = TEfficiency(hist1, hist2)
419  htitle = f'h_eff_{title}_{particle}_{trgbit}'
420  heff = TH1F(htitle, f"efficiency histogram of {particle} for {trgbit}", bin1, Xmin1, Xmax1)
421  for ibin in range(1, bin1+1):
422  binc0 = teff.GetEfficiency(ibin)
423  bine0 = (teff.GetEfficiencyErrorUp(ibin) + teff.GetEfficiencyErrorLow(ibin)) / 2.0
424  heff.SetBinContent(ibin, binc0)
425  heff.SetBinError(ibin, bine0)
426  heff.GetYaxis().SetRangeUser(0.0, 1.2)
427  return heff
428 

◆ set_descr()

def set_descr (   self,
  histogram,
  description,
  check 
)
Sets description, check and contact to validation histogram.
:param h validation histogram
:param Descr description text

Definition at line 370 of file TRGValidation.py.

◆ set_style()

def set_style (   self,
  histogram,
  xtitle,
  ytitle 
)
Sets x-y titles, and sets histogram style.
:param xtitle X-axis title
:param xtitle Y-axis title

Definition at line 386 of file TRGValidation.py.


The documentation for this class was generated from the following file: