Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add run2 pu trig prescale reweighting #13020

Merged
merged 2 commits into from Feb 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions RecoLuminosity/LumiDB/python/csvLumibyLSParser.py
Expand Up @@ -10,10 +10,11 @@ def is_intstr(s):
except ValueError:
return False
class csvLumibyLSParser(object):
def __init__(self,filename):
def __init__(self,filename,RunX):
self.__result={}
self.__strresult={}
self.__filename=filename
self.__RunX=RunX
csvReader=csv.reader(open(filename),delimiter=',')
oldRun=0
runnumber=0
Expand Down Expand Up @@ -47,7 +48,10 @@ def __init__(self,filename):
oldRun = runnumber

try:
delivered, recorded = float( row[5] ), float( row[6] )
if RunX=='Run2':
delivered, recorded = float( row[4] ), float( row[5] )
if RunX=='Run1':
delivered, recorded = float( row[5] ), float( row[6] )
except:
print 'Record not parsed, Run = %d, LS = %d' % (runnumber, lsnumber)

Expand Down
7 changes: 4 additions & 3 deletions RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py
Expand Up @@ -54,7 +54,7 @@ def parseInputFile(inputfilename):
parser.add_option('--inputLumiJSON',dest='inputLumiJSON',action='store',
help='Input Lumi/Pileup file in JSON format (required)')
parser.add_option('--verbose',dest='verbose',action='store_true',help='verbose mode for printing' )

parser.add_option('--runperiod',dest='runperiod',action='store', default='Run1',help='select runperiod Run1 or Run2, default Run1' )
# parse arguments
try:
(options, args) = parser.parse_args()
Expand All @@ -75,10 +75,11 @@ def parseInputFile(inputfilename):
print '\toutputfile: ',options.outputfile
print '\tinput selection file: ',options.inputfile


#print options.runperiod
#inpf = open (options.inputfile, 'r')
#inputfilecontent = inpf.read()
inputRange = csvLumibyLSParser.csvLumibyLSParser (options.inputfile).runsandls()

inputRange = csvLumibyLSParser.csvLumibyLSParser (options.inputfile,options.runperiod).runsandls()

#print 'number of runs processed %d' % csvLumibyLSParser.csvLumibyLSParser (options.inputfile).numruns()

Expand Down