def _fill(self): self._name = self.__class__.__name__[1:] self._constrainQcdSlope = True self._qcdParameterIsYield = False self._initialValuesFromMuonSample = False self._initialFZinvFromMc = False self._poiIniMinMax = (0.005, 0.0, 0.1) self._rhoSignalMin = 0.1 self._REwk = "" self._RQcd = "FallingExp" self._nFZinv = "Two" self._legendTitle = "CMS Preliminary, 3.9 fb^{-1}, #sqrt{s} = 8 TeV" from inputData.data2012hcp import take5_unweighted as module self.add([ likelihood.selection(name = "55_0b", note = "%s= 0"%likelihood.nb, boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), data = module.data_0b(), bJets = "btag_==_0", fZinvIni = 0.50, AQcdIni = 0.0, ), #likelihood.selection(name = "55_0b_no_aT", # note = "%s= 0"%likelihood.nb, # boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), # data = module.data_0b_no_aT(), # bJets = "btag_==_0", # fZinvIni = 0.50, # AQcdIni = 0.0, # ), likelihood.selection(name = "55_1b", note = "%s= 1"%likelihood.nb, boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), data = module.data_1b(), bJets = "btag_==_1", fZinvIni = 0.25, AQcdIni = 0.0, ), likelihood.selection(name = "55_2b", note = "%s= 2"%likelihood.nb, boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), data = module.data_2b(), bJets = "btag_==_2", fZinvIni = 0.1, AQcdIni = 0.0, ), likelihood.selection(name = "55_gt2b", note = "%s#geq 3"%likelihood.nb, boxes = {"had":True, "muon":True}.keys(), muonForFullEwk = True, data = module.data_ge3b(), bJets = "btag_>_2", fZinvIni = 0.1, AQcdIni = 0.0, ), ])
def _fill(self): self._name = self.__class__.__name__ self._constrainQcdSlope = False self._qcdParameterIsYield = True self._initialValuesFromMuonSample = False self._initialFZinvFromMc = False self._poiIniMinMax = (0.0, -1.0, 2.0) self._rhoSignalMin = 0.0 self._REwk = "" self._RQcd = "Zero" self._nFZinv = "All" self._legendTitle = "SIMPLE TEST" from ra1i.dataMisc import simpleOneBin as module self.add([ likelihood.selection(name="test", boxes=["simple"], data=module.data_simple(), ), ])
def _fill(self): self._name = self.__class__.__name__[1:] self._constrainQcdSlope = True self._qcdParameterIsYield = True self._initialValuesFromMuonSample = False self._initialFZinvFromMc = False self._poiIniMinMax = (0.005, 0.0, 0.1) self._rhoSignalMin = 0.1 self._REwk = "" self._RQcd = "FallingExp" self._nFZinv = "Two" self._legendTitle = "CMS (re-analyzed), L = 35 pb^{-1}, #sqrt{s} = 7 TeV" from inputData.dataMisc import orig as module self.add([likelihood.selection(name="55", boxes={"had":True, "muon":True, "phot":False}.keys(), data = module.data_2010(), ), ])
def _fill(self): self._name = self.__class__.__name__[1:] self._blackList += ["ge4b_le3j"] self._constrainQcdSlope = False self._qcdParameterIsYield = True self._initialValuesFromMuonSample = True self._initialFZinvFromMc = True self._poiIniMinMax = (0.0, 0.0, 1.0) self._rhoSignalMin = 0.0 self._REwk = "" self._RQcd = "Zero" self._nFZinv = "All" self._legendTitle = "CMS Preliminary, 18.7 fb^{-1}, #sqrt{s} = 8 TeV" #from ra1i.data2012dev import take_qcdkiller_hcalDeadEcal as module from ra1i.data2012dev import take_qcdkiller_hcalDeadEcal_blind as module #from ra1i.data2012dev import take13_blind_nHadFromFitWithTrigEff as module #from ra1i.data2012dev import take13_semiBlind_nHadFromBlueFit as module #from ra1i.data2012dev import take13_blind_nHadFromFitWithTrigEff_withSignal as module #from ra1i.data2012dev import take13_semiBlind_nHadFromBlueFit_withSignal as module #from ra1i.data2012dev import take13_blind_nHadFromFitWithTrigEff_withT2ttSignal as module #from ra1i.data2012dev import take13_semiBlind_nHadFromBlueFit_withT2ttSignal as module #from ra1i.data2012dev import take13 as module #QCD test if False: print "WARNING: QCD test" self._constrainQcdSlope = False self._legendTitle += "[NO MHT/MET CUT]" from ra1i.data2012hcp import take15a as module lst = [] for b in ["0", "1", "2", "3", "ge4"]: for j in ["ge2", "le3", "ge4"][1:]: yAxisLogMinMax = { "0": (0.3, 5.0e4) if j == "le3" else (0.3, 5.0e4), "1": (0.3, 5.0e3) if j == "le3" else (0.3, 3.0e3), "2": (0.05, 2.0e3) if j == "le3" else (0.3, 2.0e3), "3": (0.05, 5.0e2), "ge4": (0.1, 1.0e2), }[b] # out of date (commented below) fZinvIni = { "0b": { "ge2j": 0.57, "le3j": 0.5, "ge4j": 0.40 }, "1b": { "ge2j": 0.40, "le3j": 0.40, "ge4j": 0.20 }, "2b": { "ge2j": 0.10, "le3j": 0.10, "ge4j": 0.10 }, "3b": { "ge2j": 0.05, "le3j": 0.05, "ge4j": 0.05 }, "ge4b": { "ge2j": 0.01, "le3j": 0.01, "ge4j": 0.01 }, }[b + "b"][j + "j"] name = "%sb_%sj" % (b, j) if name == "ge4b_le3j": continue #name = "%sb_%sj_alphaTmuon"%(b,j) note = "%s%s%s" % (likelihood.nb, "= " if "ge" not in b else "#", b) note += "; %s#%s" % (likelihood.nj, j) note = note.replace("ge", "geq ").replace("le", "leq ") if b in ["0", "1"]: boxes = ["had", "muon", "phot", "mumu"] else: boxes = ["had", "muon"] sel = likelihood.selection( name=name, note=note, boxes=boxes, muonForFullEwk=len(boxes) == 2, data=getattr(module, "data_%s" % name)(), bJets=("eq%sb" % b).replace("eqge", "ge"), jets="%sj" % j, fZinvIni=fZinvIni, AQcdIni=0.0, #yAxisLogMinMax=yAxisLogMinMax, ) lst.append(sel) self.add(lst)
def _fill(self): self._name = self.__class__.__name__[1:] self._constrainQcdSlope = True self._qcdParameterIsYield = False self._initialValuesFromMuonSample = False self._initialFZinvFromMc = False self._poiIniMinMax = (0.005, 0.0, 0.1) self._rhoSignalMin = 0.1 self._REwk = "" self._RQcd = "FallingExp" self._nFZinv = "Two" self._legendTitle = "CMS Preliminary, 3.9 fb^{-1}, #sqrt{s} = 8 TeV" from ra1i.data2012hcp import take5_unweighted as module self.add([ likelihood.selection( name="55_0b", note="%s= 0" % likelihood.nb, boxes={ "had": True, "muon": True, "phot": False, "mumu": False }.keys(), data=module.data_0b(), bJets="btag_==_0", fZinvIni=0.50, AQcdIni=0.0, ), #likelihood.selection(name = "55_0b_no_aT", # note = "%s= 0"%likelihood.nb, # boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), # data = module.data_0b_no_aT(), # bJets = "btag_==_0", # fZinvIni = 0.50, # AQcdIni = 0.0, # ), likelihood.selection( name="55_1b", note="%s= 1" % likelihood.nb, boxes={ "had": True, "muon": True, "phot": False, "mumu": False }.keys(), data=module.data_1b(), bJets="btag_==_1", fZinvIni=0.25, AQcdIni=0.0, ), likelihood.selection( name="55_2b", note="%s= 2" % likelihood.nb, boxes={ "had": True, "muon": True, "phot": False, "mumu": False }.keys(), data=module.data_2b(), bJets="btag_==_2", fZinvIni=0.1, AQcdIni=0.0, ), likelihood.selection( name="55_gt2b", note="%s#geq 3" % likelihood.nb, boxes={ "had": True, "muon": True }.keys(), muonForFullEwk=True, data=module.data_ge3b(), bJets="btag_>_2", fZinvIni=0.1, AQcdIni=0.0, ), ])
def _fill(self, updated=True): self._name = self.__class__.__name__[1:] self._constrainQcdSlope = True self._qcdParameterIsYield = False self._initialValuesFromMuonSample = False self._initialFZinvFromMc = False self._poiIniMinMax = (0.005, 0.0, 0.1) self._rhoSignalMin = 0.1 self._REwk = "" self._RQcd = "FallingExp" self._nFZinv = "Two" self._legendTitle = "CMS, L = 4.98 fb^{-1}, #sqrt{s} = 7 TeV" if updated : from inputData.data2011reorg import take3 as module else : from inputData.data2011reorg import take1 as module self.add([likelihood.selection(name = "55_0b", note = "%s= 0"%likelihood.nb, boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), data = module.data_0b(), bJets = "btag_==_0", universalSystematics = True, universalKQcd = True, ), # likelihood.selection(name = "55_ge0b", # note = "%s>= 0"%likelihood.nb, # boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), # data = module.data_ge0b(), # ), # likelihood.selection(name = "55_ge1b", # note = "%s>= 1"%likelihood.nb, # boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), # data = module.data_ge1b(), # bJets = "btag_>_0", # fZinvIni = 0.25, # AQcdIni = 0.0, # ), likelihood.selection(name = "55_1b", note = "%s= 1"%likelihood.nb, boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), data = module.data_1b(), bJets = "btag_==_1", fZinvIni = 0.25, AQcdIni = 0.0, ), likelihood.selection(name = "55_2b", note = "%s= 2"%likelihood.nb, boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), data = module.data_2b(), bJets = "btag_==_2", fZinvIni = 0.1, AQcdIni = 0.0, ), # likelihood.selection(name = "55_ge2b", # note = "%s>= 2"%likelihood.nb, # boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), # data = module.data_ge2b(), # bJets = "btag_>_1", # fZinvIni = 0.1, # AQcdIni = 0.0, # ), likelihood.selection(name = "55_gt2b", #v4!! note = "%s#geq 3"%likelihood.nb, boxes = {"had":True, "muon":True}.keys(), muonForFullEwk = True, data = module.data_ge3b(), #requested studies #boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), #muonForFullEwk = True, #data = mixedMuons_b_sets.data_55_gt2btag_v4_ford_test( systMode = systMode ), bJets = "btag_>_2", fZinvIni = 0.1, AQcdIni = 0.0, AQcdMax = 1.0 if updated else 100.0, ), ])
def _fill(self, moduleName="take14", cms=True): self._name = self.__class__.__name__[1:] self._blackList += ["3b_le3j", "ge4b_le3j"] self._constrainQcdSlope = True self._qcdParameterIsYield = True self._initialValuesFromMuonSample = False self._initialFZinvFromMc = False self._poiIniMinMax = (0.005, 0.0, 0.1) self._rhoSignalMin = 0.1 self._REwk = "" self._RQcd = "FallingExp" self._nFZinv = "Two" self._legendTitle = "11.7 fb^{-1}, #sqrt{s} = 8 TeV" if cms: self._legendTitle = "CMS, " + self._legendTitle exec "from inputData.data2012hcp import %s as module"%moduleName #QCD test if False : print "WARNING: QCD test" self._constrainQcdSlope = False self._initialValuesFromMuonSample = True self._legendTitle += "[NO MHT/MET CUT]" from inputData.data2012hcp import take15a as module lst = [] for b in ["0", "1", "2", "3", "ge4"] : for j in ["ge2", "le3", "ge4"][1:] : yAxisLogMinMax = {"0" :(0.3, 5.0e4) if j=="le3" else (0.3, 5.0e4), "1" :(0.3, 5.0e3) if j=="le3" else (0.3, 3.0e3), "2" :(0.05,2.0e3) if j=="le3" else (0.3, 2.0e3), "3" :(0.05,5.0e2), "ge4":(0.1, 1.0e2), }[b] fZinvIni = {"0b" : {"ge2j":0.57, "le3j":0.57, "ge4j":0.40}, "1b" : {"ge2j":0.40, "le3j":0.40, "ge4j":0.20}, "2b" : {"ge2j":0.10, "le3j":0.10, "ge4j":0.10}, "3b" : {"ge2j":0.05, "le3j":0.05, "ge4j":0.05}, "ge4b": {"ge2j":0.01, "le3j":0.01, "ge4j":0.01}, }[b+"b"][j+"j"] name = "%sb_%sj"%(b,j) #name = "%sb_%sj_alphaTmuon"%(b,j) note = "%s%s%s"%(likelihood.nb, "= " if "ge" not in b else "#", b) if j=="le3" : note += "; 2 #le%s #%s"%(likelihood.nj, j) else : note += "; %s #%s"%(likelihood.nj, j) note = note.replace("ge","geq ").replace("le","leq ") if b=="0" : options = [{"had":True, "muon":True, "phot":False, "mumu":False}] elif b=="1" : options = [{"had":True, "muon":True, "phot":False, "mumu":False}] #options += [{"had":True, "muon":True}] elif b=="2" : options = [{"had":True, "muon":True}] #options += [{"had":True, "muon":True, "phot":False, "mumu":False}] else : options = [{"had":True, "muon":True}] for samplesAndSignalEff in options : sel = likelihood.selection(name = name, note = note, boxes = samplesAndSignalEff.keys(), muonForFullEwk = len(samplesAndSignalEff)==2, data = getattr(module, "data_%s"%name)(), bJets = ("eq%sb"%b).replace("eqge","ge"), jets = "%sj"%j, fZinvIni = fZinvIni, AQcdIni = 0.0, yAxisLogMinMax = yAxisLogMinMax, ) lst.append(sel) self.add(lst)
def _fill(self, moduleName="take14b", cms=False): self._name = self.__class__.__name__[1:] self._blackList += ["3b_le3j", "ge4b_le3j"] self._constrainQcdSlope = True self._qcdParameterIsYield = True self._initialValuesFromMuonSample = False self._initialFZinvFromMc = False self._poiIniMinMax = (0.005, 0.0, 0.1) self._rhoSignalMin = 0.1 self._REwk = "" self._RQcd = "FallingExp" self._nFZinv = "Two" self._legendTitle = "11.7 fb^{-1}, #sqrt{s} = 8 TeV" if cms: self._legendTitle = "CMS, " + self._legendTitle exec "from ra1i.data2012hcp import %s as module" % moduleName #QCD test if False: print "WARNING: QCD test" self._constrainQcdSlope = False self._initialValuesFromMuonSample = True self._legendTitle += "[NO MHT/MET CUT]" from ra1i.data2012hcp import take15a as module lst = [] for b in ["0", "1", "2", "3", "ge4"]: for j in ["ge2", "le3", "ge4"][1:]: yAxisLogMinMax = { "0": (0.3, 5.0e4) if j == "le3" else (0.3, 5.0e4), "1": (0.3, 5.0e3) if j == "le3" else (0.3, 3.0e3), "2": (0.05, 2.0e3) if j == "le3" else (0.3, 2.0e3), "3": (0.05, 5.0e2), "ge4": (0.1, 1.0e2), }[b] fZinvIni = { "0b": { "ge2j": 0.57, "le3j": 0.57, "ge4j": 0.40 }, "1b": { "ge2j": 0.40, "le3j": 0.40, "ge4j": 0.20 }, "2b": { "ge2j": 0.10, "le3j": 0.10, "ge4j": 0.10 }, "3b": { "ge2j": 0.05, "le3j": 0.05, "ge4j": 0.05 }, "ge4b": { "ge2j": 0.01, "le3j": 0.01, "ge4j": 0.01 }, }[b + "b"][j + "j"] name = "%sb_%sj" % (b, j) #name = "%sb_%sj_alphaTmuon"%(b,j) note = "%s%s%s" % (likelihood.nb, "= " if "ge" not in b else "#", b) if j == "le3": note += "; 2 #le%s #%s" % (likelihood.nj, j) else: note += "; %s #%s" % (likelihood.nj, j) note = note.replace("ge", "geq ").replace("le", "leq ") if b == "0": options = [{ "had": True, "muon": True, "phot": False, "mumu": False }] elif b == "1": options = [{ "had": True, "muon": True, "phot": False, "mumu": False }] #options += [{"had":True, "muon":True}] elif b == "2": options = [{"had": True, "muon": True}] #options += [{"had":True, "muon":True, "phot":False, "mumu":False}] else: options = [{"had": True, "muon": True}] for samplesAndSignalEff in options: sel = likelihood.selection( name=name, note=note, boxes=samplesAndSignalEff.keys(), muonForFullEwk=len(samplesAndSignalEff) == 2, data=getattr(module, "data_%s" % name)(), bJets=("eq%sb" % b).replace("eqge", "ge"), jets="%sj" % j, fZinvIni=fZinvIni, AQcdIni=0.0, yAxisLogMinMax=yAxisLogMinMax, ) lst.append(sel) self.add(lst)
def _fill(self): self._name = self.__class__.__name__[1:] self._blackList += ["ge4b_le3j"] self._constrainQcdSlope = False self._qcdParameterIsYield = True self._initialValuesFromMuonSample = True self._initialFZinvFromMc = True self._poiIniMinMax = (0.0, 0.0, 1.0) self._rhoSignalMin = 0.0 self._REwk = "" self._RQcd = "Zero" self._nFZinv = "All" self._legendTitle = "CMS Preliminary, 18.7 fb^{-1}, #sqrt{s} = 8 TeV" #from inputData.data2012dev import take13_blind_nHadFromFitWithTrigEff as module #from inputData.data2012dev import take13_semiBlind_nHadFromBlueFit as module #from inputData.data2012dev import take13_blind_nHadFromFitWithTrigEff_withSignal as module #from inputData.data2012dev import take13_semiBlind_nHadFromBlueFit_withSignal as module from inputData.data2012dev import take13_blind_nHadFromFitWithTrigEff_withT2ttSignal as module #from inputData.data2012dev import take13_semiBlind_nHadFromBlueFit_withT2ttSignal as module #from inputData.data2012dev import take13 as module #QCD test if False : print "WARNING: QCD test" self._constrainQcdSlope = False self._legendTitle += "[NO MHT/MET CUT]" from inputData.data2012hcp import take15a as module lst = [] for b in ["0", "1", "2", "3", "ge4"] : for j in ["ge2", "le3", "ge4"][1:] : yAxisLogMinMax = {"0" :(0.3, 5.0e4) if j=="le3" else (0.3, 5.0e4), "1" :(0.3, 5.0e3) if j=="le3" else (0.3, 3.0e3), "2" :(0.05,2.0e3) if j=="le3" else (0.3, 2.0e3), "3" :(0.05,5.0e2), "ge4":(0.1, 1.0e2), }[b] # out of date (commented below) fZinvIni = {"0b" : {"ge2j":0.57, "le3j":0.5, "ge4j":0.40}, "1b" : {"ge2j":0.40, "le3j":0.40, "ge4j":0.20}, "2b" : {"ge2j":0.10, "le3j":0.10, "ge4j":0.10}, "3b" : {"ge2j":0.05, "le3j":0.05, "ge4j":0.05}, "ge4b": {"ge2j":0.01, "le3j":0.01, "ge4j":0.01}, }[b+"b"][j+"j"] name = "%sb_%sj"%(b,j) if name == "ge4b_le3j": continue #name = "%sb_%sj_alphaTmuon"%(b,j) note = "%s%s%s"%(likelihood.nb, "= " if "ge" not in b else "#", b) note += "; %s#%s"%(likelihood.nj, j) note = note.replace("ge","geq ").replace("le","leq ") if b in ["0", "1"]: boxes = ["had", "muon", "phot", "mumu"] else: boxes = ["had", "muon"] sel = likelihood.selection(name=name, note=note, boxes=boxes, muonForFullEwk=len(boxes) == 2, data=getattr(module, "data_%s" % name)(), bJets=("eq%sb" % b).replace("eqge", "ge"), jets="%sj" % j, fZinvIni=fZinvIni, AQcdIni=0.0, #yAxisLogMinMax=yAxisLogMinMax, ) lst.append(sel) self.add(lst)
def _fill(self, updated=True): self._name = self.__class__.__name__[1:] self._constrainQcdSlope = True self._qcdParameterIsYield = False self._initialValuesFromMuonSample = False self._initialFZinvFromMc = False self._poiIniMinMax = (0.005, 0.0, 0.1) self._rhoSignalMin = 0.1 self._REwk = "" self._RQcd = "FallingExp" self._nFZinv = "Two" self._legendTitle = "CMS, L = 4.98 fb^{-1}, #sqrt{s} = 7 TeV" if updated: from ra1i.data2011reorg import take3 as module else: from ra1i.data2011reorg import take1 as module self.add([ likelihood.selection( name="55_0b", note="%s= 0" % likelihood.nb, boxes={ "had": True, "muon": True, "phot": False, "mumu": False }.keys(), data=module.data_0b(), bJets="btag_==_0", universalSystematics=True, universalKQcd=True, ), # likelihood.selection(name = "55_ge0b", # note = "%s>= 0"%likelihood.nb, # boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), # data = module.data_ge0b(), # ), # likelihood.selection(name = "55_ge1b", # note = "%s>= 1"%likelihood.nb, # boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), # data = module.data_ge1b(), # bJets = "btag_>_0", # fZinvIni = 0.25, # AQcdIni = 0.0, # ), likelihood.selection( name="55_1b", note="%s= 1" % likelihood.nb, boxes={ "had": True, "muon": True, "phot": False, "mumu": False }.keys(), data=module.data_1b(), bJets="btag_==_1", fZinvIni=0.25, AQcdIni=0.0, ), likelihood.selection( name="55_2b", note="%s= 2" % likelihood.nb, boxes={ "had": True, "muon": True, "phot": False, "mumu": False }.keys(), data=module.data_2b(), bJets="btag_==_2", fZinvIni=0.1, AQcdIni=0.0, ), # likelihood.selection(name = "55_ge2b", # note = "%s>= 2"%likelihood.nb, # boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), # data = module.data_ge2b(), # bJets = "btag_>_1", # fZinvIni = 0.1, # AQcdIni = 0.0, # ), likelihood.selection( name="55_gt2b", #v4!! note="%s#geq 3" % likelihood.nb, boxes={ "had": True, "muon": True }.keys(), muonForFullEwk=True, data=module.data_ge3b(), #requested studies #boxes = {"had":True, "muon":True, "phot":False, "mumu":False}.keys(), #muonForFullEwk = True, #data = mixedMuons_b_sets.data_55_gt2btag_v4_ford_test( systMode = systMode ), bJets="btag_>_2", fZinvIni=0.1, AQcdIni=0.0, AQcdMax=1.0 if updated else 100.0, ), ])