Example #1
0
#                 "afters/elastic_after_1.1_15_1.3_.8_6_1.4_.8.root",
#                 "afters/elastic_after_1.1_25_1.1_.8_6_1.4_.8.root"]

specialPlots = ["afters/elastic_after_1.1_50_1.15_.4_8_1.2_.4.root",
                "afters/elastic_after_1.1_50_1.3_.8_4_1.4_.8.root",
                "afters/elastic_after_.9_50_1.15_.8_8_1.4_.8.root",
                "afters/elastic_after_1.1_15_1._.4_4_1.2_.4.root"]

convergedInfo=[]
convergedInfo.append([1.81E-04,1.3995,75.287,1.3161,0.4548,18.57,1.7541,0.92578,6.47,1.15,0.633])
convergedInfo.append([9.02E-05,0.77693,36.094,1.5103,0.70546,7.0245,1.6665,0.96545,6.47,1.15,0.633])
convergedInfo.append([7.45E-05,1.1555,45.559,1.191,0.56288,6.485,1.046,1.1883,6.47,1.15,0.633])
convergedInfo.append([6.45E-05,1.3997,11.14,0.96429,1.1884,13.793,1.026,0.95821,6.47,1.15,0.633])


colors = [TColor.GetColorDark(ROOT.kGreen),ROOT.kBlue,ROOT.kRed,ROOT.kOrange]

tmpzip = zip(specialPlots,colors,convergedInfo)

for fileName, color, info in tmpzip:
  MakeCombined(fileName,color,info)

# for plot in specialPlots: #this bit puts the speical ones at the end so they are drawn on top
#   args.FILE.remove(plot)

# args.FILE += specialPlots

args.FILE = specialPlots


for curFileString in args.FILE:
Example #2
0
]

onepoint = ROOT.TGraphErrors()
onepoint.SetPoint(0,124.0,0.0012012)
onepoint.SetPointError(0,0,0.0003465)
onepoint.SetMarkerColor(38)
onepoint.SetMarkerStyle(20)
onepoint.SetMarkerSize(1.5)

FILES = []
MEDFILES = []
GR=[]
fitFILES = []
fitGR=[]

colors=[1,2,TColor.GetColorDark(3),4,6,7,8]
styles=[1,1,1,1,1,1,1]
colors_med=[38]
styles_med=[7]

fitcolors=[1,2,3,4,6,7,9]
fitstyles=[1,1,1,1,1,1,1,1]

if int(bin)==1: names=["Local P-value (Bin VBF)"]
else:
  names=[
  "Local P-value (Bin "+str(int(bin)-1)+")"

  #"#splitline{Local P-value}{(combined)}",
  #"#splitline{Local P-value}{(Bin VBF)}",
  #"#splitline{Local P-value}{(Bin 1)}",
Example #3
0
def combinedDraw(frescoGraph, goodPID, badPID, goodCORR, badCORR):
    #print "combinedDraw start"
    canvas = TCanvas('canvas', 'shouldnotseethis', 0, 0, 1280, 720)

    MG = TMultiGraph()
    legend = ROOT.TLegend(0.55, .55, .9, .9)
    ##legend.SetBorderSize(0)
    #underHisto.SetLineColor(ROOT.kBlack)
    #underHisto.SetMinimum(0)
    ##underHisto.SetMaximum(underHisto.GetMaximum() * 1.5)
    #underHisto.GetXaxis().SetRangeUser(0,180)
    #underHisto.SetTitle(title)
    #underHisto.SetLineColor(ROOT.kBlack)
    #underHisto.SetTitle(title)
    #underHisto.GetYaxis().SetTitle("Counts in Arb. Units")
    #legend.AddEntry(underHisto,"Simulated Angular Distribution")
    #underHisto.SetStats(ROOT.kFALSE)
    #underHisto.Draw()

    if frescoGraph:
        #print "frescoGraph"
        frescoGraph.SetMarkerColor(ROOT.kBlack)
        frescoGraph.SetLineColor(ROOT.kBlack)
        frescoGraph.SetFillColor(ROOT.kBlack)
        #frescoGraph.SetMarkerStyle(33)
        MG.Add(frescoGraph, "L")
        legend.AddEntry(frescoGraph, "Fresco Output")
    else:
        print "No FrescoGraph!!!"
        return

    if goodPID:
        #print "goodPID"
        goodPID.SetMarkerColor(ROOT.kGreen)
        goodPID.SetLineColor(ROOT.kGreen)
        goodPID.SetFillColor(ROOT.kGreen)
        #goodPID.SetMarkerStyle(33)
        MG.Add(goodPID, "P")
        legend.AddEntry(goodPID, "ScaledPID")
    else:
        print "No goodPID in Draw()"

    if goodCORR:
        #print "goodCORR"
        goodCORR.SetMarkerColor(TColor.GetColorDark(ROOT.kGreen))
        goodCORR.SetLineColor(TColor.GetColorDark(ROOT.kGreen))
        goodCORR.SetFillColor(TColor.GetColorDark(ROOT.kGreen))
        goodCORR.SetMarkerStyle(21)
        #afterHisto.Draw("PLsame")
        MG.Add(goodCORR, "P")
        legend.AddEntry(goodCORR, "Good Dual Det")
    else:
        print "No goodCORR in Draw()"

    if badPID:
        #print "badPID"
        badPID.SetMarkerColor(ROOT.kRed)
        badPID.SetLineColor(ROOT.kRed)
        badPID.SetFillColor(ROOT.kRed)
        badPID.SetMarkerStyle(33)
        MG.Add(badPID, "P")
        legend.AddEntry(badPID, "Discard PID")
    else:
        print "No badPID in Draw()"

    if badCORR:
        #print "badCORR"
        badCORR.SetMarkerColor(TColor.GetColorDark(ROOT.kRed))
        badCORR.SetLineColor(TColor.GetColorDark(ROOT.kRed))
        badCORR.SetFillColor(TColor.GetColorDark(ROOT.kRed))
        badCORR.SetMarkerStyle(21)
        MG.Add(badCORR, "P")
        legend.AddEntry(badCORR, "Discard Dual Det")
    else:
        print "No badCORR in Draw()"

    MG.SetTitle(
        "Scaled Elastic Distribution for detector {};Center of Mass Angle in Degrees;Cross section in mb/sr"
        .format(det))
    MG.SetName("MG_d{}".format(det))
    MG.Draw("AP")
    legend.Draw()
    MG.Write()
    MG.SetMaximum(500)
    MG.SetMinimum(0)

    canvas.SetLogy()
    #MG.GetYaxis().SetRangeUser(0,500)

    MG.Draw()
    canvas.SaveAs(MG.GetName() + '.png')