WJetsL2T_unc = plots_dataDrivenQCDandWJ.calcSysUnc(WJetsL2T, histDict["WJetsOSTight_MC"].GetBinContent(1), histDict["WJetsOSLoose_MC"].GetBinContent(1), histDict["WJetsOSTight_MC"].GetBinError(1), histDict["WJetsOSLoose_MC"].GetBinError(1)) WJetsLoose2Tight.Fill(0.5, WJetsL2T) WJetsLoose2Tight.SetBinError(1, WJetsL2T_unc) WJetsLoose2Tight.Write() oTree.Write() if iFS != 'em': oTree_tmp.Write() oFile.Close() printYield(yieldDict, WJetsL2T, QCD_SF, QCD_D_F_SF, iFS) if iFS != 'em': print "running combineTree(inputFile, %f)" %QCD_D_F_SF combineTree(oFileName, QCD_D_F_SF) if __name__ == "__main__": if options.PUWeight: cutSampleTools.setupLumiReWeight() if options.profile: cProfile.run("go()", sort="time") else: go() if options.PUWeight: cutSampleTools.freeLumiReWeight()
(fs, '%s/WJets_LO_HT-600toInf_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/WZTo1L3Nu_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/WWTo1L1Nu2Q_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/WZTo1L1Nu2Q_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/WZJets_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/ZZTo2L2Q_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/WZTo2L2Q_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/VVTo2L2Nu_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/ZZTo4L_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/ZPrime_500_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/ZPrime_1000_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/ZPrime_1500_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/ZPrime_2000_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/ZPrime_2500_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/ZPrime_3000_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/ZPrime_3500_all_SYNC_' %dir, 'OS', 'Tight', output_dir), (fs, '%s/ZPrime_4000_all_SYNC_' %dir, 'OS', 'Tight', output_dir), # (fs, '%s/data_Electron_all_SYNC_' %dir, 'OS', 'Loose', output_dir), (fs, '%s/data_Electron_all_SYNC_' %dir, 'OS', 'Tight', output_dir), ] split = True cutSampleTools.setupLumiReWeight() for iFS, iSample, iCharge, iIsoRegion, output_dir in listToRun: runOneFile(iFS, iSample, iCharge, iIsoRegion, output_dir, split) cutSampleTools.freeLumiReWeight()