-
Notifications
You must be signed in to change notification settings - Fork 0
/
DrawCombinedLimit.py
95 lines (73 loc) · 2.64 KB
/
DrawCombinedLimit.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import ROOT
import sys
CMSfile = ROOT.TFile("LimitcontoursAxial_observed_hist_bothCMS.root","OPEN")
combinedfile = ROOT.TFile("LimitcontoursAxial_observed_hist_bothcombined.root","OPEN")
cms = ROOT.TLatex(0.12, 0.89, '#splitline{CMS #scale[0.8]{#it{simulation}}}{#scale[0.8]{work in progress}}' )
cms.SetNDC()
cms.SetTextSize(0.04)
ROOT.gStyle.SetPalette(1)
lumi = ROOT.TLatex(0.7, 0.91, '35.9 fb^{-1} (13 TeV)' )
lumi.SetNDC()
lumi.SetTextSize(0.03)
ROOT.gStyle.SetPadRightMargin(0.15)
w=1200
h=800
canvas = ROOT.TCanvas()
canvas.cd()
canvas.SetCanvasSize(w,h)
expGraph = combinedfile.Get("MCgraph_expected")
expGraph.SetMarkerStyle(20)
expGraph.GetHistogram().Smooth()
expGraph.GetHistogram().SetContour(1000)
expGraph.SetNpx(500)
expGraph.SetNpy(500)
ROOT.gPad.SetLogz()
expGraph.Draw("colz")
expGraph.GetHistogram().GetXaxis().SetTitle("m_{med} [GeV]")
expGraph.GetHistogram().GetXaxis().SetTitleSize(0.05)
expGraph.GetHistogram().GetXaxis().SetTitleOffset(0.8)
expGraph.GetHistogram().GetYaxis().SetTitle("m_{DM} [GeV]")
expGraph.GetHistogram().GetYaxis().SetTitleSize(0.05)
expGraph.GetHistogram().GetYaxis().SetTitleOffset(0.8)
expGraph.GetHistogram().SetMinimum(0.01)
expGraph.GetHistogram().GetZaxis().SetTitle("#sigma_{95% CL}^{expected}/#sigma_{th}")
expGraph.GetHistogram().GetZaxis().SetTitleSize(0.05)
expGraph.GetHistogram().GetZaxis().SetTitleOffset(0.8)
expGraph.SetTitle("Exclusion limits at 95% CL")
expContcombined = combinedfile.Get("expected")
expContcombined.Draw("same")
expContcombined.SetLineColor(ROOT.kRed)
expContUp1 = combinedfile.Get("up1")
expContUp1.Draw("same")
expContUp1.SetLineColor(ROOT.kRed)
expContUp1.SetLineStyle(5)
expContDown1 = combinedfile.Get("down1")
expContDown1.Draw("same")
expContDown1.SetLineColor(ROOT.kRed)
expContDown1.SetLineStyle(5)
expContCMS = CMSfile.Get("expected")
expContCMS.Draw("same")
expContCMSUp1 = CMSfile.Get("up1")
expContCMSUp1.Draw("same")
expContCMSUp1.SetLineStyle(5)
expContCMSDown1 = CMSfile.Get("down1")
expContCMSDown1.Draw("same")
expContCMSDown1.SetLineStyle(5)
points=CMSfile.Get("points")
points.Draw("*")
legend = ROOT.TLegend(0.1,0.7,0.48,0.9);
legend.AddEntry(expContcombined,"Combined median expected","l");
legend.AddEntry(expContUp1,"Combined median expected #pm 1 #sigma","l");
legend.AddEntry(expContCMS,"Median expected","l");
legend.AddEntry(expContCMSUp1,"Median expected #pm 1 #sigma","l");
legend.Draw();
cms = ROOT.TLatex(0.12, 0.91, 'CMS private work in progress' )
cms.SetNDC()
cms.SetTextSize(0.04)
ROOT.gStyle.SetPalette(1)
lumi = ROOT.TLatex(0.7, 0.91, '35.9 fb^{-1} (13 TeV)' )
lumi.SetNDC()
lumi.SetTextSize(0.03)
cms.Draw()
lumi.Draw()
canvas.SaveAs("combinedLimitAxial.pdf")