def makeSignalRegionParser(): parser = razor.make_parser() parser.add_argument("--unblind", help="do not blind signal sensitive region", action='store_true') parser.add_argument('--no-mc', help="do not process MC, do data and fit only", action='store_true', dest="noMC") parser.add_argument('--no-fit', help="do not load fit results, process data and MC only", action='store_true', dest='noFit') parser.add_argument('--no-data', help="do not process data, do fit and MC only", action='store_true', dest='noData') parser.add_argument('--no-sys', help="no shape unncertainties or cross check systematics", action="store_true", dest='noSys') parser.add_argument('--no-qcd', help="do not include QCD prediction", action="store_true", dest='noQCD') parser.add_argument('--no-sfs', help="ignore MC scale factors", action="store_true", dest="noSFs") parser.add_argument('--box', help="choose a box") parser.add_argument('--btags', type=int, help="choose a number of btags") parser.add_argument('--b-inclusive', help='do not bin in btags', action='store_true', dest='bInclusive') parser.add_argument('--qcd-mc', dest='qcdMC', help='make qcd prediction using MC', action='store_true') parser.add_argument('--nlo-zinv', dest='nloZInv', action='store_true', help='use NLO sample for Z->nu nu prediction') parser.add_argument('--fine-grained', dest='fineGrained', action='store_true', help='Process each MC sample separately') parser.add_argument('--sideband', action='store_true', help='Process sideband instead of extrapolation region') parser.add_argument('--zoom', action='store_true', help='Draw restricted range on ratio plot') parser.add_argument('--super-region', action='store_true', help='Run on aggregated super analysis regions') return parser
import sys, os import ROOT as rt from macro import macro, razorWeights from macro.razorAnalysis import Analysis, make_parser from macro.razorMacros import makeControlSampleHistsForAnalysis, appendScaleFactors if __name__ == "__main__": rt.gROOT.SetBatch() parser = make_parser() args = parser.parse_args() debugLevel = args.verbose + 2*args.debug tag = args.tag boostCuts = not args.noBoostCuts #initialize plotOpts = { 'comment':False, "SUS15004CR":True } regions = {} regionsOrder = [] #define all tests for name,jets in {"DiJet":(2,3),"MultiJet":(4,-1)}.iteritems(): regionName = "GJetsInv"+name+"ClosureTest" regions[regionName] = Analysis("GJetsInv",tag=tag, njetsMin=jets[0], njetsMax=jets[1],boostCuts=boostCuts) regionsOrder.append(regionName) maxB = 3 if name == 'DiJet': maxB = 2 for nb in range(maxB+1): nbMax = nb
thisSFKey, proc) del sfs[thisSFKey] if isSevenJet(analysis): print "Using reduced binning for seven jet category" if "MR_NoZ" in analysis.binning: analysis.binning["MR_NoZ"] = [400, 4000] analysis.binning["Rsq_NoZ"] = [0.25, 1.5] if "MR" in analysis.binning: analysis.binning["MR"] = [300, 4000] analysis.binning["Rsq"] = [0.15, 1.5] if __name__ == "__main__": rt.gROOT.SetBatch() parser = razor.make_parser() args = parser.parse_args() debugLevel = args.verbose + 2 * args.debug tag = args.tag boostCuts = not args.noBoostCuts plotOpts = {"comment": False, 'SUS15004CR': True} regions = {} regionsOrder = [] #define all tests jetsOrder = ["SevenJet", "MultiJet", "DiJet"] jetsLimit = [(7, -1), (4, 6), (2, 3)] for name, jets in zip(jetsOrder, jetsLimit): for nb in reversed(range(4)): if nb >= 3 and name == 'DiJet':
import sys, os import ROOT as rt from macro import macro, razorWeights from macro.razorAnalysis import Analysis, make_parser from macro.razorMacros import makeControlSampleHistsForAnalysis, appendScaleFactors if __name__ == "__main__": rt.gROOT.SetBatch() parser = make_parser() parser.add_argument("--no-corr", dest="noCorr", action='store_true', help="Don't apply scale factor correction") args = parser.parse_args() debugLevel = args.verbose + 2*args.debug tag = args.tag noCorr = args.noCorr boostCuts = not args.noBoostCuts #initialize plotOpts = { "comment":False, 'SUS15004CR':True } regions = {} regionsOrder = [] #define all tests jetsOrder = ["Inclusive","OneJet","DiJet","MultiJet"] jetsLimit = [(-1,-1),(1,1),(2,3),(4,-1)] for name,jets in zip(jetsOrder, jetsLimit): regionName = "OneLepton"+name+"ClosureTest" if noCorr: regionName += "_NoCorr" regions[regionName] = Analysis("SingleLepton",tag=tag,
analysis.binning['Rsq_NoPho'] = [0.25, 0.30, 0.41, 1.5] elif analysis.jetVar == 'NJets40': # the condition is to avoid doing this for signal region print "Using reduced binning for seven jet category" analysis.binning['MR'] = [300, 500, 700, 900, 4000] analysis.binning['Rsq'] = [0.15, 0.20, 0.25, 0.30, 0.41, 1.5] analysis.unrollBins = (analysis.binning['MR'], [[0.15, 0.20, 0.25, 0.30, 0.41, 1.5], [0.15, 0.20, 0.25, 0.30, 0.41, 1.5], [0.15, 0.20, 0.25, 0.30, 1.5], [0.15, 0.20, 1.5]]) if __name__ == "__main__": rt.gROOT.SetBatch() parser = razor.make_parser() args = parser.parse_args() debugLevel = args.verbose + 2*args.debug tag = args.tag boostCuts = not args.noBoostCuts plotOpts = { "comment":False, 'SUS15004CR':True } regions = {} regionsOrder = [] #define all tests jetsOrder = ["SevenJet", "MultiJet", "DiJet"] jetsLimit = [(7,-1),(4,6),(2,3)] for name,jets in zip(jetsOrder, jetsLimit): regionName = 'OneLepton'+name regions[regionName] = razor.Analysis("SingleLepton",tag=tag,