|
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) |
|
Make validation histograms for trg ecl/cdc/klm
Definition at line 365 of file TRGValidation.py.
◆ 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):
402 Get relative ratio between two hists.
403 :param hist1 numerator
404 :param hist2 denominator
405 :param title new histogram title
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!!")
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)
◆ 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: