Belle II Software  release-08-01-10
MakePlots Class Reference
Inheritance diagram for MakePlots:
Collaboration diagram for MakePlots:

Public Member Functions

def initialize (self)
 

Detailed Description

 Makes a plot of alpha-ratio histograms 

Definition at line 34 of file alphaRatioPlots.py.

Member Function Documentation

◆ initialize()

def initialize (   self)
 initialize: implementation

Definition at line 37 of file alphaRatioPlots.py.

37  def initialize(self):
38  ''' initialize: implementation'''
39 
40  gROOT.SetBatch(True)
41 
42  db = Belle2.PyDBObj("TOPCalPhotonYields")
43  if not db:
44  return
45 
46  print("- global tag:", globalTag)
47  print("- time of measurement:",
48  time.strftime("%d %b %Y %H:%M:%S", time.localtime(db.getTimeStamp())), "(mean), ",
49  round(db.getTimeStampStd() / 3600 / 24, 2), "days (rms)")
50 
51  canvas = TCanvas("c1", "alpha ratio", 2000, 1500)
52  canvas.Divide(2, 8)
53  gStyle.SetOptStat(0)
54  gStyle.SetTitleFontSize(0.18)
55  for slot in range(1, 17):
56  canvas.cd(slot)
57  pad = canvas.GetPad(slot)
58  pad.SetLeftMargin(0.02)
59  pad.SetRightMargin(0.02)
60  pad.SetTopMargin(0.17)
61  pad.SetBottomMargin(0.03)
62  h = db.getAlphaRatio(slot)
63  if not h:
64  continue
65  h.SetTitle("slot " + str(slot))
66  h.SetMinimum(0)
67  h.SetMaximum(1.2)
68  h.Draw("col a")
69  fileName = 'alphaRatio-' + time.strftime("%Y-%m-%d", time.localtime(db.getTimeStamp())) + '.png'
70  canvas.SaveAs(fileName)
71  print("--> plot saved as:", fileName)
72 
73 
74 b2.set_log_level(b2.LogLevel.ERROR)
75 
Class to access a DBObjPtr from Python.
Definition: PyDBObj.h:50

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