ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/plot50tb.cc
Revision: 1.5
Committed: Tue Feb 22 13:59:19 2011 UTC (14 years, 2 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.4: +129 -47 lines
Log Message:
NLO updates

File Contents

# User Rev Content
1 auterman 1.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 auterman 1.4 genpoints->FillGeneratorMasses("GenScan_tb50.dat");
93 auterman 1.1 genpoints->match();
94 auterman 1.4 genpointsHT->FillGeneratorMasses("GenScan_tb50.dat");
95 auterman 1.1 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 auterman 1.5 TGraph * gexpexcl = plotTools ->GetContour(hexcl,Mzero,Mhalf,NLOExpExclCL, 3,0, 2,2);
234     TGraph * gexpexcl_LO = plotTools ->GetContour(hexcl,Mzero,Mhalf,ExpExclCL, 3,0, 2,4);
235     TGraph * gobsexcl = plotTools ->GetContour(hexcl,Mzero,Mhalf,NLOObsExclCL, 3,0, 2,1);
236     TGraph * gMCMCexpexcl_LO = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,MCMCExpExclusion,3,0, 3,4);
237     TGraph * gMCMCobsexcl_LO = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,MCMCObsExclusion,3,0, 3,1);
238     TGraph * gCLsExpExclHT_LO = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,ExpExclCL, 3,0, 1,4);
239     TGraph * gCLsExpExclHT = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,NLOExpExclCL, 3,0, 1,2);
240     TGraph * gCLsObsExclHT = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,NLOObsExclCL, 3,0, 1,1);
241     TGraph * gCLsExpExclHTm1 = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,NLOExpExclCLm1sigma,3,0, 5,2);
242     TGraph * gCLsExpExclHTp1 = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,NLOExpExclCLp1sigma,3,0, 5,2);
243     Smooth( gCLsExpExclHT_LO, 33 ); gCLsExpExclHT_LO->SetLineWidth( 3 );
244     Smooth( gCLsObsExclHT, 33); gCLsObsExclHT->SetLineWidth( 3 );
245     Smooth( gCLsExpExclHT, 33 ); gCLsExpExclHT->SetLineWidth( 3 );
246     Smooth( gexpexcl, 33 );
247     Smooth( gobsexcl, 33 );
248     Smooth( gMCMCexpexcl_LO, 33 );
249     Smooth( gCLsExpExclHTm1, 33 );
250     Smooth( gCLsExpExclHTp1, 33 );
251 auterman 1.1 TGraph * gCLsExp1Sigma = MakeBand(gCLsExpExclHTp1, gCLsExpExclHTm1);
252 auterman 1.5 hexcl->Draw("colz");
253     gCLsExp1Sigma->Draw("f");
254 auterman 1.1 //set old exclusion Limits
255 auterman 1.3 TGraph* LEP_ch = set_lep_ch(50);
256     TGraph* LEP_sl = set_lep_sl(50);//slepton curve
257     TGraph* TEV_sg_cdf = set_tev_sg_cdf(50);//squark gluino cdf
258     TGraph* TEV_sg_d0 = set_tev_sg_d0(50);//squark gluino d0
259     //TGraph* TEV_tlp_cdf = set_tev_tlp_cdf(10);//trilepton cdf
260     //TGraph* TEV_tlp_d0 = set_tev_tlp_d0(10);//trilepton d0
261     TGraph* stau = set_tev_stau(50);//stau
262     TGraph* TEV_sn_d0_1 = set_sneutrino_d0_1(50);
263     TGraph* TEV_sn_d0_2 = set_sneutrino_d0_2(50);
264 auterman 1.2 TGraphErrors* First = getObserved_NLO_tanBeta50();
265     TGraphErrors* Second = getExpected_NLO_tanBeta50();//getLO_jetMultis();
266     TGraphErrors* Third = getLO_tanBeta50();
267 auterman 1.1 First->GetXaxis()->SetRangeUser(0,505);
268     First->GetYaxis()->SetRangeUser(80,500);
269     First->GetXaxis()->SetTitle("m_{0} (GeV)");
270     First->GetYaxis()->SetTitle("m_{1/2} (GeV)");
271     TSpline3 *sFirst = new TSpline3("sFirst",First);
272     sFirst->SetLineColor(kBlue);
273 auterman 1.5 //sFirst->SetLineWidth(3);
274 auterman 1.1 TSpline3 *sSecond = new TSpline3("sSecond",Second);
275     sSecond->SetLineColor(kBlue);
276     sSecond->SetLineStyle(2);
277 auterman 1.5 //sSecond->SetLineWidth(3);
278 auterman 1.1 TSpline3 *sThird = new TSpline3("sThird",Third);
279 auterman 1.5 sThird->SetLineColor(kBlue);
280 auterman 1.1 sThird->SetLineStyle(4);
281 auterman 1.5 //sThird->SetLineWidth(3);
282 auterman 1.1 TEV_sn_d0_1->Draw("fsame");
283     TEV_sn_d0_2->Draw("fsame");
284 auterman 1.4 TEV_sg_d0->Draw("fsame");
285     TEV_sg_cdf->Draw("fsame");
286 auterman 1.1 LEP_ch->Draw("fsame");
287     LEP_sl->Draw("fsame");
288     stau->Draw("fsame");
289     sFirst->Draw("same");
290     sSecond->Draw("same");
291 auterman 1.2 sThird->Draw("same");
292 auterman 1.5 if (gexpexcl) gexpexcl->Draw("l");
293     if (gCLsExpExclHT) gCLsExpExclHT->Draw("l");
294     if (gCLsExpExclHT_LO) gCLsExpExclHT_LO->Draw("l");
295     if (gMCMCexpexcl_LO) gMCMCexpexcl_LO->Draw("l");
296     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
297 auterman 1.1 TLatex b; b.SetTextSize(0.02); b.SetTextColor(1);
298     //b.DrawLatex( 10,420,"#tilde{#tau} LSP");
299 auterman 1.4 b.DrawLatex(230,145,"LEP2");
300 auterman 1.1 //b.DrawLatex( 22,138,"#tilde{l}^{#pm}");
301     //b.DrawLatex(360,110,"LEP2 #tilde{#chi}^{#pm}");
302     //b.DrawLatex(100,140,"CDF");
303 auterman 1.4 //b.DrawLatex(230,145,"D0 #tilde{g}, #tilde{q}");
304 auterman 1.1 //b.DrawLatex( 80,180,"D0 #tilde{#nu}");
305     TLegend * leg = new TLegend(0.45,0.7,0.85,0.89);
306     leg->SetBorderSize(0);leg->SetFillColor(0);
307 auterman 1.5 TGraph * expLeg = (TGraph*)gCLsExpExclHT->Clone();expLeg->SetFillStyle(gCLsExp1Sigma->GetFillStyle());expLeg->SetFillColor(gCLsExp1Sigma->GetFillColor());
308 auterman 1.1 //if (gobsexcl) leg->AddEntry(gobsexcl,"Observed (MHT, CLs, TLimit)","l");
309 auterman 1.5 if (gCLsObsExclHT) leg->AddEntry(gCLsObsExclHT, "NLO Observed (HT, CLs)","l");
310     if (gCLsExpExclHT) leg->AddEntry(expLeg , "NLO Expected (HT, CLs)","l");
311     if (gCLsExpExclHT_LO) leg->AddEntry(gCLsExpExclHT_LO,"LO Expected (HT, CLs)","l");
312     if (gMCMCexpexcl_LO) leg->AddEntry(gMCMCexpexcl_LO, "LO Expected (HT, MCMC, RooStat)","l");
313     if (gexpexcl) leg->AddEntry(gexpexcl, "NLO Expected (MHT, CLs)","l");
314     if (sSecond) leg->AddEntry(sSecond, "NLO #alpha_{T} Expected");
315     if (sFirst) leg->AddEntry(sFirst, "NLO #alpha_{T} Observed");
316     if (sThird) leg->AddEntry(sThird, "LO #alpha_{T} Expected");
317 auterman 1.1 leg->Draw();
318     gPad->RedrawAxis();
319     c1->SaveAs("results_tb50/Exclusion_m0_m12_tb50.pdf");
320    
321     // Signal Contamination in M0 - M1/2
322     c1->SetLogz(0);
323     TH2F*hsigcont = new TH2F("sigcont",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
324     40,200,600,26,140,400);
325     plotToolsHT->Area(hsigcont, Mzero, Mhalf, SignalContamination);
326     hsigcont->SetMinimum(0.01);
327     hsigcont->SetMaximum(20);
328     hsigcont->Draw("colz");
329     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
330     c1->SaveAs("results_tb50/SignalContamination_HT_m0_m12_tb50.pdf");
331    
332     // Signal Contamination in M0 - M1/2
333     c1->SetLogz(0);
334     TH2F*hsigcontMHT = new TH2F("sigcontMHT",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
335     40,200,600,26,140,400);
336     plotTools->Area(hsigcontMHT, Mzero, Mhalf, SignalContamination);
337     hsigcontMHT->SetMinimum(0.01);
338     hsigcontMHT->SetMaximum(20);
339     hsigcontMHT->Draw("colz");
340     if (gobsexcl) gobsexcl->Draw("l");
341     c1->SaveAs("results_tb50/SignalContamination_MHT_m0_m12_tb50.pdf");
342    
343 auterman 1.5 // Signal JEC Uncertainty MHT
344     c1->SetLogz(0);
345     TH2F*hsig_jec_mht = new TH2F("sigjecmht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal JEC uncertainty",
346     40,200,600,26,140,400);
347     plotTools->Area(hsig_jec_mht, Mzero, Mhalf, SignalUncertJEC);
348     hsig_jec_mht->SetMinimum(0.0);
349     hsig_jec_mht->SetMaximum(0.25);
350     hsig_jec_mht->SetContour(10);
351     hsig_jec_mht->Draw("colz");
352     if (gobsexcl) gobsexcl->Draw("l");
353     c1->SaveAs("results_tb50/SigJEC_MHT_m0_m12_tb50.pdf");
354    
355     // Signal JEC Uncertainty HT
356     c1->SetLogz(0);
357     TH2F*hsig_jec_ht = new TH2F("sigjecht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal JEC uncertainty",
358     40,200,600,26,140,400);
359     plotTools->Area(hsig_jec_ht, Mzero, Mhalf, SignalUncertJEC);
360     hsig_jec_ht->SetMinimum(0.0);
361     hsig_jec_ht->SetMaximum(0.25);
362     hsig_jec_ht->SetContour(10);
363     hsig_jec_ht->Draw("colz");
364     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
365     c1->SaveAs("results_tb50/SigJEC_HT_m0_m12_tb50.pdf");
366    
367    
368     // Signal MuIso Uncertainty MHT
369     c1->SetLogz(0);
370     TH2F*hsig_MuIso_mht = new TH2F("sigMuIsomht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
371     40,200,600,26,140,400);
372     plotTools->Area(hsig_MuIso_mht, Mzero, Mhalf, SignalUncertMuIso);
373     hsig_MuIso_mht->SetMinimum(0.0);
374     hsig_MuIso_mht->SetMaximum(0.05);
375     hsig_MuIso_mht->SetContour(5);
376     hsig_MuIso_mht->Draw("colz");
377     if (gobsexcl) gobsexcl->Draw("l");
378     c1->SaveAs("results_tb50/SigMuIso_MHT_m0_m12_tb50.pdf");
379    
380     // Signal MuIso Uncertainty HT
381     c1->SetLogz(0);
382     TH2F*hsig_MuIso_ht = new TH2F("sigMuIsoht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
383     40,200,600,26,140,400);
384     plotTools->Area(hsig_MuIso_ht, Mzero, Mhalf, SignalUncertMuIso);
385     hsig_MuIso_ht->SetMinimum(0.0);
386     hsig_MuIso_ht->SetMaximum(0.05);
387     hsig_MuIso_ht->SetContour(5);
388     hsig_MuIso_ht->Draw("colz");
389     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
390     c1->SaveAs("results_tb50/SigMuIso_HT_m0_m12_tb50.pdf");
391    
392    
393     // Signal kFactor Uncertainty MHT
394     c1->SetLogz(0);
395     TH2F*hsig_kFactor_mht = new TH2F("sigkFactormht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
396     40,200,600,26,140,400);
397     plotTools->Area(hsig_kFactor_mht, Mzero, Mhalf, SignalUncertKfactor);
398     hsig_kFactor_mht->SetMinimum(0.1);
399     hsig_kFactor_mht->SetMaximum(0.2);
400     hsig_kFactor_mht->SetContour(10);
401     hsig_kFactor_mht->Draw("colz");
402     if (gobsexcl) gobsexcl->Draw("l");
403     c1->SaveAs("results_tb50/SigkFactor_MHT_m0_m12_tb50.pdf");
404    
405     // Signal kFactor Uncertainty HT
406     c1->SetLogz(0);
407     TH2F*hsig_kFactor_ht = new TH2F("sigkFactorht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
408     40,200,600,26,140,400);
409     plotTools->Area(hsig_kFactor_ht, Mzero, Mhalf, SignalUncertKfactor);
410     hsig_kFactor_ht->SetMinimum(0.1);
411     hsig_kFactor_ht->SetMaximum(0.2);
412     hsig_kFactor_ht->SetContour(10);
413     hsig_kFactor_ht->Draw("colz");
414     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
415     c1->SaveAs("results_tb50/SigkFactor_HT_m0_m12_tb50.pdf");
416    
417 auterman 1.1
418     //-----------------------------------------------------------------------------------
419     c1->SetLogz(1);
420    
421     TGraph * mz500 = plotMasses->Line( MSquarkL, MGluino, Mzero, 500, 1);
422     TGraph * mh250 = plotMasses->Line( MSquarkL, MGluino, Mhalf, 250, 1);
423    
424     // cross-section in squark - gluino mass
425     TH2F*hxsec_qg = new TH2F("xsec_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; cross section [pb]",
426 auterman 1.4 40,200,900,30,200,900);
427 auterman 1.1 plotTools->Area(hxsec_qg, MSquarkL, MGluino, Xsection);
428     hxsec_qg->SetMinimum(0.01);
429     hxsec_qg->Draw("colz");
430     mz500->Draw();
431     mh250->Draw();
432     c1->SaveAs("results_tb50/Xsection_mSql_mGl_tb50.pdf");
433    
434     // Observed Limit in squark - gluino mass
435     TH2F*hobslimit_qg = new TH2F("obslimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Limit [pb]",
436 auterman 1.4 40,200,900,30,200,900);
437 auterman 1.1 plotTools->Area(hobslimit_qg, MSquarkL, MGluino, ObsXsecLimit);
438     hobslimit_qg->SetMinimum(0.01);
439     hobslimit_qg->Draw("colz");
440     c1->SaveAs("results_tb50/ObsLimit_mSql_mGl_tb50.pdf");
441    
442     // Expected Limit in squark - gluino mass
443     TH2F*hexplimit_qg = new TH2F("explimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Limit [pb]",
444 auterman 1.4 40,200,900,30,200,900);
445 auterman 1.1 plotTools->Area(hexplimit_qg, MSquarkL, MGluino, ExpXsecLimit);
446     hexplimit_qg->SetMinimum(0.01);
447     hexplimit_qg->Draw("colz");
448     c1->SaveAs("results_tb50/ExpLimit_mSql_mGl_tb50.pdf");
449    
450     // Signal Acceptance in squark - gluino mass
451     TH2F*hsigacc_qg = new TH2F("sigacc_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; Signal Acceptance",
452 auterman 1.4 40,200,900,30,200,900);
453 auterman 1.1 plotTools->Area(hsigacc_qg, MSquarkL, MGluino, SignalAcceptance);
454     hsigacc_qg->SetMinimum(0.01);
455     hsigacc_qg->SetMaximum(1.0);
456     hsigacc_qg->Draw("colz");
457     c1->SaveAs("results_tb50/SigAcc_mSql_mGl_tb50.pdf");
458    
459     // Exp. Limit on Number of Signal Events in squark - gluino mass
460     c1->SetLogz(0);
461     TH2F*hexplimitnsig_qg = new TH2F("explimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL exp. limit signal events [# ]",
462 auterman 1.4 40,200,900,30,200,900);
463 auterman 1.1 plotTools->Area(hexplimitnsig_qg, MSquarkL, MGluino, ExpNSignLimit);
464     hexplimitnsig_qg->SetMinimum(0.0);
465     hexplimitnsig_qg->SetMaximum(20);
466     hexplimitnsig_qg->Draw("colz");
467     c1->SaveAs("results_tb50/ExpLimitOnNSig_mSql_mGl_tb50.pdf");
468    
469     // Obs. Limit on Number of Signal Events in squark - gluino mass
470     TH2F*hobslimitnsig_qg = new TH2F("obslimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL obs. limit signal events [# ]",
471 auterman 1.4 40,200,900,30,200,900);
472 auterman 1.1 plotTools->Area(hobslimitnsig_qg, MSquarkL, MGluino, ObsNSignLimit);
473     hobslimitnsig_qg->SetMinimum(0.0);
474     hobslimitnsig_qg->SetMaximum(20);
475     hobslimitnsig_qg->Draw("colz");
476     c1->SaveAs("results_tb50/ObsLimitOnNSig_mSql_mGl_tb50.pdf");
477    
478     c1->SetLogz(0);
479     // Expected Exclusion in squark - gluino mass
480     TH2F*hexpexcl_qg = new TH2F("expexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Exclusion",
481 auterman 1.4 40,200,900,30,200,900);
482 auterman 1.1 plotTools->Area(hexpexcl_qg, MSquarkL, MGluino, ExpExclCL);
483     hexpexcl_qg->Draw("colz");
484     c1->SaveAs("results_tb50/ExpExclusion_mSql_mGl_tb50.pdf");
485    
486     // Observed Exclusion in squark - gluino mass
487     TH2F*hobsexcl_qg = new TH2F("obsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
488 auterman 1.4 40,200,900,30,200,900);
489 auterman 1.1 plotTools->Area(hobsexcl_qg, MSquarkL, MGluino, ObsExclCL);
490     //std::vector<TGraph *> vobsexcl_qg = plotTools->GetContours(hobsexcl_qg);
491     hobsexcl_qg->Draw("colz");
492     //for (std::vector<TGraph *>::iterator g=vobsexcl_qg.begin();g!=vobsexcl_qg.end();++g){
493     // if (! *g) continue;
494     // // (*g)->Draw("l");
495     //}
496     c1->SaveAs("results_tb50/ObsExclusion_mSql_mGl_tb50.pdf");
497    
498     // TestContours in M0 - M1/2
499     TH2F*texcl_qg = new TH2F("texcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
500 auterman 1.4 40,200,900,30,200,900);
501 auterman 1.1 TH2F*tPLobsexcl_qg=(TH2F*)texcl_qg->Clone();
502     plotTools->Area(tPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
503     TH2F*tPLexpexcl_qg=(TH2F*)texcl_qg->Clone();
504     plotTools->Area(tPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
505     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hexpexcl_qg,3);
506     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hobsexcl_qg,3);
507     std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLobsexcl_qg,3);
508     //std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLexpexcl_qg,3);
509     //hPLexpexcl_qg
510     //hexcl_qg->Draw("colz");
511     //hexpexcl_qg->Draw("colz");
512     //hobsexcl_qg->Draw("colz");
513     tPLobsexcl_qg->Draw("colz");
514     int col_gl=kBlue-10;
515     for (std::vector<TGraph*>::iterator cont=contours_qg.begin(); cont!=contours_qg.end(); ++cont){
516     if (! *cont) continue;
517     double x, y;
518     (*cont)->GetPoint(0, x, y);
519     (*cont)->SetLineColor(col_gl);(*cont)->SetLineWidth(3);
520     (*cont)->Draw("l");
521     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col_gl++);
522     char val[20];
523     sprintf(val,"%d",(int)(cont-contours_qg.begin()));
524     l.DrawLatex(x,y,val);
525     if (cont-contours_qg.begin()>3) break;
526     }
527     c1->SaveAs("results_tb50/ExclusionTestContours_mSql_mGl_tb50.pdf");
528    
529     // Observed Exclusion in squark - gluino mass
530     TH2F*hPLobsexcl_qg = new TH2F("plobsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
531 auterman 1.4 40,200,900,30,200,900);
532 auterman 1.1 plotTools->Area(hPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
533     //hPLobsexcl_qg->Draw("colz");
534     //c1->SaveAs("results_tb50/PL_ObsExclusion_mSql_mGl_tb50.pdf");
535    
536    
537    
538     // Exclusion in squark - gluino mass ----------------------------------------
539     TH2F*hexcl_qg = new TH2F("hexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
540 auterman 1.4 40,200,900,30,200,900);
541 auterman 1.5 TGraph * gexpexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino, NLOExpExclCL, 3,0, 2,2);
542     TGraph * gexpexcl_qg_LO = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino, ExpExclCL, 3,0, 2,4);
543     TGraph * gobsexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino, NLOObsExclCL, 3,0, 2,1);
544 auterman 1.4 TGraph * gMCMCexpexcl_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCExpExclusion,3,0, 3,2);
545     TGraph * gMCMCobsexcl_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCObsExclusion,3,0, 3,1);
546 auterman 1.5 TGraph * gCLsExpExclHT_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCL, 3,0, 1,2);
547     TGraph * gCLsExpExclHT_qg_LO = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCL, 3,0, 1,4);
548     TGraph * gCLsObsExclHT_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOObsExclCL, 3,0, 1,1);
549     TGraph * gCLsExpExclHTm1_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCLm1sigma,3,0, 5,2);
550     TGraph * gCLsExpExclHTp1_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCLp1sigma,3,0, 5,2);
551 auterman 1.4 TGraph * gCLsExp1Sigma_qg = MakeBand(gCLsExpExclHTp1_qg, gCLsExpExclHTm1_qg);
552 auterman 1.1 hexcl_qg->Draw("");
553 auterman 1.4 //
554     if (gCLsExp1Sigma_qg) gCLsExp1Sigma_qg->Draw("lf");
555     if (gobsexcl_qg) gobsexcl_qg->Draw("l");
556 auterman 1.1 if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->Draw("l");
557 auterman 1.4 if (gexpexcl_qg) gexpexcl_qg->Draw("l");
558 auterman 1.5 if (gexpexcl_qg_LO) gexpexcl_qg_LO->Draw("l");
559 auterman 1.1 if (gCLsExpExclHT_qg) gCLsExpExclHT_qg->Draw("l");
560 auterman 1.5 if (gCLsExpExclHT_qg_LO) gCLsExpExclHT_qg_LO->Draw("l");
561 auterman 1.4 //
562 auterman 1.1 TLegend * leg_qg = new TLegend(0.45,0.78,0.85,0.89);
563     leg_qg->SetBorderSize(0);leg_qg->SetFillColor(0);
564 auterman 1.5 TGraph * expLeg_qg = (TGraph*)gCLsExpExclHT_qg->Clone();expLeg_qg->SetFillStyle(gCLsExp1Sigma_qg->GetFillStyle());expLeg_qg->SetFillColor(gCLsExp1Sigma_qg->GetFillColor());
565     if (gobsexcl_qg) leg_qg->AddEntry(gobsexcl_qg,"NLO Observed (MHT, CLs)","l");
566     if (gexpexcl_qg) leg_qg->AddEntry(gexpexcl_qg,"NLO Expected (MHT, CLs)","l");
567     if (gexpexcl_qg_LO) leg_qg->AddEntry(gexpexcl_qg_LO,"LO Expected (MHT, CLs)","l");
568     if (gCLsObsExclHT_qg) leg_qg->AddEntry(gCLsObsExclHT_qg,"NLO Observed (HT, CLs)","l");
569     if (gCLsExpExclHT_qg) leg_qg->AddEntry(expLeg_qg,"NLO Expected (HT, CLs)","lf");
570     if (gCLsExpExclHT_qg_LO) leg_qg->AddEntry(gCLsExpExclHT_qg_LO,"LO Expected (HT, CLs)","l");
571 auterman 1.1 //if (gPLobsexcl_qg) leg_qg->AddEntry(gPLobsexcl_qg,"Observed (PL, RooStat)","l");
572     //if (gPLexpexcl_qg) leg_qg->AddEntry(gPLexpexcl_qg,"Expected (PL, RooStat)","l");
573     leg_qg->Draw();
574     c1->SaveAs("results_tb50/Exclusion_mSql_mGl_tb50.pdf");
575 auterman 1.4 //c1->SaveAs("plot_tb10.pdf");
576    
577    
578 auterman 1.1
579     //c1->SaveAs("plot_tb50.pdf");
580     c1->SetLogy(1);
581     c1->SetLogx(1);
582     TH2F*hUncertScan = new TH2F("hUncertScan",";relative signal uncertainty; number of signal events",
583     10,0.1,0.6,10,0.9,200);
584     //hUncertScan->GetXaxis()->SetNdivisions(505, false);
585     //hUncertScan->SetMinimum(1);
586     TGraph * gCLsExpUncert = new TGraph(0);
587     TGraph * gCLsObsUncert = new TGraph(0);
588     TGraph * gPLExpUncert = new TGraph(0);
589     TGraph * gPLObsUncert = new TGraph(0);
590     TGraph * gFCExpUncert = new TGraph(0);
591     TGraph * gFCObsUncert = new TGraph(0);
592     TGraph * gMCMCExpUncert= new TGraph(0);
593     TGraph * gMCMCObsUncert= new TGraph(0);
594     plotTools->Graph(gCLsExpUncert, SignalRelUncertainty, ExpNSignLimit,1);
595     plotTools->Graph(gCLsObsUncert, SignalRelUncertainty, ObsNSignLimit,1);
596     plotTools->Graph(gPLExpUncert, SignalRelUncertainty, PLExpNSignLimit,1);
597     plotTools->Graph(gPLObsUncert, SignalRelUncertainty, PLObsNSignLimit, 1);
598     plotTools->Graph(gFCExpUncert, SignalRelUncertainty, FCExpNSignLimit,1);
599     plotTools->Graph(gFCObsUncert, SignalRelUncertainty, FCObsNSignLimit, 1);
600     plotTools->Graph(gMCMCExpUncert,SignalRelUncertainty, MCMCExpNSignLimit,1);
601     plotTools->Graph(gMCMCObsUncert,SignalRelUncertainty, MCMCObsNSignLimit, 1);
602     gCLsExpUncert->SetLineStyle(8);
603     gPLObsUncert->SetLineColor(2);
604     gPLExpUncert->SetLineColor(2); gPLExpUncert->SetLineStyle(8);
605     gFCObsUncert->SetLineColor(3);
606     gFCExpUncert->SetLineColor(3); gFCExpUncert->SetLineStyle(8);
607     gMCMCObsUncert->SetLineColor(4);
608     gMCMCExpUncert->SetLineColor(4); gMCMCExpUncert->SetLineStyle(8);
609     hUncertScan->Draw("h");
610     gCLsExpUncert->Draw("l");
611     gCLsObsUncert->Draw("l");
612     gPLObsUncert->Draw("l");
613     gPLExpUncert->Draw("l");
614     gFCObsUncert->Draw("l");
615     gFCExpUncert->Draw("l");
616     gMCMCObsUncert->Draw("l");
617     gMCMCExpUncert->Draw("l");
618     TLatex l; l.SetTextSize(0.03); l.SetTextColor(1);
619     l.DrawLatex(0.025,25,"excluded");
620     TMarker m; m.SetMarkerStyle(29); m.SetMarkerColor(2);
621     m.DrawMarker(0.128, 28.5);l.DrawLatex(0.14,28.5,"LM1");
622     m.DrawMarker(0.147, 77.4);l.DrawLatex(0.16,77.4,"LM0");
623    
624     TLegend * leg_S = new TLegend(0.5,0.14,0.85,0.38);
625     leg_S->SetBorderSize(0);leg_S->SetFillColor(0);
626     leg_S->SetHeader("95% CL upper limits");
627     leg_S->AddEntry(gCLsExpUncert,"Expected (CLs, TLimit)","l");
628     leg_S->AddEntry(gCLsObsUncert,"Observed (CLs, TLimit)","l");
629     leg_S->AddEntry(gPLExpUncert,"Expected (PL, RooStat)","l");
630     leg_S->AddEntry(gPLObsUncert,"Observed (PL, RooStat)","l");
631     leg_S->AddEntry(gFCObsUncert,"Observed (FC, RooStat)","l");
632     leg_S->AddEntry(gFCExpUncert,"Expected (FC, RooStat)","l");
633     leg_S->AddEntry(gMCMCObsUncert,"Observed (MCMC, RooStat)","l");
634     leg_S->AddEntry(gMCMCExpUncert,"Expected (MCMC, RooStat)","l");
635     leg_S->Draw();
636     c1->SaveAs("results_tb50/UncertaintyScan.pdf");
637    
638     //theApp.Run();
639     }
640    
641    
642     int main(int argc, char** argv)
643     {
644     return plot(argc, argv);
645     }