def GetSumLumihr(lumiDic, runList, file, name, info): ''' retrieve historeader in case separated for multiple runs''' hr = HistoReader(name) for run in runList: file = file.replace('RUN', run) if run == runList[0]: hr = Gethr(lumiDic[run], run, file, name, info) else: hr_run = Gethr(lumiDic[run], run, file, name, info) hr.Sum(hr_run) return hr
hr_dataDE.SetNewRange(20, 90) hr_dataDE.CleanBigError(0.01) hr_dataDE.setLumi(10) hr_dataDE.setInfo('DE') hr_dataDE.setType('data') eff2D = hr_dataDE.eff2D eff2D.Print() eff2D.Print('up') eff2D.Print('down') print 'Afer added other run (lumi-rew)' print '----------------' hr_dataBC.setLumi(10) hr_dataBC.setInfo('BC') hr_dataBC.setType('data') hr_dataBC.Sum(hr_dataDE) eff2D = hr_dataBC.eff2D eff2D.Print() eff2D.Print('up') eff2D.Print('down') print 'To test the ratio' print '----------------' fileLoose = '/afs/cern.ch/user/f/fernanpe/public/for_Gael/Efficiencies_2017/EfficiencyID_DE/MC_mcidDE/' + Id hr_dataLoose = HistoReader('DataLoose') hr_dataLoose.readfile(fileLoose) hr_dataLoose.SetNewRange(20, 90) hr_dataLoose.setLumi(10) hr_dataLoose.setInfo('DE') hr_dataLoose.setType('data')