ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/plot50tb.cc
Revision: 1.2
Committed: Wed Feb 9 09:32:31 2011 UTC (14 years, 3 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.1: +7 -5 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #include "plot.h"
2 #include "SusyScan.h"
3 #include "GeneratorMasses.h"
4 #include "PlotTools.h"
5 #include "TheLimits.h"
6 #include "GlobalFunctions.h"
7
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 #include "TGraph.h"
16 #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 #include "TLegend.h"
24 #include "TLatex.h"
25 #include "TMarker.h"
26
27 #include <string>
28 #include <cmath>
29 #include <stdio.h>
30
31 int plot(int argc, char** argv)
32 {
33 //interactive root session
34 //TApplication theApp("App", 0, 0);
35 if (gROOT->IsBatch()) {
36 fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]);
37 return 1;
38 }
39
40 //Style stuff
41 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 //Get limits and generator masses ---------------------------------------------------
81 TheLimits * genpoints = new TheLimits();
82 //genpoints->Fill(argc, argv);
83 genpoints->Fill("limits_MHT_tb50/filelist.txt");
84
85 TheLimits * genpointsHT = new TheLimits();
86 genpointsHT->Fill("limits_HT_tb50/filelist.txt");
87
88
89 //Replace read limits with specific numbers
90 //genpoints->OverwriteLimits("ABCD_MHT");
91
92 genpoints->FillGeneratorMasses("tb50_mu1_a0_massscan.dat");
93 genpoints->match();
94 genpointsHT->FillGeneratorMasses("tb50_mu1_a0_massscan.dat");
95 genpointsHT->match();
96
97 //the plotting ----------------------------------------------------------------------
98 //plotting helper functions
99 PlotTools<SusyScan> * plotTools = new PlotTools<SusyScan>(genpoints->GetScan());
100 PlotTools<SusyScan> * plotToolsHT = new PlotTools<SusyScan>(genpointsHT->GetScan());
101 PlotTools<GeneratorMasses> * plotMasses = new PlotTools<GeneratorMasses>(genpoints->GetGeneratorMasses());
102
103 //iso mass lines
104 TGraph * gl500 = plotMasses->Line(Mzero, Mhalf, MGluino, 500);
105 TGraph * sq500 = plotMasses->Line(Mzero, Mhalf, MSquarkL, 500, 10);
106 sq500->SetLineWidth(2); sq500->SetLineColor(7);
107
108 TGraph * chi100 = plotMasses->Line(Mzero, Mhalf, MChi1, 50, 20);
109 TGraph * cha200 = plotMasses->Line(Mzero, Mhalf, MCha1, 200, 20);
110 cha200->SetLineColor(2);
111
112 //the histograms
113 c1->SetLogz(1);
114 //h->SetMaximum(27);
115 //h->SetMinimum(0.01);
116
117 /**/
118 // cross-section in M0 - M1/2
119 TH2F*hxsec = new TH2F("xsec",";m_{0} [GeV]; m_{1/2} [GeV]; cross section [pb]",
120 40,200,600,26,140,400);
121 plotTools->Area(hxsec, Mzero, Mhalf, Xsection);
122 hxsec->SetMinimum(0.01);
123 //sq500->Draw();
124 //gl500->Draw();
125 hxsec->Draw("colz");
126 c1->SaveAs("results_tb50/Xsection_m0_m12_tb50.pdf");
127 std::string wait;
128 //std::cin>>wait;
129
130 // Observed Limit in M0 - M1/2
131 TH2F*hobslimit = new TH2F("obslimit",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Limit [pb]",
132 40,200,600,26,140,400);
133 plotTools->Area(hobslimit, Mzero, Mhalf, ObsXsecLimit);
134 hobslimit->SetMinimum(0.01);
135 hobslimit->Draw("colz");
136 c1->SaveAs("results_tb50/ObsLimit_m0_m12_tb50.pdf");
137
138 // Expected Limit in M0 - M1/2
139 TH2F*hexplimit = new TH2F("explimit",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Limit [pb]",
140 40,200,600,26,140,400);
141 plotTools->Area(hexplimit, Mzero, Mhalf, ExpXsecLimit);
142 hexplimit->SetMinimum(0.01);
143 hexplimit->Draw("colz");
144 c1->SaveAs("results_tb50/ExpLimit_m0_m12_tb50.pdf");
145
146 // Signal Acceptance in M0 - M1/2
147 TH2F*hsigacc = new TH2F("sigacc",";m_{0} [GeV]; m_{1/2} [GeV]; Signal Acceptance",
148 40,200,600,26,140,400);
149 plotTools->Area(hsigacc, Mzero, Mhalf, SignalAcceptance);
150 hsigacc->SetMinimum(0.01);
151 hsigacc->SetMaximum(1.0);
152 hsigacc->Draw("colz");
153 chi100->Draw();
154 cha200->Draw();
155 gl500 ->Draw();
156 sq500 ->Draw();
157 c1->SaveAs("results_tb50/SigAcc_m0_m12_tb50.pdf");
158
159 // Exp. Limit on Number of Signal Events in M0 - M1/2
160 c1->SetLogz(0);
161 TH2F*hexplimitnsig = new TH2F("explimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL exp. limit signal events [# ]",
162 40,200,600,26,140,400);
163 plotTools->Area(hexplimitnsig, Mzero, Mhalf, ExpNSignLimit);
164 hexplimitnsig->SetMinimum(0.0);
165 hexplimitnsig->SetMaximum(20);
166 hexplimitnsig->Draw("colz");
167 c1->SaveAs("results_tb50/ExpLimitOnNSig_m0_m12_tb50.pdf");
168
169 // Obs. Limit on Number of Signal Events in M0 - M1/2
170 TH2F*hobslimitnsig = new TH2F("obslimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL obs. limit signal events [# ]",
171 40,200,600,26,140,400);
172 plotTools->Area(hobslimitnsig, Mzero, Mhalf, ObsNSignLimit);
173 hobslimitnsig->SetMinimum(0.0);
174 hobslimitnsig->SetMaximum(20);
175 hobslimitnsig->Draw("colz");
176 c1->SaveAs("results_tb50/ObsLimitOnNSig_m0_m12_tb50.pdf");
177
178 c1->SetLogz(0);
179 // Expected Exclusion in M0 - M1/2
180 TH2F*hexpexcl = new TH2F("expexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
181 40,200,600,26,140,400);
182 plotTools->Area(hexpexcl, Mzero, Mhalf, ExpExclCL);
183 hexpexcl->Draw("colz");
184 c1->SaveAs("results_tb50/ExpExclusion_m0_m12_tb50.pdf");
185
186 // Observed Exclusion in M0 - M1/2
187 TH2F*hobsexcl = new TH2F("obsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
188 40,200,600,26,140,400);
189 plotTools->Area(hobsexcl, Mzero, Mhalf, ObsExclCL);
190 hobsexcl->Draw("colz");
191 c1->SaveAs("results_tb50/ObsExclusion_m0_m12_tb50.pdf");
192
193 // Observed Exclusion in M0 - M1/2
194 TH2F*hPLobsexcl = new TH2F("plobsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
195 40,200,600,26,140,400);
196 plotTools->Area(hPLobsexcl, Mzero, Mhalf, PLObsExclusion);
197 hPLobsexcl->Draw("colz");
198 c1->SaveAs("results_tb50/PL_ObsExclusion_m0_m12_tb50.pdf");
199
200 // TestContours in M0 - M1/2
201 TH2F*texcl = new TH2F("texcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
202 40,200,600,26,140,400);
203 TH2F*texpexcl=(TH2F*)texcl->Clone();
204 plotTools->Area(texpexcl, Mzero, Mhalf, MCMCExpExclusion);
205 TH2F*tobsexcl=(TH2F*)texcl->Clone();
206 plotTools->Area(tobsexcl, Mzero, Mhalf, MCMCObsExclusion);
207 std::vector<TGraph*> contours = plotTools->GetContours(texpexcl,3);
208 //std::vector<TGraph*> contours = plotTools->GetContours(tobsexcl,3);
209 //hPLexpexcl
210 //hexcl->Draw("colz");
211 //hexpexcl->Draw("colz");
212 //hobsexcl->Draw("colz");
213 texpexcl->Draw("colz");
214 int col=kBlue-10;
215 for (std::vector<TGraph*>::iterator cont=contours.begin(); cont!=contours.end(); ++cont){
216 if (! *cont) continue;
217 double x, y;
218 (*cont)->GetPoint(0, x, y);
219 (*cont)->SetLineColor(col);
220 (*cont)->Draw("l");
221 TLatex l; l.SetTextSize(0.04); l.SetTextColor(col++);
222 char val[20];
223 sprintf(val,"%d",(int)(cont-contours.begin()));
224 l.DrawLatex(x,y,val);
225 //if (cont-contours.begin()>3) break;
226 }
227 c1->SaveAs("results_tb50/ExclusionTestContours_m0_m12_tb50.pdf");
228
229
230 // Exclusion in M0 - M1/2
231 TH2F*hexcl = new TH2F("hexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
232 40,200,600,26,140,400);
233 TGraph * gexpexcl = plotTools ->GetContour(hexcl,Mzero,Mhalf,ExpExclCL, 3,0, 2,2);
234 TGraph * gobsexcl = plotTools ->GetContour(hexcl,Mzero,Mhalf,ObsExclCL, 3,0, 2,1);
235 TGraph * gMCMCexpexcl = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,MCMCExpExclusion,3,0, 3,2);
236 TGraph * gMCMCobsexcl = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,MCMCObsExclusion,3,0, 3,1);
237 TGraph * gCLsExpExclHT = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,ExpExclCL, 3,0, 1,2);
238 TGraph * gCLsObsExclHT = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,ObsExclCL, 3,0, 1,1);
239 TGraph * gCLsExpExclHTm1 = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,ExpExclCLm1sigma,3,0, 5,2);
240 TGraph * gCLsExpExclHTp1 = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,ExpExclCLp1sigma,3,0, 5,2);
241 TGraph * gCLsExp1Sigma = MakeBand(gCLsExpExclHTp1, gCLsExpExclHTm1);
242 hexcl->Draw("colz");
243 if (gCLsExp1Sigma) gCLsExp1Sigma->Draw("lf");
244 if (gexpexcl) gexpexcl->Draw("l");
245 if (gCLsExpExclHT) gCLsExpExclHT->Draw("l");
246 if (gMCMCexpexcl) gMCMCexpexcl->Draw("l");
247 if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
248 //if (gobsexcl) gobsexcl->Draw("l");
249 //if (gPLobsexcl) gPLobsexcl->Draw("l");
250 //if (gFCobsexcl) gFCobsexcl->Draw("l");
251 //if (gMCMCobsexcl) gMCMCobsexcl->Draw("l");
252 //if (gFCexpexcl) gFCexpexcl->Draw("l");
253 //if (gPLexpexcl) gPLexpexcl->Draw("l");
254 //if (gFCexpexcl) gFCexpexcl->Draw("l");
255 //set old exclusion Limits
256 TGraph* LEP_ch = set_lep_ch();
257 TGraph* LEP_sl = set_lep_sl();//slepton curve
258 TGraph* TEV_sg_cdf = set_tev_sg_cdf();//squark gluino cdf
259 TGraph* TEV_sg_d0 = set_tev_sg_d0();//squark gluino d0
260 TGraph* TEV_tlp_cdf = set_tev_tlp_cdf();//trilepton cdf
261 TGraph* TEV_tlp_d0 = set_tev_tlp_d0();//trilepton d0
262 TGraph* stau = set_tev_stau();//stau
263 TGraph* TEV_sn_d0_1 = set_sneutrino_d0_1();
264 TGraph* TEV_sn_d0_2 = set_sneutrino_d0_2();
265 TGraphErrors* First = getObserved_NLO_tanBeta50();
266 TGraphErrors* Second = getExpected_NLO_tanBeta50();//getLO_jetMultis();
267 TGraphErrors* Third = getLO_tanBeta50();
268 First->GetXaxis()->SetRangeUser(0,505);
269 First->GetYaxis()->SetRangeUser(80,500);
270 First->GetXaxis()->SetTitle("m_{0} (GeV)");
271 First->GetYaxis()->SetTitle("m_{1/2} (GeV)");
272 TSpline3 *sFirst = new TSpline3("sFirst",First);
273 sFirst->SetLineColor(kBlue);
274 sFirst->SetLineWidth(3);
275 TSpline3 *sSecond = new TSpline3("sSecond",Second);
276 sSecond->SetLineColor(kBlue);
277 sSecond->SetLineStyle(2);
278 sSecond->SetLineWidth(3);
279 TSpline3 *sThird = new TSpline3("sThird",Third);
280 sThird->SetLineColor(kGreen+2);
281 sThird->SetLineStyle(4);
282 sThird->SetLineWidth(3);
283 TEV_sn_d0_1->Draw("fsame");
284 TEV_sn_d0_2->Draw("fsame");
285 TEV_sg_d0->Draw("fsame");
286 TEV_sg_cdf->Draw("fsame");
287 LEP_ch->Draw("fsame");
288 LEP_sl->Draw("fsame");
289 stau->Draw("fsame");
290 sFirst->Draw("same");
291 sSecond->Draw("same");
292 sThird->Draw("same");
293 TLatex b; b.SetTextSize(0.02); b.SetTextColor(1);
294 //b.DrawLatex( 10,420,"#tilde{#tau} LSP");
295 //b.DrawLatex( 6,150,"LEP2");
296 //b.DrawLatex( 22,138,"#tilde{l}^{#pm}");
297 //b.DrawLatex(360,110,"LEP2 #tilde{#chi}^{#pm}");
298 //b.DrawLatex(100,140,"CDF");
299 b.DrawLatex(230,145,"D0 #tilde{g}, #tilde{q}");
300 //b.DrawLatex( 80,180,"D0 #tilde{#nu}");
301 TLegend * leg = new TLegend(0.45,0.7,0.85,0.89);
302 leg->SetBorderSize(0);leg->SetFillColor(0);
303 //if (gobsexcl) leg->AddEntry(gobsexcl,"Observed (MHT, CLs, TLimit)","l");
304 if (gexpexcl) leg->AddEntry(gexpexcl,"LO Expected (MHT, CLs, TLimit)","l");
305 if (gCLsObsExclHT) leg->AddEntry(gCLsObsExclHT,"LO Observed (HT, CLs, TLimit)","l");
306 if (gCLsExpExclHT) leg->AddEntry(gCLsExpExclHT,"LO Expected (HT, CLs, TLimit)","l");
307 //if (gPLobsexcl) leg->AddEntry(gPLobsexcl,"Observed (PL, RooStat)","l");
308 //if (gPLexpexcl) leg->AddEntry(gPLexpexcl,"Expected (PL, RooStat)","l");
309 //if (gFCobsexcl) leg->AddEntry(gFCobsexcl,"Observed (FC, RooStat)","l");
310 //if (gFCexpexcl) leg->AddEntry(gFCexpexcl,"Expected (FC, RooStat)","l");
311 //if (gMCMCobsexcl) leg->AddEntry(gMCMCobsexcl,"Observed (MHT, MCMC, RooStat)","l");
312 if (gMCMCexpexcl) leg->AddEntry(gMCMCexpexcl,"LO Expected (HT, MCMC, RooStat)","l");
313 if (sFirst) leg->AddEntry(sFirst, "NLO RA1 Observed");
314 if (sSecond) leg->AddEntry(sSecond,"NLO RA1 Expected");
315 if (sThird) leg->AddEntry(sThird,"LO RA1 Observed");
316 leg->Draw();
317 gPad->RedrawAxis();
318 c1->SaveAs("results_tb50/Exclusion_m0_m12_tb50.pdf");
319
320 // Signal Contamination in M0 - M1/2
321 c1->SetLogz(0);
322 TH2F*hsigcont = new TH2F("sigcont",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
323 40,200,600,26,140,400);
324 plotToolsHT->Area(hsigcont, Mzero, Mhalf, SignalContamination);
325 hsigcont->SetMinimum(0.01);
326 hsigcont->SetMaximum(20);
327 hsigcont->Draw("colz");
328 if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
329 c1->SaveAs("results_tb50/SignalContamination_HT_m0_m12_tb50.pdf");
330
331 // Signal Contamination in M0 - M1/2
332 c1->SetLogz(0);
333 TH2F*hsigcontMHT = new TH2F("sigcontMHT",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
334 40,200,600,26,140,400);
335 plotTools->Area(hsigcontMHT, Mzero, Mhalf, SignalContamination);
336 hsigcontMHT->SetMinimum(0.01);
337 hsigcontMHT->SetMaximum(20);
338 hsigcontMHT->Draw("colz");
339 if (gobsexcl) gobsexcl->Draw("l");
340 c1->SaveAs("results_tb50/SignalContamination_MHT_m0_m12_tb50.pdf");
341
342
343 /*
344 //-----------------------------------------------------------------------------------
345 c1->SetLogz(1);
346
347 TGraph * mz500 = plotMasses->Line( MSquarkL, MGluino, Mzero, 500, 1);
348 TGraph * mh250 = plotMasses->Line( MSquarkL, MGluino, Mhalf, 250, 1);
349
350 // cross-section in squark - gluino mass
351 TH2F*hxsec_qg = new TH2F("xsec_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; cross section [pb]",
352 60,200,1400,50,200,1200);
353 plotTools->Area(hxsec_qg, MSquarkL, MGluino, Xsection);
354 hxsec_qg->SetMinimum(0.01);
355 hxsec_qg->Draw("colz");
356 mz500->Draw();
357 mh250->Draw();
358 c1->SaveAs("results_tb50/Xsection_mSql_mGl_tb50.pdf");
359
360 // Observed Limit in squark - gluino mass
361 TH2F*hobslimit_qg = new TH2F("obslimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Limit [pb]",
362 60,200,1400,50,200,1200);
363 plotTools->Area(hobslimit_qg, MSquarkL, MGluino, ObsXsecLimit);
364 hobslimit_qg->SetMinimum(0.01);
365 hobslimit_qg->Draw("colz");
366 c1->SaveAs("results_tb50/ObsLimit_mSql_mGl_tb50.pdf");
367
368 // Expected Limit in squark - gluino mass
369 TH2F*hexplimit_qg = new TH2F("explimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Limit [pb]",
370 60,200,1400,50,200,1200);
371 plotTools->Area(hexplimit_qg, MSquarkL, MGluino, ExpXsecLimit);
372 hexplimit_qg->SetMinimum(0.01);
373 hexplimit_qg->Draw("colz");
374 c1->SaveAs("results_tb50/ExpLimit_mSql_mGl_tb50.pdf");
375
376 // Signal Acceptance in squark - gluino mass
377 TH2F*hsigacc_qg = new TH2F("sigacc_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; Signal Acceptance",
378 60,200,1400,50,200,1200);
379 plotTools->Area(hsigacc_qg, MSquarkL, MGluino, SignalAcceptance);
380 hsigacc_qg->SetMinimum(0.01);
381 hsigacc_qg->SetMaximum(1.0);
382 hsigacc_qg->Draw("colz");
383 c1->SaveAs("results_tb50/SigAcc_mSql_mGl_tb50.pdf");
384
385 // Exp. Limit on Number of Signal Events in squark - gluino mass
386 c1->SetLogz(0);
387 TH2F*hexplimitnsig_qg = new TH2F("explimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL exp. limit signal events [# ]",
388 60,200,1400,50,200,1200);
389 plotTools->Area(hexplimitnsig_qg, MSquarkL, MGluino, ExpNSignLimit);
390 hexplimitnsig_qg->SetMinimum(0.0);
391 hexplimitnsig_qg->SetMaximum(20);
392 hexplimitnsig_qg->Draw("colz");
393 c1->SaveAs("results_tb50/ExpLimitOnNSig_mSql_mGl_tb50.pdf");
394
395 // Obs. Limit on Number of Signal Events in squark - gluino mass
396 TH2F*hobslimitnsig_qg = new TH2F("obslimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL obs. limit signal events [# ]",
397 60,200,1400,50,200,1200);
398 plotTools->Area(hobslimitnsig_qg, MSquarkL, MGluino, ObsNSignLimit);
399 hobslimitnsig_qg->SetMinimum(0.0);
400 hobslimitnsig_qg->SetMaximum(20);
401 hobslimitnsig_qg->Draw("colz");
402 c1->SaveAs("results_tb50/ObsLimitOnNSig_mSql_mGl_tb50.pdf");
403
404 c1->SetLogz(0);
405 // Expected Exclusion in squark - gluino mass
406 TH2F*hexpexcl_qg = new TH2F("expexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Exclusion",
407 60,200,1400,50,200,1200);
408 plotTools->Area(hexpexcl_qg, MSquarkL, MGluino, ExpExclCL);
409 hexpexcl_qg->Draw("colz");
410 c1->SaveAs("results_tb50/ExpExclusion_mSql_mGl_tb50.pdf");
411
412 // Observed Exclusion in squark - gluino mass
413 TH2F*hobsexcl_qg = new TH2F("obsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
414 60,200,1400,50,200,1200);
415 plotTools->Area(hobsexcl_qg, MSquarkL, MGluino, ObsExclCL);
416 //std::vector<TGraph *> vobsexcl_qg = plotTools->GetContours(hobsexcl_qg);
417 hobsexcl_qg->Draw("colz");
418 //for (std::vector<TGraph *>::iterator g=vobsexcl_qg.begin();g!=vobsexcl_qg.end();++g){
419 // if (! *g) continue;
420 // // (*g)->Draw("l");
421 //}
422 c1->SaveAs("results_tb50/ObsExclusion_mSql_mGl_tb50.pdf");
423
424 // TestContours in M0 - M1/2
425 TH2F*texcl_qg = new TH2F("texcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
426 60,200,1400,50,200,1200);
427 TH2F*tPLobsexcl_qg=(TH2F*)texcl_qg->Clone();
428 plotTools->Area(tPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
429 TH2F*tPLexpexcl_qg=(TH2F*)texcl_qg->Clone();
430 plotTools->Area(tPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
431 //std::vector<TGraph*> contours_qg = plotTools->GetContours(hexpexcl_qg,3);
432 //std::vector<TGraph*> contours_qg = plotTools->GetContours(hobsexcl_qg,3);
433 std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLobsexcl_qg,3);
434 //std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLexpexcl_qg,3);
435 //hPLexpexcl_qg
436 //hexcl_qg->Draw("colz");
437 //hexpexcl_qg->Draw("colz");
438 //hobsexcl_qg->Draw("colz");
439 tPLobsexcl_qg->Draw("colz");
440 int col_gl=kBlue-10;
441 for (std::vector<TGraph*>::iterator cont=contours_qg.begin(); cont!=contours_qg.end(); ++cont){
442 if (! *cont) continue;
443 double x, y;
444 (*cont)->GetPoint(0, x, y);
445 (*cont)->SetLineColor(col_gl);(*cont)->SetLineWidth(3);
446 (*cont)->Draw("l");
447 TLatex l; l.SetTextSize(0.04); l.SetTextColor(col_gl++);
448 char val[20];
449 sprintf(val,"%d",(int)(cont-contours_qg.begin()));
450 l.DrawLatex(x,y,val);
451 if (cont-contours_qg.begin()>3) break;
452 }
453 c1->SaveAs("results_tb50/ExclusionTestContours_mSql_mGl_tb50.pdf");
454
455 // Observed Exclusion in squark - gluino mass
456 TH2F*hPLobsexcl_qg = new TH2F("plobsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
457 60,200,1400,50,200,1200);
458 plotTools->Area(hPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
459 //hPLobsexcl_qg->Draw("colz");
460 //c1->SaveAs("results_tb50/PL_ObsExclusion_mSql_mGl_tb50.pdf");
461
462
463
464
465
466 // Exclusion in squark - gluino mass ----------------------------------------
467 TH2F*hexcl_qg = new TH2F("hexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
468 60,200,1400,50,200,1200);
469 TGraph * gexpexcl_qg = plotTools->GetContour(hexpexcl_qg,3,0);
470 if (gexpexcl_qg) gexpexcl_qg->SetLineStyle(2);
471 TGraph * gobsexcl_qg = plotTools->GetContour(hobsexcl_qg,3,0);
472 TH2F*hPLexpexcl_qg=(TH2F*)hexcl_qg->Clone();
473 plotTools->Area(hPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
474 TGraph * gPLexpexcl_qg = plotTools->GetContour(hPLexpexcl_qg,3,0);
475 if (gPLexpexcl_qg) {gPLexpexcl_qg->SetLineStyle(2);gPLexpexcl_qg->SetLineColor(2);}
476 TGraph * gPLobsexcl_qg = plotTools->GetContour(hPLobsexcl_qg,3,0);
477 if (gPLobsexcl_qg) gPLobsexcl_qg->SetLineColor(2);
478 TH2F*hCLsExpHT_qg=(TH2F*)hexcl_qg->Clone();
479 TH2F*hCLsObsHT_qg=(TH2F*)hexcl_qg->Clone();
480 plotToolsHT->Area(hCLsExpHT_qg, MSquarkL, MGluino, ExpExclCL);
481 plotToolsHT->Area(hCLsObsHT_qg, MSquarkL, MGluino, ObsExclCL);
482 TGraph * gCLsExpExclHT_qg = plotTools->GetContour(hCLsExpHT_qg,3,0);
483 TGraph * gCLsObsExclHT_qg = plotTools->GetContour(hCLsObsHT_qg,3,0);
484 if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->SetLineColor(2);
485 if (gCLsExpExclHT_qg) {gCLsExpExclHT_qg->SetLineStyle(2);gCLsExpExclHT_qg->SetLineColor(2);}
486 hexcl_qg->Draw("");
487 if (gobsexcl_qg) gobsexcl_qg->Draw("l");
488 if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->Draw("l");
489 if (gexpexcl_qg) gexpexcl_qg->Draw("l");
490 //if (gPLobsexcl_qg) gPLobsexcl_qg->Draw("l");
491 //if (gPLexpexcl_qg) gPLexpexcl_qg->Draw("l");
492 if (gCLsExpExclHT_qg) gCLsExpExclHT_qg->Draw("l");
493 TLegend * leg_qg = new TLegend(0.45,0.78,0.85,0.89);
494 leg_qg->SetBorderSize(0);leg_qg->SetFillColor(0);
495 if (gobsexcl_qg) leg_qg->AddEntry(gobsexcl_qg,"Observed (MHT, CLs, TLimit)","l");
496 if (gexpexcl_qg) leg_qg->AddEntry(gexpexcl_qg,"Expected (MHT, CLs, TLimit)","l");
497 if (gCLsObsExclHT_qg) leg_qg->AddEntry(gCLsObsExclHT_qg,"Observed (HT, CLs, TLimit)","l");
498 if (gCLsExpExclHT_qg) leg_qg->AddEntry(gCLsExpExclHT_qg,"Expected (HT, CLs, TLimit)","l");
499 //if (gPLobsexcl_qg) leg_qg->AddEntry(gPLobsexcl_qg,"Observed (PL, RooStat)","l");
500 //if (gPLexpexcl_qg) leg_qg->AddEntry(gPLexpexcl_qg,"Expected (PL, RooStat)","l");
501 leg_qg->Draw();
502 c1->SaveAs("results_tb50/Exclusion_mSql_mGl_tb50.pdf");
503
504 //c1->SaveAs("plot_tb50.pdf");
505 */
506 c1->SetLogy(1);
507 c1->SetLogx(1);
508 TH2F*hUncertScan = new TH2F("hUncertScan",";relative signal uncertainty; number of signal events",
509 10,0.1,0.6,10,0.9,200);
510 //hUncertScan->GetXaxis()->SetNdivisions(505, false);
511 //hUncertScan->SetMinimum(1);
512 TGraph * gCLsExpUncert = new TGraph(0);
513 TGraph * gCLsObsUncert = new TGraph(0);
514 TGraph * gPLExpUncert = new TGraph(0);
515 TGraph * gPLObsUncert = new TGraph(0);
516 TGraph * gFCExpUncert = new TGraph(0);
517 TGraph * gFCObsUncert = new TGraph(0);
518 TGraph * gMCMCExpUncert= new TGraph(0);
519 TGraph * gMCMCObsUncert= new TGraph(0);
520 plotTools->Graph(gCLsExpUncert, SignalRelUncertainty, ExpNSignLimit,1);
521 plotTools->Graph(gCLsObsUncert, SignalRelUncertainty, ObsNSignLimit,1);
522 plotTools->Graph(gPLExpUncert, SignalRelUncertainty, PLExpNSignLimit,1);
523 plotTools->Graph(gPLObsUncert, SignalRelUncertainty, PLObsNSignLimit, 1);
524 plotTools->Graph(gFCExpUncert, SignalRelUncertainty, FCExpNSignLimit,1);
525 plotTools->Graph(gFCObsUncert, SignalRelUncertainty, FCObsNSignLimit, 1);
526 plotTools->Graph(gMCMCExpUncert,SignalRelUncertainty, MCMCExpNSignLimit,1);
527 plotTools->Graph(gMCMCObsUncert,SignalRelUncertainty, MCMCObsNSignLimit, 1);
528 gCLsExpUncert->SetLineStyle(8);
529 gPLObsUncert->SetLineColor(2);
530 gPLExpUncert->SetLineColor(2); gPLExpUncert->SetLineStyle(8);
531 gFCObsUncert->SetLineColor(3);
532 gFCExpUncert->SetLineColor(3); gFCExpUncert->SetLineStyle(8);
533 gMCMCObsUncert->SetLineColor(4);
534 gMCMCExpUncert->SetLineColor(4); gMCMCExpUncert->SetLineStyle(8);
535 hUncertScan->Draw("h");
536 gCLsExpUncert->Draw("l");
537 gCLsObsUncert->Draw("l");
538 gPLObsUncert->Draw("l");
539 gPLExpUncert->Draw("l");
540 gFCObsUncert->Draw("l");
541 gFCExpUncert->Draw("l");
542 gMCMCObsUncert->Draw("l");
543 gMCMCExpUncert->Draw("l");
544 TLatex l; l.SetTextSize(0.03); l.SetTextColor(1);
545 l.DrawLatex(0.025,25,"excluded");
546 TMarker m; m.SetMarkerStyle(29); m.SetMarkerColor(2);
547 m.DrawMarker(0.128, 28.5);l.DrawLatex(0.14,28.5,"LM1");
548 m.DrawMarker(0.147, 77.4);l.DrawLatex(0.16,77.4,"LM0");
549
550 TLegend * leg_S = new TLegend(0.5,0.14,0.85,0.38);
551 leg_S->SetBorderSize(0);leg_S->SetFillColor(0);
552 leg_S->SetHeader("95% CL upper limits");
553 leg_S->AddEntry(gCLsExpUncert,"Expected (CLs, TLimit)","l");
554 leg_S->AddEntry(gCLsObsUncert,"Observed (CLs, TLimit)","l");
555 leg_S->AddEntry(gPLExpUncert,"Expected (PL, RooStat)","l");
556 leg_S->AddEntry(gPLObsUncert,"Observed (PL, RooStat)","l");
557 leg_S->AddEntry(gFCObsUncert,"Observed (FC, RooStat)","l");
558 leg_S->AddEntry(gFCExpUncert,"Expected (FC, RooStat)","l");
559 leg_S->AddEntry(gMCMCObsUncert,"Observed (MCMC, RooStat)","l");
560 leg_S->AddEntry(gMCMCExpUncert,"Expected (MCMC, RooStat)","l");
561 leg_S->Draw();
562 c1->SaveAs("results_tb50/UncertaintyScan.pdf");
563
564 //theApp.Run();
565 }
566
567
568 int main(int argc, char** argv)
569 {
570 return plot(argc, argv);
571 }