ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/plot3tb.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: +103 -62 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     //Style stuff
42 auterman 1.6 /*
43 auterman 1.1 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::paperNoTitle();
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_tb3_20110303/filelist.txt");
89     genpoints->Fill("limits_MHT_20110310/filelist_tb3.txt");
90 auterman 1.1
91     TheLimits * genpointsHT = new TheLimits();
92 auterman 1.7 //genpointsHT->Fill("limits_HT_tb3_20110303/filelist.txt");
93     genpointsHT->Fill("limits_HT_20110310/filelist_tb3.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_tb3.dat");
100 auterman 1.1 genpoints->match();
101 auterman 1.4 genpointsHT->FillGeneratorMasses("GenScan_tb3.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     50,0,509.9,25,100,350);
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_tb3/Xsection_m0_m12_tb3.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     50,0,509.9,25,100,350);
140     plotTools->Area(hobslimit, Mzero, Mhalf, ObsXsecLimit);
141     hobslimit->SetMinimum(0.01);
142     hobslimit->Draw("colz");
143     c1->SaveAs("results_tb3/ObsLimit_m0_m12_tb3.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     50,0,509.9,25,100,350);
148     plotTools->Area(hexplimit, Mzero, Mhalf, ExpXsecLimit);
149     hexplimit->SetMinimum(0.01);
150     hexplimit->Draw("colz");
151     c1->SaveAs("results_tb3/ExpLimit_m0_m12_tb3.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     50,0,509.9,25,100,350);
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_tb3/SigAcc_m0_m12_tb3.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     50,0,509.9,25,100,350);
170     plotTools->Area(hexplimitnsig, Mzero, Mhalf, ExpNSignLimit);
171     hexplimitnsig->SetMinimum(0.0);
172     hexplimitnsig->SetMaximum(20);
173     hexplimitnsig->Draw("colz");
174     c1->SaveAs("results_tb3/ExpLimitOnNSig_m0_m12_tb3.pdf");
175    
176     // Obs. Limit on Number of Signal Events in M0 - M1/2
177     TH2F*hobslimitnsig = new TH2F("obslimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL obs. limit signal events [# ]",
178     50,0,509.9,25,100,350);
179     plotTools->Area(hobslimitnsig, Mzero, Mhalf, ObsNSignLimit);
180     hobslimitnsig->SetMinimum(0.0);
181     hobslimitnsig->SetMaximum(20);
182     hobslimitnsig->Draw("colz");
183     c1->SaveAs("results_tb3/ObsLimitOnNSig_m0_m12_tb3.pdf");
184    
185     c1->SetLogz(0);
186     // Expected Exclusion in M0 - M1/2
187     TH2F*hexpexcl = new TH2F("expexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
188     50,0,509.9,35,100,450);
189     plotTools->Area(hexpexcl, Mzero, Mhalf, ExpExclCL);
190     hexpexcl->Draw("colz");
191     c1->SaveAs("results_tb3/ExpExclusion_m0_m12_tb3.pdf");
192    
193     // Observed Exclusion in M0 - M1/2
194     TH2F*hobsexcl = new TH2F("obsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
195     50,0,509.9,35,100,450);
196     plotTools->Area(hobsexcl, Mzero, Mhalf, ObsExclCL);
197     hobsexcl->Draw("colz");
198     c1->SaveAs("results_tb3/ObsExclusion_m0_m12_tb3.pdf");
199    
200     // Observed Exclusion in M0 - M1/2
201     TH2F*hPLobsexcl = new TH2F("plobsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
202     50,0,509.9,35,100,450);
203     plotTools->Area(hPLobsexcl, Mzero, Mhalf, PLObsExclusion);
204     hPLobsexcl->Draw("colz");
205     c1->SaveAs("results_tb3/PL_ObsExclusion_m0_m12_tb3.pdf");
206    
207 auterman 1.6 // TestContours in M0 - M1/2 ===================================================================
208 auterman 1.1 TH2F*texcl = new TH2F("texcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
209     50,0,509.9,35,100,450);
210     TH2F*texpexcl=(TH2F*)texcl->Clone();
211 auterman 1.7 plotTools->Area(texpexcl, Mzero, Mhalf, ObsExclCL);
212 auterman 1.6 std::vector<TGraph*> contours = plotToolsHT->GetContours(texpexcl,3);
213 auterman 1.1 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     }
226     c1->SaveAs("results_tb3/ExclusionTestContours_m0_m12_tb3.pdf");
227    
228    
229     // Exclusion in M0 - M1/2
230     TH2F*hexcl = new TH2F("hexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
231 auterman 1.7 50,0,509.9,35,100,500);
232 auterman 1.6 TH2F*hs = new TH2F("hs","",50,0,509.9,35,100,450);
233     TGraph * gexpexcl = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpExclCL, 3,2, 2,2);
234     TGraph * gexpexcl_LO = plotTools ->GetContour(hs,Mzero,Mhalf,ExpExclCL, 3,0, 2,4);
235     TGraph * gobsexcl = plotTools ->GetContour(hs,Mzero,Mhalf,NLOObsExclCL, 3,2, 2,1);
236 auterman 1.7 TGraph * gobsexcl_LO = plotTools ->GetContour(hs,Mzero,Mhalf,ObsExclCL, 3,0, 2,1);
237 auterman 1.6 TGraph * gMCMCexpexcl = plotToolsHT->GetContour(hs,Mzero,Mhalf,MCMCExpExclusion, 3,0, 3,2);
238     TGraph * gMCMCobsexcl = plotToolsHT->GetContour(hs,Mzero,Mhalf,MCMCObsExclusion, 3,0, 3,1);
239     TGraph * gFCexpexclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOFCExpExclusion, 3,0, 3,2);
240     TGraph * gFCexpexclHT_LO = plotToolsHT->GetContour(hs,Mzero,Mhalf,FCExpExclusion, 3,0, 3,4);
241     TGraph * gFCexpexclMHT = plotTools->GetContour(hs,Mzero,Mhalf,NLOFCExpExclusion, 3,0, 3,2);
242     TGraph * gFCexpexclMHT_LO = plotTools->GetContour(hs,Mzero,Mhalf,FCExpExclusion, 3,0, 3,4);
243     TGraph * gFCobsexclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOFCObsExclusion, 3,0, 3,1);
244     TGraph * gFCobsexclMHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOFCObsExclusion, 3,0, 3,1);
245     TGraph * gCLsExpExclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpExclCL, 3,2, 1,2);
246     TGraph * gCLsObsExclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOObsExclCL, 3,0, 1,1);
247     TGraph * gCLsExpExclHT_LO = plotToolsHT->GetContour(hs,Mzero,Mhalf,ExpExclCL, 3,0, 1,4);
248 auterman 1.7 TGraph * gCLsObsExclHT_LO = plotToolsHT->GetContour(hs,Mzero,Mhalf,ObsExclCL, 3,0, 2,1);
249 auterman 1.6 TGraph * gCLsExpExclHTm1 = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpExclCLm1sigma,3,2, 5,2);
250     TGraph * gCLsExpExclHTp1 = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpExclCLp1sigma,3,2, 5,2);
251     TGraph * gCLsExpExclMHTm1 = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpExclCLm1sigma, 3,2, 5,2);
252     TGraph * gCLsExpExclMHTp1 = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpExclCLp1sigma, 3,2, 5,2);
253     TGraph * gCheck1 = (TGraph*)gobsexcl->Clone();
254     TGraph * gCheck2 = (TGraph*)gexpexcl->Clone();
255 auterman 1.7 Smooth( gCLsObsExclHT, 27); gCLsObsExclHT->SetLineWidth( 3 );
256     Smooth( gCLsExpExclHT, 27 ); gCLsExpExclHT->SetLineWidth( 3 );
257     Smooth( gCLsObsExclHT_LO, 27); gCLsObsExclHT_LO->SetLineWidth( 2 );
258     Smooth( gCLsExpExclHT_LO, 27 ); gCLsExpExclHT_LO->SetLineWidth( 3 );
259     Smooth( gexpexcl, 27 );
260     Smooth( gobsexcl_LO, 27 );
261     //Smooth( gobsexcl, 27 );
262     Smooth( gobsexcl, 27 );
263     Smooth( gexpexcl_LO, 27 );
264     Smooth( gFCexpexclHT, 27 );
265     Smooth( gFCexpexclHT_LO, 27 );gFCexpexclHT_LO->SetLineWidth( 3 );
266     Smooth( gFCexpexclMHT, 27 );
267     Smooth( gFCexpexclMHT_LO, 27 );
268     Smooth( gFCobsexclHT, 27 );gFCobsexclHT->SetLineWidth( 2 );
269     Smooth( gFCobsexclMHT, 27 );
270     Smooth( gCLsExpExclHTm1, 27 );
271     Smooth( gCLsExpExclHTp1, 27 );
272     Smooth( gCLsExpExclMHTm1, 27 );
273     Smooth( gCLsExpExclMHTp1, 27 );
274 auterman 1.6 TGraph * CLsObsNLO = plotToolsHT->ChooseBest(gCLsObsExclHT,gobsexcl, gCLsObsExclHT,gobsexcl);
275 auterman 1.7 TGraph * CLsObsLO = plotToolsHT->ChooseBest(gCLsObsExclHT_LO,gobsexcl_LO, gCLsObsExclHT_LO,gobsexcl_LO);
276 auterman 1.6 TGraph * CLsExpNLO = plotToolsHT->ChooseBest(gCLsExpExclHT,gexpexcl, gCLsExpExclHT,gexpexcl);
277     TGraph * CLsExpLO = plotToolsHT->ChooseBest(gCLsExpExclHT_LO,gexpexcl_LO, gCLsExpExclHT_LO,gexpexcl_LO);
278     TGraph * FCExpLO = plotToolsHT->ChooseBest(gFCexpexclHT_LO,gFCexpexclMHT_LO,gFCexpexclHT_LO,gFCexpexclMHT_LO);
279 auterman 1.7 TGraph * FCExpNLO = plotToolsHT->ChooseBest(gFCexpexclHT,gFCexpexclMHT,gFCexpexclHT,gFCexpexclMHT);
280 auterman 1.6 TGraph * FCObsNLO = plotToolsHT->ChooseBest(gFCobsexclHT,gFCobsexclMHT,gFCobsexclHT,gFCobsexclMHT);
281     TGraph * gCLsExpExclp1 = plotToolsHT->ChooseBest(gCLsExpExclHTp1,gCLsExpExclMHTp1, gCLsExpExclHTp1,gCLsExpExclMHTp1);
282     TGraph * gCLsExpExclm1 = plotToolsHT->ChooseBest(gCLsExpExclHTm1,gCLsExpExclMHTm1, gCLsExpExclHTm1,gCLsExpExclMHTm1);
283     TGraph * gCLsExp1Sigma = MakeBand(gCLsExpExclp1, gCLsExpExclm1);
284     hexcl->GetYaxis()->SetTitleOffset(1.3);
285 auterman 1.7 hexcl->GetXaxis()->SetTitleOffset(0.92);
286 auterman 1.6 hexcl->Draw("colz");
287 auterman 1.1 //set old exclusion Limits
288 auterman 1.7 TGraph* Atlas = Atlas_m0_m12_tb3_obs();
289     Atlas->SetLineColor( 28 );
290 auterman 1.3 TGraph* LEP_ch = set_lep_ch(3);
291     TGraph* LEP_sl = set_lep_sl(3);//slepton curve
292     TGraph* TEV_sg_cdf = set_tev_sg_cdf(3);//squark gluino cdf
293     TGraph* TEV_sg_d0 = set_tev_sg_d0(3);//squark gluino d0
294     //TGraph* TEV_tlp_cdf = set_tev_tlp_cdf(10);//trilepton cdf
295     //TGraph* TEV_tlp_d0 = set_tev_tlp_d0(10);//trilepton d0
296     TGraph* stau = set_tev_stau(3);//stau
297     TGraph* TEV_sn_d0_1 = set_sneutrino_d0_1(3);
298     TGraph* TEV_sn_d0_2 = set_sneutrino_d0_2(3);
299 auterman 1.2 TGraphErrors* First = getObserved_NLO_tanBeta3();
300     TGraphErrors* Second = getExpected_NLO_tanBeta3();//getLO_jetMultis();
301     TGraphErrors* Third = getLO_tanBeta3();
302 auterman 1.1 First->GetXaxis()->SetRangeUser(0,505);
303     First->GetYaxis()->SetRangeUser(80,500);
304     First->GetXaxis()->SetTitle("m_{0} (GeV)");
305     First->GetYaxis()->SetTitle("m_{1/2} (GeV)");
306     TSpline3 *sFirst = new TSpline3("sFirst",First);
307     sFirst->SetLineColor(kBlue);
308 auterman 1.5 //sFirst->SetLineWidth(3);
309 auterman 1.1 TSpline3 *sSecond = new TSpline3("sSecond",Second);
310     sSecond->SetLineColor(kBlue);
311     sSecond->SetLineStyle(2);
312 auterman 1.5 //sSecond->SetLineWidth(3);
313 auterman 1.1 TSpline3 *sThird = new TSpline3("sThird",Third);
314 auterman 1.5 sThird->SetLineColor(kBlue);
315 auterman 1.1 sThird->SetLineStyle(4);
316 auterman 1.5 //sThird->SetLineWidth(3);
317 auterman 1.6 //gCheck1->Draw("same");
318     //gCheck2->Draw("same");
319     //gexpexcl->Draw("l");
320     //gobsexcl->Draw("l");
321     //gexpexcl_LO->Draw("l");
322     //gCLsExpExclHT_LO->Draw("l");
323     //gCLsObsExclHT->Draw("l");
324     //gCLsExpExclHT->Draw("l");
325     //gFCexpexclHT_LO->Draw("l");
326     //gFCexpexclMHT_LO->Draw("l");
327 auterman 1.5 if (gCLsExp1Sigma) gCLsExp1Sigma->Draw("lf");
328 auterman 1.1 TEV_sn_d0_1->Draw("fsame");
329 auterman 1.7 TEV_sn_d0_2->Draw("fsame"); //only for tb=3
330     stau->Draw("fsame");
331 auterman 1.1 LEP_ch->Draw("fsame");
332     LEP_sl->Draw("fsame");
333 auterman 1.7 TEV_sg_cdf->Draw("fsame");
334     TEV_sg_cdf->Draw("lsame");
335     TEV_sg_d0->Draw("fsame");
336     TEV_sg_d0->Draw("lsame");
337 auterman 1.1 sFirst->Draw("same");
338 auterman 1.7 TLatex b; b.SetTextSize(0.02); b.SetTextColor(1);
339     b.DrawLatex( 10,435,"#tilde{#tau} LSP");
340    
341     //sSecond->Draw("same");
342     //sThird->Draw("same");
343     Atlas->Draw("c,same");
344     TLatex ms; ms.SetTextSize(0.025); ms.SetTextFont(42);//ms.SetTextColor(12);
345     ms.DrawLatex(395,508,"tan#beta=3, #mu>0, A_{0}=0");
346     //gCheck1->Draw("same");
347     //gCheck2->Draw("same");
348     TLegend* legexp = new TLegend(0.66,0.65,0.98,0.93,NULL,"brNDC");
349     legexp->SetFillColor(0);legexp->SetShadowColor(0);legexp->SetFillStyle(4000);legexp->SetTextFont(42);legexp->SetTextSize(0.025);legexp->SetBorderSize(0);
350     //TEV_sg_cdf.SetLineColor(1);
351     legexp->SetHeader("CMS preliminary");
352     legexp->AddEntry(TEV_sg_cdf,"CDF #tilde{#font[12]{g}}, #tilde{#font[12]{q}}, #scale[0.8]{tan#beta=5, #mu<0}","f");
353     legexp->AddEntry(TEV_sg_d0,"D0 #tilde{#font[12]{g}}, #tilde{#font[12]{q}}, #scale[0.8]{#mu<0}","f");
354     //ch_gr.SetLineColor(1);
355     legexp->AddEntry(LEP_ch,"LEP2 #tilde{#chi}_{1}^{#pm}","f");
356     //sl_gr.SetLineColor(1);
357     legexp->AddEntry(LEP_sl,"LEP2 #tilde{#font[12]{l}}^{#pm}","f"); //NOT FOR tb=50!
358     //if(tanbeta == 3)
359     legexp->AddEntry(TEV_sn_d0_1,"D0 #chi^{#pm}_{1}, #chi^{0}_{2}","f");
360     legexp->AddEntry(sFirst, "CMS #alpha_{T}");
361     legexp->AddEntry(Atlas, "Atlas","l");
362     legexp->Draw();
363    
364 auterman 1.6 CLsObsNLO->Draw("l");
365 auterman 1.7 CLsObsLO->Draw("l");
366 auterman 1.6 CLsExpNLO->Draw("l");
367 auterman 1.7 //FCExpNLO->Draw("l");
368 auterman 1.6
369 auterman 1.7 //constant ssqquark and gluino lines
370     TF1* lnsq[4];
371     TF1* lngl[4];
372     TLatex sqt; sqt.SetTextSize(0.02); sqt.SetTextAngle(-14);sqt.SetTextColor(kGray+2);
373     sqt.DrawLatex(148,218,"#font[92]{#tilde{q}(500)GeV}");
374     sqt.DrawLatex(220,385,"#font[92]{#tilde{q}(800)GeV}");
375     TLatex glt; glt.SetTextSize(0.02); sqt.SetTextAngle(-4); glt.SetTextColor(kGray+2);
376     glt.DrawLatex(430,184,"#font[92]{#tilde{g}(500)GeV}");
377     //glt.DrawLatex(450,235,"#font[92]{#tilde{g}(650)GeV}");
378     glt.DrawLatex(428,311,"#font[92]{#tilde{g}(800)GeV}");
379     int tanBeta_=3;
380     for(int i = 0; i < 4; i++){
381     lnsq[i] = constant_squark(tanBeta_,i);
382     lngl[i] = constant_gluino(tanBeta_,i);
383     lngl[i]->Draw("same");
384     lnsq[i]->Draw("same");
385     }
386     TLegend * leg = new TLegend(0.3,0.8,0.65,0.93);
387     leg->SetBorderSize(0);leg->SetFillColor(0);leg->SetFillStyle(4000);leg->SetTextFont(42);legexp->SetTextSize(0.025);
388 auterman 1.6 TGraph * expLeg = (TGraph*)CLsExpNLO->Clone();expLeg->SetFillStyle(gCLsExp1Sigma->GetFillStyle());expLeg->SetFillColor(gCLsExp1Sigma->GetFillColor());
389 auterman 1.7 leg->SetHeader("L_{int} = 36/pb, #sqrt{s} = 7 TeV");
390     leg->AddEntry(CLsObsNLO,"Observed, NLO","l");
391     leg->AddEntry(CLsObsLO, "Observed, LO","l");
392     leg->AddEntry(expLeg, "Expected #pm 1#sigma, NLO","lf");
393     //leg->AddEntry(FCExpLO, "Expected, FC, NLO","l");
394 auterman 1.1 leg->Draw();
395     gPad->RedrawAxis();
396 auterman 1.7 c1->SaveAs("results/Exclusion_m0_m12_tb3.pdf");
397    
398     hexcl->Draw("");
399     gCLsExp1Sigma->SetName("CLsNLO_Exp1SigmaUncertaintyTb3");
400     CLsObsNLO->SetName("CLsNLO_ObservedTb3");
401     CLsExpNLO->SetName("CLsNLO_ExpectedTb3");
402     CLsExpLO->SetName("CLsLO_ExpectedTb3");
403     gCLsExp1Sigma->Draw("l");
404     CLsObsNLO->Draw("l");
405     CLsExpNLO->Draw("l");
406     CLsObsLO->Draw("l");
407     c1->SaveAs("results/LimitContours_tb3.C");
408 auterman 1.1
409 auterman 1.7 // plotToolsHT->Print(Xsection, Mzero,Mhalf,gCLsObsExclHT, 10);
410 auterman 1.4
411 auterman 1.1 // Signal Contamination in M0 - M1/2
412     c1->SetLogz(0);
413     TH2F*hsigcont = new TH2F("sigcont",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
414     50,0,509.9,25,100,350);
415     plotToolsHT->Area(hsigcont, Mzero, Mhalf, SignalContamination);
416     hsigcont->SetMinimum(0.01);
417     hsigcont->SetMaximum(20);
418     hsigcont->Draw("colz");
419     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
420     c1->SaveAs("results_tb3/SignalContamination_HT_m0_m12_tb3.pdf");
421    
422     // Signal Contamination in M0 - M1/2
423     c1->SetLogz(0);
424     TH2F*hsigcontMHT = new TH2F("sigcontMHT",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
425     50,0,509.9,25,100,350);
426     plotTools->Area(hsigcontMHT, Mzero, Mhalf, SignalContamination);
427     hsigcontMHT->SetMinimum(0.01);
428     hsigcontMHT->SetMaximum(20);
429     hsigcontMHT->Draw("colz");
430     if (gobsexcl) gobsexcl->Draw("l");
431     c1->SaveAs("results_tb3/SignalContamination_MHT_m0_m12_tb3.pdf");
432    
433 auterman 1.5
434     // Signal JEC Uncertainty MHT
435     c1->SetLogz(0);
436     TH2F*hsig_jec_mht = new TH2F("sigjecmht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal JEC uncertainty",
437     50,0,509.9,25,100,350);
438     plotTools->Area(hsig_jec_mht, Mzero, Mhalf, SignalUncertJEC);
439     hsig_jec_mht->SetMinimum(0.0);
440     hsig_jec_mht->SetMaximum(0.25);
441     hsig_jec_mht->SetContour(10);
442     hsig_jec_mht->Draw("colz");
443     if (gobsexcl) gobsexcl->Draw("l");
444     c1->SaveAs("results_tb3/SigJEC_MHT_m0_m12_tb3.pdf");
445    
446     // Signal JEC Uncertainty HT
447     c1->SetLogz(0);
448     TH2F*hsig_jec_ht = new TH2F("sigjecht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal JEC uncertainty",
449     50,0,509.9,25,100,350);
450 auterman 1.6 plotToolsHT->Area(hsig_jec_ht, Mzero, Mhalf, SignalUncertJEC);
451 auterman 1.5 hsig_jec_ht->SetMinimum(0.0);
452     hsig_jec_ht->SetMaximum(0.25);
453     hsig_jec_ht->SetContour(10);
454     hsig_jec_ht->Draw("colz");
455     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
456     c1->SaveAs("results_tb3/SigJEC_HT_m0_m12_tb3.pdf");
457    
458 auterman 1.1
459 auterman 1.5 // Signal MuIso Uncertainty MHT
460     c1->SetLogz(0);
461     TH2F*hsig_MuIso_mht = new TH2F("sigMuIsomht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
462     50,0,509.9,25,100,350);
463     plotTools->Area(hsig_MuIso_mht, Mzero, Mhalf, SignalUncertMuIso);
464     hsig_MuIso_mht->SetMinimum(0.0);
465     hsig_MuIso_mht->SetMaximum(0.05);
466     hsig_MuIso_mht->SetContour(5);
467     hsig_MuIso_mht->Draw("colz");
468     if (gobsexcl) gobsexcl->Draw("l");
469     c1->SaveAs("results_tb3/SigMuIso_MHT_m0_m12_tb3.pdf");
470    
471     // Signal MuIso Uncertainty HT
472     c1->SetLogz(0);
473     TH2F*hsig_MuIso_ht = new TH2F("sigMuIsoht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
474     50,0,509.9,25,100,350);
475 auterman 1.6 plotToolsHT->Area(hsig_MuIso_ht, Mzero, Mhalf, SignalUncertMuIso);
476 auterman 1.5 hsig_MuIso_ht->SetMinimum(0.0);
477     hsig_MuIso_ht->SetMaximum(0.05);
478     hsig_MuIso_ht->SetContour(5);
479     hsig_MuIso_ht->Draw("colz");
480     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
481     c1->SaveAs("results_tb3/SigMuIso_HT_m0_m12_tb3.pdf");
482    
483    
484     // Signal kFactor Uncertainty MHT
485     c1->SetLogz(0);
486     TH2F*hsig_kFactor_mht = new TH2F("sigkFactormht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
487     50,0,509.9,25,100,350);
488     plotTools->Area(hsig_kFactor_mht, Mzero, Mhalf, SignalUncertKfactor);
489     hsig_kFactor_mht->SetMinimum(0.1);
490     hsig_kFactor_mht->SetMaximum(0.2);
491     hsig_kFactor_mht->SetContour(10);
492     hsig_kFactor_mht->Draw("colz");
493     if (gobsexcl) gobsexcl->Draw("l");
494     c1->SaveAs("results_tb3/SigkFactor_MHT_m0_m12_tb3.pdf");
495    
496     // Signal kFactor Uncertainty HT
497     c1->SetLogz(0);
498     TH2F*hsig_kFactor_ht = new TH2F("sigkFactorht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
499     50,0,509.9,25,100,350);
500 auterman 1.6 plotToolsHT->Area(hsig_kFactor_ht, Mzero, Mhalf, SignalUncertKfactor);
501 auterman 1.5 hsig_kFactor_ht->SetMinimum(0.1);
502     hsig_kFactor_ht->SetMaximum(0.2);
503     hsig_kFactor_ht->SetContour(10);
504     hsig_kFactor_ht->Draw("colz");
505     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
506     c1->SaveAs("results_tb3/SigkFactor_HT_m0_m12_tb3.pdf");
507    
508 auterman 1.1 //-----------------------------------------------------------------------------------
509     c1->SetLogz(1);
510    
511     TGraph * mz500 = plotMasses->Line( MSquarkL, MGluino, Mzero, 500, 1);
512     TGraph * mh250 = plotMasses->Line( MSquarkL, MGluino, Mhalf, 250, 1);
513    
514     // cross-section in squark - gluino mass
515     TH2F*hxsec_qg = new TH2F("xsec_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; cross section [pb]",
516 auterman 1.4 60,200,800,40,200,900);
517 auterman 1.1 plotTools->Area(hxsec_qg, MSquarkL, MGluino, Xsection);
518     hxsec_qg->SetMinimum(0.01);
519     hxsec_qg->Draw("colz");
520     mz500->Draw();
521     mh250->Draw();
522     c1->SaveAs("results_tb3/Xsection_mSql_mGl_tb3.pdf");
523    
524     // Observed Limit in squark - gluino mass
525     TH2F*hobslimit_qg = new TH2F("obslimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Limit [pb]",
526 auterman 1.4 60,200,800,40,200,900);
527 auterman 1.1 plotTools->Area(hobslimit_qg, MSquarkL, MGluino, ObsXsecLimit);
528     hobslimit_qg->SetMinimum(0.01);
529     hobslimit_qg->Draw("colz");
530     c1->SaveAs("results_tb3/ObsLimit_mSql_mGl_tb3.pdf");
531    
532     // Expected Limit in squark - gluino mass
533     TH2F*hexplimit_qg = new TH2F("explimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Limit [pb]",
534 auterman 1.4 60,200,800,40,200,900);
535 auterman 1.1 plotTools->Area(hexplimit_qg, MSquarkL, MGluino, ExpXsecLimit);
536     hexplimit_qg->SetMinimum(0.01);
537     hexplimit_qg->Draw("colz");
538     c1->SaveAs("results_tb3/ExpLimit_mSql_mGl_tb3.pdf");
539    
540     // Signal Acceptance in squark - gluino mass
541     TH2F*hsigacc_qg = new TH2F("sigacc_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; Signal Acceptance",
542 auterman 1.4 60,200,800,40,200,900);
543 auterman 1.1 plotTools->Area(hsigacc_qg, MSquarkL, MGluino, SignalAcceptance);
544     hsigacc_qg->SetMinimum(0.01);
545     hsigacc_qg->SetMaximum(1.0);
546     hsigacc_qg->Draw("colz");
547     c1->SaveAs("results_tb3/SigAcc_mSql_mGl_tb3.pdf");
548    
549     // Exp. Limit on Number of Signal Events in squark - gluino mass
550     c1->SetLogz(0);
551     TH2F*hexplimitnsig_qg = new TH2F("explimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL exp. limit signal events [# ]",
552 auterman 1.4 60,200,800,40,200,900);
553 auterman 1.1 plotTools->Area(hexplimitnsig_qg, MSquarkL, MGluino, ExpNSignLimit);
554     hexplimitnsig_qg->SetMinimum(0.0);
555     hexplimitnsig_qg->SetMaximum(20);
556     hexplimitnsig_qg->Draw("colz");
557     c1->SaveAs("results_tb3/ExpLimitOnNSig_mSql_mGl_tb3.pdf");
558    
559     // Obs. Limit on Number of Signal Events in squark - gluino mass
560     TH2F*hobslimitnsig_qg = new TH2F("obslimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL obs. limit signal events [# ]",
561 auterman 1.4 60,200,800,40,200,900);
562 auterman 1.1 plotTools->Area(hobslimitnsig_qg, MSquarkL, MGluino, ObsNSignLimit);
563     hobslimitnsig_qg->SetMinimum(0.0);
564     hobslimitnsig_qg->SetMaximum(20);
565     hobslimitnsig_qg->Draw("colz");
566     c1->SaveAs("results_tb3/ObsLimitOnNSig_mSql_mGl_tb3.pdf");
567    
568     c1->SetLogz(0);
569     // Expected Exclusion in squark - gluino mass
570     TH2F*hexpexcl_qg = new TH2F("expexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Exclusion",
571 auterman 1.4 60,200,800,40,200,900);
572 auterman 1.1 plotTools->Area(hexpexcl_qg, MSquarkL, MGluino, ExpExclCL);
573     hexpexcl_qg->Draw("colz");
574     c1->SaveAs("results_tb3/ExpExclusion_mSql_mGl_tb3.pdf");
575    
576     // Observed Exclusion in squark - gluino mass
577     TH2F*hobsexcl_qg = new TH2F("obsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
578 auterman 1.4 60,200,800,40,200,900);
579 auterman 1.1 plotTools->Area(hobsexcl_qg, MSquarkL, MGluino, ObsExclCL);
580     //std::vector<TGraph *> vobsexcl_qg = plotTools->GetContours(hobsexcl_qg);
581     hobsexcl_qg->Draw("colz");
582     //for (std::vector<TGraph *>::iterator g=vobsexcl_qg.begin();g!=vobsexcl_qg.end();++g){
583     // if (! *g) continue;
584     // // (*g)->Draw("l");
585     //}
586     c1->SaveAs("results_tb3/ObsExclusion_mSql_mGl_tb3.pdf");
587    
588     // TestContours in M0 - M1/2
589     TH2F*texcl_qg = new TH2F("texcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
590 auterman 1.4 60,200,800,40,200,900);
591 auterman 1.1 TH2F*tPLobsexcl_qg=(TH2F*)texcl_qg->Clone();
592     plotTools->Area(tPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
593     TH2F*tPLexpexcl_qg=(TH2F*)texcl_qg->Clone();
594     plotTools->Area(tPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
595     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hexpexcl_qg,3);
596     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hobsexcl_qg,3);
597     std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLobsexcl_qg,3);
598     //std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLexpexcl_qg,3);
599     //hPLexpexcl_qg
600     //hexcl_qg->Draw("colz");
601     //hexpexcl_qg->Draw("colz");
602     //hobsexcl_qg->Draw("colz");
603     tPLobsexcl_qg->Draw("colz");
604     int col_gl=kBlue-10;
605     for (std::vector<TGraph*>::iterator cont=contours_qg.begin(); cont!=contours_qg.end(); ++cont){
606     if (! *cont) continue;
607     double x, y;
608     (*cont)->GetPoint(0, x, y);
609     (*cont)->SetLineColor(col_gl);(*cont)->SetLineWidth(3);
610     (*cont)->Draw("l");
611     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col_gl++);
612     char val[20];
613     sprintf(val,"%d",(int)(cont-contours_qg.begin()));
614     l.DrawLatex(x,y,val);
615     if (cont-contours_qg.begin()>3) break;
616     }
617     c1->SaveAs("results_tb3/ExclusionTestContours_mSql_mGl_tb3.pdf");
618    
619     // Observed Exclusion in squark - gluino mass
620     TH2F*hPLobsexcl_qg = new TH2F("plobsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
621 auterman 1.4 60,200,800,40,200,900);
622 auterman 1.1 plotTools->Area(hPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
623     //hPLobsexcl_qg->Draw("colz");
624     //c1->SaveAs("results_tb3/PL_ObsExclusion_mSql_mGl_tb3.pdf");
625    
626    
627    
628     TH2F*hexcl_qg = new TH2F("hexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
629 auterman 1.4 50,200,800,30,200,900);
630 auterman 1.5 TGraph * gexpexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCL, 3,0, 2,2);
631     TGraph * gexpexcl_qg_LO = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCL, 3,0, 2,4);
632     TGraph * gobsexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,NLOObsExclCL, 3,0, 2,1);
633 auterman 1.4 TGraph * gMCMCexpexcl_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCExpExclusion,3,0, 3,2);
634     TGraph * gMCMCobsexcl_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCObsExclusion,3,0, 3,1);
635 auterman 1.5 TGraph * gCLsExpExclHT_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCL, 3,0, 1,2);
636     TGraph * gCLsExpExclHT_qg_LO = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCL, 3,0, 1,4);
637     TGraph * gCLsObsExclHT_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOObsExclCL, 3,0, 1,1);
638     TGraph * gCLsExpExclHTm1_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCLm1sigma,3,0, 5,2);
639     TGraph * gCLsExpExclHTp1_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCLp1sigma,3,0, 5,2);
640     Smooth(gexpexcl_qg, 11);
641     Smooth(gobsexcl_qg, 11);
642     Smooth(gCLsExpExclHT_qg, 11);
643     Smooth(gCLsObsExclHT_qg, 11);
644     Smooth(gCLsExpExclHTm1_qg, 11);
645     Smooth(gCLsExpExclHTp1_qg, 11);
646 auterman 1.4 TGraph * gCLsExp1Sigma_qg = MakeBand(gCLsExpExclHTp1_qg, gCLsExpExclHTm1_qg);
647 auterman 1.1 hexcl_qg->Draw("");
648 auterman 1.4 //
649     if (gCLsExp1Sigma_qg) gCLsExp1Sigma_qg->Draw("lf");
650     if (gobsexcl_qg) gobsexcl_qg->Draw("l");
651 auterman 1.1 if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->Draw("l");
652 auterman 1.4 if (gexpexcl_qg) gexpexcl_qg->Draw("l");
653 auterman 1.1 if (gCLsExpExclHT_qg) gCLsExpExclHT_qg->Draw("l");
654 auterman 1.5 if (gexpexcl_qg_LO) gexpexcl_qg_LO->Draw("l");
655     if (gCLsExpExclHT_qg_LO) gCLsExpExclHT_qg_LO->Draw("l");
656 auterman 1.4 //
657 auterman 1.1 TLegend * leg_qg = new TLegend(0.45,0.78,0.85,0.89);
658     leg_qg->SetBorderSize(0);leg_qg->SetFillColor(0);
659 auterman 1.5 TGraph * expLeg_qg = (TGraph*)gCLsExpExclHT_qg->Clone();expLeg_qg->SetFillStyle(gCLsExp1Sigma_qg->GetFillStyle());expLeg_qg->SetFillColor(gCLsExp1Sigma_qg->GetFillColor());
660     if (gobsexcl_qg) leg_qg->AddEntry(gobsexcl_qg,"NLO Observed (MHT, CLs)","l");
661     if (gexpexcl_qg) leg_qg->AddEntry(gexpexcl_qg,"NLO Expected (MHT, CLs)","l");
662     if (gexpexcl_qg_LO) leg_qg->AddEntry(gexpexcl_qg_LO,"LO Expected (MHT, CLs)","l");
663     if (gCLsObsExclHT_qg) leg_qg->AddEntry(gCLsObsExclHT_qg,"NLO Observed (HT, CLs)","l");
664     if (gCLsExpExclHT_qg) leg_qg->AddEntry(expLeg_qg,"NLO Expected (HT, CLs)","lf");
665     if (gCLsExpExclHT_qg_LO) leg_qg->AddEntry(gCLsExpExclHT_qg_LO,"LO Expected (HT, CLs)","l");
666 auterman 1.1 //if (gPLobsexcl_qg) leg_qg->AddEntry(gPLobsexcl_qg,"Observed (PL, RooStat)","l");
667     //if (gPLexpexcl_qg) leg_qg->AddEntry(gPLexpexcl_qg,"Expected (PL, RooStat)","l");
668     leg_qg->Draw();
669     c1->SaveAs("results_tb3/Exclusion_mSql_mGl_tb3.pdf");
670 auterman 1.4 //c1->SaveAs("plot_tb10.pdf");
671    
672    
673 auterman 1.1
674     c1->SetLogy(1);
675     c1->SetLogx(1);
676     TH2F*hUncertScan = new TH2F("hUncertScan",";relative signal uncertainty; number of signal events",
677     10,0.1,0.6,10,0.9,200);
678     //hUncertScan->GetXaxis()->SetNdivisions(505, false);
679     //hUncertScan->SetMinimum(1);
680     TGraph * gCLsExpUncert = new TGraph(0);
681     TGraph * gCLsObsUncert = new TGraph(0);
682     TGraph * gPLExpUncert = new TGraph(0);
683     TGraph * gPLObsUncert = new TGraph(0);
684     TGraph * gFCExpUncert = new TGraph(0);
685     TGraph * gFCObsUncert = new TGraph(0);
686     TGraph * gMCMCExpUncert= new TGraph(0);
687     TGraph * gMCMCObsUncert= new TGraph(0);
688     plotTools->Graph(gCLsExpUncert, SignalRelUncertainty, ExpNSignLimit,1);
689     plotTools->Graph(gCLsObsUncert, SignalRelUncertainty, ObsNSignLimit,1);
690     plotTools->Graph(gPLExpUncert, SignalRelUncertainty, PLExpNSignLimit,1);
691     plotTools->Graph(gPLObsUncert, SignalRelUncertainty, PLObsNSignLimit, 1);
692     plotTools->Graph(gFCExpUncert, SignalRelUncertainty, FCExpNSignLimit,1);
693     plotTools->Graph(gFCObsUncert, SignalRelUncertainty, FCObsNSignLimit, 1);
694     plotTools->Graph(gMCMCExpUncert,SignalRelUncertainty, MCMCExpNSignLimit,1);
695     plotTools->Graph(gMCMCObsUncert,SignalRelUncertainty, MCMCObsNSignLimit, 1);
696     gCLsExpUncert->SetLineStyle(8);
697     gPLObsUncert->SetLineColor(2);
698     gPLExpUncert->SetLineColor(2); gPLExpUncert->SetLineStyle(8);
699     gFCObsUncert->SetLineColor(3);
700     gFCExpUncert->SetLineColor(3); gFCExpUncert->SetLineStyle(8);
701     gMCMCObsUncert->SetLineColor(4);
702     gMCMCExpUncert->SetLineColor(4); gMCMCExpUncert->SetLineStyle(8);
703     hUncertScan->Draw("h");
704     gCLsExpUncert->Draw("l");
705     gCLsObsUncert->Draw("l");
706     gPLObsUncert->Draw("l");
707     gPLExpUncert->Draw("l");
708     gFCObsUncert->Draw("l");
709     gFCExpUncert->Draw("l");
710     gMCMCObsUncert->Draw("l");
711     gMCMCExpUncert->Draw("l");
712     TLatex l; l.SetTextSize(0.03); l.SetTextColor(1);
713     l.DrawLatex(0.025,25,"excluded");
714     TMarker m; m.SetMarkerStyle(29); m.SetMarkerColor(2);
715     m.DrawMarker(0.128, 28.5);l.DrawLatex(0.14,28.5,"LM1");
716     m.DrawMarker(0.147, 77.4);l.DrawLatex(0.16,77.4,"LM0");
717    
718     TLegend * leg_S = new TLegend(0.5,0.14,0.85,0.38);
719     leg_S->SetBorderSize(0);leg_S->SetFillColor(0);
720     leg_S->SetHeader("95% CL upper limits");
721     leg_S->AddEntry(gCLsExpUncert,"Expected (CLs, TLimit)","l");
722     leg_S->AddEntry(gCLsObsUncert,"Observed (CLs, TLimit)","l");
723     leg_S->AddEntry(gPLExpUncert,"Expected (PL, RooStat)","l");
724     leg_S->AddEntry(gPLObsUncert,"Observed (PL, RooStat)","l");
725     leg_S->AddEntry(gFCObsUncert,"Observed (FC, RooStat)","l");
726     leg_S->AddEntry(gFCExpUncert,"Expected (FC, RooStat)","l");
727     leg_S->AddEntry(gMCMCObsUncert,"Observed (MCMC, RooStat)","l");
728     leg_S->AddEntry(gMCMCExpUncert,"Expected (MCMC, RooStat)","l");
729     leg_S->Draw();
730     c1->SaveAs("results_tb3/UncertaintyScan.pdf");
731    
732     //theApp.Run();
733     }
734    
735    
736     int main(int argc, char** argv)
737     {
738     return plot(argc, argv);
739     }