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

Constructor & Destructor Documentation

def generateEDF.LumiInfo.__init__ (   self,
  line 
)

Definition at line 26 of file generateEDF.py.

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

Member Function Documentation

def generateEDF.LumiInfo.__str__ (   self)

Definition at line 89 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, 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.

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

Definition at line 83 of file generateEDF.py.

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

Referenced by generateEDF.LumiInfo.__str__().

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

Definition at line 63 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, 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.

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

Member Data Documentation

generateEDF.LumiInfo.aveInstLum

Definition at line 28 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.badXingInfo

Definition at line 33 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

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

Definition at line 30 of file generateEDF.py.

generateEDF.LumiInfo.key
generateEDF.LumiInfo.keyString

Definition at line 60 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.lumi

Definition at line 42 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__().

generateEDF.LumiInfo.numXings
generateEDF.LumiInfo.recorded

Definition at line 44 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.deadtime().

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