CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static 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
 

Static Public Attributes

 lastSingleXingRun
 
 lumiSectionLength
 

Detailed Description

LumiInfo Class

Definition at line 27 of file generateEDF.py.

Constructor & Destructor Documentation

def generateEDF.LumiInfo.__init__ (   self,
  line 
)

Definition at line 32 of file generateEDF.py.

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 
def __init__(self, line)
Definition: generateEDF.py:32

Member Function Documentation

def generateEDF.LumiInfo.__str__ (   self)

Definition at line 95 of file generateEDF.py.

References Level1TriggerScalers.deadtime(), generateEDF.LumiInfo.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, upgradeWorkflowComponents.UpgradeWorkflowAging.lumi, generateEDF.LumiInfo.numXings, RPCRunIOV::RunIOV_Item.run, TB06RecoH2.run, TB06Reco.run, RPCDQMObject.run, EfficiencyPlotter.run, WZInterestingEventSelector::event.run, generateEDF.LumiInfo.run, MuonRecoTest.run, DTResolutionAnalysisTest.run, Point.run, MatacqProducer::MatacqEventId.run, BeamSpotRcdReader::theBSfromDB.run, DTBlockedROChannelsTest.run, DTDataIntegrityTest.run, DTChamberEfficiencyTest.run, DTResolutionTest.run, DTEfficiencyTest.run, ME::Header.run, personalPlayback.Playback.run, DQMNet::CoreObject.run, DTLocalTriggerBaseTest.run, MatrixUtil.InputInfo.run, HitEff.run, cond::RunInfo_t.run, SiPixelErrorEstimation.run, personalPlayback.FrameworkJob.run, and generateEDF.LumiInfo.totInstLum.

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 
def generateEDF.LumiInfo.deadtime (   self)

Definition at line 89 of file generateEDF.py.

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

Referenced by generateEDF.LumiInfo.__str__().

89  def deadtime (self):
90  if not self.delivered:
91  return 1
92  return 1 - (old_div(self.recorded, self.delivered))
93 
94 
def generateEDF.LumiInfo.fixXingInfo (   self)

Definition at line 69 of file generateEDF.py.

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

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 
def fixXingInfo(self)
Definition: generateEDF.py:69

Member Data Documentation

generateEDF.LumiInfo.aveInstLum

Definition at line 34 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.badXingInfo

Definition at line 39 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

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

Definition at line 36 of file generateEDF.py.

generateEDF.LumiInfo.key
generateEDF.LumiInfo.keyString

Definition at line 66 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.lastSingleXingRun
static

Definition at line 29 of file generateEDF.py.

generateEDF.LumiInfo.lumi

Definition at line 48 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__().

generateEDF.LumiInfo.lumiSectionLength
static

Definition at line 30 of file generateEDF.py.

generateEDF.LumiInfo.numXings
generateEDF.LumiInfo.recorded

Definition at line 50 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.deadtime().

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