minxvals = [0., 0., -0.77, -0.69, -0.82, -0.71, -0.70, -0.75, -0.59] maxxvals = [5000., 5000., 0.63, 0.57, 0.64, 0.56, 0.57, 0.58, 0.40] bdts = [] for b, bl, nb, minx, maxx in zip(bins, binlabels, nhistobins, minxvals, maxxvals): if bl == "j4_t2" or bl == "j5_t2": bdts.append( Plot( ROOT.TH1F("BDT_ljets" + "_" + bl, "BDT_ljets" + " (" + bl + ")", nb, minx, maxx), "Evt_HT", b)) else: bdts.append( Plot( ROOT.TH1F("BDT_ljets" + "_" + bl, "BDT_ljets" + " (" + bl + ")", nb, minx, maxx), "BDT_common5_output", b)) outputpath = plotParallel(name, 1000000, bdts, allsamples, [''], ['1.'], weightsystnames, systweights) renameHistos(outputpath, name + '_limitInput.root', allsystnames) addPseudoData(name + '_limitInput.root', [s.name for s in samples[1:]], binlabels, allsystnames) MoveOverUnderflow(name + '_limitInput.root', name + '_limitInput_rebinned.root') listOfHistoLists = createHistoLists_fromSuperHistoFile(outputpath, samples, bdts) writeListOfHistoLists(listOfHistoLists, allsamples, '', name, False)
import ROOT import sys ROOT.gDirectory.cd('PyROOT:/') from limittools import renameHistos infname = sys.argv[1] outfname = sys.argv[2] sysnames = [ "_CMS_ttH_CSVLFUp", "_CMS_ttH_CSVLFDown", "_CMS_ttH_CSVHFUp", "_CMS_ttH_CSVHFDown", "_CMS_ttH_CSVHFStats1Up", "_CMS_ttH_CSVHFStats1Down", "_CMS_ttH_CSVLFStats1Up", "_CMS_ttH_CSVLFStats1Down", "_CMS_ttH_CSVHFStats2Up", "_CMS_ttH_CSVHFStats2Down", "_CMS_ttH_CSVLFStats2Up", "_CMS_ttH_CSVLFStats2Down", "_CMS_ttH_CSVCErr1Up", "_CMS_ttH_CSVCErr1Down", "_CMS_ttH_CSVCErr2Up", "_CMS_ttH_CSVCErr2Down", "_CMS_scale_jUp", "_CMS_scale_jDown", "_CMS_res_jUp", "_CMS_res_jDown" ] renameHistos(infname, outfname, sysnames)