CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
generateEDF.LumiInfo Class Reference

LumiInfo Class

More...

Inheritance diagram for generateEDF.LumiInfo:

Public Member Functions

def __init__ (self, line)
 
def __str__ (self)
 
def deadtime (self)
 
def fixXingInfo (self)
 

Public Attributes

 aveInstLum
 
 badXingInfo
 
 delivered
 
 events
 
 instLums
 
 key
 
 keyString
 
 lumi
 
 numXings
 
 recorded
 
 run
 
 totInstLum
 
 xingInfo
 

Detailed Description

LumiInfo Class

Definition at line 20 of file generateEDF.py.

Constructor & Destructor Documentation

def generateEDF.LumiInfo.__init__ (   self,
  line 
)

Definition at line 25 of file generateEDF.py.

25  def __init__ (self, line):
26  self.totInstLum = 0.
27  self.aveInstLum = 0.
28  self.numXings = 0
29  self.instLums = []
30  self.events = []
31  self.xingInfo = False
32  self.badXingInfo = False
33  pieces = sepRE.split (line.strip())
34  size = len (pieces)
35  if size % 2:
36  raise RuntimeError("Odd number of pieces")
37  if size < 4:
38  raise RuntimeError("Not enough pieces")
39  try:
40  self.run = int (pieces[0])
41  self.lumi = int (pieces[1])
42  self.delivered = float (pieces[2])
43  self.recorded = float (pieces[3])
44  except:
45  raise RuntimeError("Pieces not right format")
46  if size > 4:
47  try:
48  for xing, lum in zip (pieces[4::2],pieces[5::2]):
49  xing = int (xing)
50  lum = float (lum)
51  self.instLums.append( (xing, lum) )
52  self.totInstLum += lum
53  self.numXings += 1
54  except:
55  raise RuntimeError("Inst Lumi Info malformed")
56  self.aveInstLum = self.totInstLum / (self.numXings)
57  self.xingInfo = True
58  self.key = (self.run, self.lumi)
59  self.keyString = self.key.__str__()
60 
61 
def __init__(self, line)
Definition: generateEDF.py:25

Member Function Documentation

def generateEDF.LumiInfo.__str__ (   self)

Definition at line 88 of file generateEDF.py.

References generateEDF.LumiInfo.deadtime(), Level1TriggerScalers.deadtime(), TriggerScalersRaw_v3.deadtime, HCAL_HLX::TRIGGER_LUMI_SEGMENT.deadtime, generateEDF.LumiInfo.delivered, generateEDF.LumiInfo.lumi, DQMNet::CoreObject.lumi, ScalersEventRecordRaw_v1.lumi, ScalersEventRecordRaw_v2.lumi, ScalersEventRecordRaw_v3.lumi, ScalersEventRecordRaw_v4.lumi, ScalersEventRecordRaw_v5.lumi, ScalersEventRecordRaw_v6.lumi, generateEDF.LumiInfo.numXings, RPCRunIOV::RunIOV_Item.run, TB06Reco.run, TB06RecoH2.run, RPCDQMObject.run, generateEDF.LumiInfo.run, EfficiencyPlotter.run, WZInterestingEventSelector::event.run, MuonRecoTest.run, DTResolutionAnalysisTest.run, BeamSpotRcdReader::theBSfromDB.run, DTBlockedROChannelsTest.run, MatacqProducer::MatacqEventId.run, DTDataIntegrityTest.run, DTChamberEfficiencyTest.run, DTResolutionTest.run, ME::Header.run, DTEfficiencyTest.run, personalPlayback.Playback.run, HitEff.run, DQMNet::CoreObject.run, MatrixUtil.InputInfo.run, DTLocalTriggerBaseTest.run, cond::RunInfo_t.run, SiPixelErrorEstimation.run, personalPlayback.FrameworkJob.run, and generateEDF.LumiInfo.totInstLum.

88  def __str__ (self):
89  return "%6d, %4d: %6.1f (%4.1f%%) %4.2f (%3d)" % \
90  (self.run,
91  self.lumi,
92  self.delivered,
93  self.deadtime(),
94  self.totInstLum,
95  self.numXings)
96 
97 
def generateEDF.LumiInfo.deadtime (   self)

Definition at line 82 of file generateEDF.py.

References generateEDF.LumiInfo.delivered, and generateEDF.LumiInfo.recorded.

Referenced by generateEDF.LumiInfo.__str__().

82  def deadtime (self):
83  if not self.delivered:
84  return 1
85  return 1 - (self.recorded / self.delivered)
86 
87 
def generateEDF.LumiInfo.fixXingInfo (   self)

Definition at line 62 of file generateEDF.py.

References generateEDF.LumiInfo.aveInstLum, generateEDF.LumiInfo.badXingInfo, generateEDF.LumiInfo.delivered, generateEDF.LumiInfo.keyString, generateEDF.LumiInfo.numXings, RPCRunIOV::RunIOV_Item.run, TB06Reco.run, TB06RecoH2.run, RPCDQMObject.run, generateEDF.LumiInfo.run, EfficiencyPlotter.run, WZInterestingEventSelector::event.run, MuonRecoTest.run, DTResolutionAnalysisTest.run, BeamSpotRcdReader::theBSfromDB.run, DTBlockedROChannelsTest.run, MatacqProducer::MatacqEventId.run, DTDataIntegrityTest.run, DTChamberEfficiencyTest.run, DTResolutionTest.run, ME::Header.run, DTEfficiencyTest.run, personalPlayback.Playback.run, HitEff.run, DQMNet::CoreObject.run, MatrixUtil.InputInfo.run, DTLocalTriggerBaseTest.run, cond::RunInfo_t.run, SiPixelErrorEstimation.run, personalPlayback.FrameworkJob.run, generateEDF.LumiInfo.totInstLum, and generateEDF.LumiInfo.xingInfo.

62  def fixXingInfo (self):
63  if self.numXings:
64  # You shouldn't try and fix an event if it already has
65  # xing information.
66  raise RuntimeError("This event %s already has Xing information" \
67  % self.keyString)
68  if self.run > LumiInfo.lastSingleXingRun:
69  # this run may have more than one crossing. I don't know
70  # how to fix this.
71  self.badXingInfo = True
72  return False
73  self.numXings = 1
74  xing = 1
75  self.aveInstLum = self.totInstLum = lum = \
76  self.delivered / LumiInfo.lumiSectionLength
77  self.instLums.append( (xing, lum) )
78  self.xingInfo = True
79  return True
80 
81 
def fixXingInfo(self)
Definition: generateEDF.py:62

Member Data Documentation

generateEDF.LumiInfo.aveInstLum

Definition at line 27 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.badXingInfo

Definition at line 32 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.delivered
generateEDF.LumiInfo.events
generateEDF.LumiInfo.instLums

Definition at line 29 of file generateEDF.py.

generateEDF.LumiInfo.key
generateEDF.LumiInfo.keyString

Definition at line 59 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.lumi

Definition at line 41 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__().

generateEDF.LumiInfo.numXings
generateEDF.LumiInfo.recorded

Definition at line 43 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.deadtime().

generateEDF.LumiInfo.run
generateEDF.LumiInfo.totInstLum
generateEDF.LumiInfo.xingInfo