Ejemplo n.º 1
0
    rocGraph.GetXaxis().SetRangeUser(0, 1)
    rocGraph.GetYaxis().SetRangeUser(0, 1)
    c.cd(4)
    rocGraph.Draw("ALP")
    c.Modified()
    c.Print(sys.argv[1] + ".pdf".format(name), "Title:" + name)


cuts = [
    "uncP>0.85", "uncP<1.2", "tarChisq<50", "max(topTrkChisq,botTrkChisq)<50",
    "abs(topTrkT-botTrkT)<4", "abs(tarPX)/tarP<0.005", "abs(tarPY)/tarP<0.003"
]

c.Print(sys.argv[1] + ".pdf[")

makePlots("uncP", "uncP", 100, 0.5, 1.5, makeCutString(cuts[2:]), True)
makePlots("tarP", "tarP", 100, 0.5, 1.5, makeCutString(cuts[2:]), True)
makePlots("abs(uncP)", "abs(uncP-1.056)", 100, 0, 1, makeCutString(cuts[2:]),
          True)
makePlots("abs(vzcP)", "abs(vzcP-1.056)", 100, 0, 1, makeCutString(cuts[2:]),
          True)
makePlots("abs(tarP)", "abs(tarP-1.056)", 100, 0, 1, makeCutString(cuts[2:]),
          True)

makePlots("tarChisq", "tarChisq", 200, 0, 200, makeCutString(cuts, 2), True)
makePlots("bscChisq", "bscChisq", 200, 0, 200, makeCutString(cuts, 2), True)
makePlots("vzcChisq", "vzcChisq", 200, 0, 100, makeCutString(cuts, 2), True)
makePlots("uncChisq", "uncChisq", 200, 0, 100, makeCutString(cuts, 2), True)
makePlots("tar-uncChisq", "tarChisq-uncChisq", 200, 0, 200,
          makeCutString(cuts, 2), True)
