Functions | |
def | beamForIds (schema, irunlsdict, dataidmap, withBeamIntensity=False, minIntensity=0.1) |
def | beamForRange (schema, inputRange, withBeamIntensity=False, minIntensity=0.1, tableName=None, branchName=None) |
def | deliveredLumiForIds (schema, irunlsdict, dataidmap, runsummaryMap, beamstatusfilter=None, timeFilter=None, normmap=None, withBXInfo=False, bxAlgo=None, xingMinLum=None, withBeamIntensity=False, lumitype='HF', minbiasXsec=None) |
def | effectiveLumiForIds (schema, irunlsdict, dataidmap, runsummaryMap=None, beamstatusfilter=None, timeFilter=None, normmap=None, hltpathname=None, hltpathpattern=None, withBXInfo=False, bxAlgo=None, xingMinLum=None, withBeamIntensity=False, lumitype='HF', minbiasXsec=None) |
def | fillInRange (schema, fillmin=1000, fillmax=9999, amodetag='PROTPHYS', startT=None, stopT=None) |
def | fillrunMap (schema, fillnum=None, runmin=None, runmax=None, startT=None, stopT=None, l1keyPattern=None, hltkeyPattern=None, amodetag=None) |
def | hltForIds (schema, irunlsdict, dataidmap, hltpathname=None, hltpathpattern=None, withL1Pass=False, withHLTAccept=False) |
def | hltpathsForRange (schema, runlist, hltpathname=None, hltpathpattern=None) |
def | instLumiForIds (schema, irunlsdict, dataidmap, runsummaryMap, beamstatusfilter=None, timeFilter=None, withBXInfo=False, bxAlgo=None, xingMinLum=None, withBeamIntensity=False, lumitype='HF') |
def | lumiForIds (schema, irunlsdict, dataidmap, runsummaryMap, beamstatusfilter=None, timeFilter=None, normmap=None, withBXInfo=False, bxAlgo=None, xingMinLum=None, withBeamIntensity=False, lumitype='HF', minbiasXsec=None) |
def | runList (schema, datatagid, runmin=None, runmax=None, fillmin=None, fillmax=None, startT=None, stopT=None, l1keyPattern=None, hltkeyPattern=None, amodetag=None, nominalEnergy=None, energyFlut=0.2, requiretrg=True, requirehlt=True, preselectedruns=None, lumitype='HF') |
def | runsummary (schema, irunlsdict) |
Lumi data management and calculation API # # Author: Zhen Xie #. More... | |
def | runsummaryMap (schema, irunlsdict, dataidmap, lumitype='HF') |
def | trgForIds (schema, irunlsdict, dataidmap, trgbitname=None, trgbitnamepattern=None, withL1Count=False, withPrescale=False) |
def lumiCalcAPI.beamForIds | ( | schema, | |
irunlsdict, | |||
dataidmap, | |||
withBeamIntensity = False , |
|||
minIntensity = 0.1 |
|||
) |
input: inputRange: {run:[cmsls]} (required) dataidmap: {run:(lumiid,trgid,hltid)} output : {runnumber:[(lumicmslnum(0),cmslsnum(1),beamenergy(2),beamstatus(3),ncollidingbx(4),[(ibx,b1,b2)])...](5)}
Definition at line 115 of file lumiCalcAPI.py.
References mps_setup.append, and dataDML.beamInfoById().
def lumiCalcAPI.beamForRange | ( | schema, | |
inputRange, | |||
withBeamIntensity = False , |
|||
minIntensity = 0.1 , |
|||
tableName = None , |
|||
branchName = None |
|||
) |
input: inputRange: {run:[cmsls]} (required) output : {runnumber:[(lumicmslnum,cmslsnum,beamenergy,beamstatus,[(ibx,b1,b2)])...](4)}
Definition at line 75 of file lumiCalcAPI.py.
References mps_setup.append, dataDML.beamInfoById(), and nameDealer.lumidataTableName().
def lumiCalcAPI.deliveredLumiForIds | ( | schema, | |
irunlsdict, | |||
dataidmap, | |||
runsummaryMap, | |||
beamstatusfilter = None , |
|||
timeFilter = None , |
|||
normmap = None , |
|||
withBXInfo = False , |
|||
bxAlgo = None , |
|||
xingMinLum = None , |
|||
withBeamIntensity = False , |
|||
lumitype = 'HF' , |
|||
minbiasXsec = None |
|||
) |
delivered lumi (including calibration,time integral) input: irunlsdict: {run:[lsnum]}, where [lsnum]==None means all ; [lsnum]==[] means selected ls dataidmap : {run:(lumiid,trgid,hltid)} runsummaryMap: {run:[l1key(0),amodetag(1),egev(2),hltkey(3),fillnum(4),fillscheme(5),starttime(6),stoptime(7)]} beamstatus: LS filter on beamstatus normmap: {since:[corrector(0),{paramname:paramvalue}(1),amodetag(2),egev(3),comment(4)]} if normmap empty, means without-correction , if notnormmap means without-correction withBXInfo: get per bunch info (optional) bxAlgo: algoname for bx values (optional) ['OCC1','OCC2','ET'] xingMinLum: cut on bx lumi value (optional) withBeamIntensity: get beam intensity info (optional) lumitype: luminosity source output: result {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),calibratedlumierr(6),(bxidxlist,bxvalues,bxerrs)(7),(bxidx,b1intensities,b2intensities)(8),fillnum(9),pu(10)]} special meanings: {run:None} None means no run in lumiDB, {run:[]} [] means no lumi for this run in lumiDB {run:cmslsnum(1)==0} means either not cmslsnum or iscms but not selected lumi unit: /ub
Definition at line 369 of file lumiCalcAPI.py.
References mps_setup.append, dataDML.fillschemePatternMap(), instLumiForIds(), dataDML.intglumiForRange(), dataDML.lumiRunByIds(), and normFunctors.normFunctionCaller().
Referenced by effectiveLumiForIds(), specificLumi.getSpecificLumi(), and lumiForIds().
def lumiCalcAPI.effectiveLumiForIds | ( | schema, | |
irunlsdict, | |||
dataidmap, | |||
runsummaryMap = None , |
|||
beamstatusfilter = None , |
|||
timeFilter = None , |
|||
normmap = None , |
|||
hltpathname = None , |
|||
hltpathpattern = None , |
|||
withBXInfo = False , |
|||
bxAlgo = None , |
|||
xingMinLum = None , |
|||
withBeamIntensity = False , |
|||
lumitype = 'HF' , |
|||
minbiasXsec = None |
|||
) |
delivered/recorded/eff lumi in selected hlt path (including calibration,time integral) input: irunlsdict: {run:[lsnum]}, where [lsnum]==None means all ; [lsnum]==[] means selected ls dataidmap : {run:(lumiid,trgid,hltid)} runsummaryMap: {run:[l1key(0),amodetag(1),egev(2),hltkey(3),fillnum(4),fillscheme(5),starttime(6),stoptime(7)]} beamstatusfilter: LS filter on beamstatus normmap: {since:[corrector(0),{paramname:paramvalue}(1),amodetag(2),egev(3),comment(4)]} if normmap empty, means without-correction , if notnormmap means without-correction hltpathname: selected hltpathname hltpathpattern: regex select hltpaths withBXInfo: get per bunch info (optional) bxAlgo: algoname for bx values (optional) ['OCC1','OCC2','ET'] xingMinLum: cut on bx lumi value (optional) withBeamIntensity: get beam intensity info (optional) lumitype: luminosity source output: result {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),{hltpath:[l1name,l1prescale,hltprescale,efflumi]}(8),bxdata(9),beamdata(10),fillnum(11),ncollidingbunches(12)]} {run:None} None means no run in lumiDB, {run:[]} [] means no lumi for this run in lumiDB {run:[....deliveredlumi(5),recorded(6)==None,]} means no trigger in lumiDB {run:[....deliveredlumi(5),recorded(6),calibratedlumierror(7)==None]} means no hlt in lumiDB lumi unit: 1/ub
Definition at line 531 of file lumiCalcAPI.py.
References deliveredLumiForIds(), hltTrgSeedMapper.findUniqueSeed(), objects.autophobj.float, hltForIds(), dataDML.hlttrgMappingByrun(), and trgForIds().
def lumiCalcAPI.fillInRange | ( | schema, | |
fillmin = 1000 , |
|||
fillmax = 9999 , |
|||
amodetag = 'PROTPHYS' , |
|||
startT = None , |
|||
stopT = None |
|||
) |
output [fill]
Definition at line 35 of file lumiCalcAPI.py.
References dataDML.fillInRange().
def lumiCalcAPI.fillrunMap | ( | schema, | |
fillnum = None , |
|||
runmin = None , |
|||
runmax = None , |
|||
startT = None , |
|||
stopT = None , |
|||
l1keyPattern = None , |
|||
hltkeyPattern = None , |
|||
amodetag = None |
|||
) |
output: {fill:[runnum,...]}
Definition at line 41 of file lumiCalcAPI.py.
References dataDML.fillrunMap().
Referenced by specificLumi.getFillFromDB().
def lumiCalcAPI.hltForIds | ( | schema, | |
irunlsdict, | |||
dataidmap, | |||
hltpathname = None , |
|||
hltpathpattern = None , |
|||
withL1Pass = False , |
|||
withHLTAccept = False |
|||
) |
input: irunlsdict: {run:[cmsls]} (required) dataidmap: {run:(lumiid,trgid,hltid)} hltpathname: exact match hltpathname (optional) hltpathpattern: regex match hltpathpattern (optional) withL1Pass: with L1 pass count withHLTAccept: with HLT accept output: {runnumber:[(cmslsnum,[(hltpath,hltprescale,l1pass,hltaccept),...]),(cmslsnum,[])})}
Definition at line 152 of file lumiCalcAPI.py.
References mps_setup.append, and dataDML.hltLSById().
Referenced by effectiveLumiForIds().
input: runlist [run], (required) datatag: data version (optional) output : {runnumber,[(hltpath,l1seedexpr,l1bitname)...]}
Definition at line 53 of file lumiCalcAPI.py.
References mps_setup.append, hltTrgSeedMapper.findUniqueSeed(), and dataDML.hlttrgMappingByrun().
def lumiCalcAPI.instLumiForIds | ( | schema, | |
irunlsdict, | |||
dataidmap, | |||
runsummaryMap, | |||
beamstatusfilter = None , |
|||
timeFilter = None , |
|||
withBXInfo = False , |
|||
bxAlgo = None , |
|||
xingMinLum = None , |
|||
withBeamIntensity = False , |
|||
lumitype = 'HF' |
|||
) |
FROM ROOT FILE NO CORRECTION AT ALL input: irunlsdict: {run:[cmsls]} dataidmap: {run:(lumiid,trgid,hltid)} runsummaryMap: {run:[l1key(0),amodetag(1),egev(2),hltkey(3),fillnum(4),fillscheme(5),starttime(6),stoptime(7)]} beamstatus: LS filter on beamstatus (optional) timeFilter: (minLSBegTime,maxLSBegTime) withBXInfo: get per bunch info (optional) bxAlgo: algoname for bx values (optional) ['OCC1','OCC2','ET'] xingMinLum: None means apply no cut withBeamIntensity: get beam intensity info (optional) lumitype: luminosity measurement source output: result {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),instlumi(5),instlumierr(6),startorbit(7),numorbit(8),(bxidx,bxvalues,bxerrs)(9),(bxidx,b1intensities,b2intensities)(10),fillnum(11)]}} special meanings: {run:None} None means selected run not in lumiDB, {run:[]} [] means no lumi data for this run in lumiDB {run:cmslsnum(1)==0} means either not cmslsnum or iscms but not selected instlumi unit in Hz/ub
Definition at line 250 of file lumiCalcAPI.py.
References nameDealer.lumidataTableName(), dataDML.lumiLSById(), nameDealer.lumisummaryv2TableName(), nameDealer.pixellumidataTableName(), and nameDealer.pixellumisummaryv2TableName().
Referenced by deliveredLumiForIds().
def lumiCalcAPI.lumiForIds | ( | schema, | |
irunlsdict, | |||
dataidmap, | |||
runsummaryMap, | |||
beamstatusfilter = None , |
|||
timeFilter = None , |
|||
normmap = None , |
|||
withBXInfo = False , |
|||
bxAlgo = None , |
|||
xingMinLum = None , |
|||
withBeamIntensity = False , |
|||
lumitype = 'HF' , |
|||
minbiasXsec = None |
|||
) |
delivered/recorded lumi (including calibration,time integral) input: irunlsdict: {run:[lsnum]}, where [lsnum]==None means all ; [lsnum]==[] means no selected ls dataidmap : {run:(lumiid,trgid,hltid)} runsummaryMap: {run:[l1key(0),amodetag(1),egev(2),hltkey(3),fillnum(4),fillscheme(5),starttime(6),stoptime(7)]} beamstatus: LS filter on beamstatus normmap: withBXInfo: get per bunch info (optional) bxAlgo: algoname for bx values (optional) ['OCC1','OCC2','ET'] xingMinLum: cut on bx lumi value (optional) withBeamIntensity: get beam intensity info (optional) lumitype: luminosity source output: result {run:[[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),(bxidx,bxvalues,bxerrs)(8),(bxidx,b1intensities,b2intensities)(9),fillnum(10),ncollidingbunches(11)]...]} special meanings: {run:None} None means no run in lumiDB, {run:[]} [] means no lumi for this run in lumiDB {run:[....deliveredlumi(5),recordedlumi(6)None]} means no trigger in lumiDB {run:cmslsnum(1)==0} means either not cmslsnum or is cms but not selected, therefore set recordedlumi=0,efflumi=0 lumi unit: 1/ub
Definition at line 479 of file lumiCalcAPI.py.
References deliveredLumiForIds(), and trgForIds().
def lumiCalcAPI.runList | ( | schema, | |
datatagid, | |||
runmin = None , |
|||
runmax = None , |
|||
fillmin = None , |
|||
fillmax = None , |
|||
startT = None , |
|||
stopT = None , |
|||
l1keyPattern = None , |
|||
hltkeyPattern = None , |
|||
amodetag = None , |
|||
nominalEnergy = None , |
|||
energyFlut = 0.2 , |
|||
requiretrg = True , |
|||
requirehlt = True , |
|||
preselectedruns = None , |
|||
lumitype = 'HF' |
|||
) |
output: [runnumber,...]
Definition at line 47 of file lumiCalcAPI.py.
References dataDML.runList().
Referenced by lumiData2.main().
def lumiCalcAPI.runsummary | ( | schema, | |
irunlsdict | |||
) |
Lumi data management and calculation API # # Author: Zhen Xie #.
output [[run(0),l1key(1),amodetag(2),egev(3),hltkey(4),fillnum(5),fillscheme(6),starttime(7),stoptime(8)]]
Definition at line 10 of file lumiCalcAPI.py.
References dataDML.runsummary().
Referenced by specificLumi.getFillFromDB(), and runsummaryMap().
def lumiCalcAPI.runsummaryMap | ( | schema, | |
irunlsdict, | |||
dataidmap, | |||
lumitype = 'HF' |
|||
) |
output: {run:[l1key(0),amodetag(1),egev(2),hltkey(3),fillnum(4),fillscheme(5),starttime(6),stoptime(7)]}
Definition at line 21 of file lumiCalcAPI.py.
References dataDML.lumiRunByIds(), and runsummary().
Referenced by specificLumi.getSpecificLumi().
def lumiCalcAPI.trgForIds | ( | schema, | |
irunlsdict, | |||
dataidmap, | |||
trgbitname = None , |
|||
trgbitnamepattern = None , |
|||
withL1Count = False , |
|||
withPrescale = False |
|||
) |
input : irunlsdict {run:[cmsls]} (required) dataidmap: {run:(lumiid,trgid,hltid)} trgbitname exact match trgbitname (optional) trgbitnamepattern match trgbitname (optional) output result {run:[[cmslsnum(0),deadfrac(1),deadtimecount(2),bitzero_count(3),bitzero_prescale(4),[(bitname,prescale,counts,mask)](5)]]}
Definition at line 197 of file lumiCalcAPI.py.
References mps_setup.append, and dataDML.trgLSById().
Referenced by effectiveLumiForIds(), and lumiForIds().