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 23 of file generateEDF.py.

Constructor & Destructor Documentation

def generateEDF.LumiInfo.__init__ (   self,
  line 
)

Definition at line 28 of file generateEDF.py.

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

Member Function Documentation

def generateEDF.LumiInfo.__str__ (   self)

Definition at line 91 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, TB06RecoH2.run, TB06Reco.run, RPCDQMObject.run, generateEDF.LumiInfo.run, EfficiencyPlotter.run, WZInterestingEventSelector::event.run, Point.run, MuonRecoTest.run, DTResolutionAnalysisTest.run, BeamSpotRcdReader::theBSfromDB.run, MatacqProducer::MatacqEventId.run, DTBlockedROChannelsTest.run, DTDataIntegrityTest.run, DTChamberEfficiencyTest.run, DTResolutionTest.run, ME::Header.run, DTEfficiencyTest.run, personalPlayback.Playback.run, DQMNet::CoreObject.run, MatrixUtil.InputInfo.run, DTLocalTriggerBaseTest.run, HitEff.run, cond::RunInfo_t.run, SiPixelErrorEstimation.run, personalPlayback.FrameworkJob.run, and generateEDF.LumiInfo.totInstLum.

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

Definition at line 85 of file generateEDF.py.

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

Referenced by generateEDF.LumiInfo.__str__().

85  def deadtime (self):
86  if not self.delivered:
87  return 1
88  return 1 - (self.recorded / self.delivered)
89 
90 
def generateEDF.LumiInfo.fixXingInfo (   self)

Definition at line 65 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, Point.run, MuonRecoTest.run, DTResolutionAnalysisTest.run, BeamSpotRcdReader::theBSfromDB.run, MatacqProducer::MatacqEventId.run, DTDataIntegrityTest.run, DTBlockedROChannelsTest.run, DTChamberEfficiencyTest.run, DTResolutionTest.run, ME::Header.run, DTEfficiencyTest.run, personalPlayback.Playback.run, DQMNet::CoreObject.run, MatrixUtil.InputInfo.run, DTLocalTriggerBaseTest.run, HitEff.run, cond::RunInfo_t.run, SiPixelErrorEstimation.run, personalPlayback.FrameworkJob.run, generateEDF.LumiInfo.totInstLum, and generateEDF.LumiInfo.xingInfo.

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

Member Data Documentation

generateEDF.LumiInfo.aveInstLum

Definition at line 30 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.badXingInfo

Definition at line 35 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

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

Definition at line 32 of file generateEDF.py.

generateEDF.LumiInfo.key
generateEDF.LumiInfo.keyString

Definition at line 62 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.lumi

Definition at line 44 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__().

generateEDF.LumiInfo.numXings
generateEDF.LumiInfo.recorded

Definition at line 46 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.deadtime().

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