ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/plot.cc
Revision: 1.16
Committed: Wed Feb 9 21:00:29 2011 UTC (14 years, 3 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.15: +61 -35 lines
Log Message:
updated Tevatron and LEP contours

File Contents

# User Rev Content
1 auterman 1.1 #include "plot.h"
2     #include "SusyScan.h"
3 auterman 1.2 #include "GeneratorMasses.h"
4 auterman 1.4 #include "PlotTools.h"
5 auterman 1.2 #include "TheLimits.h"
6 auterman 1.6 #include "GlobalFunctions.h"
7 auterman 1.1
8     #include "TRint.h"
9     #include "TROOT.h"
10     #include "TObjArray.h"
11     #include "TStyle.h"
12    
13     #include "TChain.h"
14     #include "TFile.h"
15 auterman 1.2 #include "TGraph.h"
16 auterman 1.1 #include "TH1.h"
17     #include "TH2.h"
18     #include "TH2F.h"
19     #include "TTree.h"
20     #include "TKey.h"
21     #include "Riostream.h"
22     #include "TCanvas.h"
23 auterman 1.8 #include "TLegend.h"
24 auterman 1.9 #include "TLatex.h"
25 auterman 1.10 #include "TMarker.h"
26 auterman 1.1
27     #include <string>
28 auterman 1.2 #include <cmath>
29 auterman 1.9 #include <stdio.h>
30 auterman 1.1
31     int plot(int argc, char** argv)
32     {
33 auterman 1.6 //interactive root session
34 auterman 1.7 //TApplication theApp("App", 0, 0);
35 auterman 1.2 if (gROOT->IsBatch()) {
36     fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]);
37     return 1;
38     }
39    
40 auterman 1.6 //Style stuff
41 auterman 1.1 gStyle->SetHistFillColor(0);
42     gStyle->SetPalette(1);
43     gStyle->SetCanvasColor(0);
44     gStyle->SetCanvasBorderMode(0);
45     gStyle->SetPadColor(0);
46     gStyle->SetPadBorderMode(0);
47     gStyle->SetFrameBorderMode(0);
48    
49     gStyle->SetTitleFillColor(0);
50     gStyle->SetTitleBorderSize(0);
51     gStyle->SetTitleX(0.10);
52     gStyle->SetTitleY(0.98);
53     gStyle->SetTitleW(0.8);
54     gStyle->SetTitleH(0.06);
55    
56     gStyle->SetErrorX(0);
57     gStyle->SetStatColor(0);
58     gStyle->SetStatBorderSize(0);
59     gStyle->SetStatX(0);
60     gStyle->SetStatY(0);
61     gStyle->SetStatW(0);
62     gStyle->SetStatH(0);
63    
64     gStyle->SetTitleFont(22);
65     gStyle->SetLabelFont(22,"X");
66     gStyle->SetLabelFont(22,"Y");
67     gStyle->SetLabelFont(22,"Z");
68     gStyle->SetLabelSize(0.03,"X");
69     gStyle->SetLabelSize(0.03,"Y");
70     gStyle->SetLabelSize(0.03,"Z");
71    
72     //gROOT->SetStyle("MyStyle");
73     TCanvas * c1 = new TCanvas("c1","c1",600,600);
74     c1->SetFillStyle ( 4000 );
75     c1->SetLeftMargin ( 0.15 );
76     c1->SetRightMargin ( 0.15 );
77     c1->SetBottomMargin( 0.10 );
78     c1->cd();
79    
80 auterman 1.6 //Get limits and generator masses ---------------------------------------------------
81 auterman 1.4 TheLimits * genpoints = new TheLimits();
82 auterman 1.11 //genpoints->Fill(argc, argv);
83     genpoints->Fill("limits_MHT/filelist.txt");
84    
85     TheLimits * genpointsHT = new TheLimits();
86     genpointsHT->Fill("limits_HT/filelist.txt");
87 auterman 1.12
88     TheLimits * genpointsHT_SC = new TheLimits();
89 auterman 1.13 genpointsHT_SC->Fill("limits_HT_SigCont/filelist.txt");
90    
91     TheLimits * genpointsMHT_SC = new TheLimits();
92     genpointsMHT_SC->Fill("limits_MHT_SigCont/filelist.txt");
93 auterman 1.11
94 auterman 1.10
95     //Replace read limits with specific numbers
96     //genpoints->OverwriteLimits("ABCD_MHT");
97    
98 auterman 1.5 genpoints->FillGeneratorMasses("tb10_mu1_a0_massscan.dat");
99     genpoints->match();
100 auterman 1.11 genpointsHT->FillGeneratorMasses("tb10_mu1_a0_massscan.dat");
101     genpointsHT->match();
102 auterman 1.12 genpointsHT_SC->FillGeneratorMasses("tb10_mu1_a0_massscan.dat");
103     genpointsHT_SC->match();
104 auterman 1.13 genpointsMHT_SC->FillGeneratorMasses("tb10_mu1_a0_massscan.dat");
105     genpointsMHT_SC->match();
106 auterman 1.2
107 auterman 1.6 //the plotting ----------------------------------------------------------------------
108 auterman 1.7 //plotting helper functions
109 auterman 1.4 PlotTools<SusyScan> * plotTools = new PlotTools<SusyScan>(genpoints->GetScan());
110 auterman 1.11 PlotTools<SusyScan> * plotToolsHT = new PlotTools<SusyScan>(genpointsHT->GetScan());
111 auterman 1.12 PlotTools<SusyScan> * plotToolsHT_SC = new PlotTools<SusyScan>(genpointsHT_SC->GetScan());
112 auterman 1.15 PlotTools<SusyScan> * plotToolsMHT_SC = new PlotTools<SusyScan>(genpointsMHT_SC->GetScan());
113 auterman 1.6 PlotTools<GeneratorMasses> * plotMasses = new PlotTools<GeneratorMasses>(genpoints->GetGeneratorMasses());
114 auterman 1.2
115 auterman 1.7 //iso mass lines
116     TGraph * gl500 = plotMasses->Line(Mzero, Mhalf, MGluino, 500);
117     TGraph * sq500 = plotMasses->Line(Mzero, Mhalf, MSquarkL, 500, 10);
118     sq500->SetLineWidth(2); sq500->SetLineColor(7);
119    
120     TGraph * chi100 = plotMasses->Line(Mzero, Mhalf, MChi1, 50, 20);
121     TGraph * cha200 = plotMasses->Line(Mzero, Mhalf, MCha1, 200, 20);
122     cha200->SetLineColor(2);
123    
124     //the histograms
125     c1->SetLogz(1);
126     //h->SetMaximum(27);
127     //h->SetMinimum(0.01);
128 auterman 1.10
129     /**/
130 auterman 1.7 // cross-section in M0 - M1/2
131     TH2F*hxsec = new TH2F("xsec",";m_{0} [GeV]; m_{1/2} [GeV]; cross section [pb]",
132     100,0,1009.9,50,0,500);
133     plotTools->Area(hxsec, Mzero, Mhalf, Xsection);
134     hxsec->SetMinimum(0.01);
135     //sq500->Draw();
136     //gl500->Draw();
137     hxsec->Draw("colz");
138 auterman 1.10 c1->SaveAs("results/Xsection_m0_m12_tb10.pdf");
139 auterman 1.7 std::string wait;
140     //std::cin>>wait;
141 auterman 1.10
142 auterman 1.7 // Observed Limit in M0 - M1/2
143     TH2F*hobslimit = new TH2F("obslimit",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Limit [pb]",
144     100,0,1009.9,50,0,500);
145     plotTools->Area(hobslimit, Mzero, Mhalf, ObsXsecLimit);
146     hobslimit->SetMinimum(0.01);
147     hobslimit->Draw("colz");
148 auterman 1.14 c1->SaveAs("results/ObsLimit_m0_m12_tb10.pdf");
149    
150 auterman 1.15
151 auterman 1.7 // Expected Limit in M0 - M1/2
152     TH2F*hexplimit = new TH2F("explimit",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Limit [pb]",
153     100,0,1009.9,50,0,500);
154     plotTools->Area(hexplimit, Mzero, Mhalf, ExpXsecLimit);
155     hexplimit->SetMinimum(0.01);
156     hexplimit->Draw("colz");
157 auterman 1.10 c1->SaveAs("results/ExpLimit_m0_m12_tb10.pdf");
158 auterman 1.7
159 auterman 1.13 // Signal Acceptance in M0 - M1/2
160 auterman 1.7 TH2F*hsigacc = new TH2F("sigacc",";m_{0} [GeV]; m_{1/2} [GeV]; Signal Acceptance",
161     100,0,1009.9,50,0,500);
162     plotTools->Area(hsigacc, Mzero, Mhalf, SignalAcceptance);
163     hsigacc->SetMinimum(0.01);
164     hsigacc->SetMaximum(1.0);
165     hsigacc->Draw("colz");
166 auterman 1.14 //chi100->Draw();
167     //cha200->Draw();
168     //gl500 ->Draw();
169     // sq500 ->Draw();
170     c1->SaveAs("results/SigAccMHT_m0_m12_tb10.pdf");
171    
172 auterman 1.15
173 auterman 1.7 // Exp. Limit on Number of Signal Events in M0 - M1/2
174 auterman 1.8 c1->SetLogz(0);
175 auterman 1.7 TH2F*hexplimitnsig = new TH2F("explimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL exp. limit signal events [# ]",
176     100,0,1009.9,50,0,500);
177     plotTools->Area(hexplimitnsig, Mzero, Mhalf, ExpNSignLimit);
178 auterman 1.10 hexplimitnsig->SetMinimum(0.0);
179     hexplimitnsig->SetMaximum(20);
180 auterman 1.7 hexplimitnsig->Draw("colz");
181 auterman 1.10 c1->SaveAs("results/ExpLimitOnNSig_m0_m12_tb10.pdf");
182 auterman 1.7
183     // Obs. Limit on Number of Signal Events in M0 - M1/2
184     TH2F*hobslimitnsig = new TH2F("obslimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL obs. limit signal events [# ]",
185 auterman 1.2 100,0,1009.9,50,0,500);
186 auterman 1.7 plotTools->Area(hobslimitnsig, Mzero, Mhalf, ObsNSignLimit);
187 auterman 1.10 hobslimitnsig->SetMinimum(0.0);
188     hobslimitnsig->SetMaximum(20);
189 auterman 1.7 hobslimitnsig->Draw("colz");
190 auterman 1.10 c1->SaveAs("results/ObsLimitOnNSig_m0_m12_tb10.pdf");
191 auterman 1.7
192     c1->SetLogz(0);
193     // Expected Exclusion in M0 - M1/2
194     TH2F*hexpexcl = new TH2F("expexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
195 auterman 1.8 100,0,1009.9,35,100,450);
196 auterman 1.11 plotTools->Area(hexpexcl, Mzero, Mhalf, ExpExclCL);
197 auterman 1.7 hexpexcl->Draw("colz");
198 auterman 1.10 c1->SaveAs("results/ExpExclusion_m0_m12_tb10.pdf");
199 auterman 1.7
200     // Observed Exclusion in M0 - M1/2
201     TH2F*hobsexcl = new TH2F("obsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
202 auterman 1.8 100,0,1009.9,35,100,450);
203 auterman 1.11 plotTools->Area(hobsexcl, Mzero, Mhalf, ObsExclCL);
204 auterman 1.7 hobsexcl->Draw("colz");
205 auterman 1.10 c1->SaveAs("results/ObsExclusion_m0_m12_tb10.pdf");
206 auterman 1.7
207 auterman 1.8 // Observed Exclusion in M0 - M1/2
208     TH2F*hPLobsexcl = new TH2F("plobsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
209     100,0,1009.9,35,100,450);
210     plotTools->Area(hPLobsexcl, Mzero, Mhalf, PLObsExclusion);
211     hPLobsexcl->Draw("colz");
212 auterman 1.10 c1->SaveAs("results/PL_ObsExclusion_m0_m12_tb10.pdf");
213 auterman 1.8
214 auterman 1.9 // TestContours in M0 - M1/2
215 auterman 1.14 TH2F*texcl = new TH2F("texcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
216     100,0,1009.9,35,100,450);
217     TH2F*tPLexpexcl=(TH2F*)texcl->Clone();
218     plotTools->Area(tPLexpexcl, Mzero, Mhalf, PLExpExclusion);
219     TH2F*tFCexpexcl=(TH2F*)texcl->Clone();
220     plotTools->Area(tFCexpexcl, Mzero, Mhalf, FCExpExclusion);
221     TH2F*tFCobsexcl=(TH2F*)texcl->Clone();
222     plotTools->Area(tFCobsexcl, Mzero, Mhalf, FCObsExclusion);
223     std::vector<TGraph*> contours = plotTools->GetContours(hexpexcl,3);
224     //std::vector<TGraph*> contours = plotTools->GetContours(hobsexcl,3);
225     //std::vector<TGraph*> contours = plotTools->GetContours(tPLexpexcl,3);
226     //std::vector<TGraph*> contours = plotTools->GetContours(hPLobsexcl,3);
227 auterman 1.9 //hPLexpexcl
228     //hexcl->Draw("colz");
229 auterman 1.15 hexpexcl->Draw("colz");
230 auterman 1.9 //hobsexcl->Draw("colz");
231 auterman 1.14 int col=kBlue-10;
232 auterman 1.9 for (std::vector<TGraph*>::iterator cont=contours.begin(); cont!=contours.end(); ++cont){
233     if (! *cont) continue;
234     double x, y;
235     (*cont)->GetPoint(0, x, y);
236     (*cont)->SetLineColor(col);
237     (*cont)->Draw("l");
238     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col++);
239     char val[20];
240 auterman 1.13 sprintf(val,"%d",(int)(cont-contours.begin()));
241 auterman 1.9 l.DrawLatex(x,y,val);
242 auterman 1.11 //if (cont-contours.begin()>3) break;
243 auterman 1.9 }
244 auterman 1.10 c1->SaveAs("results/ExclusionTestContours_m0_m12_tb10.pdf");
245 auterman 1.9
246 auterman 1.13
247 auterman 1.8 // Exclusion in M0 - M1/2
248     TH2F*hexcl = new TH2F("hexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
249     100,0,1009.9,35,100,450);
250 auterman 1.14 hexcl->Draw("colz");
251 auterman 1.13 TGraph * gexpexcl = plotTools ->GetContour(hexcl,Mzero,Mhalf,ExpExclCL, 3,0, 2,2);
252     TGraph * gobsexcl = plotTools ->GetContour(hexcl,Mzero,Mhalf,ObsExclCL, 3,0, 2,1);
253 auterman 1.16 TGraph * gMCMCexpexcl = plotToolsHT_SC->GetContour(hexcl,Mzero,Mhalf,MCMCExpExclusion,3,0, 3,2);
254     TGraph * gMCMCobsexcl = plotToolsHT_SC->GetContour(hexcl,Mzero,Mhalf,MCMCObsExclusion,3,0, 3,1);
255     TGraph * gCLsExpExclHT = plotToolsHT_SC->GetContour(hexcl,Mzero,Mhalf,ExpExclCL, 3,0, 1,2);
256     TGraph * gCLsObsExclHT = plotToolsHT_SC->GetContour(hexcl,Mzero,Mhalf,ObsExclCL, 3,0, 1,1);
257     TGraph * gCLsExpExclHTm1 = plotToolsHT_SC->GetContour(hexcl,Mzero,Mhalf,ExpExclCLm1sigma,3,0, 5,2);
258     TGraph * gCLsExpExclHTp1 = plotToolsHT_SC->GetContour(hexcl,Mzero,Mhalf,ExpExclCLp1sigma,3,0, 5,2);
259 auterman 1.13 TGraph * gCLsExp1Sigma = MakeBand(gCLsExpExclHTp1, gCLsExpExclHTm1);
260     hexcl->Draw("colz");
261     if (gCLsExp1Sigma) gCLsExp1Sigma->Draw("lf");
262     if (gexpexcl) gexpexcl->Draw("l");
263     if (gCLsExpExclHT) gCLsExpExclHT->Draw("l");
264     if (gMCMCexpexcl) gMCMCexpexcl->Draw("l");
265     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
266     //if (gobsexcl) gobsexcl->Draw("l");
267     //if (gPLobsexcl) gPLobsexcl->Draw("l");
268     //if (gFCobsexcl) gFCobsexcl->Draw("l");
269     //if (gMCMCobsexcl) gMCMCobsexcl->Draw("l");
270     //if (gFCexpexcl) gFCexpexcl->Draw("l");
271     //if (gPLexpexcl) gPLexpexcl->Draw("l");
272     //if (gFCexpexcl) gFCexpexcl->Draw("l");
273 auterman 1.10 //set old exclusion Limits
274 auterman 1.16 TGraph* LEP_ch = set_lep_ch(10);
275     TGraph* LEP_sl = set_lep_sl(10);//slepton curve
276     TGraph* TEV_sg_cdf = set_tev_sg_cdf(10);//squark gluino cdf
277     TGraph* TEV_sg_d0 = set_tev_sg_d0(10);//squark gluino d0
278     //TGraph* TEV_tlp_cdf = set_tev_tlp_cdf(10);//trilepton cdf
279     //TGraph* TEV_tlp_d0 = set_tev_tlp_d0(10);//trilepton d0
280     TGraph* stau = set_tev_stau(10);//stau
281     TGraph* TEV_sn_d0_1 = set_sneutrino_d0_1(10);
282     TGraph* TEV_sn_d0_2 = set_sneutrino_d0_2(10);
283 auterman 1.15 TGraphErrors* First = getObserved_NLO_tanBeta10();
284     TGraphErrors* Second = getExpected_NLO_tanBeta10();//getLO_jetMultis();
285     TGraphErrors* Third = getLO_tanBeta10();
286 auterman 1.10 First->GetXaxis()->SetRangeUser(0,505);
287     First->GetYaxis()->SetRangeUser(80,500);
288     First->GetXaxis()->SetTitle("m_{0} (GeV)");
289     First->GetYaxis()->SetTitle("m_{1/2} (GeV)");
290     TSpline3 *sFirst = new TSpline3("sFirst",First);
291     sFirst->SetLineColor(kBlue);
292     sFirst->SetLineWidth(3);
293     TSpline3 *sSecond = new TSpline3("sSecond",Second);
294     sSecond->SetLineColor(kBlue);
295     sSecond->SetLineStyle(2);
296     sSecond->SetLineWidth(3);
297     TSpline3 *sThird = new TSpline3("sThird",Third);
298     sThird->SetLineColor(kGreen+2);
299     sThird->SetLineStyle(4);
300     sThird->SetLineWidth(3);
301     TEV_sn_d0_1->Draw("fsame");
302     TEV_sn_d0_2->Draw("fsame");
303 auterman 1.16 //TEV_sg_d0->Draw("fsame");
304     //TEV_sg_cdf->Draw("fsame");
305 auterman 1.10 LEP_ch->Draw("fsame");
306     LEP_sl->Draw("fsame");
307     stau->Draw("fsame");
308     sFirst->Draw("same");
309     sSecond->Draw("same");
310 auterman 1.15 sThird->Draw("same");
311 auterman 1.10 TLatex b; b.SetTextSize(0.02); b.SetTextColor(1);
312     b.DrawLatex( 10,420,"#tilde{#tau} LSP");
313     b.DrawLatex( 6,150,"LEP2");
314     b.DrawLatex( 22,138,"#tilde{l}^{#pm}");
315     b.DrawLatex(360,110,"LEP2 #tilde{#chi}^{#pm}");
316     b.DrawLatex(100,140,"CDF");
317     b.DrawLatex(248,129,"D0 #tilde{g}, #tilde{q}");
318     b.DrawLatex( 80,180,"D0 #tilde{#nu}");
319 auterman 1.14
320     TLegend * leg = new TLegend(0.45,0.7,0.85,0.89);
321 auterman 1.8 leg->SetBorderSize(0);leg->SetFillColor(0);
322 auterman 1.12 //if (gobsexcl) leg->AddEntry(gobsexcl,"Observed (MHT, CLs, TLimit)","l");
323 auterman 1.16 if (gCLsObsExclHT) leg->AddEntry(gCLsObsExclHT,"LO Observed (HT, CLs)","l");
324     if (gCLsExpExclHT) leg->AddEntry(gCLsExpExclHT,"LO Expected (HT, CLs)","l");
325     if (gexpexcl) leg->AddEntry(gexpexcl,"LO Expected (MHT, CLs)","l");
326 auterman 1.11 //if (gPLobsexcl) leg->AddEntry(gPLobsexcl,"Observed (PL, RooStat)","l");
327     //if (gPLexpexcl) leg->AddEntry(gPLexpexcl,"Expected (PL, RooStat)","l");
328 auterman 1.10 //if (gFCobsexcl) leg->AddEntry(gFCobsexcl,"Observed (FC, RooStat)","l");
329     //if (gFCexpexcl) leg->AddEntry(gFCexpexcl,"Expected (FC, RooStat)","l");
330 auterman 1.12 //if (gMCMCobsexcl) leg->AddEntry(gMCMCobsexcl,"Observed (MHT, MCMC, RooStat)","l");
331     if (gMCMCexpexcl) leg->AddEntry(gMCMCexpexcl,"LO Expected (HT, MCMC, RooStat)","l");
332 auterman 1.15 if (sFirst) leg->AddEntry(sFirst, "NLO RA1 tb10 Observed");
333     if (sSecond) leg->AddEntry(sSecond,"NLO RA1 tb10 Expected");
334     if (sThird) leg->AddEntry(sThird,"LO RA1 tb10 Observed");
335 auterman 1.8 leg->Draw();
336 auterman 1.10 gPad->RedrawAxis();
337 auterman 1.13 c1->SaveAs("results/Exclusion_m0_m12_tb10.pdf");
338 auterman 1.15
339 auterman 1.8
340 auterman 1.13 // Signal Contamination in M0 - M1/2
341     c1->SetLogz(0);
342     TH2F*hsigcont = new TH2F("sigcont",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
343     100,0,1009.9,50,0,500);
344     plotToolsHT_SC->Area(hsigcont, Mzero, Mhalf, SignalContamination);
345     hsigcont->SetMinimum(0.01);
346     hsigcont->SetMaximum(20);
347     hsigcont->Draw("colz");
348     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
349     c1->SaveAs("results/SignalContamination_HT_m0_m12_tb10.pdf");
350    
351     // Signal Contamination in M0 - M1/2
352     c1->SetLogz(0);
353     TH2F*hsigcontMHT = new TH2F("sigcontMHT",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
354     100,0,1009.9,50,0,500);
355     plotToolsMHT_SC->Area(hsigcontMHT, Mzero, Mhalf, SignalContamination);
356     hsigcontMHT->SetMinimum(0.01);
357     hsigcontMHT->SetMaximum(20);
358     hsigcontMHT->Draw("colz");
359     if (gobsexcl) gobsexcl->Draw("l");
360     c1->SaveAs("results/SignalContamination_MHT_m0_m12_tb10.pdf");
361    
362 auterman 1.1
363 auterman 1.2
364 auterman 1.7 //-----------------------------------------------------------------------------------
365     c1->SetLogz(1);
366    
367     TGraph * mz500 = plotMasses->Line( MSquarkL, MGluino, Mzero, 500, 1);
368     TGraph * mh250 = plotMasses->Line( MSquarkL, MGluino, Mhalf, 250, 1);
369    
370 auterman 1.8 // cross-section in squark - gluino mass
371 auterman 1.7 TH2F*hxsec_qg = new TH2F("xsec_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; cross section [pb]",
372     60,200,1400,50,200,1200);
373     plotTools->Area(hxsec_qg, MSquarkL, MGluino, Xsection);
374     hxsec_qg->SetMinimum(0.01);
375     hxsec_qg->Draw("colz");
376     mz500->Draw();
377     mh250->Draw();
378 auterman 1.10 c1->SaveAs("results/Xsection_mSql_mGl_tb10.pdf");
379 auterman 1.7
380 auterman 1.8 // Observed Limit in squark - gluino mass
381 auterman 1.7 TH2F*hobslimit_qg = new TH2F("obslimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Limit [pb]",
382     60,200,1400,50,200,1200);
383     plotTools->Area(hobslimit_qg, MSquarkL, MGluino, ObsXsecLimit);
384     hobslimit_qg->SetMinimum(0.01);
385     hobslimit_qg->Draw("colz");
386 auterman 1.10 c1->SaveAs("results/ObsLimit_mSql_mGl_tb10.pdf");
387 auterman 1.7
388 auterman 1.8 // Expected Limit in squark - gluino mass
389 auterman 1.7 TH2F*hexplimit_qg = new TH2F("explimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Limit [pb]",
390     60,200,1400,50,200,1200);
391     plotTools->Area(hexplimit_qg, MSquarkL, MGluino, ExpXsecLimit);
392     hexplimit_qg->SetMinimum(0.01);
393     hexplimit_qg->Draw("colz");
394 auterman 1.10 c1->SaveAs("results/ExpLimit_mSql_mGl_tb10.pdf");
395 auterman 1.7
396 auterman 1.8 // Signal Acceptance in squark - gluino mass
397 auterman 1.7 TH2F*hsigacc_qg = new TH2F("sigacc_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; Signal Acceptance",
398     60,200,1400,50,200,1200);
399     plotTools->Area(hsigacc_qg, MSquarkL, MGluino, SignalAcceptance);
400     hsigacc_qg->SetMinimum(0.01);
401     hsigacc_qg->SetMaximum(1.0);
402     hsigacc_qg->Draw("colz");
403 auterman 1.14 c1->SaveAs("results/SigAccMHT_mSql_mGl_tb10.pdf");
404    
405     // Signal Acceptance in squark - gluino mass
406     TH2F*hsigaccHT_qg = new TH2F("sigaccHT_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; Signal Acceptance",
407     60,200,1400,50,200,1200);
408     plotToolsHT->Area(hsigaccHT_qg, MSquarkL, MGluino, SignalAcceptance);
409     hsigaccHT_qg->SetMinimum(0.01);
410     hsigaccHT_qg->SetMaximum(1.0);
411     hsigaccHT_qg->Draw("colz");
412     c1->SaveAs("results/SigAccHT_mSql_mGl_tb10.pdf");
413 auterman 1.15
414 auterman 1.7
415 auterman 1.8 // Exp. Limit on Number of Signal Events in squark - gluino mass
416     c1->SetLogz(0);
417 auterman 1.7 TH2F*hexplimitnsig_qg = new TH2F("explimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL exp. limit signal events [# ]",
418     60,200,1400,50,200,1200);
419     plotTools->Area(hexplimitnsig_qg, MSquarkL, MGluino, ExpNSignLimit);
420 auterman 1.10 hexplimitnsig_qg->SetMinimum(0.0);
421     hexplimitnsig_qg->SetMaximum(20);
422 auterman 1.7 hexplimitnsig_qg->Draw("colz");
423 auterman 1.10 c1->SaveAs("results/ExpLimitOnNSig_mSql_mGl_tb10.pdf");
424 auterman 1.6
425 auterman 1.8 // Obs. Limit on Number of Signal Events in squark - gluino mass
426 auterman 1.7 TH2F*hobslimitnsig_qg = new TH2F("obslimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL obs. limit signal events [# ]",
427     60,200,1400,50,200,1200);
428     plotTools->Area(hobslimitnsig_qg, MSquarkL, MGluino, ObsNSignLimit);
429 auterman 1.10 hobslimitnsig_qg->SetMinimum(0.0);
430     hobslimitnsig_qg->SetMaximum(20);
431 auterman 1.7 hobslimitnsig_qg->Draw("colz");
432 auterman 1.10 c1->SaveAs("results/ObsLimitOnNSig_mSql_mGl_tb10.pdf");
433 auterman 1.7
434     c1->SetLogz(0);
435 auterman 1.8 // Expected Exclusion in squark - gluino mass
436 auterman 1.7 TH2F*hexpexcl_qg = new TH2F("expexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Exclusion",
437 auterman 1.2 60,200,1400,50,200,1200);
438 auterman 1.11 plotTools->Area(hexpexcl_qg, MSquarkL, MGluino, ExpExclCL);
439 auterman 1.7 hexpexcl_qg->Draw("colz");
440 auterman 1.10 c1->SaveAs("results/ExpExclusion_mSql_mGl_tb10.pdf");
441 auterman 1.2
442 auterman 1.8 // Observed Exclusion in squark - gluino mass
443 auterman 1.7 TH2F*hobsexcl_qg = new TH2F("obsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
444     60,200,1400,50,200,1200);
445 auterman 1.11 plotTools->Area(hobsexcl_qg, MSquarkL, MGluino, ObsExclCL);
446 auterman 1.8 //std::vector<TGraph *> vobsexcl_qg = plotTools->GetContours(hobsexcl_qg);
447 auterman 1.7 hobsexcl_qg->Draw("colz");
448 auterman 1.8 //for (std::vector<TGraph *>::iterator g=vobsexcl_qg.begin();g!=vobsexcl_qg.end();++g){
449     // if (! *g) continue;
450     // // (*g)->Draw("l");
451     //}
452 auterman 1.10 c1->SaveAs("results/ObsExclusion_mSql_mGl_tb10.pdf");
453 auterman 1.2
454 auterman 1.9 // TestContours in M0 - M1/2
455     TH2F*texcl_qg = new TH2F("texcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
456     60,200,1400,50,200,1200);
457     TH2F*tPLobsexcl_qg=(TH2F*)texcl_qg->Clone();
458     plotTools->Area(tPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
459 auterman 1.10 TH2F*tPLexpexcl_qg=(TH2F*)texcl_qg->Clone();
460     plotTools->Area(tPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
461 auterman 1.9 //std::vector<TGraph*> contours_qg = plotTools->GetContours(hexpexcl_qg,3);
462     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hobsexcl_qg,3);
463     std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLobsexcl_qg,3);
464 auterman 1.10 //std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLexpexcl_qg,3);
465 auterman 1.9 //hPLexpexcl_qg
466     //hexcl_qg->Draw("colz");
467     //hexpexcl_qg->Draw("colz");
468     //hobsexcl_qg->Draw("colz");
469     tPLobsexcl_qg->Draw("colz");
470     int col_gl=kBlue-10;
471     for (std::vector<TGraph*>::iterator cont=contours_qg.begin(); cont!=contours_qg.end(); ++cont){
472     if (! *cont) continue;
473     double x, y;
474     (*cont)->GetPoint(0, x, y);
475     (*cont)->SetLineColor(col_gl);(*cont)->SetLineWidth(3);
476     (*cont)->Draw("l");
477     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col_gl++);
478     char val[20];
479 auterman 1.13 sprintf(val,"%d",(int)(cont-contours_qg.begin()));
480 auterman 1.9 l.DrawLatex(x,y,val);
481 auterman 1.10 if (cont-contours_qg.begin()>3) break;
482 auterman 1.9 }
483 auterman 1.10 c1->SaveAs("results/ExclusionTestContours_mSql_mGl_tb10.pdf");
484 auterman 1.9
485 auterman 1.8 // Observed Exclusion in squark - gluino mass
486     TH2F*hPLobsexcl_qg = new TH2F("plobsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
487     60,200,1400,50,200,1200);
488     plotTools->Area(hPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
489 auterman 1.10 //hPLobsexcl_qg->Draw("colz");
490     //c1->SaveAs("results/PL_ObsExclusion_mSql_mGl_tb10.pdf");
491 auterman 1.8
492 auterman 1.11
493    
494 auterman 1.16 /*
495 auterman 1.10 // Exclusion in squark - gluino mass ----------------------------------------
496 auterman 1.8 TH2F*hexcl_qg = new TH2F("hexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
497     60,200,1400,50,200,1200);
498 auterman 1.16 TGraph * gexpexcl_qg = plotToolsMHT_SC->GetContour(hexpexcl_qg,3,0);
499 auterman 1.8 if (gexpexcl_qg) gexpexcl_qg->SetLineStyle(2);
500 auterman 1.16 TGraph * gobsexcl_qg = plotToolsMHT_SC->GetContour(hobsexcl_qg,3,0);
501 auterman 1.8 TH2F*hPLexpexcl_qg=(TH2F*)hexcl_qg->Clone();
502 auterman 1.16 plotToolsMHT_SC->Area(hPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
503     TGraph * gPLexpexcl_qg = plotToolsMHT_SC->GetContour(hPLexpexcl_qg,3,0);
504 auterman 1.10 if (gPLexpexcl_qg) {gPLexpexcl_qg->SetLineStyle(2);gPLexpexcl_qg->SetLineColor(2);}
505 auterman 1.16 TGraph * gPLobsexcl_qg = plotToolsMHT_SC->GetContour(hPLobsexcl_qg,3,0);
506 auterman 1.10 if (gPLobsexcl_qg) gPLobsexcl_qg->SetLineColor(2);
507 auterman 1.11 TH2F*hCLsExpHT_qg=(TH2F*)hexcl_qg->Clone();
508     TH2F*hCLsObsHT_qg=(TH2F*)hexcl_qg->Clone();
509 auterman 1.16 plotToolsHT_SC->Area(hCLsExpHT_qg, MSquarkL, MGluino, ExpExclCL);
510     plotToolsHT_SC->Area(hCLsObsHT_qg, MSquarkL, MGluino, ObsExclCL);
511     TGraph * gCLsExpExclHT_qg = plotToolsMHT_SC->GetContour(hCLsExpHT_qg,3,0);
512     TGraph * gCLsObsExclHT_qg = plotToolsMHT_SC->GetContour(hCLsObsHT_qg,3,0);
513 auterman 1.11 if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->SetLineColor(2);
514     if (gCLsExpExclHT_qg) {gCLsExpExclHT_qg->SetLineStyle(2);gCLsExpExclHT_qg->SetLineColor(2);}
515 auterman 1.10 hexcl_qg->Draw("");
516 auterman 1.9 if (gobsexcl_qg) gobsexcl_qg->Draw("l");
517 auterman 1.11 if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->Draw("l");
518 auterman 1.9 if (gexpexcl_qg) gexpexcl_qg->Draw("l");
519 auterman 1.11 //if (gPLobsexcl_qg) gPLobsexcl_qg->Draw("l");
520     //if (gPLexpexcl_qg) gPLexpexcl_qg->Draw("l");
521     if (gCLsExpExclHT_qg) gCLsExpExclHT_qg->Draw("l");
522 auterman 1.8 TLegend * leg_qg = new TLegend(0.45,0.78,0.85,0.89);
523     leg_qg->SetBorderSize(0);leg_qg->SetFillColor(0);
524 auterman 1.11 if (gobsexcl_qg) leg_qg->AddEntry(gobsexcl_qg,"Observed (MHT, CLs, TLimit)","l");
525     if (gexpexcl_qg) leg_qg->AddEntry(gexpexcl_qg,"Expected (MHT, CLs, TLimit)","l");
526     if (gCLsObsExclHT_qg) leg_qg->AddEntry(gCLsObsExclHT_qg,"Observed (HT, CLs, TLimit)","l");
527     if (gCLsExpExclHT_qg) leg_qg->AddEntry(gCLsExpExclHT_qg,"Expected (HT, CLs, TLimit)","l");
528     //if (gPLobsexcl_qg) leg_qg->AddEntry(gPLobsexcl_qg,"Observed (PL, RooStat)","l");
529     //if (gPLexpexcl_qg) leg_qg->AddEntry(gPLexpexcl_qg,"Expected (PL, RooStat)","l");
530 auterman 1.8 leg_qg->Draw();
531 auterman 1.10 c1->SaveAs("results/Exclusion_mSql_mGl_tb10.pdf");
532 auterman 1.16 */
533    
534     TH2F*hexcl_qg = new TH2F("hexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
535     60,200,1400,50,200,1200);
536     TGraph * gexpexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCL, 3,0, 2,2);
537     TGraph * gobsexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,ObsExclCL, 3,0, 2,1);
538     TGraph * gMCMCexpexcl_qg = plotToolsHT_SC->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCExpExclusion,3,0, 3,2);
539     TGraph * gMCMCobsexcl_qg = plotToolsHT_SC->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCObsExclusion,3,0, 3,1);
540     TGraph * gCLsExpExclHT_qg = plotToolsHT_SC->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCL, 3,0, 1,2);
541     TGraph * gCLsObsExclHT_qg = plotToolsHT_SC->GetContour(hexcl_qg,MSquarkL,MGluino,ObsExclCL, 3,0, 1,1);
542     TGraph * gCLsExpExclHTm1_qg = plotToolsHT_SC->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCLm1sigma,3,0, 5,2);
543     TGraph * gCLsExpExclHTp1_qg = plotToolsHT_SC->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCLp1sigma,3,0, 5,2);
544     TGraph * gCLsExp1Sigma_qg = MakeBand(gCLsExpExclHTp1_qg, gCLsExpExclHTm1_qg);
545     hexcl_qg->Draw("");
546     //
547     if (gCLsExp1Sigma_qg) gCLsExp1Sigma_qg->Draw("lf");
548     if (gobsexcl_qg) gobsexcl_qg->Draw("l");
549     if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->Draw("l");
550     if (gexpexcl_qg) gexpexcl_qg->Draw("l");
551     if (gCLsExpExclHT_qg) gCLsExpExclHT_qg->Draw("l");
552     //
553     TLegend * leg_qg = new TLegend(0.45,0.78,0.85,0.89);
554     leg_qg->SetBorderSize(0);leg_qg->SetFillColor(0);
555     if (gobsexcl_qg) leg_qg->AddEntry(gobsexcl_qg,"LO Observed (MHT, CLs)","l");
556     if (gexpexcl_qg) leg_qg->AddEntry(gexpexcl_qg,"LO Expected (MHT, CLs)","l");
557     if (gCLsObsExclHT_qg) leg_qg->AddEntry(gCLsObsExclHT_qg,"LO Observed (HT, CLs)","l");
558     if (gCLsExpExclHT_qg) leg_qg->AddEntry(gCLsExpExclHT_qg,"LO Expected (HT, CLs)","l");
559     //if (gPLobsexcl_qg) leg_qg->AddEntry(gPLobsexcl_qg,"Observed (PL, RooStat)","l");
560     //if (gPLexpexcl_qg) leg_qg->AddEntry(gPLexpexcl_qg,"Expected (PL, RooStat)","l");
561     leg_qg->Draw();
562     c1->SaveAs("results/Exclusion_mSql_mGl_tb10.pdf");
563 auterman 1.10 //c1->SaveAs("plot_tb10.pdf");
564 auterman 1.2
565 auterman 1.14 c1->SetLogy(1);
566     c1->SetLogx(1);
567     TH2F*hUncertScan = new TH2F("hUncertScan",";relative signal uncertainty; number of signal events",
568     10,0.1,0.6,10,0.9,200);
569     //hUncertScan->GetXaxis()->SetNdivisions(505, false);
570     //hUncertScan->SetMinimum(1);
571     TGraph * gCLsExpUncert = new TGraph(0);
572     TGraph * gCLsObsUncert = new TGraph(0);
573     TGraph * gPLExpUncert = new TGraph(0);
574     TGraph * gPLObsUncert = new TGraph(0);
575     TGraph * gFCExpUncert = new TGraph(0);
576     TGraph * gFCObsUncert = new TGraph(0);
577     TGraph * gMCMCExpUncert= new TGraph(0);
578     TGraph * gMCMCObsUncert= new TGraph(0);
579     plotTools->Graph(gCLsExpUncert, SignalRelUncertainty, ExpNSignLimit,1);
580     plotTools->Graph(gCLsObsUncert, SignalRelUncertainty, ObsNSignLimit,1);
581     plotTools->Graph(gPLExpUncert, SignalRelUncertainty, PLExpNSignLimit,1);
582     plotTools->Graph(gPLObsUncert, SignalRelUncertainty, PLObsNSignLimit, 1);
583     plotTools->Graph(gFCExpUncert, SignalRelUncertainty, FCExpNSignLimit,1);
584     plotTools->Graph(gFCObsUncert, SignalRelUncertainty, FCObsNSignLimit, 1);
585     plotTools->Graph(gMCMCExpUncert,SignalRelUncertainty, MCMCExpNSignLimit,1);
586     plotTools->Graph(gMCMCObsUncert,SignalRelUncertainty, MCMCObsNSignLimit, 1);
587     gCLsExpUncert->SetLineStyle(8);
588     gPLObsUncert->SetLineColor(2);
589     gPLExpUncert->SetLineColor(2); gPLExpUncert->SetLineStyle(8);
590     gFCObsUncert->SetLineColor(3);
591     gFCExpUncert->SetLineColor(3); gFCExpUncert->SetLineStyle(8);
592     gMCMCObsUncert->SetLineColor(4);
593     gMCMCExpUncert->SetLineColor(4); gMCMCExpUncert->SetLineStyle(8);
594     hUncertScan->Draw("h");
595     gCLsExpUncert->Draw("l");
596     gCLsObsUncert->Draw("l");
597     //gPLObsUncert->Draw("l");
598     gPLExpUncert->Draw("l");
599     //gFCObsUncert->Draw("l");
600     //gFCExpUncert->Draw("l");
601     //gMCMCObsUncert->Draw("l");
602     //gMCMCExpUncert->Draw("l");
603     TLatex l; l.SetTextSize(0.03); l.SetTextColor(1);
604     l.DrawLatex(0.025,25,"excluded");
605     TMarker m; m.SetMarkerStyle(29); m.SetMarkerColor(2);
606     m.DrawMarker(0.128, 28.5);l.DrawLatex(0.14,28.5,"LM1");
607     m.DrawMarker(0.147, 77.4);l.DrawLatex(0.16,77.4,"LM0");
608    
609     TLegend * leg_S = new TLegend(0.5,0.14,0.85,0.38);
610     leg_S->SetBorderSize(0);leg_S->SetFillColor(0);
611     leg_S->SetHeader("95% CL upper limits");
612     leg_S->AddEntry(gCLsExpUncert,"Expected (CLs, TLimit)","l");
613     leg_S->AddEntry(gCLsObsUncert,"Observed (CLs, TLimit)","l");
614     //leg_S->AddEntry(gPLExpUncert,"Expected (PL, RooStat)","l");
615     //leg_S->AddEntry(gPLObsUncert,"Observed (PL, RooStat)","l");
616     //leg_S->AddEntry(gFCObsUncert,"Observed (FC, RooStat)","l");
617     //leg_S->AddEntry(gFCExpUncert,"Expected (FC, RooStat)","l");
618     //leg_S->AddEntry(gMCMCObsUncert,"Observed (MCMC, RooStat)","l");
619     //leg_S->AddEntry(gMCMCExpUncert,"Expected (MCMC, RooStat)","l");
620     leg_S->Draw();
621     c1->SaveAs("results/UncertaintyScan.pdf");
622 auterman 1.2
623 auterman 1.7 //theApp.Run();
624 auterman 1.1 }
625    
626    
627     int main(int argc, char** argv)
628     {
629     return plot(argc, argv);
630     }