CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes
generateEDF.LumiInfo Class Reference
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 26 of file generateEDF.py.

Constructor & Destructor Documentation

◆ __init__()

def generateEDF.LumiInfo.__init__ (   self,
  line 
)

Definition at line 31 of file generateEDF.py.

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

Member Function Documentation

◆ __str__()

def generateEDF.LumiInfo.__str__ (   self)

Definition at line 94 of file generateEDF.py.

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

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

◆ deadtime()

def generateEDF.LumiInfo.deadtime (   self)

Definition at line 88 of file generateEDF.py.

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

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

Referenced by generateEDF.LumiInfo.__str__().

◆ fixXingInfo()

def generateEDF.LumiInfo.fixXingInfo (   self)

Definition at line 68 of file generateEDF.py.

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

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

Member Data Documentation

◆ aveInstLum

generateEDF.LumiInfo.aveInstLum

Definition at line 33 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

◆ badXingInfo

generateEDF.LumiInfo.badXingInfo

Definition at line 38 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

◆ delivered

generateEDF.LumiInfo.delivered

◆ events

generateEDF.LumiInfo.events

◆ instLums

generateEDF.LumiInfo.instLums

Definition at line 35 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

◆ key

generateEDF.LumiInfo.key

◆ keyString

generateEDF.LumiInfo.keyString

Definition at line 65 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

◆ lastSingleXingRun

generateEDF.LumiInfo.lastSingleXingRun
static

Definition at line 28 of file generateEDF.py.

◆ lumi

generateEDF.LumiInfo.lumi

Definition at line 47 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__().

◆ lumiSectionLength

generateEDF.LumiInfo.lumiSectionLength
static

Definition at line 29 of file generateEDF.py.

◆ numXings

generateEDF.LumiInfo.numXings

◆ recorded

generateEDF.LumiInfo.recorded

Definition at line 49 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.deadtime().

◆ run

generateEDF.LumiInfo.run

◆ totInstLum

generateEDF.LumiInfo.totInstLum

◆ xingInfo

generateEDF.LumiInfo.xingInfo
mps_setup.append
append
Definition: mps_setup.py:85
TriggerAnalyzer.__str__
def __str__(self)
Definition: TriggerAnalyzer.py:103