for nEvent in range(0, nev): if (nEvent%10000 == 0) and i>0 : print nEvent c.GetEntry(eList.GetEntry(nEvent)) m0 = getValue( c, "msugraM0") m12 = getValue( c, "msugraM12") # tanb = getValue( c, "msugraTanbeta") # A0 = getValue( c, "msugraA0") # signMu = getValue( c, "msugraSignMu") btag0 = getValue( c, "btag0") btag1 = getValue( c, "btag1") ht = getValue( c, "ht") barepfMet = getValue( c, "barepfmet") ileaf = c.GetLeaf("ints_pfRA4Tupelizer_sparticles_PAT.obj") pcode = productionCode([int(ileaf.GetValue(0)), int(ileaf.GetValue(1))]) # sstring = getMSUGRAShortString(m0, m12, tanb, A0, signMu) sstring = getMSUGRAShortString(m0, m12, 10, 0, 1) for bj in bjetbins.keys(): for lhbin in binningHT: for lmbin in binningMET: if not LO_efficiency[bj][lhbin][lmbin].has_key(sstring): LO_efficiency[bj][lhbin][lmbin][sstring] = 0 LO_events[bj][lhbin][lmbin][sstring] = 0 NLO_efficiency[bj][lhbin][lmbin][sstring] = 0 NLO_events[bj][lhbin][lmbin][sstring] = 0 if not efficiencyPP[bj][lhbin][lmbin].has_key(sstring): efficiencyPP[bj][lhbin][lmbin][sstring] = {} LO_eventsPP[bj][lhbin][lmbin][sstring] = {} NLO_eventsPP[bj][lhbin][lmbin][sstring] = {}
c.Draw(">>eList", "(1)") eList = ROOT.gROOT.Get("eList") print "Total # of Events in Count-Scan:",eList.GetN() nev = eList.GetN() if maxEvents>0: nev = min(maxEvents, eList.GetN()) for nEvent in range(0, nev): if (nEvent%10000 == 0): print nEvent c.GetEntry(eList.GetEntry(nEvent)) m0 = getValue( c, "msugraM0") m12 = getValue( c, "msugraM12") pcode = productionCode([getValue( c, "sparticle0"), getValue( c, "sparticle1") ]) sstring = getMSUGRAShortString(m0, m12, 10, 0, 1) if not counts.has_key(sstring): counts[sstring] = 0 countsPP[sstring] = {} if not countsPP[sstring].has_key(pcode): countsPP[sstring][pcode] = 0 counts[sstring]+=1 countsPP[sstring][pcode]+=1 if not small: pickle.dump(counts, open("/data/schoef/efficiencies/msugra_counts.pkl", 'wb')) print "Written", "/data/schoef/efficiencies/msugra_counts.pkl" pickle.dump(countsPP, open("/data/schoef/efficiencies/msugra_countsPP.pkl", 'wb')) print "Written", "/data/schoef/efficiencies/msugra_countsPP.pkl"
for nEvent in range(0, nev): if (nEvent % 10000 == 0) and i > 0: print nEvent c.GetEntry(eList.GetEntry(nEvent)) m0 = getValue(c, "msugraM0") m12 = getValue(c, "msugraM12") # tanb = getValue( c, "msugraTanbeta") # A0 = getValue( c, "msugraA0") # signMu = getValue( c, "msugraSignMu") btag0 = getValue(c, "btag0") btag1 = getValue(c, "btag1") ht = getValue(c, "ht") barepfMet = getValue(c, "barepfmet") ileaf = c.GetLeaf("ints_pfRA4Tupelizer_sparticles_PAT.obj") pcode = productionCode([int(ileaf.GetValue(0)), int(ileaf.GetValue(1))]) # sstring = getMSUGRAShortString(m0, m12, tanb, A0, signMu) sstring = getMSUGRAShortString(m0, m12, 10, 0, 1) for bj in bjetbins.keys(): for lhbin in binningHT: for lmbin in binningMET: if not LO_efficiency[bj][lhbin][lmbin].has_key(sstring): LO_efficiency[bj][lhbin][lmbin][sstring] = 0 LO_events[bj][lhbin][lmbin][sstring] = 0 NLO_efficiency[bj][lhbin][lmbin][sstring] = 0 NLO_events[bj][lhbin][lmbin][sstring] = 0 if not efficiencyPP[bj][lhbin][lmbin].has_key(sstring): efficiencyPP[bj][lhbin][lmbin][sstring] = {} LO_eventsPP[bj][lhbin][lmbin][sstring] = {} NLO_eventsPP[bj][lhbin][lmbin][sstring] = {}
c.Draw(">>eList", "(1)") eList = ROOT.gROOT.Get("eList") print "Total # of Events in Count-Scan:", eList.GetN() nev = eList.GetN() if maxEvents > 0: nev = min(maxEvents, eList.GetN()) for nEvent in range(0, nev): if (nEvent % 10000 == 0): print nEvent c.GetEntry(eList.GetEntry(nEvent)) m0 = getValue(c, "msugraM0") m12 = getValue(c, "msugraM12") pcode = productionCode( [getValue(c, "sparticle0"), getValue(c, "sparticle1")]) sstring = getMSUGRAShortString(m0, m12, 10, 0, 1) if not counts.has_key(sstring): counts[sstring] = 0 countsPP[sstring] = {} if not countsPP[sstring].has_key(pcode): countsPP[sstring][pcode] = 0 counts[sstring] += 1 countsPP[sstring][pcode] += 1 if not small: pickle.dump(counts, open("/data/schoef/efficiencies/msugra_counts.pkl", 'wb')) print "Written", "/data/schoef/efficiencies/msugra_counts.pkl" pickle.dump(countsPP,