ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/plot50tb.cc
Revision: 1.7
Committed: Thu Mar 10 20:59:52 2011 UTC (14 years, 2 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.6: +121 -67 lines
Log Message:
commiting style changes

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 auterman 1.6 #include "StyleSettings.h"
8 auterman 1.1
9     #include "TRint.h"
10     #include "TROOT.h"
11     #include "TObjArray.h"
12     #include "TStyle.h"
13    
14     #include "TChain.h"
15     #include "TFile.h"
16     #include "TGraph.h"
17     #include "TH1.h"
18     #include "TH2.h"
19     #include "TH2F.h"
20     #include "TTree.h"
21     #include "TKey.h"
22     #include "Riostream.h"
23     #include "TCanvas.h"
24     #include "TLegend.h"
25     #include "TLatex.h"
26     #include "TMarker.h"
27    
28     #include <string>
29     #include <cmath>
30     #include <stdio.h>
31    
32     int plot(int argc, char** argv)
33     {
34     //interactive root session
35     //TApplication theApp("App", 0, 0);
36     if (gROOT->IsBatch()) {
37     fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]);
38     return 1;
39     }
40    
41 auterman 1.6 /*
42 auterman 1.1 //Style stuff
43     gStyle->SetHistFillColor(0);
44     gStyle->SetPalette(1);
45     gStyle->SetCanvasColor(0);
46     gStyle->SetCanvasBorderMode(0);
47     gStyle->SetPadColor(0);
48     gStyle->SetPadBorderMode(0);
49     gStyle->SetFrameBorderMode(0);
50    
51     gStyle->SetTitleFillColor(0);
52     gStyle->SetTitleBorderSize(0);
53     gStyle->SetTitleX(0.10);
54     gStyle->SetTitleY(0.98);
55     gStyle->SetTitleW(0.8);
56     gStyle->SetTitleH(0.06);
57    
58     gStyle->SetErrorX(0);
59     gStyle->SetStatColor(0);
60     gStyle->SetStatBorderSize(0);
61     gStyle->SetStatX(0);
62     gStyle->SetStatY(0);
63     gStyle->SetStatW(0);
64     gStyle->SetStatH(0);
65    
66     gStyle->SetTitleFont(22);
67     gStyle->SetLabelFont(22,"X");
68     gStyle->SetLabelFont(22,"Y");
69     gStyle->SetLabelFont(22,"Z");
70     gStyle->SetLabelSize(0.03,"X");
71     gStyle->SetLabelSize(0.03,"Y");
72     gStyle->SetLabelSize(0.03,"Z");
73 auterman 1.6 */
74     util::StyleSettings::paper();
75     gStyle->SetPadBottomMargin(0.18);
76 auterman 1.1
77     //gROOT->SetStyle("MyStyle");
78     TCanvas * c1 = new TCanvas("c1","c1",600,600);
79 auterman 1.6 //c1->SetFillStyle ( 4000 );
80     //c1->SetLeftMargin ( 0.15 );
81     //c1->SetRightMargin ( 0.15 );
82     //c1->SetBottomMargin( 0.10 );
83 auterman 1.1 c1->cd();
84    
85     //Get limits and generator masses ---------------------------------------------------
86     TheLimits * genpoints = new TheLimits();
87     //genpoints->Fill(argc, argv);
88 auterman 1.7 //genpoints->Fill("limits_MHT_tb50_20110303/filelist.txt");
89     genpoints->Fill("limits_MHT_20110310/filelist_tb50.txt");
90 auterman 1.1
91     TheLimits * genpointsHT = new TheLimits();
92 auterman 1.7 //genpointsHT->Fill("limits_HT_tb50_20110303/filelist.txt");
93     genpointsHT->Fill("limits_HT_20110310/filelist_tb50.txt");
94 auterman 1.1
95    
96     //Replace read limits with specific numbers
97     //genpoints->OverwriteLimits("ABCD_MHT");
98    
99 auterman 1.4 genpoints->FillGeneratorMasses("GenScan_tb50.dat");
100 auterman 1.1 genpoints->match();
101 auterman 1.4 genpointsHT->FillGeneratorMasses("GenScan_tb50.dat");
102 auterman 1.1 genpointsHT->match();
103    
104     //the plotting ----------------------------------------------------------------------
105     //plotting helper functions
106     PlotTools<SusyScan> * plotTools = new PlotTools<SusyScan>(genpoints->GetScan());
107     PlotTools<SusyScan> * plotToolsHT = new PlotTools<SusyScan>(genpointsHT->GetScan());
108     PlotTools<GeneratorMasses> * plotMasses = new PlotTools<GeneratorMasses>(genpoints->GetGeneratorMasses());
109    
110     //iso mass lines
111     TGraph * gl500 = plotMasses->Line(Mzero, Mhalf, MGluino, 500);
112     TGraph * sq500 = plotMasses->Line(Mzero, Mhalf, MSquarkL, 500, 10);
113     sq500->SetLineWidth(2); sq500->SetLineColor(7);
114    
115     TGraph * chi100 = plotMasses->Line(Mzero, Mhalf, MChi1, 50, 20);
116     TGraph * cha200 = plotMasses->Line(Mzero, Mhalf, MCha1, 200, 20);
117     cha200->SetLineColor(2);
118    
119     //the histograms
120     c1->SetLogz(1);
121     //h->SetMaximum(27);
122     //h->SetMinimum(0.01);
123    
124     /**/
125     // cross-section in M0 - M1/2
126     TH2F*hxsec = new TH2F("xsec",";m_{0} [GeV]; m_{1/2} [GeV]; cross section [pb]",
127     40,200,600,26,140,400);
128     plotTools->Area(hxsec, Mzero, Mhalf, Xsection);
129     hxsec->SetMinimum(0.01);
130     //sq500->Draw();
131     //gl500->Draw();
132     hxsec->Draw("colz");
133     c1->SaveAs("results_tb50/Xsection_m0_m12_tb50.pdf");
134     std::string wait;
135     //std::cin>>wait;
136    
137     // Observed Limit in M0 - M1/2
138     TH2F*hobslimit = new TH2F("obslimit",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Limit [pb]",
139     40,200,600,26,140,400);
140     plotTools->Area(hobslimit, Mzero, Mhalf, ObsXsecLimit);
141     hobslimit->SetMinimum(0.01);
142     hobslimit->Draw("colz");
143     c1->SaveAs("results_tb50/ObsLimit_m0_m12_tb50.pdf");
144    
145     // Expected Limit in M0 - M1/2
146     TH2F*hexplimit = new TH2F("explimit",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Limit [pb]",
147     40,200,600,26,140,400);
148     plotTools->Area(hexplimit, Mzero, Mhalf, ExpXsecLimit);
149     hexplimit->SetMinimum(0.01);
150     hexplimit->Draw("colz");
151     c1->SaveAs("results_tb50/ExpLimit_m0_m12_tb50.pdf");
152    
153     // Signal Acceptance in M0 - M1/2
154     TH2F*hsigacc = new TH2F("sigacc",";m_{0} [GeV]; m_{1/2} [GeV]; Signal Acceptance",
155     40,200,600,26,140,400);
156     plotTools->Area(hsigacc, Mzero, Mhalf, SignalAcceptance);
157     hsigacc->SetMinimum(0.01);
158     hsigacc->SetMaximum(1.0);
159     hsigacc->Draw("colz");
160     chi100->Draw();
161     cha200->Draw();
162     gl500 ->Draw();
163     sq500 ->Draw();
164     c1->SaveAs("results_tb50/SigAcc_m0_m12_tb50.pdf");
165    
166     // Exp. Limit on Number of Signal Events in M0 - M1/2
167     c1->SetLogz(0);
168     TH2F*hexplimitnsig = new TH2F("explimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL exp. limit signal events [# ]",
169     40,200,600,26,140,400);
170     plotTools->Area(hexplimitnsig, Mzero, Mhalf, ExpNSignLimit);
171     hexplimitnsig->SetMinimum(0.0);
172     hexplimitnsig->SetMaximum(20);
173     hexplimitnsig->Draw("colz");
174     c1->SaveAs("results_tb50/ExpLimitOnNSig_m0_m12_tb50.pdf");
175    
176 auterman 1.7 // Charged LSP in M0 - M1/2
177     c1->SetRightMargin ( 0.15 );
178     c1->SetLogz(0);
179     TH2F*hchargedLSP = new TH2F("explimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; Charged LSP",
180     40,200,600,26,140,400);
181     plotTools->Area(hchargedLSP, Mzero, Mhalf, ChargedLSP);
182     //hchargedLSP->SetMinimum(-0.01);
183     //hchargedLSP->SetMaximum(1.1);
184     hchargedLSP->Draw("colz");
185     c1->SaveAs("results_tb50/ChargedLSP_m0_m12_tb50.pdf");
186    
187     TH2F*hnLSP = new TH2F("explimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; Neutral LSP",
188     40,200,600,26,140,400);
189     plotTools->Area(hnLSP, Mzero, Mhalf, MChi1);
190     //hchargedLSP->SetMinimum(-0.01);
191     //hchargedLSP->SetMaximum(1.1);
192     hnLSP->Draw("colz");
193     c1->SaveAs("results_tb50/NeutralLSP_m0_m12_tb50.pdf");
194    
195 auterman 1.1 // Obs. Limit on Number of Signal Events in M0 - M1/2
196     TH2F*hobslimitnsig = new TH2F("obslimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL obs. limit signal events [# ]",
197     40,200,600,26,140,400);
198     plotTools->Area(hobslimitnsig, Mzero, Mhalf, ObsNSignLimit);
199     hobslimitnsig->SetMinimum(0.0);
200     hobslimitnsig->SetMaximum(20);
201     hobslimitnsig->Draw("colz");
202     c1->SaveAs("results_tb50/ObsLimitOnNSig_m0_m12_tb50.pdf");
203    
204     c1->SetLogz(0);
205     // Expected Exclusion in M0 - M1/2
206     TH2F*hexpexcl = new TH2F("expexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
207     40,200,600,26,140,400);
208     plotTools->Area(hexpexcl, Mzero, Mhalf, ExpExclCL);
209     hexpexcl->Draw("colz");
210     c1->SaveAs("results_tb50/ExpExclusion_m0_m12_tb50.pdf");
211    
212     // Observed Exclusion in M0 - M1/2
213     TH2F*hobsexcl = new TH2F("obsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
214     40,200,600,26,140,400);
215     plotTools->Area(hobsexcl, Mzero, Mhalf, ObsExclCL);
216     hobsexcl->Draw("colz");
217     c1->SaveAs("results_tb50/ObsExclusion_m0_m12_tb50.pdf");
218    
219     // Observed Exclusion in M0 - M1/2
220     TH2F*hPLobsexcl = new TH2F("plobsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
221     40,200,600,26,140,400);
222     plotTools->Area(hPLobsexcl, Mzero, Mhalf, PLObsExclusion);
223     hPLobsexcl->Draw("colz");
224     c1->SaveAs("results_tb50/PL_ObsExclusion_m0_m12_tb50.pdf");
225    
226 auterman 1.7 c1->SetRightMargin ( 0.1 );
227 auterman 1.1 // TestContours in M0 - M1/2
228     TH2F*texcl = new TH2F("texcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
229     40,200,600,26,140,400);
230     TH2F*texpexcl=(TH2F*)texcl->Clone();
231 auterman 1.6 plotToolsHT->Area(texpexcl, Mzero, Mhalf, NLOExpExclCLp1sigma);
232 auterman 1.1 std::vector<TGraph*> contours = plotTools->GetContours(texpexcl,3);
233     texpexcl->Draw("colz");
234     int col=kBlue-10;
235     for (std::vector<TGraph*>::iterator cont=contours.begin(); cont!=contours.end(); ++cont){
236     if (! *cont) continue;
237     double x, y;
238     (*cont)->GetPoint(0, x, y);
239     (*cont)->SetLineColor(col);
240     (*cont)->Draw("l");
241     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col++);
242     char val[20];
243     sprintf(val,"%d",(int)(cont-contours.begin()));
244     l.DrawLatex(x,y,val);
245     //if (cont-contours.begin()>3) break;
246     }
247     c1->SaveAs("results_tb50/ExclusionTestContours_m0_m12_tb50.pdf");
248    
249    
250     // Exclusion in M0 - M1/2
251     TH2F*hexcl = new TH2F("hexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
252 auterman 1.6 40,200,600,26,140,450);
253     TH2F*hs = new TH2F("hs","",40,200,600,26,140,400);
254     TGraph * gexpexcl = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpExclCL, 3,0, 2,2);
255     TGraph * gexpexcl_LO = plotTools ->GetContour(hs,Mzero,Mhalf,ExpExclCL, 3,0, 2,4);
256     TGraph * gobsexcl = plotTools ->GetContour(hs,Mzero,Mhalf,NLOObsExclCL, 3,0, 2,1);
257 auterman 1.7 TGraph * gobsexcl_LO = plotTools ->GetContour(hs,Mzero,Mhalf,ObsExclCL, 3,0, 2,1);
258 auterman 1.6 TGraph * gMCMCexpexcl = plotToolsHT->GetContour(hs,Mzero,Mhalf,MCMCExpExclusion, 3,0, 3,2);
259     TGraph * gMCMCobsexcl = plotToolsHT->GetContour(hs,Mzero,Mhalf,MCMCObsExclusion, 3,0, 3,1);
260     TGraph * gFCexpexclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOFCExpExclusion, 3,0, 3,2);
261     TGraph * gFCexpexclHT_LO = plotToolsHT->GetContour(hs,Mzero,Mhalf,FCExpExclusion, 3,0, 3,4);
262     TGraph * gFCexpexclMHT = plotTools->GetContour(hs,Mzero,Mhalf,NLOFCExpExclusion, 3,0, 3,2);
263     TGraph * gFCexpexclMHT_LO = plotTools->GetContour(hs,Mzero,Mhalf,FCExpExclusion, 3,0, 3,4);
264     TGraph * gFCobsexclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOFCObsExclusion, 3,0, 3,1);
265     TGraph * gFCobsexclMHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOFCObsExclusion, 3,0, 3,1);
266     TGraph * gCLsExpExclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpExclCL, 3,0, 1,2);
267     TGraph * gCLsObsExclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOObsExclCL, 3,0, 1,1);
268     TGraph * gCLsExpExclHT_LO = plotToolsHT->GetContour(hs,Mzero,Mhalf,ExpExclCL, 3,0, 1,4);
269 auterman 1.7 TGraph * gCLsObsExclHT_LO = plotToolsHT->GetContour(hs,Mzero,Mhalf,ObsExclCL, 3,0, 2,1);
270 auterman 1.6 TGraph * gCLsExpExclHTm1 = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpExclCLm1sigma,3,0, 5,2);
271     TGraph * gCLsExpExclHTp1 = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpExclCLp1sigma,3,0, 5,2);
272     TGraph * gCLsExpExclMHTm1 = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpExclCLm1sigma, 3,0, 5,2);
273     TGraph * gCLsExpExclMHTp1 = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpExclCLp1sigma, 3,0, 5,2);
274     TGraph * gCheck1 = (TGraph*)gobsexcl->Clone();
275     TGraph * gCheck2 = (TGraph*)gexpexcl->Clone();
276 auterman 1.7 Smooth( gCLsObsExclHT, 27); gCLsObsExclHT->SetLineWidth( 3 );
277     Smooth( gCLsExpExclHT, 27 ); gCLsExpExclHT->SetLineWidth( 3 );
278     Smooth( gCLsObsExclHT_LO, 27); gCLsObsExclHT_LO->SetLineWidth( 2 );
279     Smooth( gCLsExpExclHT_LO, 27 ); gCLsExpExclHT_LO->SetLineWidth( 3 );
280     Smooth( gexpexcl, 27 );
281     Smooth( gobsexcl_LO, 27 );gobsexcl_LO->SetLineWidth( 2 );
282     //Smooth( gobsexcl, 27 );
283     Smooth( gobsexcl, 27 );
284     Smooth( gexpexcl_LO, 27 );
285     Smooth( gFCexpexclHT, 27 );
286     Smooth( gFCexpexclHT_LO, 27 );gFCexpexclHT_LO->SetLineWidth( 3 );
287     Smooth( gFCexpexclMHT, 27 );
288     Smooth( gFCexpexclMHT_LO, 27 );
289     Smooth( gFCobsexclHT, 27 );gFCobsexclHT->SetLineWidth( 3 );
290     Smooth( gFCobsexclMHT, 27 );
291     Smooth( gCLsExpExclHTm1, 27 );
292     Smooth( gCLsExpExclHTp1, 27 );
293     Smooth( gCLsExpExclMHTm1, 27 );
294     Smooth( gCLsExpExclMHTp1, 27 );
295 auterman 1.6 TGraph * CLsObsNLO = plotToolsHT->ChooseBest(gCLsObsExclHT,gobsexcl, gCLsObsExclHT,gobsexcl);
296 auterman 1.7 TGraph * CLsObsLO = plotToolsHT->ChooseBest(gCLsObsExclHT_LO,gobsexcl_LO, gCLsObsExclHT_LO,gobsexcl_LO);
297 auterman 1.6 TGraph * CLsExpNLO = plotToolsHT->ChooseBest(gCLsExpExclHT,gexpexcl, gCLsExpExclHT,gexpexcl);
298     TGraph * CLsExpLO = plotToolsHT->ChooseBest(gCLsExpExclHT_LO,gexpexcl_LO, gCLsExpExclHT_LO,gexpexcl_LO);
299     TGraph * FCExpLO = plotToolsHT->ChooseBest(gFCexpexclHT_LO,gFCexpexclMHT_LO,gFCexpexclHT_LO,gFCexpexclMHT_LO);
300 auterman 1.7 TGraph * FCExpNLO = plotToolsHT->ChooseBest(gFCexpexclHT,gFCexpexclMHT,gFCexpexclHT,gFCexpexclMHT);
301 auterman 1.6 TGraph * FCObsNLO = plotToolsHT->ChooseBest(gFCobsexclHT,gFCobsexclMHT,gFCobsexclHT,gFCobsexclMHT);
302     TGraph * gCLsExpExclp1 = plotToolsHT->ChooseBest(gCLsExpExclHTp1,gCLsExpExclMHTp1, gCLsExpExclHTp1,gCLsExpExclMHTp1);
303     TGraph * gCLsExpExclm1 = plotToolsHT->ChooseBest(gCLsExpExclHTm1,gCLsExpExclMHTm1, gCLsExpExclHTm1,gCLsExpExclMHTm1);
304     TGraph * gCLsExp1Sigma = MakeBand(gCLsExpExclp1, gCLsExpExclm1);
305     hexcl->GetYaxis()->SetTitleOffset(1.3);
306 auterman 1.7 hexcl->GetXaxis()->SetTitleOffset(0.92);
307 auterman 1.6 hexcl->Draw("colz");
308     //gCLsExpExclHTp1->Draw("l");
309     //gCLsExpExclMHTp1->Draw("l");
310     //gCLsExpExclHTm1->Draw("l");
311     //gCLsExpExclMHTm1->Draw("l");
312     gCLsExp1Sigma->Draw("f");
313 auterman 1.1 //set old exclusion Limits
314 auterman 1.7 TGraph* Atlas = Atlas_m0_m12_tb3_obs();
315     Atlas->SetLineColor( 28 );
316 auterman 1.3 TGraph* LEP_ch = set_lep_ch(50);
317     TGraph* LEP_sl = set_lep_sl(50);//slepton curve
318     TGraph* TEV_sg_cdf = set_tev_sg_cdf(50);//squark gluino cdf
319     TGraph* TEV_sg_d0 = set_tev_sg_d0(50);//squark gluino d0
320     //TGraph* TEV_tlp_cdf = set_tev_tlp_cdf(10);//trilepton cdf
321     //TGraph* TEV_tlp_d0 = set_tev_tlp_d0(10);//trilepton d0
322     TGraph* stau = set_tev_stau(50);//stau
323     TGraph* TEV_sn_d0_1 = set_sneutrino_d0_1(50);
324     TGraph* TEV_sn_d0_2 = set_sneutrino_d0_2(50);
325 auterman 1.2 TGraphErrors* First = getObserved_NLO_tanBeta50();
326     TGraphErrors* Second = getExpected_NLO_tanBeta50();//getLO_jetMultis();
327     TGraphErrors* Third = getLO_tanBeta50();
328 auterman 1.1 First->GetXaxis()->SetRangeUser(0,505);
329     First->GetYaxis()->SetRangeUser(80,500);
330     First->GetXaxis()->SetTitle("m_{0} (GeV)");
331     First->GetYaxis()->SetTitle("m_{1/2} (GeV)");
332     TSpline3 *sFirst = new TSpline3("sFirst",First);
333     sFirst->SetLineColor(kBlue);
334 auterman 1.5 //sFirst->SetLineWidth(3);
335 auterman 1.1 TSpline3 *sSecond = new TSpline3("sSecond",Second);
336     sSecond->SetLineColor(kBlue);
337     sSecond->SetLineStyle(2);
338 auterman 1.5 //sSecond->SetLineWidth(3);
339 auterman 1.1 TSpline3 *sThird = new TSpline3("sThird",Third);
340 auterman 1.5 sThird->SetLineColor(kBlue);
341 auterman 1.1 sThird->SetLineStyle(4);
342 auterman 1.5 //sThird->SetLineWidth(3);
343 auterman 1.7 //TEV_sn_d0_1->Draw("fsame");
344     //TEV_sn_d0_2->Draw("fsame"); //only for tb=3
345 auterman 1.1 LEP_ch->Draw("fsame");
346     LEP_sl->Draw("fsame");
347 auterman 1.7 //TEV_sg_cdf->Draw("fsame");
348     //TEV_sg_cdf->Draw("lsame");
349     //TEV_sg_d0->Draw("fsame");
350 auterman 1.1 sFirst->Draw("same");
351 auterman 1.7 //sSecond->Draw("same");
352     //sThird->Draw("same");
353     Atlas->Draw("c,same");
354 auterman 1.1 TLatex b; b.SetTextSize(0.02); b.SetTextColor(1);
355 auterman 1.7 TLatex ms; ms.SetTextSize(0.025); ms.SetTextFont(42);//ms.SetTextColor(12);
356     ms.DrawLatex(490,458,"tan#beta=50, #mu>0, A_{0}=0");
357     TLegend* legexp = new TLegend(0.69,0.77,0.93,0.92,NULL,"brNDC");
358     legexp->SetFillColor(0);legexp->SetShadowColor(0);legexp->SetFillStyle(4000);legexp->SetTextFont(42);legexp->SetTextSize(0.025);legexp->SetBorderSize(0);
359     //TEV_sg_cdf.SetLineColor(1);
360     legexp->SetHeader("CMS preliminary");
361     //legexp->AddEntry(TEV_sg_cdf,"CDF #tilde{#font[12]{g}}, #tilde{#font[12]{q}}, #scale[0.8]{tan#beta=5, #mu<0}","f");
362     //legexp->AddEntry(TEV_sg_d0,"D0 #tilde{#font[12]{g}}, #tilde{#font[12]{q}}, #scale[0.8]{tan#beta=3, #mu<0}","f");
363     //ch_gr.SetLineColor(1);
364     legexp->AddEntry(LEP_ch,"LEP2 #tilde{#chi}_{1}^{#pm}","f");
365     //sl_gr.SetLineColor(1);
366     //legexp->AddEntry(LEP_sl,"LEP2 #tilde{#font[12]{l}}^{#pm}","f"); //NOT FOR tb=50!
367     //if(tanbeta == 3)
368     //legexp->AddEntry(TEV_sn_d0_1,"D0 #chi^{#pm}_{1}, #chi^{0}_{2}","f");
369     legexp->AddEntry(sFirst, "CMS #alpha_{T}");
370     legexp->AddEntry(Atlas, "Atlas, #scale[0.8]{tan#beta=3}","l");
371     legexp->Draw();
372    
373 auterman 1.6 CLsObsNLO->Draw("l");
374 auterman 1.7 CLsObsLO->Draw("l");
375 auterman 1.6 CLsExpNLO->Draw("l");
376 auterman 1.7 //FCExpNLO->Draw("l");
377     stau->Draw("fsame");
378     b.DrawLatex( 220,420,"#tilde{#tau} LSP");
379    
380     //constant ssqquark and gluino lines
381     TF1* lnsq[4];
382     TF1* lngl[4];
383     TLatex sqt; sqt.SetTextSize(0.02); sqt.SetTextAngle(-22);sqt.SetTextColor(kGray+2);
384     sqt.DrawLatex(270,180,"#font[92]{#tilde{q}(500)GeV}");
385     sqt.DrawLatex(327,255,"#font[92]{#tilde{q}(650)GeV}");
386     sqt.DrawLatex(390,348,"#font[92]{#tilde{q}(800)GeV}");
387     TLatex glt; glt.SetTextSize(0.02); sqt.SetTextAngle(-4); glt.SetTextColor(kGray+2);
388     glt.DrawLatex(528,195,"#font[92]{#tilde{g}(500)GeV}");
389     glt.DrawLatex(528,258,"#font[92]{#tilde{g}(650)GeV}");
390     glt.DrawLatex(528,322,"#font[92]{#tilde{g}(800)GeV}");
391     int tanBeta_=50;
392     for(int i = 0; i < 4; i++){
393     lnsq[i] = constant_squark(tanBeta_,i);
394     lngl[i] = constant_gluino(tanBeta_,i);
395     lngl[i]->Draw("same");
396     lnsq[i]->Draw("same");
397     }
398     TLegend * leg = new TLegend(0.38,0.8,0.73,0.92);
399     leg->SetBorderSize(0);leg->SetFillColor(0);leg->SetFillStyle(4000);leg->SetTextFont(42);legexp->SetTextSize(0.025);
400 auterman 1.6 TGraph * expLeg = (TGraph*)CLsExpNLO->Clone();expLeg->SetFillStyle(gCLsExp1Sigma->GetFillStyle());expLeg->SetFillColor(gCLsExp1Sigma->GetFillColor());
401 auterman 1.7 leg->SetHeader("L_{int} = 36/pb, #sqrt{s} = 7 TeV");
402     leg->AddEntry(CLsObsNLO,"Observed, NLO","l");
403     leg->AddEntry(CLsObsLO, "Observed, LO","l");
404     leg->AddEntry(expLeg, "Expected #pm 1#sigma, NLO","lf");
405     //leg->AddEntry(FCExpLO, "Expected, FC, NLO","l");
406 auterman 1.1 leg->Draw();
407     gPad->RedrawAxis();
408 auterman 1.7 c1->SaveAs("results/Exclusion_m0_m12_tb50.pdf");
409    
410    
411     hexcl->Draw("");
412     gCLsExp1Sigma->SetName("CLsNLO_Exp1SigmaUncertaintyTb50");
413     CLsObsNLO->SetName("CLsNLO_ObservedTb50");
414     CLsExpNLO->SetName("CLsNLO_ExpectedTb50");
415     CLsExpLO->SetName("CLsLO_ExpectedTb50");
416     gCLsExp1Sigma->Draw("l");
417     CLsObsNLO->Draw("l");
418     CLsExpNLO->Draw("l");
419     CLsObsLO->Draw("l");
420     c1->SaveAs("results/LimitContours_tb50.C");
421    
422    
423 auterman 1.1
424     // Signal Contamination in M0 - M1/2
425     c1->SetLogz(0);
426     TH2F*hsigcont = new TH2F("sigcont",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
427     40,200,600,26,140,400);
428     plotToolsHT->Area(hsigcont, Mzero, Mhalf, SignalContamination);
429     hsigcont->SetMinimum(0.01);
430     hsigcont->SetMaximum(20);
431     hsigcont->Draw("colz");
432     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
433     c1->SaveAs("results_tb50/SignalContamination_HT_m0_m12_tb50.pdf");
434    
435     // Signal Contamination in M0 - M1/2
436     c1->SetLogz(0);
437     TH2F*hsigcontMHT = new TH2F("sigcontMHT",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
438     40,200,600,26,140,400);
439     plotTools->Area(hsigcontMHT, Mzero, Mhalf, SignalContamination);
440     hsigcontMHT->SetMinimum(0.01);
441     hsigcontMHT->SetMaximum(20);
442     hsigcontMHT->Draw("colz");
443     if (gobsexcl) gobsexcl->Draw("l");
444     c1->SaveAs("results_tb50/SignalContamination_MHT_m0_m12_tb50.pdf");
445    
446 auterman 1.5 // Signal JEC Uncertainty MHT
447     c1->SetLogz(0);
448     TH2F*hsig_jec_mht = new TH2F("sigjecmht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal JEC uncertainty",
449     40,200,600,26,140,400);
450     plotTools->Area(hsig_jec_mht, Mzero, Mhalf, SignalUncertJEC);
451     hsig_jec_mht->SetMinimum(0.0);
452     hsig_jec_mht->SetMaximum(0.25);
453     hsig_jec_mht->SetContour(10);
454     hsig_jec_mht->Draw("colz");
455     if (gobsexcl) gobsexcl->Draw("l");
456     c1->SaveAs("results_tb50/SigJEC_MHT_m0_m12_tb50.pdf");
457    
458     // Signal JEC Uncertainty HT
459     c1->SetLogz(0);
460     TH2F*hsig_jec_ht = new TH2F("sigjecht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal JEC uncertainty",
461     40,200,600,26,140,400);
462     plotTools->Area(hsig_jec_ht, Mzero, Mhalf, SignalUncertJEC);
463     hsig_jec_ht->SetMinimum(0.0);
464     hsig_jec_ht->SetMaximum(0.25);
465     hsig_jec_ht->SetContour(10);
466     hsig_jec_ht->Draw("colz");
467     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
468     c1->SaveAs("results_tb50/SigJEC_HT_m0_m12_tb50.pdf");
469    
470    
471     // Signal MuIso Uncertainty MHT
472     c1->SetLogz(0);
473     TH2F*hsig_MuIso_mht = new TH2F("sigMuIsomht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
474     40,200,600,26,140,400);
475     plotTools->Area(hsig_MuIso_mht, Mzero, Mhalf, SignalUncertMuIso);
476     hsig_MuIso_mht->SetMinimum(0.0);
477     hsig_MuIso_mht->SetMaximum(0.05);
478     hsig_MuIso_mht->SetContour(5);
479     hsig_MuIso_mht->Draw("colz");
480     if (gobsexcl) gobsexcl->Draw("l");
481     c1->SaveAs("results_tb50/SigMuIso_MHT_m0_m12_tb50.pdf");
482    
483     // Signal MuIso Uncertainty HT
484     c1->SetLogz(0);
485     TH2F*hsig_MuIso_ht = new TH2F("sigMuIsoht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
486     40,200,600,26,140,400);
487     plotTools->Area(hsig_MuIso_ht, Mzero, Mhalf, SignalUncertMuIso);
488     hsig_MuIso_ht->SetMinimum(0.0);
489     hsig_MuIso_ht->SetMaximum(0.05);
490     hsig_MuIso_ht->SetContour(5);
491     hsig_MuIso_ht->Draw("colz");
492     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
493     c1->SaveAs("results_tb50/SigMuIso_HT_m0_m12_tb50.pdf");
494    
495    
496     // Signal kFactor Uncertainty MHT
497     c1->SetLogz(0);
498     TH2F*hsig_kFactor_mht = new TH2F("sigkFactormht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
499     40,200,600,26,140,400);
500     plotTools->Area(hsig_kFactor_mht, Mzero, Mhalf, SignalUncertKfactor);
501     hsig_kFactor_mht->SetMinimum(0.1);
502     hsig_kFactor_mht->SetMaximum(0.2);
503     hsig_kFactor_mht->SetContour(10);
504     hsig_kFactor_mht->Draw("colz");
505     if (gobsexcl) gobsexcl->Draw("l");
506     c1->SaveAs("results_tb50/SigkFactor_MHT_m0_m12_tb50.pdf");
507    
508     // Signal kFactor Uncertainty HT
509     c1->SetLogz(0);
510     TH2F*hsig_kFactor_ht = new TH2F("sigkFactorht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
511     40,200,600,26,140,400);
512     plotTools->Area(hsig_kFactor_ht, Mzero, Mhalf, SignalUncertKfactor);
513     hsig_kFactor_ht->SetMinimum(0.1);
514     hsig_kFactor_ht->SetMaximum(0.2);
515     hsig_kFactor_ht->SetContour(10);
516     hsig_kFactor_ht->Draw("colz");
517     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
518     c1->SaveAs("results_tb50/SigkFactor_HT_m0_m12_tb50.pdf");
519    
520 auterman 1.1
521     //-----------------------------------------------------------------------------------
522     c1->SetLogz(1);
523    
524     TGraph * mz500 = plotMasses->Line( MSquarkL, MGluino, Mzero, 500, 1);
525     TGraph * mh250 = plotMasses->Line( MSquarkL, MGluino, Mhalf, 250, 1);
526    
527     // cross-section in squark - gluino mass
528     TH2F*hxsec_qg = new TH2F("xsec_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; cross section [pb]",
529 auterman 1.4 40,200,900,30,200,900);
530 auterman 1.1 plotTools->Area(hxsec_qg, MSquarkL, MGluino, Xsection);
531     hxsec_qg->SetMinimum(0.01);
532     hxsec_qg->Draw("colz");
533     mz500->Draw();
534     mh250->Draw();
535     c1->SaveAs("results_tb50/Xsection_mSql_mGl_tb50.pdf");
536    
537     // Observed Limit in squark - gluino mass
538     TH2F*hobslimit_qg = new TH2F("obslimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Limit [pb]",
539 auterman 1.4 40,200,900,30,200,900);
540 auterman 1.1 plotTools->Area(hobslimit_qg, MSquarkL, MGluino, ObsXsecLimit);
541     hobslimit_qg->SetMinimum(0.01);
542     hobslimit_qg->Draw("colz");
543     c1->SaveAs("results_tb50/ObsLimit_mSql_mGl_tb50.pdf");
544    
545     // Expected Limit in squark - gluino mass
546     TH2F*hexplimit_qg = new TH2F("explimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Limit [pb]",
547 auterman 1.4 40,200,900,30,200,900);
548 auterman 1.1 plotTools->Area(hexplimit_qg, MSquarkL, MGluino, ExpXsecLimit);
549     hexplimit_qg->SetMinimum(0.01);
550     hexplimit_qg->Draw("colz");
551     c1->SaveAs("results_tb50/ExpLimit_mSql_mGl_tb50.pdf");
552    
553     // Signal Acceptance in squark - gluino mass
554     TH2F*hsigacc_qg = new TH2F("sigacc_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; Signal Acceptance",
555 auterman 1.4 40,200,900,30,200,900);
556 auterman 1.1 plotTools->Area(hsigacc_qg, MSquarkL, MGluino, SignalAcceptance);
557     hsigacc_qg->SetMinimum(0.01);
558     hsigacc_qg->SetMaximum(1.0);
559     hsigacc_qg->Draw("colz");
560     c1->SaveAs("results_tb50/SigAcc_mSql_mGl_tb50.pdf");
561    
562     // Exp. Limit on Number of Signal Events in squark - gluino mass
563     c1->SetLogz(0);
564     TH2F*hexplimitnsig_qg = new TH2F("explimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL exp. limit signal events [# ]",
565 auterman 1.4 40,200,900,30,200,900);
566 auterman 1.1 plotTools->Area(hexplimitnsig_qg, MSquarkL, MGluino, ExpNSignLimit);
567     hexplimitnsig_qg->SetMinimum(0.0);
568     hexplimitnsig_qg->SetMaximum(20);
569     hexplimitnsig_qg->Draw("colz");
570     c1->SaveAs("results_tb50/ExpLimitOnNSig_mSql_mGl_tb50.pdf");
571    
572     // Obs. Limit on Number of Signal Events in squark - gluino mass
573     TH2F*hobslimitnsig_qg = new TH2F("obslimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL obs. limit signal events [# ]",
574 auterman 1.4 40,200,900,30,200,900);
575 auterman 1.1 plotTools->Area(hobslimitnsig_qg, MSquarkL, MGluino, ObsNSignLimit);
576     hobslimitnsig_qg->SetMinimum(0.0);
577     hobslimitnsig_qg->SetMaximum(20);
578     hobslimitnsig_qg->Draw("colz");
579     c1->SaveAs("results_tb50/ObsLimitOnNSig_mSql_mGl_tb50.pdf");
580    
581     c1->SetLogz(0);
582     // Expected Exclusion in squark - gluino mass
583     TH2F*hexpexcl_qg = new TH2F("expexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Exclusion",
584 auterman 1.4 40,200,900,30,200,900);
585 auterman 1.1 plotTools->Area(hexpexcl_qg, MSquarkL, MGluino, ExpExclCL);
586     hexpexcl_qg->Draw("colz");
587     c1->SaveAs("results_tb50/ExpExclusion_mSql_mGl_tb50.pdf");
588    
589     // Observed Exclusion in squark - gluino mass
590     TH2F*hobsexcl_qg = new TH2F("obsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
591 auterman 1.4 40,200,900,30,200,900);
592 auterman 1.1 plotTools->Area(hobsexcl_qg, MSquarkL, MGluino, ObsExclCL);
593     //std::vector<TGraph *> vobsexcl_qg = plotTools->GetContours(hobsexcl_qg);
594     hobsexcl_qg->Draw("colz");
595     //for (std::vector<TGraph *>::iterator g=vobsexcl_qg.begin();g!=vobsexcl_qg.end();++g){
596     // if (! *g) continue;
597     // // (*g)->Draw("l");
598     //}
599     c1->SaveAs("results_tb50/ObsExclusion_mSql_mGl_tb50.pdf");
600    
601     // TestContours in M0 - M1/2
602     TH2F*texcl_qg = new TH2F("texcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
603 auterman 1.4 40,200,900,30,200,900);
604 auterman 1.1 TH2F*tPLobsexcl_qg=(TH2F*)texcl_qg->Clone();
605     plotTools->Area(tPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
606     TH2F*tPLexpexcl_qg=(TH2F*)texcl_qg->Clone();
607     plotTools->Area(tPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
608     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hexpexcl_qg,3);
609     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hobsexcl_qg,3);
610     std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLobsexcl_qg,3);
611     //std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLexpexcl_qg,3);
612     //hPLexpexcl_qg
613     //hexcl_qg->Draw("colz");
614     //hexpexcl_qg->Draw("colz");
615     //hobsexcl_qg->Draw("colz");
616     tPLobsexcl_qg->Draw("colz");
617     int col_gl=kBlue-10;
618     for (std::vector<TGraph*>::iterator cont=contours_qg.begin(); cont!=contours_qg.end(); ++cont){
619     if (! *cont) continue;
620     double x, y;
621     (*cont)->GetPoint(0, x, y);
622     (*cont)->SetLineColor(col_gl);(*cont)->SetLineWidth(3);
623     (*cont)->Draw("l");
624     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col_gl++);
625     char val[20];
626     sprintf(val,"%d",(int)(cont-contours_qg.begin()));
627     l.DrawLatex(x,y,val);
628     if (cont-contours_qg.begin()>3) break;
629     }
630     c1->SaveAs("results_tb50/ExclusionTestContours_mSql_mGl_tb50.pdf");
631    
632     // Observed Exclusion in squark - gluino mass
633     TH2F*hPLobsexcl_qg = new TH2F("plobsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
634 auterman 1.4 40,200,900,30,200,900);
635 auterman 1.1 plotTools->Area(hPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
636     //hPLobsexcl_qg->Draw("colz");
637     //c1->SaveAs("results_tb50/PL_ObsExclusion_mSql_mGl_tb50.pdf");
638    
639    
640    
641     // Exclusion in squark - gluino mass ----------------------------------------
642     TH2F*hexcl_qg = new TH2F("hexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
643 auterman 1.4 40,200,900,30,200,900);
644 auterman 1.5 TGraph * gexpexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino, NLOExpExclCL, 3,0, 2,2);
645     TGraph * gexpexcl_qg_LO = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino, ExpExclCL, 3,0, 2,4);
646     TGraph * gobsexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino, NLOObsExclCL, 3,0, 2,1);
647 auterman 1.4 TGraph * gMCMCexpexcl_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCExpExclusion,3,0, 3,2);
648     TGraph * gMCMCobsexcl_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCObsExclusion,3,0, 3,1);
649 auterman 1.5 TGraph * gCLsExpExclHT_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCL, 3,0, 1,2);
650     TGraph * gCLsExpExclHT_qg_LO = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCL, 3,0, 1,4);
651     TGraph * gCLsObsExclHT_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOObsExclCL, 3,0, 1,1);
652     TGraph * gCLsExpExclHTm1_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCLm1sigma,3,0, 5,2);
653     TGraph * gCLsExpExclHTp1_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCLp1sigma,3,0, 5,2);
654 auterman 1.4 TGraph * gCLsExp1Sigma_qg = MakeBand(gCLsExpExclHTp1_qg, gCLsExpExclHTm1_qg);
655 auterman 1.1 hexcl_qg->Draw("");
656 auterman 1.4 //
657     if (gCLsExp1Sigma_qg) gCLsExp1Sigma_qg->Draw("lf");
658     if (gobsexcl_qg) gobsexcl_qg->Draw("l");
659 auterman 1.1 if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->Draw("l");
660 auterman 1.4 if (gexpexcl_qg) gexpexcl_qg->Draw("l");
661 auterman 1.5 if (gexpexcl_qg_LO) gexpexcl_qg_LO->Draw("l");
662 auterman 1.1 if (gCLsExpExclHT_qg) gCLsExpExclHT_qg->Draw("l");
663 auterman 1.5 if (gCLsExpExclHT_qg_LO) gCLsExpExclHT_qg_LO->Draw("l");
664 auterman 1.4 //
665 auterman 1.1 TLegend * leg_qg = new TLegend(0.45,0.78,0.85,0.89);
666 auterman 1.6 leg_qg->SetBorderSize(0);leg_qg->SetFillColor(0);leg->SetTextFont(42);
667 auterman 1.5 TGraph * expLeg_qg = (TGraph*)gCLsExpExclHT_qg->Clone();expLeg_qg->SetFillStyle(gCLsExp1Sigma_qg->GetFillStyle());expLeg_qg->SetFillColor(gCLsExp1Sigma_qg->GetFillColor());
668     if (gobsexcl_qg) leg_qg->AddEntry(gobsexcl_qg,"NLO Observed (MHT, CLs)","l");
669     if (gexpexcl_qg) leg_qg->AddEntry(gexpexcl_qg,"NLO Expected (MHT, CLs)","l");
670     if (gexpexcl_qg_LO) leg_qg->AddEntry(gexpexcl_qg_LO,"LO Expected (MHT, CLs)","l");
671     if (gCLsObsExclHT_qg) leg_qg->AddEntry(gCLsObsExclHT_qg,"NLO Observed (HT, CLs)","l");
672     if (gCLsExpExclHT_qg) leg_qg->AddEntry(expLeg_qg,"NLO Expected (HT, CLs)","lf");
673     if (gCLsExpExclHT_qg_LO) leg_qg->AddEntry(gCLsExpExclHT_qg_LO,"LO Expected (HT, CLs)","l");
674 auterman 1.1 //if (gPLobsexcl_qg) leg_qg->AddEntry(gPLobsexcl_qg,"Observed (PL, RooStat)","l");
675     //if (gPLexpexcl_qg) leg_qg->AddEntry(gPLexpexcl_qg,"Expected (PL, RooStat)","l");
676     leg_qg->Draw();
677     c1->SaveAs("results_tb50/Exclusion_mSql_mGl_tb50.pdf");
678 auterman 1.4 //c1->SaveAs("plot_tb10.pdf");
679    
680    
681 auterman 1.1
682     //c1->SaveAs("plot_tb50.pdf");
683     c1->SetLogy(1);
684     c1->SetLogx(1);
685     TH2F*hUncertScan = new TH2F("hUncertScan",";relative signal uncertainty; number of signal events",
686     10,0.1,0.6,10,0.9,200);
687     //hUncertScan->GetXaxis()->SetNdivisions(505, false);
688     //hUncertScan->SetMinimum(1);
689     TGraph * gCLsExpUncert = new TGraph(0);
690     TGraph * gCLsObsUncert = new TGraph(0);
691     TGraph * gPLExpUncert = new TGraph(0);
692     TGraph * gPLObsUncert = new TGraph(0);
693     TGraph * gFCExpUncert = new TGraph(0);
694     TGraph * gFCObsUncert = new TGraph(0);
695     TGraph * gMCMCExpUncert= new TGraph(0);
696     TGraph * gMCMCObsUncert= new TGraph(0);
697     plotTools->Graph(gCLsExpUncert, SignalRelUncertainty, ExpNSignLimit,1);
698     plotTools->Graph(gCLsObsUncert, SignalRelUncertainty, ObsNSignLimit,1);
699     plotTools->Graph(gPLExpUncert, SignalRelUncertainty, PLExpNSignLimit,1);
700     plotTools->Graph(gPLObsUncert, SignalRelUncertainty, PLObsNSignLimit, 1);
701     plotTools->Graph(gFCExpUncert, SignalRelUncertainty, FCExpNSignLimit,1);
702     plotTools->Graph(gFCObsUncert, SignalRelUncertainty, FCObsNSignLimit, 1);
703     plotTools->Graph(gMCMCExpUncert,SignalRelUncertainty, MCMCExpNSignLimit,1);
704     plotTools->Graph(gMCMCObsUncert,SignalRelUncertainty, MCMCObsNSignLimit, 1);
705     gCLsExpUncert->SetLineStyle(8);
706     gPLObsUncert->SetLineColor(2);
707     gPLExpUncert->SetLineColor(2); gPLExpUncert->SetLineStyle(8);
708     gFCObsUncert->SetLineColor(3);
709     gFCExpUncert->SetLineColor(3); gFCExpUncert->SetLineStyle(8);
710     gMCMCObsUncert->SetLineColor(4);
711     gMCMCExpUncert->SetLineColor(4); gMCMCExpUncert->SetLineStyle(8);
712     hUncertScan->Draw("h");
713     gCLsExpUncert->Draw("l");
714     gCLsObsUncert->Draw("l");
715     gPLObsUncert->Draw("l");
716     gPLExpUncert->Draw("l");
717     gFCObsUncert->Draw("l");
718     gFCExpUncert->Draw("l");
719     gMCMCObsUncert->Draw("l");
720     gMCMCExpUncert->Draw("l");
721     TLatex l; l.SetTextSize(0.03); l.SetTextColor(1);
722     l.DrawLatex(0.025,25,"excluded");
723     TMarker m; m.SetMarkerStyle(29); m.SetMarkerColor(2);
724     m.DrawMarker(0.128, 28.5);l.DrawLatex(0.14,28.5,"LM1");
725     m.DrawMarker(0.147, 77.4);l.DrawLatex(0.16,77.4,"LM0");
726    
727     TLegend * leg_S = new TLegend(0.5,0.14,0.85,0.38);
728     leg_S->SetBorderSize(0);leg_S->SetFillColor(0);
729     leg_S->SetHeader("95% CL upper limits");
730     leg_S->AddEntry(gCLsExpUncert,"Expected (CLs, TLimit)","l");
731     leg_S->AddEntry(gCLsObsUncert,"Observed (CLs, TLimit)","l");
732     leg_S->AddEntry(gPLExpUncert,"Expected (PL, RooStat)","l");
733     leg_S->AddEntry(gPLObsUncert,"Observed (PL, RooStat)","l");
734     leg_S->AddEntry(gFCObsUncert,"Observed (FC, RooStat)","l");
735     leg_S->AddEntry(gFCExpUncert,"Expected (FC, RooStat)","l");
736     leg_S->AddEntry(gMCMCObsUncert,"Observed (MCMC, RooStat)","l");
737     leg_S->AddEntry(gMCMCExpUncert,"Expected (MCMC, RooStat)","l");
738     leg_S->Draw();
739     c1->SaveAs("results_tb50/UncertaintyScan.pdf");
740    
741     //theApp.Run();
742     }
743    
744    
745     int main(int argc, char** argv)
746     {
747     return plot(argc, argv);
748     }