CMS 3D CMS Logo

generateEDF.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 
3 from __future__ import print_function
4 from __future__ import division
5 from builtins import zip
6 from builtins import object
7 from past.utils import old_div
8 from builtins import range
9 import sys
10 import re
11 import optparse
12 from pprint import pprint
13 import array
14 import ROOT
15 import math
16 import six
17 
18 sepRE = re.compile (r'[\s,;:]+')
19 nonSpaceRE = re.compile (r'\S')
20 
21 
26 
27 class LumiInfo (object):
28 
29  lastSingleXingRun = 136175
30  lumiSectionLength = 23.310779
31 
32  def __init__ (self, line):
33  self.totInstLum = 0.
34  self.aveInstLum = 0.
35  self.numXings = 0
36  self.instLums = []
37  self.events = []
38  self.xingInfo = False
39  self.badXingInfo = False
40  pieces = sepRE.split (line.strip())
41  size = len (pieces)
42  if size % 2:
43  raise RuntimeError("Odd number of pieces")
44  if size < 4:
45  raise RuntimeError("Not enough pieces")
46  try:
47  self.run = int (pieces[0])
48  self.lumi = int (pieces[1])
49  self.delivered = float (pieces[2])
50  self.recorded = float (pieces[3])
51  except:
52  raise RuntimeError("Pieces not right format")
53  if size > 4:
54  try:
55  for xing, lum in zip (pieces[4::2],pieces[5::2]):
56  xing = int (xing)
57  lum = float (lum)
58  self.instLums.append( (xing, lum) )
59  self.totInstLum += lum
60  self.numXings += 1
61  except:
62  raise RuntimeError("Inst Lumi Info malformed")
63  self.aveInstLum = old_div(self.totInstLum, (self.numXings))
64  self.xingInfo = True
65  self.key = (self.run, self.lumi)
66  self.keyString = self.key.__str__()
67 
68 
69  def fixXingInfo (self):
70  if self.numXings:
71  # You shouldn't try and fix an event if it already has
72  # xing information.
73  raise RuntimeError("This event %s already has Xing information" \
74  % self.keyString)
75  if self.run > LumiInfo.lastSingleXingRun:
76  # this run may have more than one crossing. I don't know
77  # how to fix this.
78  self.badXingInfo = True
79  return False
80  self.numXings = 1
81  xing = 1
82  self.aveInstLum = self.totInstLum = lum = \
83  old_div(self.delivered, LumiInfo.lumiSectionLength)
84  self.instLums.append( (xing, lum) )
85  self.xingInfo = True
86  return True
87 
88 
89  def deadtime (self):
90  if not self.delivered:
91  return 1
92  return 1 - (old_div(self.recorded, self.delivered))
93 
94 
95  def __str__ (self):
96  return "%6d, %4d: %6.1f (%4.1f%%) %4.2f (%3d)" % \
97  (self.run,
98  self.lumi,
99  self.delivered,
100  self.deadtime(),
101  self.totInstLum,
102  self.numXings)
103 
104 
105 
110 
111 class LumiInfoCont (dict):
112 
113  def __init__ (self, filename, **kwargs):
114  print("loading luminosity information from '%s'." % filename)
115  source = open (filename, 'r')
116  self.minMaxKeys = ['totInstLum', 'aveInstLum', 'numXings',
117  'delivered', 'recorded']
118  self._min = {}
119  self._max = {}
120  self.totalRecLum = 0.
121  self.xingInfo = False
122  self.allowNoXing = kwargs.get ('ignore')
123  self.noWarnings = kwargs.get ('noWarnings')
124  self.minRun = 0
125  self.maxRun = 0
126  self.minIntLum = 0
127  self.maxIntLum = 0
128 
129  for key in self.minMaxKeys:
130  self._min[key] = -1
131  self._max[key] = 0
132  for line in source:
133  try:
134  lumi = LumiInfo (line)
135  except:
136  continue
137  self[lumi.key] = lumi
138  self.totalRecLum += lumi.recorded
139  if not self.xingInfo and lumi.xingInfo:
140  self.xingInfo = True
141  if lumi.xingInfo:
142  #print "yes", lumi.keyString
143  if not self.xingInfo:
144  print("huh?")
145  for key in self.minMaxKeys:
146  val = getattr (lumi, key)
147  if val < self._min[key] or self._min[key] < 0:
148  self._min[key] = val
149  if val > self._max[key] or not self._max[key]:
150  self._max[key] = val
151  source.close()
152 
157  self.invunits = 'nb'
158  lumFactor = 1e3
159  if self.totalRecLum > 1e9:
160  lumFactor = 1e9
161  self.invunits = 'fb'
162  elif self.totalRecLum > 1e6:
163  lumFactor = 1e6
164  self.invunits = 'pb'
165  # use lumFactor to make everything consistent
166  #print "units", self.invunits, "factor", lumFactor
167  self.totalRecLum /= lumFactor
168  for lumis in self.values():
169  lumis.delivered /= lumFactor
170  lumis.recorded /= lumFactor
171  # Probably want to rename this next subroutine, but I'll leave
172  # it alone for now...
173  self._integrateContainer()
174 
175 
176 
177  def __str__ (self):
178  retval = 'run, lum del ( dt ) inst (#xng)\n'
179  for key, value in sorted (six.iteritems(self)):
180  retval += "%s\n" % value
181  return retval
182 
183 
184  def min (self, key):
185  return self._min[key]
186 
187 
188  def max (self, key):
189  return self._max[key]
190 
191 
192  def keys (self):
193  return sorted (dict.keys (self))
194 
195 
196  def iteritems (self):
197  return sorted (dict.iteritems (self))
198 
199 
201  # calculate numbers for recorded integrated luminosity
202  total = 0.
203  for key, lumi in six.iteritems(self):
204  total += lumi.recorded
205  lumi.totalRecorded = total
206  lumi.fracRecorded = old_div(total, self.totalRecLum)
207  # calculate numbers for average xing instantaneous luminosity
208  if not self.xingInfo:
209  # nothing to do here
210  return
211  xingKeyList = []
212  maxAveInstLum = 0.
213  for key, lumi in six.iteritems(self):
214  if not lumi.xingInfo and not lumi.fixXingInfo():
215  if not self.noWarnings:
216  print("Do not have lumi xing info for %s" % lumi.keyString)
217  if not self.allowNoXing:
218  print("Setting no Xing info flag")
219  self.xingInfo = False
220  return
221  continue
222  xingKeyList.append( (lumi.aveInstLum, key) )
223  if lumi.aveInstLum > maxAveInstLum:
224  maxAveInstLum = lumi.aveInstLum
225  xingKeyList.sort()
226  total = 0.
227  for tup in xingKeyList:
228  lumi = self[tup[1]]
229  total += lumi.recorded
230  lumi.totalAXILrecorded = total
231  lumi.fracAXILrecorded = old_div(total, self.totalRecLum)
232  lumi.fracAXIL = old_div(lumi.aveInstLum, maxAveInstLum)
233 
234 
235 
240 
241 def loadEvents (filename, cont, options):
242  eventsDict = {}
243  print("loading events from '%s'" % filename)
244  events = open (filename, 'r')
245  runIndex, lumiIndex, eventIndex, weightIndex = 0, 1, 2, 3
246  if options.relOrder:
247  lumiIndex, eventIndex = 2,1
248  minPieces = 3
249  totalWeight = 0.
250  if options.weights:
251  minPieces = 4
252  for line in events:
253  pieces = sepRE.split (line.strip())
254  if len (pieces) < minPieces:
255  if nonSpaceRE.search (line):
256  print("skipping", line)
257  continue
258  try:
259  run, lumi, event = int( pieces[runIndex] ), \
260  int( pieces[lumiIndex] ), \
261  int( pieces[eventIndex] )
262  except:
263  continue
264  key = (run, lumi)
265  if key not in cont:
266  if options.ignore:
267  print("Warning, %s is not found in the lumi information" \
268  % key.__str__())
269  continue
270  else:
271  raise RuntimeError("%s is not found in lumi information. Use '--ignoreNoLumiEvents' option to ignore these events and continue." \
272  % key.__str__())
273  if options.edfMode != 'time' and not cont[key].xingInfo:
274  if options.ignore:
275  print("Warning, %s does not have Xing information" \
276  % key.__str__())
277  continue
278  else:
279  raise RuntimeError("%s does not have Xing information. Use '--ignoreNoLumiEvents' option to ignore these events and continue." \
280  % key.__str__())
281  if options.weights:
282  weight = float (pieces[weightIndex])
283  else:
284  weight = 1
285  eventsDict.setdefault( key, []).append( (event, weight) )
286  totalWeight += weight
287  events.close()
288  return eventsDict, totalWeight
289 
290 
291 def makeEDFplot (lumiCont, eventsDict, totalWeight, outputFile, options):
292  # make TGraph
293  xVals = [0]
294  yVals = [0]
295  expectedVals = [0]
296  predVals = [0]
297  weight = 0
298  expectedChunks = []
299 
302  if 'time' == options.edfMode:
303  # if we have a minimum run number, clear the lists
304  if lumiCont.minRun or lumiCont.minIntLum:
305  xVals = []
306  yVals = []
307  expectedVals = []
308  predVals = []
309  # loop over events
310  for key, eventList in sorted( six.iteritems(eventsDict) ):
311  usePoints = True
312  # should we add this point?
313  if lumiCont.minRun and lumiCont.minRun > key[0] or \
314  lumiCont.maxRun and lumiCont.maxRun < key[0]:
315  usePoints = False
316  for event in eventList:
317  weight += event[1]
318  if not usePoints:
319  continue
320  factor = old_div(weight, totalWeight)
321  try:
322  intLum = lumiCont[key].totalRecorded
323  except:
324  raise RuntimeError("key %s not found in lumi information" \
325  % key.__str__())
326  if lumiCont.minIntLum and lumiCont.minIntLum > intLum or \
327  lumiCont.maxIntLum and lumiCont.maxIntLum < intLum:
328  continue
329  lumFrac = old_div(intLum, lumiCont.totalRecLum)
330  xVals.append( lumiCont[key].totalRecorded)
331  yVals.append (factor)
332  expectedVals.append (lumFrac)
333  predVals.append (lumFrac * options.pred)
334  # put on the last point if we aren't giving a maximum run
335  if not lumiCont.maxRun and not lumiCont.maxIntLum:
336  xVals.append (lumiCont.totalRecLum)
337  yVals.append (1)
338  expectedVals.append (1)
339  predVals.append (options.pred)
340 
343  if options.resetExpected:
344  slope = old_div((yVals[-1] - yVals[0]), (xVals[-1] - xVals[0]))
345  print("slope", slope)
346  for index, old in enumerate (expectedVals):
347  expectedVals[index] = yVals[0] + \
348  slope * (xVals[index] - xVals[0])
349 
352  if options.breakExpectedIntLum:
353  breakExpectedIntLum = []
354  for chunk in options.breakExpectedIntLum:
355  pieces = sepRE.split (chunk)
356  try:
357  for piece in pieces:
358  breakExpectedIntLum.append( float(piece) )
359  except:
360  raise RuntimeError("'%s' from '%s' is not a valid float" \
361  % (piece, chunk))
362  breakExpectedIntLum.sort()
363  boundaries = []
364  breakIndex = 0
365  done = False
366  for index, xPos in enumerate (xVals):
367  if xPos > breakExpectedIntLum[breakIndex]:
368  boundaries.append (index)
369  while breakIndex < len (breakExpectedIntLum):
370  breakIndex += 1
371  if breakIndex >= len (breakExpectedIntLum):
372  done = True
373  break
374  # If this next position is different, than
375  # we're golden. Otherwise, let it go through
376  # the loop again.
377  if xPos <= breakExpectedIntLum[breakIndex]:
378  break
379  if done:
380  break
381  # do we have any boundaries?
382  if not boundaries:
383  raise RuntimeError("No values of 'breakExpectedIntLum' are in current range.")
384  # is the first boundary at 0? If not, add 0
385  if boundaries[0]:
386  boundaries.insert (0, 0)
387  # is the last boundary at the end? If not, make the end a
388  # boundary
389  if boundaries[-1] != len (xVals) - 1:
390  boundaries.append( len (xVals) - 1 )
391  rangeList = list(zip (boundaries, boundaries[1:]))
392  for thisRange in rangeList:
393  upper = thisRange[1]
394  lower = thisRange[0]
395  slope = old_div((yVals[upper] - yVals[lower]), \
396  (xVals[upper] - xVals[lower]))
397  print("slope", slope)
398  # now go over the range inclusively
399  pairList = []
400  for index in range (lower, upper + 1):
401  newExpected = yVals[lower] + \
402  slope * (xVals[index] - xVals[lower])
403  pairList.append( (xVals[index], newExpected) )
404  expectedVals[index] = newExpected
405  expectedChunks.append (pairList)
406 
409  elif 'instLum' == options.edfMode or 'instIntLum' == options.edfMode:
410  eventTupList = []
411  if not lumiCont.xingInfo:
412  raise RuntimeError("Luminosity Xing information missing.")
413  for key, eventList in sorted( six.iteritems(eventsDict) ):
414  try:
415  lumi = lumiCont[key]
416  instLum = lumi.aveInstLum
417  fracAXIL = lumi.fracAXILrecorded
418  totalAXIL = lumi.totalAXILrecorded
419  except:
420  raise RuntimeError("key %s not found in lumi information" \
421  % key.__str__())
422  for event in eventList:
423  eventTupList.append( (instLum, fracAXIL, totalAXIL, key,
424  event[0], event[1], ) )
425  eventTupList.sort()
426  for eventTup in eventTupList:
427  weight += eventTup[5]
428  factor = old_div(weight, totalWeight)
429  if 'instLum' == options.edfMode:
430  xVals.append (eventTup[0])
431  else:
432  xVals.append (eventTup[2])
433  yVals.append (factor)
434  expectedVals.append (eventTup[1])
435  predVals.append (eventTup[1] * options.pred)
436  else:
437  raise RuntimeError("It looks like Charles screwed up if you are seeing this.")
438 
439  size = len (xVals)
440  step = int (old_div(math.sqrt(size), 2) + 1)
441  if options.printValues:
442  for index in range (size):
443  print("%8f %8f %8f" % (xVals[index], yVals[index], expectedVals[index]), end=' ')
444  if index > step:
445  denom = xVals[index] - xVals[index - step]
446  numer = yVals[index] - yVals[index - step]
447  if denom:
448  print(" %8f" % (old_div(numer, denom)), end=' ')
449  if 0 == index % step:
450  print(" **", end=' ')
452  print()
453  print()
454 
455  xArray = array.array ('d', xVals)
456  yArray = array.array ('d', yVals)
457  expected = array.array ('d', expectedVals)
458  graph = ROOT.TGraph( size, xArray, yArray)
459  graph.SetTitle (options.title)
460  graph.SetMarkerStyle (20)
461  expectedGraph = ROOT.TGraph( size, xArray, expected)
462  expectedGraph.SetLineColor (ROOT.kRed)
463  expectedGraph.SetLineWidth (3)
464  if options.noDataPoints:
465  expectedGraph.SetLineStyle (2)
466 
467  # run statistical tests
468  if options.weights:
469  print("average weight per event:", old_div(weight, ( size - 1)))
470  maxDistance = ROOT.TMath.KolmogorovTest (size, yArray,
471  size, expected,
472  "M")
473  prob = ROOT.TMath.KolmogorovProb( maxDistance * math.sqrt( size ) )
474 
475  # display everything
476  ROOT.gROOT.SetStyle('Plain')
477  ROOT.gROOT.SetBatch()
478  c1 = ROOT.TCanvas()
479  graph.GetXaxis().SetRangeUser (min (xVals), max (xVals))
480  minValue = min (min(yVals), min(expected))
481  if options.pred:
482  minValue = min (minValue, min (predVals))
483  graph.GetYaxis().SetRangeUser (minValue,
484  max (max(yVals), max(expected), max(predVals)))
485  graph.SetLineWidth (3)
486  if options.noDataPoints:
487  graph.Draw ("AL")
488  else:
489  graph.Draw ("ALP")
490  if 'instLum' == options.edfMode:
491  graph.GetXaxis().SetTitle ("Average Xing Inst. Luminosity (1/ub/s)")
492  graph.GetXaxis().SetRangeUser (0., lumiCont.max('aveInstLum'))
493  else:
494  if 'instIntLum' == options.edfMode:
495  graph.GetXaxis().SetTitle ("Integrated Luminosity - Inst. Lum. Ordered (1/%s)" \
496  % lumiCont.invunits)
497  else:
498  graph.GetXaxis().SetTitle ("Integrated Luminosity (1/%s)" \
499  % lumiCont.invunits)
500  graph.GetYaxis().SetTitle ("Fraction of Events Seen")
501  expectedGraphs = []
502  if expectedChunks:
503  for index, chunk in enumerate (expectedChunks):
504  expectedXarray = array.array ('d', [item[0] for item in chunk])
505  expectedYarray = array.array ('d', [item[1] for item in chunk])
506  expectedGraph = ROOT.TGraph( len(chunk),
507  expectedXarray,
508  expectedYarray )
509  expectedGraph.SetLineWidth (3)
510  if options.noDataPoints:
511  expectedGraph.SetLineStyle (2)
512  if index % 2:
513  expectedGraph.SetLineColor (ROOT.kBlue)
514  else:
515  expectedGraph.SetLineColor (ROOT.kRed)
516  expectedGraph.Draw("L")
517  expectedGraphs.append (expectedGraph)
518  exptectedGraph = expectedGraphs[0]
519  else:
520  expectedGraph.Draw ("L")
521  green = 0
522  if options.pred:
523  predArray = array.array ('d', predVals)
524  green = ROOT.TGraph (size, xArray, predArray)
525  green.SetLineWidth (3)
526  green.SetLineColor (8)
527  green.Draw ('l')
528  legend = ROOT.TLegend(0.15, 0.65, 0.50, 0.85)
529  legend.SetFillStyle (0)
530  legend.SetLineColor(ROOT.kWhite)
531  observed = 'Observed'
532  if options.weights:
533  observed += ' (weighted)'
534  legend.AddEntry(graph, observed,"PL")
535  if options.resetExpected:
536  legend.AddEntry(expectedGraph, "Expected from partial yield","L")
537  else:
538  legend.AddEntry(expectedGraph, "Expected from total yield","L")
539  if options.pred:
540  legend.AddEntry(green, options.predLabel,"L")
541  legend.AddEntry("","D_{stat}=%.3f, N=%d" % (maxDistance, size),"")
542  legend.AddEntry("","P_{KS}=%.3f" % prob,"")
543  legend.Draw()
544 
545  # save file
546  c1.Print (outputFile)
547 
548 
549 
556 
557 if __name__ == '__main__':
558 
561  allowedEDF = ['time', 'instLum', 'instIntLum']
562  parser = optparse.OptionParser ("Usage: %prog [options] lumi.csv events.txt output.png", description='Script for generating EDF curves. See https://twiki.cern.ch/twiki/bin/viewauth/CMS/SWGuideGenerateEDF for more details.')
563  plotGroup = optparse.OptionGroup (parser, "Plot Options")
564  rangeGroup = optparse.OptionGroup (parser, "Range Options")
565  inputGroup = optparse.OptionGroup (parser, "Input Options")
566  modeGroup = optparse.OptionGroup (parser, "Mode Options")
567  plotGroup.add_option ('--title', dest='title', type='string',
568  default = 'Empirical Distribution Function',
569  help = 'title of plot (default %default)')
570  plotGroup.add_option ('--predicted', dest='pred', type='float',
571  default = 0,
572  help = 'factor by which predicted curve is greater than observed')
573  plotGroup.add_option ('--predLabel', dest='predLabel', type='string',
574  default = 'Predicted',
575  help = 'label of predicted in legend')
576  plotGroup.add_option ('--noDataPoints', dest='noDataPoints',
577  action='store_true',
578  help="Draw lines but no points for data")
579  rangeGroup.add_option ('--minRun', dest='minRun', type='int', default=0,
580  help='Minimum run number to consider')
581  rangeGroup.add_option ('--maxRun', dest='maxRun', type='int', default=0,
582  help='Maximum run number to consider')
583  rangeGroup.add_option ('--minIntLum', dest='minIntLum', type='float', default=0,
584  help='Minimum integrated luminosity to consider')
585  rangeGroup.add_option ('--maxIntLum', dest='maxIntLum', type='float', default=0,
586  help='Maximum integrated luminosity to consider')
587  rangeGroup.add_option ('--resetExpected', dest='resetExpected',
588  action='store_true',
589  help='Reset expected from total yield to highest point considered')
590  rangeGroup.add_option ('--breakExpectedIntLum', dest='breakExpectedIntLum',
591  type='string', action='append', default=[],
592  help='Break expected curve into pieces at integrated luminosity boundaries')
593  inputGroup.add_option ('--ignoreNoLumiEvents', dest='ignore',
594  action='store_true',
595  help = 'Ignore (with a warning) events that do not have a lumi section')
596  inputGroup.add_option ('--noWarnings', dest='noWarnings',
597  action='store_true',
598  help = 'Do not print warnings about missing luminosity information')
599  inputGroup.add_option ('--runEventLumi', dest='relOrder',
600  action='store_true',
601  help = 'Parse event list assuming Run, Event #, Lumi# order')
602  inputGroup.add_option ('--weights', dest='weights', action='store_true',
603  help = 'Read fourth column as a weight')
604  modeGroup.add_option ('--print', dest='printValues', action='store_true',
605  help = 'Print X and Y values of EDF plot')
606  modeGroup.add_option ('--runsWithLumis', dest='runsWithLumis',
607  type='string',action='append', default=[],
608  help='Print out run and lumi sections corresponding to integrated luminosities provided and then exits')
609  modeGroup.add_option ('--edfMode', dest='edfMode', type='string',
610  default='time',
611  help="EDF Mode %s (default '%%default')" % allowedEDF)
612  parser.add_option_group (plotGroup)
613  parser.add_option_group (rangeGroup)
614  parser.add_option_group (inputGroup)
615  parser.add_option_group (modeGroup)
616  (options, args) = parser.parse_args()
617 
618  if options.edfMode not in allowedEDF:
619  raise RuntimeError("edfMode (currently '%s') must be one of %s" \
620  % (options.edfMode, allowedEDF))
621 
622  if len (args) != 3 and not (options.runsWithLumis and len(args) >= 1):
623  raise RuntimeError("Must provide lumi.csv, events.txt, and output.png")
624 
625 
626 
629  cont = LumiInfoCont (args[0], **options.__dict__)
630  cont.minRun = options.minRun
631  cont.maxRun = options.maxRun
632  cont.minIntLum = options.minIntLum
633  cont.maxIntLum = options.maxIntLum
634 
635 
639  if options.runsWithLumis:
640  recLumis = []
641  for line in options.runsWithLumis:
642  pieces = sepRE.split (line)
643  for piece in pieces:
644  try:
645  recLumValue = float (piece)
646  except:
647  raise RuntimeError("'%s' in '%s' is not a float" % \
648  (piece, line))
649  if recLumValue <= 0:
650  raise RuntimeError("You must provide positive values for -runsWithLumis ('%f' given)" % recLumValue)
651  recLumis.append (recLumValue)
652  if not recLumis:
653  raise RuntimeError("What did Charles do now?")
654  recLumis.sort()
655  recLumIndex = 0
656  recLumValue = recLumis [recLumIndex]
657  prevRecLumi = 0.
658  done = False
659  for key, lumi in six.iteritems(cont):
660  if prevRecLumi >= recLumValue and recLumValue < lumi.totalRecorded:
661  # found it
662  print("%s contains total recorded lumi %f" % \
663  (key.__str__(), recLumValue))
664  while True:
665  recLumIndex += 1
666  if recLumIndex == len (recLumis):
667  done = True
668  break
669  recLumValue = recLumis [recLumIndex]
670  if prevRecLumi >= recLumValue and recLumValue < lumi.totalRecorded:
671  # found it
672  print("%s contains total recorded lumi %f" % \
673  (key.__str__(), recLumValue))
674  else:
675  break
676  if done:
677  break
678  prevRecLumi = lumi.totalRecorded
679  if recLumIndex < len (recLumis):
680  print("Theses lumis not found: %s" % recLumis[recLumIndex:])
681  sys.exit()
682 
683 
686  if options.edfMode != 'time' and not cont.xingInfo:
687  raise RuntimeError("'%s' does not have Xing info" % args[0])
688  eventsDict, totalWeight = loadEvents (args[1], cont, options)
689  makeEDFplot (cont, eventsDict, totalWeight, args[2], options)
generateEDF.LumiInfoCont.minMaxKeys
minMaxKeys
Definition: generateEDF.py:116
generateEDF.LumiInfoCont.invunits
invunits
Now that everything is setup, switch integrated ## luminosity to more reasonable units.
Definition: generateEDF.py:157
generateEDF.LumiInfoCont.xingInfo
xingInfo
Definition: generateEDF.py:121
generateEDF.LumiInfoCont._min
_min
Definition: generateEDF.py:118
resolutioncreator_cfi.object
object
Definition: resolutioncreator_cfi.py:4
generateEDF.LumiInfoCont.minIntLum
minIntLum
Definition: generateEDF.py:126
generateEDF.LumiInfoCont._integrateContainer
def _integrateContainer(self)
Definition: generateEDF.py:200
generateEDF.LumiInfo.__str__
def __str__(self)
Definition: generateEDF.py:95
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
generateEDF.LumiInfoCont.maxIntLum
maxIntLum
Definition: generateEDF.py:127
generateEDF.LumiInfoCont.noWarnings
noWarnings
Definition: generateEDF.py:123
min
T min(T a, T b)
Definition: MathUtil.h:58
generateEDF.LumiInfo.__init__
def __init__(self, line)
Definition: generateEDF.py:32
generateEDF.LumiInfoCont.max
def max(self, key)
Definition: generateEDF.py:188
generateEDF.LumiInfoCont._max
_max
Definition: generateEDF.py:119
generateEDF.LumiInfoCont.keys
def keys(self)
Definition: generateEDF.py:192
generateEDF.LumiInfo.keyString
keyString
Definition: generateEDF.py:66
generateEDF.LumiInfo.events
events
Definition: generateEDF.py:37
generateEDF.LumiInfoCont.minRun
minRun
Definition: generateEDF.py:124
generateEDF.makeEDFplot
def makeEDFplot(lumiCont, eventsDict, totalWeight, outputFile, options)
Definition: generateEDF.py:291
generateEDF.LumiInfo.instLums
instLums
Definition: generateEDF.py:36
generateEDF.LumiInfo.key
key
Definition: generateEDF.py:65
generateEDF.LumiInfo.numXings
numXings
Definition: generateEDF.py:35
generateEDF.LumiInfo.deadtime
def deadtime(self)
Definition: generateEDF.py:89
generateEDF.LumiInfo.run
run
Definition: generateEDF.py:47
generateEDF.LumiInfoCont.min
def min(self, key)
Definition: generateEDF.py:184
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
generateEDF.LumiInfo.delivered
delivered
Definition: generateEDF.py:49
generateEDF.LumiInfoCont.totalRecLum
totalRecLum
Definition: generateEDF.py:120
generateEDF.LumiInfoCont.__str__
def __str__(self)
Definition: generateEDF.py:177
mps_setup.append
append
Definition: mps_setup.py:85
createfilelist.int
int
Definition: createfilelist.py:10
generateEDF.LumiInfo.totInstLum
totInstLum
Definition: generateEDF.py:33
generateEDF.LumiInfo
Definition: generateEDF.py:27
generateEDF.LumiInfoCont
Definition: generateEDF.py:111
generateEDF.LumiInfo.recorded
recorded
Definition: generateEDF.py:50
generateEDF.LumiInfoCont.__init__
def __init__(self, filename, **kwargs)
Definition: generateEDF.py:113
generateEDF.loadEvents
def loadEvents(filename, cont, options)
Definition: generateEDF.py:241
generateEDF.LumiInfo.badXingInfo
badXingInfo
Definition: generateEDF.py:39
generateEDF.LumiInfoCont.maxRun
maxRun
Definition: generateEDF.py:125
generateEDF.LumiInfoCont.iteritems
def iteritems(self)
Definition: generateEDF.py:196
generateEDF.LumiInfo.xingInfo
xingInfo
Definition: generateEDF.py:38
generateEDF.LumiInfo.aveInstLum
aveInstLum
Definition: generateEDF.py:34
generateEDF.LumiInfo.fixXingInfo
def fixXingInfo(self)
Definition: generateEDF.py:69
generateEDF.LumiInfoCont.allowNoXing
allowNoXing
Definition: generateEDF.py:122
generateEDF.LumiInfo.lumi
lumi
Definition: generateEDF.py:48