def cutFlow(cutTreeMC, model): out = [] cutTreeMC.Attach(count_total) if isCmssm(model): cutTreeMC.TAttach(count_total, selection) out.append(tripleScale(model=switches()["model"], cutTree=cutTreeMC, cut=count_total, label="before")) elif isSms(model): cutTreeMC.TAttach(count_total, smsFilter) out.append(smsOps(model=switches()["model"], cutTree=cutTreeMC, cut=sms_filter, label="before")) cutTreeMC.TAttach(smsFilter, selection) if switches()["selection"] != "muon": cutTreeMC.TAttach(selection, oddMuon) cutTreeMC.TAttach(oddMuon, oddElectron) cutTreeMC.TAttach(oddElectron, oddPhoton) cutTreeMC.TAttach(oddPhoton, numComLeptons) cutTreeMC.TAttach(numComLeptons, numComPhotons) cutTreeMC.TAttach(numComPhotons, LeadingJetEta) cutTreeMC.TAttach(LeadingJetEta, badMuonInJet) cutTreeMC.TAttach(badMuonInJet, oddJet) cutTreeMC.TAttach(oddJet, numComJetsGeq2) cutTreeMC.TAttach(numComJetsGeq2, secondJetET) cutTreeMC.TAttach(secondJetET, alphaT) cutTreeMC.TAttach(alphaT, deadECAL_MC) cutTreeMC.TAttach(deadECAL_MC, MHToverMET) else: cutTreeMC.TAttach(selection, oddMuon) cutTreeMC.TAttach(oddMuon, oddElectron) cutTreeMC.TAttach(oddElectron, oddPhoton) cutTreeMC.TAttach(oddPhoton, numComElectrons) cutTreeMC.TAttach(numComElectrons, numComMuons) cutTreeMC.TAttach(numComMuons, minDRMuonJetCut) cutTreeMC.TAttach(minDRMuonJetCut, ZMassCut) cutTreeMC.TAttach(ZMassCut, CommonMHTovHT) cutTreeMC.TAttach(CommonMHTovHT, PFMTCut30) cutTreeMC.TAttach(PFMTCut30, numComPhotons) cutTreeMC.TAttach(numComPhotons, LeadingJetEta) cutTreeMC.TAttach(LeadingJetEta, badMuonInJet) cutTreeMC.TAttach(badMuonInJet, oddJet) cutTreeMC.TAttach(oddJet, numComJetsGeq2) cutTreeMC.TAttach(numComJetsGeq2, secondJetET) cutTreeMC.TAttach(secondJetET, alphaT) cutTreeMC.TAttach(alphaT, deadECAL_MC) cutTreeMC.TAttach(deadECAL_MC, MHToverMET) out.append( addBinnedStuff(model=switches()["model"], cutTree=cutTreeMC, cut=MHToverMET, htBins=[250, 300, 350, 450]) ) out.append( addBinnedStuff( model=switches()["model"], cutTree=cutTreeMC, cut=MHToverMET, htBins=[275, 325] + [375 + 100 * i for i in range(6)], ) ) return out
def sample(): if isCmssm(switches()["model"]): return eval("PhysicsProcesses_mSUGRA_%sFall10v1" % switches()["model"].replace("tanB", "tanbeta")) elif isSms(switches()["model"]): return eval( "PhysicsProcesses_Topology%s_38xFall10_spadhi%s" % (switches()["model"], "_new" if switches()["model"] == "T2" else "") ) else: return None
def sample(): if isCmssm(switches()["model"]): return eval("PhysicsProcesses_mSUGRA_%sFall10v1" % switches()["model"].replace("tanB", "tanbeta")) elif isSms(switches()["model"]): return eval("PhysicsProcesses_Topology%s_38xFall10_spadhi%s" % (switches()["model"], "_new" if switches()["model"] == "T2" else "")) else: return None
def checkSwitches(d) : assert d["model"] in ["T1","T2","tanB3","tanB10","tanB50"] assert d["jes"] in ["","+ve","-ve"] assert isCmssm(d["model"]) or isSms(d["model"])
def cutFlow(cutTreeMC, model): out = [] cutTreeMC.Attach(count_total) if isCmssm(model): cutTreeMC.TAttach(count_total, selection) out.append( tripleScale(model=switches()["model"], cutTree=cutTreeMC, cut=count_total, label="before")) elif isSms(model): cutTreeMC.TAttach(count_total, smsFilter) out.append( smsOps(model=switches()["model"], cutTree=cutTreeMC, cut=sms_filter, label="before")) cutTreeMC.TAttach(smsFilter, selection) if switches()["selection"] != "muon": cutTreeMC.TAttach(selection, oddMuon) cutTreeMC.TAttach(oddMuon, oddElectron) cutTreeMC.TAttach(oddElectron, oddPhoton) cutTreeMC.TAttach(oddPhoton, numComLeptons) cutTreeMC.TAttach(numComLeptons, numComPhotons) cutTreeMC.TAttach(numComPhotons, LeadingJetEta) cutTreeMC.TAttach(LeadingJetEta, badMuonInJet) cutTreeMC.TAttach(badMuonInJet, oddJet) cutTreeMC.TAttach(oddJet, numComJetsGeq2) cutTreeMC.TAttach(numComJetsGeq2, secondJetET) cutTreeMC.TAttach(secondJetET, alphaT) cutTreeMC.TAttach(alphaT, deadECAL_MC) cutTreeMC.TAttach(deadECAL_MC, MHToverMET) else: cutTreeMC.TAttach(selection, oddMuon) cutTreeMC.TAttach(oddMuon, oddElectron) cutTreeMC.TAttach(oddElectron, oddPhoton) cutTreeMC.TAttach(oddPhoton, numComElectrons) cutTreeMC.TAttach(numComElectrons, numComMuons) cutTreeMC.TAttach(numComMuons, minDRMuonJetCut) cutTreeMC.TAttach(minDRMuonJetCut, ZMassCut) cutTreeMC.TAttach(ZMassCut, CommonMHTovHT) cutTreeMC.TAttach(CommonMHTovHT, PFMTCut30) cutTreeMC.TAttach(PFMTCut30, numComPhotons) cutTreeMC.TAttach(numComPhotons, LeadingJetEta) cutTreeMC.TAttach(LeadingJetEta, badMuonInJet) cutTreeMC.TAttach(badMuonInJet, oddJet) cutTreeMC.TAttach(oddJet, numComJetsGeq2) cutTreeMC.TAttach(numComJetsGeq2, secondJetET) cutTreeMC.TAttach(secondJetET, alphaT) cutTreeMC.TAttach(alphaT, deadECAL_MC) cutTreeMC.TAttach(deadECAL_MC, MHToverMET) out.append( addBinnedStuff(model=switches()["model"], cutTree=cutTreeMC, cut=MHToverMET, htBins=[250, 300, 350, 450])) out.append( addBinnedStuff(model=switches()["model"], cutTree=cutTreeMC, cut=MHToverMET, htBins=[275, 325] + [375 + 100 * i for i in range(6)])) return out
def checkSwitches(d): assert d["model"] in ["T1", "T2", "tanB3", "tanB10", "tanB50"] assert d["jes"] in ["", "+ve", "-ve"] assert isCmssm(d["model"]) or isSms(d["model"])