makePlots("tar-bscChisq", "tarChisq-bscChisq", 200, 0, 100,
Ejemplo n.º 2
0
outFile = TFile(sys.argv[1] + ".root", "RECREATE")

cuts = [
    "bscChisq<10",
    "max(eleTrkChisq,posTrkChisq)<30",
    #"minPositiveIso-0.02*bscChisq>-10",
    "eleP<0.8",
    #"abs(eleFirstHitX-posFirstHitX+2)<700",
    "abs(eleP-posP)/(eleP+posP)<0.4",
    "posTrkD0-5*posPX/posP<1.5",
    "min(eleMinPositiveIso+0.5*(eleTrkZ0-5*elePY/eleP)*sign(elePY),posMinPositiveIso+0.5*(posTrkZ0-5*posPY/posP)*sign(posPY))>0",
    "bscChisq-uncChisq<5"
]

c.Print(sys.argv[1] + ".pdf[")
makePlots(c, goodEvents, badEvents, sys.argv[1], "bscChisq", "bscChisq", 100,
          0, 50, makeCutString(cuts, 0), True)
makePlots(c, goodEvents, badEvents, sys.argv[1], "bsc-uncChisq",
          "bscChisq-uncChisq", 200, 0, 50, makeCutString(cuts, 6), True)
makePlots(c, goodEvents, badEvents, sys.argv[1], "uncChisq", "uncChisq", 100,
          0, 50, makeCutString(cuts), True)

makePlots(c, goodEvents, badEvents, sys.argv[1],
          "trkChisq", "max(eleTrkChisq,posTrkChisq)", 100, 0, 50,
          makeCutString(cuts, 1), True)

makePlots(c, goodEvents, badEvents, sys.argv[1], "minPosIso", "minPositiveIso",
          200, 0, 5, makeCutString(cuts), False)
makePlots(c, goodEvents, badEvents, sys.argv[1],
          "minPosIso_sloped", "minPositiveIso-0.02*bscChisq", 200, 0, 5,
          makeCutString(cuts), False)
makePlots(c, goodEvents, badEvents, sys.argv[1],
Ejemplo n.º 3
0
    rocGraph.Draw("ALP")
    c.Modified()
    c.Print(sys.argv[1]+".pdf".format(name),"Title:"+name)


cuts=["uncP>0.85",
        "uncP<1.2",
        "tarChisq<50",
        "max(topTrkChisq,botTrkChisq)<50",
        "abs(topTrkT-botTrkT)<4",
        "abs(tarPX)/tarP<0.005",
        "abs(tarPY)/tarP<0.003"]

c.Print(sys.argv[1]+".pdf[")

makePlots("uncP","uncP",100,0.5,1.5,makeCutString(cuts[2:]),True)
makePlots("tarP","tarP",100,0.5,1.5,makeCutString(cuts[2:]),True)
makePlots("abs(uncP)","abs(uncP-1.056)",100,0,1,makeCutString(cuts[2:]),True)
makePlots("abs(vzcP)","abs(vzcP-1.056)",100,0,1,makeCutString(cuts[2:]),True)
makePlots("abs(tarP)","abs(tarP-1.056)",100,0,1,makeCutString(cuts[2:]),True)



makePlots("tarChisq","tarChisq",200,0,200,makeCutString(cuts,2),True)
makePlots("bscChisq","bscChisq",200,0,200,makeCutString(cuts,2),True)
makePlots("vzcChisq","vzcChisq",200,0,100,makeCutString(cuts,2),True)
makePlots("uncChisq","uncChisq",200,0,100,makeCutString(cuts,2),True)
makePlots("tar-uncChisq","tarChisq-uncChisq",200,0,200,makeCutString(cuts,2),True)
makePlots("tar-bscChisq","tarChisq-bscChisq",200,0,100,makeCutString(cuts,2),True)

makePlots("trkChisq","max(topTrkChisq,botTrkChisq)",100,0,100,makeCutString(cuts,3),True)
Ejemplo n.º 4
0
outFile = TFile(sys.argv[1] + ".root", "RECREATE")

cuts = [
    "bscChisq<10",
    "max(eleTrkChisq,posTrkChisq)<30",
    # "minPositiveIso-0.02*bscChisq>-10",
    "eleP<0.8",
    # "abs(eleFirstHitX-posFirstHitX+2)<700",
    "abs(eleP-posP)/(eleP+posP)<0.4",
    "posTrkD0-5*posPX/posP<1.5",
    "min(eleMinPositiveIso+0.5*(eleTrkZ0-5*elePY/eleP)*sign(elePY),posMinPositiveIso+0.5*(posTrkZ0-5*posPY/posP)*sign(posPY))>0",
    "bscChisq-uncChisq<5",
]

c.Print(sys.argv[1] + ".pdf[")
makePlots(c, goodEvents, badEvents, sys.argv[1], "bscChisq", "bscChisq", 100, 0, 50, makeCutString(cuts, 0), True)
makePlots(
    c, goodEvents, badEvents, sys.argv[1], "bsc-uncChisq", "bscChisq-uncChisq", 200, 0, 50, makeCutString(cuts, 6), True
)
makePlots(c, goodEvents, badEvents, sys.argv[1], "uncChisq", "uncChisq", 100, 0, 50, makeCutString(cuts), True)

makePlots(
    c,
    goodEvents,
    badEvents,
    sys.argv[1],
    "trkChisq",
    "max(eleTrkChisq,posTrkChisq)",
    100,
    0,
    50,
Ejemplo n.º 5
0
#badEvents = events.CopyTree("uncVZ*uncM>0.5")
outFile = TFile(sys.argv[1]+".root","RECREATE")


cuts=["max(abs(eleClT-eleTrkT-43),abs(posClT-posTrkT-43))<4",
        "max(eleMatchChisq,posMatchChisq)<5",
        "tarChisq<50",
        "max(eleTrkChisq,posTrkChisq)<50",
        "eleP<0.8",
        "tarP<1.2",
        "abs(tarPX)/tarP<0.025",
        "abs(tarPY)/tarP<0.015"]

c.Print(sys.argv[1]+".pdf[")

makePlots(c,goodEvents,badEvents,sys.argv[1],"matchDt","max(abs(eleClT-eleTrkT-43),abs(posClT-posTrkT-43))",100,0,20,makeCutString(cuts,0),True)
makePlots(c,goodEvents,badEvents,sys.argv[1],"eleMatchDt","abs(eleClT-eleTrkT-43)",100,0,20,makeCutString(cuts,0),True)
makePlots(c,goodEvents,badEvents,sys.argv[1],"posMatchDt","abs(posClT-posTrkT-43)",100,0,20,makeCutString(cuts,0),True)

makePlots(c,goodEvents,badEvents,sys.argv[1],"matchChisq","max(eleMatchChisq,posMatchChisq)",100,0,20,makeCutString(cuts,1),True)
makePlots(c,goodEvents,badEvents,sys.argv[1],"eleMatchChisq","eleMatchChisq",100,0,20,makeCutString(cuts,1),True)
makePlots(c,goodEvents,badEvents,sys.argv[1],"posMatchChisq","posMatchChisq",100,0,20,makeCutString(cuts,1),True)

makePlots(c,goodEvents,badEvents,sys.argv[1],"tarChisq","tarChisq",200,0,200,makeCutString(cuts,2),True)
makePlots(c,goodEvents,badEvents,sys.argv[1],"bscChisq","bscChisq",200,0,200,makeCutString(cuts,2),True)
makePlots(c,goodEvents,badEvents,sys.argv[1],"vzcChisq","vzcChisq",200,0,100,makeCutString(cuts,2),True)
makePlots(c,goodEvents,badEvents,sys.argv[1],"uncChisq","uncChisq",200,0,100,makeCutString(cuts,2),True)
makePlots(c,goodEvents,badEvents,sys.argv[1],"tar-uncChisq","tarChisq-uncChisq",200,0,200,makeCutString(cuts,2),True)
makePlots(c,goodEvents,badEvents,sys.argv[1],"tar-bscChisq","tarChisq-bscChisq",200,0,100,makeCutString(cuts,2),True)
#makePlots(c,goodEvents,badEvents,sys.argv[1],"vzc-uncChisq","vzcChisq-uncChisq",200,0,100,makeCutString(cuts,2),True)
Ejemplo n.º 6
0
badEvents = badFile.Get("ntuple")
#goodEvents = events.CopyTree("abs(uncVZ)*uncM<0.1")
#badEvents = events.CopyTree("uncVZ*uncM>0.5")
outFile = TFile(sys.argv[1] + ".root", "RECREATE")

cuts = [
    "max(abs(eleClT-eleTrkT-43),abs(posClT-posTrkT-43))<4",
    "max(eleMatchChisq,posMatchChisq)<5", "tarChisq<50",
    "max(eleTrkChisq,posTrkChisq)<50", "eleP<0.8", "tarP<1.2",
    "abs(tarPX)/tarP<0.025", "abs(tarPY)/tarP<0.015"
]

c.Print(sys.argv[1] + ".pdf[")

makePlots(c, goodEvents, badEvents, sys.argv[1], "matchDt",
          "max(abs(eleClT-eleTrkT-43),abs(posClT-posTrkT-43))", 100, 0, 20,
          makeCutString(cuts, 0), True)
makePlots(c, goodEvents, badEvents, sys.argv[1], "eleMatchDt",
          "abs(eleClT-eleTrkT-43)", 100, 0, 20, makeCutString(cuts, 0), True)
makePlots(c, goodEvents, badEvents, sys.argv[1], "posMatchDt",
          "abs(posClT-posTrkT-43)", 100, 0, 20, makeCutString(cuts, 0), True)

makePlots(c, goodEvents, badEvents, sys.argv[1],
          "matchChisq", "max(eleMatchChisq,posMatchChisq)", 100, 0, 20,
          makeCutString(cuts, 1), True)
makePlots(c, goodEvents, badEvents, sys.argv[1], "eleMatchChisq",
          "eleMatchChisq", 100, 0, 20, makeCutString(cuts, 1), True)
makePlots(c, goodEvents, badEvents, sys.argv[1], "posMatchChisq",
          "posMatchChisq", 100, 0, 20, makeCutString(cuts, 1), True)

makePlots(c, goodEvents, badEvents, sys.argv[1], "tarChisq", "tarChisq", 200,