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

Constructor & Destructor Documentation

◆ __init__()

def generateEDF.LumiInfo.__init__ (   self,
  line 
)

Definition at line 29 of file generateEDF.py.

29  def __init__ (self, line):
30  self.totInstLum = 0.
31  self.aveInstLum = 0.
32  self.numXings = 0
33  self.instLums = []
34  self.events = []
35  self.xingInfo = False
36  self.badXingInfo = False
37  pieces = sepRE.split (line.strip())
38  size = len (pieces)
39  if size % 2:
40  raise RuntimeError("Odd number of pieces")
41  if size < 4:
42  raise RuntimeError("Not enough pieces")
43  try:
44  self.run = int (pieces[0])
45  self.lumi = int (pieces[1])
46  self.delivered = float (pieces[2])
47  self.recorded = float (pieces[3])
48  except:
49  raise RuntimeError("Pieces not right format")
50  if size > 4:
51  try:
52  for xing, lum in zip (pieces[4::2],pieces[5::2]):
53  xing = int (xing)
54  lum = float (lum)
55  self.instLums.append( (xing, lum) )
56  self.totInstLum += lum
57  self.numXings += 1
58  except:
59  raise RuntimeError("Inst Lumi Info malformed")
60  self.aveInstLum = old_div(self.totInstLum, (self.numXings))
61  self.xingInfo = True
62  self.key = (self.run, self.lumi)
63  self.keyString = self.key.__str__()
64 
65 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ __str__()

def generateEDF.LumiInfo.__str__ (   self)

Definition at line 92 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, Trend.lumi, DQMNet::CoreObject.lumi, ScalersEventRecordRaw_v1.lumi, ScalersEventRecordRaw_v2.lumi, ScalersEventRecordRaw_v3.lumi, ScalersEventRecordRaw_v4.lumi, ScalersEventRecordRaw_v5.lumi, ScalersEventRecordRaw_v6.lumi, l1ct::Event.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, Point.run, MatacqProducer::MatacqEventId.run, BeamProfile2DBReader::TheBSfromDB.run, DTResolutionAnalysisTest.run, BeamProfileHLLHC2DBReader::TheBSfromDB.run, BeamSpotRcdReader::theBSfromDB.run, DTDataIntegrityTest.run, BeamSpotOnlineRecordsReader::theBSOfromDB.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, l1ct::Event.run, and generateEDF.LumiInfo.totInstLum.

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

◆ deadtime()

def generateEDF.LumiInfo.deadtime (   self)

Definition at line 86 of file generateEDF.py.

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

Referenced by generateEDF.LumiInfo.__str__().

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

◆ fixXingInfo()

def generateEDF.LumiInfo.fixXingInfo (   self)

Definition at line 66 of file generateEDF.py.

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, Point.run, MatacqProducer::MatacqEventId.run, BeamProfile2DBReader::TheBSfromDB.run, DTResolutionAnalysisTest.run, BeamProfileHLLHC2DBReader::TheBSfromDB.run, BeamSpotRcdReader::theBSfromDB.run, DTDataIntegrityTest.run, BeamSpotOnlineRecordsReader::theBSOfromDB.run, DTBlockedROChannelsTest.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, l1ct::Event.run, generateEDF.LumiInfo.totInstLum, and generateEDF.LumiInfo.xingInfo.

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

Member Data Documentation

◆ aveInstLum

generateEDF.LumiInfo.aveInstLum

Definition at line 31 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

◆ badXingInfo

generateEDF.LumiInfo.badXingInfo

Definition at line 36 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

◆ delivered

generateEDF.LumiInfo.delivered

◆ events

generateEDF.LumiInfo.events

◆ instLums

generateEDF.LumiInfo.instLums

Definition at line 33 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

◆ key

generateEDF.LumiInfo.key

◆ keyString

generateEDF.LumiInfo.keyString

Definition at line 63 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

◆ lastSingleXingRun

generateEDF.LumiInfo.lastSingleXingRun
static

Definition at line 26 of file generateEDF.py.

◆ lumi

generateEDF.LumiInfo.lumi

Definition at line 45 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__().

◆ lumiSectionLength

generateEDF.LumiInfo.lumiSectionLength
static

Definition at line 27 of file generateEDF.py.

◆ numXings

generateEDF.LumiInfo.numXings

◆ recorded

generateEDF.LumiInfo.recorded

Definition at line 47 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.deadtime().

◆ run

generateEDF.LumiInfo.run

◆ totInstLum

generateEDF.LumiInfo.totInstLum

◆ xingInfo

generateEDF.LumiInfo.xingInfo