ATLAS Offline Software
LArG4PlottingScript.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 from __future__ import print_function
4 
5 __author__ = 'Radist Morse radist.morse@gmail.com'
6 
7 class RootFile :
8  def __init__(self) :
9  self.filename = ""
10  self.color = 0
11  self.thickness = 1
12  self.markerstyle = 1
13  self.markersize = 1
14  self.legendname = ""
15  self.drawopt = "HIST"
16  self.restricts = []
17 
18 def parseRoots(filename) :
19  inputfile=open(filename)
20  parsedRoots = []
21  parsedRestricts = []
22  for line in inputfile :
23  line = line.expandtabs(1)
24  line = line.rstrip("\n")
25  line = line.split("#")[0] #everything after "#" is a comment. just like here :)
26  line = line.split()
27  line[:] = [x for x in line if (len(x) > 0) ] #remove empty elements
28  if len(line) == 0 : #the whole line is a comment, empty, or just spaces
29  continue
30  rf = RootFile()
31  if line[0] == "file" :
32  rf.filename = line[1]
33  rf.color = int(line[2])
34  rf.thickness = int(line[3])
35  rf.markerstyle = int(line[4])
36  if (rf.markerstyle > 1) :
37  rf.drawopt = "E"
38  rf.markersize = float(line[5])
39  rf.legendname = " ".join(line[6:])
40  parsedRoots.append(rf)
41  print ("Found rootfile '"+rf.filename+"' added as '"+rf.legendname+"'")
42  if line[0] == "restrict" :
43  re = RestrictEntry()
44  abs = False
45  if line[1].startswith("+") :
46  abs = True
47  line[1] = line[1][1:]
48  re.var = line[1]
49  for rang in line[2:] :
50  if abs :
51  re.addRangeAbs(rang)
52  else :
53  re.addRange(rang)
54  if (len(parsedRoots) > 0) : #there already was a rootfile, adding restriction to it
55  rstrict = parsedRoots[-1].restricts #the last parsed rootfile
56  else : #no roots yet. this is a global restriction
57  rstrict = parsedRestricts
58  for rech in rstrict :
59  if (rech.var == re.var) : #there is already a restriction on a given variable. just add ranges
60  rech.rangeList += re.rangeList
61  re.rangeList = []
62  if (len(re.rangeList) > 0) : #no restriction for this variable yet. add it.
63  print ("A restriction found for variable",str(re))
64  rstrict.append(re)
65  else :
66  print ("WARNING: unknown key:", line[0])
67  continue
68  for pr in parsedRoots : #apply global restrictions on every plot
69  for re in parsedRestricts :
70  for rech in pr.restricts :
71  if (rech.var == re.var) :
72  rech.rangeList += re.rangeList
73  re.rangeList = []
74  if (len(re.rangeList) > 0) :
75  pr.restricts.append(re)
76  return parsedRoots
77 
78 def defaultRoots(args) :
79  parsed = []
80  colors = [2,4,7,6,3,1]
81  thickness = [1,1,1,1,1,1]
82  markerstyle = [20,1,0,1,1,1]
83  markersize = [0.6,1,1,1,1,1]
84  for fn,col,thick,mark1,mark2,legname in zip(args,colors,thickness,markerstyle,markersize,args) :
85  rf = RootFile()
86  rf.filename = fn
87  rf.color = col
88  rf.thickness = thick
89  rf.markerstyle = mark1
90  if (rf.markerstyle > 1) :
91  rf.drawopt = "E"
92  rf.markersize = mark2
93  rf.legendname = legname
94  parsed.append(rf)
95  return parsed
96 
97 class PlotEntry :
98  def __init__(self) :
99  self.vars_to_draw = []
100  self.axis_captions = {} #var is the key
101  self.givenmin = 0
102  self.givenmax = 0
103  self.nbins = 100
104  self.logy = 0
105  self.display_name = ""
106  self.profile = False
107  self.i2d = False
108  self.restricts = []
109 
111  def __init__(self) :
112  self.var = ""
113  self.rangeList = []
114  def checkVar(self,value) :
115  for rang in self.rangeList :
116  if (value >= rang[0]) and (value <= rang[1]) :
117  return True
118  return False
119  def __str__(self) :
120  outstr = self.var+" :"
121  for rang in self.rangeList :
122  outstr+=" ["+str(rang[0])+".."+str(rang[1])+"]"
123  return outstr
124  def addRange(self,rang) :
125  parsed = rang.split("..")
126  try :
127  parsed[0] = float(parsed[0])
128  except ValueError:
129  parsed[0] = -999999.9
130  try :
131  parsed[1] = float(parsed[1])
132  except ValueError:
133  parsed[1] = 9999999.9
134  self.rangeList.append(parsed[0:2])
135  def addRangeAbs(self,rang) :
136  parsed = rang.split("..")
137  try :
138  parsed[0] = float(parsed[0])
139  except ValueError:
140  parsed[0] = 0.0
141  try :
142  parsed[1] = float(parsed[1])
143  except ValueError:
144  parsed[1] = 9999999.9
145  if (parsed[0] < 0) or (parsed[1] <= 0) :
146  print ("WARNING: The absolute range is not valid: less then zero. Ignore.")
147  return
148  rang = str(parsed[0])+".."+str(parsed[1])
149  rang2 = str(-parsed[1])+".."+str(-parsed[0])
150  self.addRange(rang)
151  self.addRange(rang2)
152 
153 def parsePlots(filename,varCaption) :
154  inputfile=open(filename)
155  parsedPlots = []
156  parsedRestricts = []
157  for line in inputfile :
158  line = line.expandtabs(1)
159  line = line.rstrip("\n")
160  line = line.split("#")[0] #everything after "#" is a comment. just like here :)
161  line = line.split(" ")
162  line[:] = [x for x in line if (len(x) > 0) ] #remove empty elements
163  if len(line) == 0 : #the whole line is a comment, empty, or just spaces
164  continue
165  pe = PlotEntry()
166  if line[0] == "hist" :
167  pe.vars_to_draw.append(line[1])
168  pe.givenmin = float(line[2])
169  pe.givenmax = float(line[3])
170  pe.nbins = int(line[4])
171  pe.logy = int(line[5])
172  pe.display_name = " ".join(line[6:])
173  for var in pe.vars_to_draw :
174  varcap = varCaption(var.lstrip("+"))
175  if (varcap == "") :
176  varcap = var.lstrip("+")
177  pe.axis_captions[var.lstrip("+")]=varcap
178  if (pe.vars_to_draw[0].startswith("+")) and ((pe.givenmin < 0) or (pe.givenmax < 0)) :
179  print ("WARNING: Boundaries are less the zero, while the variable is absolute. Ignore.")
180  pe.givenmin = 0.0
181  pe.givenmax = 0.0
182  print ("Found 1D histogram:",pe.vars_to_draw[0],[pe.givenmin,pe.givenmax])
183  parsedPlots.append(pe)
184  elif line[0] == "prof" :
185  pe.vars_to_draw.extend(line[1:3])
186  pe.givenmin = float(line[3])
187  pe.givenmax = float(line[4])
188  pe.nbins = int(line[5])
189  pe.logy = int(line[6])
190  pe.display_name = " ".join(line[7:])
191  pe.profile = True
192  for var in pe.vars_to_draw :
193  varcap = varCaption(var.lstrip("+"))
194  if (varcap == "") :
195  varcap = var.lstrip("+")
196  pe.axis_captions[var.lstrip("+")]=varcap
197  if (pe.vars_to_draw[0].startswith("+")) and ((pe.givenmin < 0) or (pe.givenmax < 0)) :
198  print ("WARNING: Boundaries are less the zero, while the variable is absolute. Ignore.")
199  pe.givenmin = 0.0
200  pe.givenmax = 0.0
201  print ("Found 1D profile:",pe.vars_to_draw[1],"vs",pe.vars_to_draw[0],[pe.givenmin,pe.givenmax])
202  parsedPlots.append(pe)
203  elif line[0] == "hist2d" :
204  pe = PlotEntry()
205  pe.vars_to_draw.extend(line[1:3])
206  pe.givenmin = 0
207  pe.givenmax = 0
208  pe.nbins = [int(line[3]), int(line[4])]
209  pe.logy = 0
210  pe.display_name = " ".join(line[5:])
211  pe.i2d = True
212  for var in pe.vars_to_draw :
213  varcap = varCaption(var.lstrip("+"))
214  if (varcap == "") :
215  varcap = var.lstrip("+")
216  pe.axis_captions[var.lstrip("+")]=varcap
217  print ("Found 2D histogram:",pe.vars_to_draw)
218  parsedPlots.append(pe)
219  elif line[0] == "prof2d" :
220  pe.vars_to_draw.extend(line[1:4])
221  pe.givenmin = 0
222  pe.givenmax = 0
223  pe.nbins = [int(line[4]), int(line[5])]
224  pe.logy = 0
225  pe.display_name = " ".join(line[6:])
226  pe.profile = True
227  pe.i2d = True
228  for var in pe.vars_to_draw :
229  varcap = varCaption(var.lstrip("+"))
230  if (varcap == "") :
231  varcap = var.lstrip("+")
232  pe.axis_captions[var.lstrip("+")]=varcap
233  print ("Found 2D profile:",pe.vars_to_draw[2],"vs",pe.vars_to_draw[0:2])
234  parsedPlots.append(pe)
235  elif line[0] == "restrict" :
236  re = RestrictEntry()
237  abs = False
238  if line[1].startswith("+") :
239  abs = True
240  line[1] = line[1][1:]
241  re.var = line[1]
242  for rang in line[2:] :
243  if abs :
244  re.addRangeAbs(rang)
245  else :
246  re.addRange(rang)
247  if (len(parsedPlots) > 0) : #there already was a plot, adding restriction to it
248  rstrict = parsedPlots[-1].restricts #the last parsed plot
249  else : #no plots yet. this is a global restriction
250  rstrict = parsedRestricts
251  for rech in rstrict :
252  if (rech.var == re.var) : #there is already a restriction on a given variable. just add ranges
253  rech.rangeList += re.rangeList
254  re.rangeList = []
255  if (len(re.rangeList) > 0) : #no restriction for this variable yet. add it.
256  print ("A restriction found for variable",str(re))
257  rstrict.append(re)
258  elif line[0] == "axisname" :
259  if (len(parsedPlots) == 0) : #no plots yet. drop the name
260  print ("WARNING: axisname shouldn't be before plots")
261  continue
262  parsedPlots[-1].axis_captions[line[1].lstrip("+")] = " ".join(line[2:]).replace("%","#")
263  else :
264  print ("WARNING: unknown key:", line[0])
265  continue
266  for pe in parsedPlots : #apply global restrictions on every plot
267  for re in parsedRestricts :
268  for rech in pe.restricts :
269  if (rech.var == re.var) :
270  rech.rangeList += re.rangeList
271  re.rangeList = []
272  if (len(re.rangeList) > 0) :
273  pe.restricts.append(re)
274  return parsedPlots
275 
276 def createPlots(plotopts,rootopts) :
277  from ROOT import TH1D, TProfile,TH2D,TProfile2D
278  plots = {}
279  #creating histos
280  for plotopt in plotopts :
281  plots[plotopt] = {}
282  for rootopt in rootopts :
283  if (plotopt.profile) :
284  if (plotopt.i2d) :
285  plot = TProfile2D(str(hash(plotopt))+str(hash(rootopt)),plotopt.display_name,plotopt.nbins[0], 0,0,plotopt.nbins[1], 0,0)
286  else:
287  plot = TProfile(str(hash(plotopt))+str(hash(rootopt)),plotopt.display_name,plotopt.nbins, 0,0)
288  else :
289  if (plotopt.i2d) :
290  plot = TH2D(str(hash(plotopt))+str(hash(rootopt)),plotopt.display_name,plotopt.nbins[0], 0,0,plotopt.nbins[1], 0,0)
291  else :
292  plot = TH1D(str(hash(plotopt))+str(hash(rootopt)),plotopt.display_name,plotopt.nbins, 0,0)
293  plot.SetBuffer(1000000)
294  plots[plotopt][rootopt] = plot
295  return plots
296 
297 def fillPlots(plots,plotopts,rootopts,eventVal) :
298  listmin = {}
299  listmax = {}
300  listmin2 = {}
301  listmax2 = {}
302  for plotopt in plotopts :
303  listmin[plotopt] = 99999.9
304  listmax[plotopt] = -99999.9
305  listmin2[plotopt] = 99999.9
306  listmax2[plotopt] = -99999.9
307  for rootopt in rootopts :
308  for event in rootopt.tree :
309  for plotopt in plotopts :
310  inrange = True
311  # deal with restrictions
312  if (len(plotopt.restricts) > 0) : #there are restricts for this plot
313  for rest in plotopt.restricts :
314  eventval = eventVal(event,rest.var) #first try to find in the provided aliases
315  if (eventval == "False") :
316  try: #then try the event itself
317  eventval = event.__getattr__(rest.var)
318  except AttributeError: #nothing found
319  print ("ERROR: Non-existent variable in plot restrict:", rest.var)
320  import sys
321  sys.exit(1)
322  if not rest.checkVar(eventval) : #variable is not in the range list
323  inrange = False
324  break
325  if (len(rootopt.restricts) > 0) : #there are restricts for this rootfile
326  for rest in rootopt.restricts :
327  eventval = eventVal(event,rest.var) #first try to find in the provided aliases
328  if (eventval == "False") :
329  try: #then try the event itself
330  eventval = event.__getattr__(rest.var)
331  except Exception: #nothing found
332  print ("ERROR: Non-existent variable in rootfile restrict:", rest.var)
333  import sys
334  sys.exit(1)
335  if not rest.checkVar(eventval) : #variable is not in the range list
336  inrange = False
337  break
338  if (not inrange) :
339  continue #this event in this plot is outside restriction
340  plot = plots[plotopt][rootopt]
341  plotvars = plotopt.vars_to_draw
342  eventvals = []
343  # extracting values from root
344  for plotvar in plotvars : # one for hist1D, two for hist2D and prof1D, three for prof2D
345  sign = 1
346  locvar = plotvar
347  if plotvar.startswith("+") :
348  locvar = plotvar.lstrip("+")
349  sign = -1
350  eventval = eventVal(event,locvar) #first try to find in the provided aliases
351  if (eventval == "False") :
352  try: #then try the event itself
353  eventval = event.__getattr__(locvar)
354  except AttributeError: #nothing found
355  print ("ERROR: Non-existent variable:", locvar)
356  import sys
357  sys.exit(1)
358  if (eventval < 0) :
359  eventval *= sign
360  eventvals.append(eventval)
361  if (plotopt.profile) : #profile
362  if (plotopt.i2d) :
363  plot.Fill(eventvals[0],eventvals[1],eventvals[2])
364  else :
365  plot.Fill(eventvals[0],eventvals[1])
366  else : #hist
367  if (plotopt.i2d) :
368  plot.Fill(eventvals[0],eventvals[1])
369  else :
370  plot.Fill(eventvals[0])
371  # set limits. we pick the limits closest to the given (if provided)
372  if (eventvals[0] < plotopt.givenmax) or (plotopt.givenmin == plotopt.givenmax) :
373  listmax[plotopt] = max(listmax[plotopt], eventvals[0])
374  if (eventvals[0] > plotopt.givenmin) or (plotopt.givenmin == plotopt.givenmax) :
375  listmin[plotopt] = min(listmin[plotopt], eventvals[0])
376  if (plotopt.i2d) :
377  if (eventvals[1] < plotopt.givenmax) or (plotopt.givenmin == plotopt.givenmax) :
378  listmax2[plotopt] = max(listmax2[plotopt], eventvals[1])
379  if (eventvals[1] > plotopt.givenmin) or (plotopt.givenmin == plotopt.givenmax) :
380  listmin2[plotopt] = min(listmin2[plotopt], eventvals[1])
381  #eye candy
382  for plotopt in plotopts :
383  if (plotopt.i2d) :
384  pass #no "markers" for 2d stuff
385  else :
386  plot = plots[plotopt][rootopt]
387  plot.SetLineColor(rootopt.color)
388  plot.SetLineWidth(rootopt.thickness)
389  if rootopt.markerstyle > 0 :
390  plot.SetMarkerStyle(rootopt.markerstyle)
391  else :
392  plot.SetMarkerStyle(1)
393  plot.SetFillColor(rootopt.color)
394  #fillers[hname] = n
395  plot.SetMarkerSize(rootopt.markersize)
396  plot.SetMarkerColor(rootopt.color)
397  #setting limits & emptying buffer
398  for plotopt in plotopts :
399  for plot in plots[plotopt].itervalues() :
400  plot.GetXaxis().SetLimits(listmin[plotopt],listmax[plotopt])
401  if (plotopt.i2d) :
402  plot.GetYaxis().SetLimits(listmin2[plotopt],listmax2[plotopt])
403  plot.BufferEmpty(1)
404 
405 def dividePlots(plots,rootopt1) :
406  for singplot in plots.itervalues() :
407  plot1 = singplot.pop(rootopt1)
408  plot1.Sumw2()
409  for plot in singplot.itervalues() :
410  plot.Sumw2()
411  plot.Divide(plot1)
412  del plot1
413 
414 def savePlots(plots,output):
415  from ROOT import TFile
416 
417  rootfile = TFile(output,"RECREATE")
418 
419  for plotopt, pls in plots.iteritems() :
420  rootfile.cd(output+":/")
421  rootfile.mkdir("_".join(plotopt.vars_to_draw)+"/")
422  rootfile.cd(output+":/"+"_".join(plotopt.vars_to_draw)+"/")
423  for rootopt, plot in pls.iteritems() :
424  plot.Write("_".join(plotopt.vars_to_draw))
425  rootfile.Close
426 
427 def drawPlots(plots,plotopts,rootopts,output,optzero,optmean,opth,optw) :
428  from ROOT import TPostScript, TCanvas, TLegend
429  from ROOT import gROOT, gStyle, gPad
430 
431  gROOT.Reset()
432  gROOT.SetStyle("Plain")
433  gStyle.SetOptStat(0)
434  gStyle.SetPalette(1)
435 
436  leg = TLegend(0.54,0.71,0.9,0.9)
437 
438  leg.SetLineColor(1)
439  leg.SetLineStyle(1)
440  leg.SetLineWidth(1)
441  leg.SetFillColor(10)
442  leg.SetFillStyle(0)
443  leg.SetBorderSize(0)
444 
445 
446  if output != "DISPLAY" :
447  ps = TPostScript(output,111)
448  ps.NewPage()
449  canv = TCanvas( 'c1', "Validation Plot Viewer",600,800)
450  canv.Divide(opth, optw)
451  maxperlist = opth * optw
452 
453  #current pad
454  num = 0
455  #for stupid drawing system
456  legends = []
457 
458  #drawing hists
459  for plotopt in plotopts :
460  print ("Drawing",plotopt.display_name)
461  num += 1
462  if (num > maxperlist and output != "DISPLAY") : #end of a current PS page
463  ps.NewPage()
464  print ("new page")
465  num = 1
466  canv.cd(num)
467  gPad.SetLogy(plotopt.logy)
468  leg.Clear()
469 
470  entries = {}
471  valuemax = -999999.9
472  entryZ = 0
473 
474  for rootopt in rootopts : #get the max entries
475  entries[rootopt] = plots[plotopt][rootopt].GetEntries()
476  if (plots[plotopt][rootopt].GetEntries() > entryZ) :
477  entryZ = plots[plotopt][rootopt].GetEntries()
478 
479  for rootopt in rootopts : #get the max entries
480  plot = plots[plotopt][rootopt]
481  if (plotopt.profile) :
482  print (rootopt.legendname,"is a profile: no need to scale")
483  else :
484  if not (entries[rootopt] == 0) :
485  print ("scaling",rootopt.legendname,"to",entryZ/entries[rootopt])
486  plot.Scale(entryZ/entries[rootopt])
487  else :
488  print (rootopt.legendname,"is an empty hist, no scale")
489 
490  for rootopt in rootopts : #get the highest peak
491  if (plots[plotopt][rootopt].GetMaximum() > valuemax) :
492  valuemax = plots[plotopt][rootopt].GetMaximum()
493  entryZ = plots[plotopt][rootopt].GetEntries()
494 
495  sameDrawOpt = ""
496  #now we plot all fillers, as otherwise they will render invisible everything behind them
497  for rootopt in rootopts :
498  if (rootopt.markerstyle > 0) : #not filler
499  continue
500  plot = plots[plotopt][rootopt]
501  print ("Drawing filler from",rootopt.legendname)
502  if optzero :
503  if (plotopt.logy == 1) :
504  plot.SetMinimum(1.0)
505  else :
506  plot.SetMinimum(0.0)
507  plot.SetMaximum(valuemax * 1.1)
508  plot.GetXaxis().SetTitle(plotopt.axis_captions[plotopt.vars_to_draw[0].lstrip("+")])
509  if len(plotopt.vars_to_draw) > 1 :
510  plot.GetYaxis().SetTitle(plotopt.axis_captions[plotopt.vars_to_draw[1].lstrip("+")])
511  if (plotopt.i2d) :
512  plot.Draw("CONT4Z "+sameDrawOpt)
513  else :
514  plot.Draw(rootopt.drawopt+sameDrawOpt)
515  sameDrawOpt = " SAME"
516  #plot the rest & fill the legend in the normal order
517  for rootopt in rootopts :
518  plot = plots[plotopt][rootopt]
519  prname = rootopt.legendname
520  if optmean and (not plotopt.profile):
521  prname += " (mean: "+("%.4f" %plot.GetMean())+")"
522  leg.AddEntry(plot,prname,"L")
523  if (rootopt.markerstyle == 0) : #filler
524  continue #fillers are already drawn
525  print ("Drawing plot from",rootopt.legendname)
526  if optzero :
527  if (plotopt.logy == 1) :
528  plot.SetMinimum(1.0)
529  else :
530  plot.SetMinimum(0.0)
531  plot.SetMaximum(valuemax * 1.1)
532  plot.GetXaxis().SetTitle(plotopt.axis_captions[plotopt.vars_to_draw[0].lstrip("+")])
533  if len(plotopt.vars_to_draw) > 1 :
534  plot.GetYaxis().SetTitle(plotopt.axis_captions[plotopt.vars_to_draw[1].lstrip("+")])
535  if (plotopt.i2d) :
536  plot.Draw("CONT4Z "+sameDrawOpt)
537  else :
538  plot.Draw(rootopt.drawopt+sameDrawOpt)
539  sameDrawOpt = " SAME"
540  if not plotopt.i2d:
541  legends.append(leg.Clone())
542  legends[len(legends)-1].Draw()
543  canv.Update()
544  if output != "DISPLAY" :
545  canv.Close()
546  ps.Close()
547  return canv,legends
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
LArG4PlottingScript.drawPlots
def drawPlots(plots, plotopts, rootopts, output, optzero, optmean, opth, optw)
Definition: LArG4PlottingScript.py:427
LArG4PlottingScript.PlotEntry.vars_to_draw
vars_to_draw
Definition: LArG4PlottingScript.py:99
max
#define max(a, b)
Definition: cfImp.cxx:41
LArG4PlottingScript.RootFile.legendname
legendname
Definition: LArG4PlottingScript.py:14
LArG4PlottingScript.RestrictEntry.var
var
Definition: LArG4PlottingScript.py:112
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LArG4PlottingScript.RestrictEntry.__str__
def __str__(self)
Definition: LArG4PlottingScript.py:119
LArG4PlottingScript.RootFile.__init__
def __init__(self)
Definition: LArG4PlottingScript.py:8
LArG4PlottingScript.RootFile
Definition: LArG4PlottingScript.py:7
LArG4PlottingScript.RestrictEntry.__init__
def __init__(self)
Definition: LArG4PlottingScript.py:111
TProfile2D
Definition: rootspy.cxx:531
TH1D
Definition: rootspy.cxx:342
LArG4PlottingScript.RestrictEntry.addRangeAbs
def addRangeAbs(self, rang)
Definition: LArG4PlottingScript.py:135
LArG4PlottingScript.fillPlots
def fillPlots(plots, plotopts, rootopts, eventVal)
Definition: LArG4PlottingScript.py:297
LArG4PlottingScript.RootFile.markersize
markersize
Definition: LArG4PlottingScript.py:13
LArG4PlottingScript.RootFile.thickness
thickness
Definition: LArG4PlottingScript.py:11
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
LArG4PlottingScript.PlotEntry.__init__
def __init__(self)
Definition: LArG4PlottingScript.py:98
LArG4PlottingScript.RootFile.restricts
restricts
Definition: LArG4PlottingScript.py:16
LArG4PlottingScript.RestrictEntry.addRange
def addRange(self, rang)
Definition: LArG4PlottingScript.py:124
LArG4PlottingScript.RootFile.markerstyle
markerstyle
Definition: LArG4PlottingScript.py:12
LArG4PlottingScript.PlotEntry
Definition: LArG4PlottingScript.py:97
LArG4PlottingScript.savePlots
def savePlots(plots, output)
Definition: LArG4PlottingScript.py:414
LArG4PlottingScript.RestrictEntry
Definition: LArG4PlottingScript.py:110
LArG4PlottingScript.PlotEntry.givenmax
givenmax
Definition: LArG4PlottingScript.py:102
TH2D
Definition: rootspy.cxx:430
LArG4PlottingScript.PlotEntry.axis_captions
axis_captions
Definition: LArG4PlottingScript.py:100
LArG4PlottingScript.parsePlots
def parsePlots(filename, varCaption)
Definition: LArG4PlottingScript.py:153
min
#define min(a, b)
Definition: cfImp.cxx:40
LArG4PlottingScript.dividePlots
def dividePlots(plots, rootopt1)
Definition: LArG4PlottingScript.py:405
LArG4PlottingScript.PlotEntry.i2d
i2d
Definition: LArG4PlottingScript.py:107
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
LArG4PlottingScript.PlotEntry.givenmin
givenmin
Definition: LArG4PlottingScript.py:101
LArG4PlottingScript.PlotEntry.logy
logy
Definition: LArG4PlottingScript.py:104
TProfile
Definition: rootspy.cxx:515
LArG4PlottingScript.PlotEntry.display_name
display_name
Definition: LArG4PlottingScript.py:105
LArG4PlottingScript.createPlots
def createPlots(plotopts, rootopts)
Definition: LArG4PlottingScript.py:276
LArG4PlottingScript.defaultRoots
def defaultRoots(args)
Definition: LArG4PlottingScript.py:78
LArG4PlottingScript.PlotEntry.profile
profile
Definition: LArG4PlottingScript.py:106
Trk::open
@ open
Definition: BinningType.h:40
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
generate::GetEntries
double GetEntries(TH1D *h, int ilow, int ihi)
Definition: rmsFrac.cxx:20
LArG4PlottingScript.RootFile.color
color
Definition: LArG4PlottingScript.py:10
LArG4PlottingScript.parseRoots
def parseRoots(filename)
Definition: LArG4PlottingScript.py:18
python.Bindings.itervalues
itervalues
Definition: Control/AthenaPython/python/Bindings.py:807
str
Definition: BTagTrackIpAccessor.cxx:11
LArG4PlottingScript.RootFile.drawopt
drawopt
Definition: LArG4PlottingScript.py:15
LArG4PlottingScript.PlotEntry.restricts
restricts
Definition: LArG4PlottingScript.py:108
LArG4PlottingScript.RootFile.filename
filename
Definition: LArG4PlottingScript.py:9
readCCLHist.float
float
Definition: readCCLHist.py:83
LArG4PlottingScript.RestrictEntry.rangeList
rangeList
Definition: LArG4PlottingScript.py:113
LArG4PlottingScript.RestrictEntry.checkVar
def checkVar(self, value)
Definition: LArG4PlottingScript.py:114
LArG4PlottingScript.PlotEntry.nbins
nbins
Definition: LArG4PlottingScript.py:103