ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/plot3tb.cc
Revision: 1.8
Committed: Fri May 20 07:39:34 2011 UTC (13 years, 11 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.7: +146 -29 lines
Log Message:
post CWR comments

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 auterman 1.8 genpoints->Fill("limits_MHT_tb3add/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 auterman 1.8 genpointsHT->Fill("limits_HT_tb3add/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 auterman 1.8 150,0,1509.9,25,100,350);
128 auterman 1.1 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 auterman 1.8 150,0,1509.9,25,100,350);
140 auterman 1.1 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 auterman 1.8 150,0,1509.9,25,100,350);
148 auterman 1.1 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 auterman 1.8 150,0,1509.9,25,100,350);
156 auterman 1.1 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 auterman 1.8 150,0,1509.9,25,100,350);
170 auterman 1.1 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 auterman 1.8 150,0,1509.9,25,100,350);
179 auterman 1.1 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 auterman 1.8 150,0,1509.9,35,100,450);
189 auterman 1.1 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 auterman 1.8 150,0,1509.9,35,100,450);
196 auterman 1.1 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 auterman 1.8 150,0,1509.9,35,100,450);
203 auterman 1.1 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 auterman 1.8 150,0,1509.9,35,100,450);
210 auterman 1.1 TH2F*texpexcl=(TH2F*)texcl->Clone();
211 auterman 1.8 plotToolsHT->Area(texpexcl, Mzero, Mhalf, NLOExpNoSigExclCL);
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 auterman 1.8 c1->SaveAs("results/ExclusionTestContours_m0_m12_tb3.pdf");
227 auterman 1.1
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.8 150,0,1509.9,35,100,500);
232     TH2F*hs = new TH2F("hs","",150,0,1509.9,35,100,450);
233     TGraph * gexpexcl = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpExclCL, 3,3, 2,2);
234 auterman 1.6 TGraph * gexpexcl_LO = plotTools ->GetContour(hs,Mzero,Mhalf,ExpExclCL, 3,0, 2,4);
235 auterman 1.8 TGraph * gobsexcl = plotTools ->GetContour(hs,Mzero,Mhalf,NLOObsExclCL, 3,3, 2,1);
236     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 auterman 1.8 TGraph * gCLsExpExclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpExclCL, 3,3, 1,2);
246     TGraph * gCLsObsExclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOObsExclCL, 3,3, 1,1);
247 auterman 1.6 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.8
412    
413     hexcl->Draw("colz");
414     LEP_ch->Draw("fsame");
415     LEP_sl->Draw("fsame");
416     TEV_sg_cdf->Draw("fsame");
417     TEV_sg_cdf->Draw("lsame");
418     TEV_sg_d0->Draw("fsame");
419     TEV_sg_d0->Draw("lsame");
420     if (gCLsExp1Sigma) gCLsExp1Sigma->Draw("lf");
421     sFirst->Draw("same");
422     Atlas->Draw("c,same");
423     ms.DrawLatex(395,508,"tan#beta=3, #mu>0, A_{0}=0");
424     CLsObsNLO->Draw("l");
425     //CLsObsLO->Draw("l");
426     CLsExpNLO->Draw("l");
427     //FCExpNLO->Draw("l");
428     //Jim's limits///////////////////////////////////////////////////////////////////////////////
429     TGraph* JimObsHT = Jim_ht_tb3(0);
430     TGraph* JimObsMHT = Jim_mht_tb3(0);
431     TGraph* JimExpHT = Jim_ht_tb3(1);
432     TGraph* JimExpMHT = Jim_mht_tb3(1);
433     TGraph* JimExpHTup = Jim_ht_tb3(2);
434     TGraph* JimExpMHTup = Jim_mht_tb3(2);
435     TGraph* JimExpHTdn = Jim_ht_tb3(3);
436     TGraph* JimExpMHTdn = Jim_mht_tb3(3);
437     Smooth(JimObsHT, 2);
438     Smooth(JimObsMHT,2);
439     Smooth(JimExpHT, 2);
440     Smooth(JimExpMHT,2);
441     Smooth(JimExpHTup, 2);
442     Smooth(JimExpMHTup,2);
443     Smooth(JimExpHTdn, 2);
444     Smooth(JimExpMHTdn,2);
445     TGraph * JimObs = plotToolsHT->ChooseBest(JimObsHT,JimObsMHT,JimObsHT,JimObsMHT);
446     TGraph * JimExp = plotToolsHT->ChooseBest(JimExpHT,JimExpMHT,JimExpHT,JimExpMHT);
447     TGraph * JimExpup = plotToolsHT->ChooseBest(JimExpHTup,JimExpMHTup,JimExpHTup,JimExpMHTup);
448     TGraph * JimExpdn = plotToolsHT->ChooseBest(JimExpHTdn,JimExpMHTdn,JimExpHTdn,JimExpMHTdn);
449     TGraph * JimExp1Sigma = MakeBand(JimExpup, JimExpdn);JimExp1Sigma->SetFillStyle(3001);
450     TGraph * JimLeg = (TGraph*)JimExp->Clone();JimLeg->SetFillStyle(JimExp1Sigma->GetFillStyle());JimLeg->SetFillColor(JimExp1Sigma->GetFillColor());
451     JimExp1Sigma->Draw("f");
452     JimObs->Draw("c");
453     JimExp->Draw("c");
454     stau->Draw("fsame");
455     b.DrawLatex( 10,435,"#tilde{#tau} LSP");
456     //constant ssqquark and gluino lines
457     sqt.DrawLatex(148,218,"#font[92]{#tilde{q}(500)GeV}");
458     sqt.DrawLatex(220,385,"#font[92]{#tilde{q}(800)GeV}");
459     glt.DrawLatex(430,184,"#font[92]{#tilde{g}(500)GeV}");
460     glt.DrawLatex(428,311,"#font[92]{#tilde{g}(800)GeV}");
461     for(int i = 0; i < 4; i++){
462     lngl[i]->Draw("same");
463     lnsq[i]->Draw("same");
464     }
465     legexp->Draw();
466     TLegend * legBayes = new TLegend(0.3,0.8,0.65,0.93);
467     legBayes->SetBorderSize(0);legBayes->SetFillColor(0);legBayes->SetFillStyle(4000);legBayes->SetTextFont(42);
468     legBayes->SetHeader("L_{int} = 36/pb, #sqrt{s} = 7 TeV");
469     legBayes->AddEntry(JimObs, "Observed, Bayes","l");
470     legBayes->AddEntry(JimLeg, "Expected #pm 1#sigma, Bayes","lf");
471     legBayes->AddEntry(CLsObsNLO,"Observed, CLs","l");
472     legBayes->AddEntry(expLeg, "Expected #pm 1#sigma, CLs","lf");
473     legBayes->Draw();
474     gPad->RedrawAxis();
475     c1->SaveAs("results/Exclusion_m0_m12_tb3_Bayes.pdf");
476    
477    
478     //The RA1-style Expected limits - no-signal hypothesis *only* for pseudo data ///////////////////////////////
479     TGraph * gCLsExpNoSExclMHT = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpNoSigExclCL, 3,2, 1,2);
480     TGraph * gCLsExpNoSExclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpNoSigExclCL, 3,2, 1,2);
481     TGraph * gCLsExpNoSExclHTm1 = plotToolsHT->ModifyExpSigma(gCLsExpExclHTm1, gCLsExpExclHT, gCLsExpNoSExclHT);
482     TGraph * gCLsExpNoSExclHTp1 = plotToolsHT->ModifyExpSigma(gCLsExpExclHTp1, gCLsExpExclHT, gCLsExpNoSExclHT);
483     TGraph * gCLsExpNoSExclMHTm1 = plotTools ->ModifyExpSigma(gCLsExpExclMHTm1,gCLsExpExclHT, gCLsExpNoSExclHT);
484     TGraph * gCLsExpNoSExclMHTp1 = plotTools ->ModifyExpSigma(gCLsExpExclMHTp1,gCLsExpExclHT, gCLsExpNoSExclHT);
485     Smooth( gCLsExpNoSExclMHT, 27 ); gCLsExpNoSExclMHT->SetLineWidth( 3 );
486     Smooth( gCLsExpNoSExclHT, 27 ); gCLsExpNoSExclHT->SetLineWidth( 3 );
487     Smooth( gCLsExpNoSExclHTm1, 27 );
488     Smooth( gCLsExpNoSExclHTp1, 27 );
489     Smooth( gCLsExpNoSExclMHTm1, 27 );
490     Smooth( gCLsExpNoSExclMHTp1, 27 );
491     TGraph * CLsExpNoSNLO = plotToolsHT->ChooseBest(gCLsExpNoSExclHT,gCLsExpNoSExclMHT, gCLsExpNoSExclHT,gCLsExpNoSExclMHT);
492     TGraph * gCLsExpNoSExclp1 = plotToolsHT->ChooseBest(gCLsExpNoSExclHTp1,gCLsExpNoSExclMHTp1, gCLsExpNoSExclHTp1,gCLsExpNoSExclMHTp1);
493     TGraph * gCLsExpNoSExclm1 = plotToolsHT->ChooseBest(gCLsExpNoSExclHTm1,gCLsExpNoSExclMHTm1, gCLsExpNoSExclHTm1,gCLsExpNoSExclMHTm1);
494     TGraph * gCLsExpNoS1Sigma = MakeBand(gCLsExpNoSExclp1, gCLsExpNoSExclm1);gCLsExpNoS1Sigma->SetFillStyle(4010);
495     hexcl->Draw("colz");
496     LEP_ch->Draw("fsame");
497     LEP_sl->Draw("fsame");
498     TEV_sg_cdf->Draw("fsame");
499     TEV_sg_cdf->Draw("lsame");
500     TEV_sg_d0->Draw("fsame");
501     TEV_sg_d0->Draw("lsame");
502     ms.DrawLatex(395,508,"tan#beta=3, #mu>0, A_{0}=0");
503     gCLsExpNoS1Sigma->Draw("lf,same");
504     sFirst->Draw("same");
505     Atlas->Draw("c,same");
506     CLsObsNLO->Draw("l,same");
507     CLsObsLO->Draw("l,same");
508     CLsExpNoSNLO->Draw("l,same");
509     //FCExpNLO->Draw("l");
510     stau->Draw("fsame");
511     b.DrawLatex( 10,435,"#tilde{#tau} LSP");
512     //constant ssqquark and gluino lines
513     sqt.DrawLatex(148,218,"#font[92]{#tilde{q}(500)GeV}");
514     sqt.DrawLatex(220,385,"#font[92]{#tilde{q}(800)GeV}");
515     glt.DrawLatex(430,184,"#font[92]{#tilde{g}(500)GeV}");
516     glt.DrawLatex(428,311,"#font[92]{#tilde{g}(800)GeV}");
517     for(int i = 0; i < 4; i++){
518     lngl[i]->Draw("same");
519     lnsq[i]->Draw("same");
520     }
521     legexp->Draw();
522     leg->Draw();
523     gPad->RedrawAxis();
524     c1->SaveAs("results/Exclusion_m0_m12_tb3_NoSigHypPseudoData.pdf");
525    
526    
527    
528 auterman 1.1 // Signal Contamination in M0 - M1/2
529     c1->SetLogz(0);
530     TH2F*hsigcont = new TH2F("sigcont",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
531 auterman 1.8 150,0,1509.9,25,100,350);
532 auterman 1.1 plotToolsHT->Area(hsigcont, Mzero, Mhalf, SignalContamination);
533     hsigcont->SetMinimum(0.01);
534     hsigcont->SetMaximum(20);
535     hsigcont->Draw("colz");
536     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
537     c1->SaveAs("results_tb3/SignalContamination_HT_m0_m12_tb3.pdf");
538    
539     // Signal Contamination in M0 - M1/2
540     c1->SetLogz(0);
541     TH2F*hsigcontMHT = new TH2F("sigcontMHT",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
542 auterman 1.8 150,0,1509.9,25,100,350);
543 auterman 1.1 plotTools->Area(hsigcontMHT, Mzero, Mhalf, SignalContamination);
544     hsigcontMHT->SetMinimum(0.01);
545     hsigcontMHT->SetMaximum(20);
546     hsigcontMHT->Draw("colz");
547     if (gobsexcl) gobsexcl->Draw("l");
548     c1->SaveAs("results_tb3/SignalContamination_MHT_m0_m12_tb3.pdf");
549    
550 auterman 1.5
551     // Signal JEC Uncertainty MHT
552     c1->SetLogz(0);
553     TH2F*hsig_jec_mht = new TH2F("sigjecmht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal JEC uncertainty",
554 auterman 1.8 150,0,1509.9,25,100,350);
555 auterman 1.5 plotTools->Area(hsig_jec_mht, Mzero, Mhalf, SignalUncertJEC);
556     hsig_jec_mht->SetMinimum(0.0);
557     hsig_jec_mht->SetMaximum(0.25);
558     hsig_jec_mht->SetContour(10);
559     hsig_jec_mht->Draw("colz");
560     if (gobsexcl) gobsexcl->Draw("l");
561     c1->SaveAs("results_tb3/SigJEC_MHT_m0_m12_tb3.pdf");
562    
563     // Signal JEC Uncertainty HT
564     c1->SetLogz(0);
565     TH2F*hsig_jec_ht = new TH2F("sigjecht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal JEC uncertainty",
566 auterman 1.8 150,0,1509.9,25,100,350);
567 auterman 1.6 plotToolsHT->Area(hsig_jec_ht, Mzero, Mhalf, SignalUncertJEC);
568 auterman 1.5 hsig_jec_ht->SetMinimum(0.0);
569     hsig_jec_ht->SetMaximum(0.25);
570     hsig_jec_ht->SetContour(10);
571     hsig_jec_ht->Draw("colz");
572     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
573     c1->SaveAs("results_tb3/SigJEC_HT_m0_m12_tb3.pdf");
574    
575 auterman 1.1
576 auterman 1.5 // Signal MuIso Uncertainty MHT
577     c1->SetLogz(0);
578     TH2F*hsig_MuIso_mht = new TH2F("sigMuIsomht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
579 auterman 1.8 150,0,1509.9,25,100,350);
580 auterman 1.5 plotTools->Area(hsig_MuIso_mht, Mzero, Mhalf, SignalUncertMuIso);
581     hsig_MuIso_mht->SetMinimum(0.0);
582     hsig_MuIso_mht->SetMaximum(0.05);
583     hsig_MuIso_mht->SetContour(5);
584     hsig_MuIso_mht->Draw("colz");
585     if (gobsexcl) gobsexcl->Draw("l");
586     c1->SaveAs("results_tb3/SigMuIso_MHT_m0_m12_tb3.pdf");
587    
588     // Signal MuIso Uncertainty HT
589     c1->SetLogz(0);
590     TH2F*hsig_MuIso_ht = new TH2F("sigMuIsoht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
591 auterman 1.8 150,0,1509.9,25,100,350);
592 auterman 1.6 plotToolsHT->Area(hsig_MuIso_ht, Mzero, Mhalf, SignalUncertMuIso);
593 auterman 1.5 hsig_MuIso_ht->SetMinimum(0.0);
594     hsig_MuIso_ht->SetMaximum(0.05);
595     hsig_MuIso_ht->SetContour(5);
596     hsig_MuIso_ht->Draw("colz");
597     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
598     c1->SaveAs("results_tb3/SigMuIso_HT_m0_m12_tb3.pdf");
599    
600    
601     // Signal kFactor Uncertainty MHT
602     c1->SetLogz(0);
603     TH2F*hsig_kFactor_mht = new TH2F("sigkFactormht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
604 auterman 1.8 150,0,1509.9,25,100,350);
605 auterman 1.5 plotTools->Area(hsig_kFactor_mht, Mzero, Mhalf, SignalUncertKfactor);
606     hsig_kFactor_mht->SetMinimum(0.1);
607     hsig_kFactor_mht->SetMaximum(0.2);
608     hsig_kFactor_mht->SetContour(10);
609     hsig_kFactor_mht->Draw("colz");
610     if (gobsexcl) gobsexcl->Draw("l");
611     c1->SaveAs("results_tb3/SigkFactor_MHT_m0_m12_tb3.pdf");
612    
613     // Signal kFactor Uncertainty HT
614     c1->SetLogz(0);
615     TH2F*hsig_kFactor_ht = new TH2F("sigkFactorht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
616 auterman 1.8 150,0,1509.9,25,100,350);
617 auterman 1.6 plotToolsHT->Area(hsig_kFactor_ht, Mzero, Mhalf, SignalUncertKfactor);
618 auterman 1.5 hsig_kFactor_ht->SetMinimum(0.1);
619     hsig_kFactor_ht->SetMaximum(0.2);
620     hsig_kFactor_ht->SetContour(10);
621     hsig_kFactor_ht->Draw("colz");
622     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
623     c1->SaveAs("results_tb3/SigkFactor_HT_m0_m12_tb3.pdf");
624    
625 auterman 1.1 //-----------------------------------------------------------------------------------
626     c1->SetLogz(1);
627    
628     TGraph * mz500 = plotMasses->Line( MSquarkL, MGluino, Mzero, 500, 1);
629     TGraph * mh250 = plotMasses->Line( MSquarkL, MGluino, Mhalf, 250, 1);
630    
631     // cross-section in squark - gluino mass
632     TH2F*hxsec_qg = new TH2F("xsec_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; cross section [pb]",
633 auterman 1.4 60,200,800,40,200,900);
634 auterman 1.1 plotTools->Area(hxsec_qg, MSquarkL, MGluino, Xsection);
635     hxsec_qg->SetMinimum(0.01);
636     hxsec_qg->Draw("colz");
637     mz500->Draw();
638     mh250->Draw();
639     c1->SaveAs("results_tb3/Xsection_mSql_mGl_tb3.pdf");
640    
641     // Observed Limit in squark - gluino mass
642     TH2F*hobslimit_qg = new TH2F("obslimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Limit [pb]",
643 auterman 1.4 60,200,800,40,200,900);
644 auterman 1.1 plotTools->Area(hobslimit_qg, MSquarkL, MGluino, ObsXsecLimit);
645     hobslimit_qg->SetMinimum(0.01);
646     hobslimit_qg->Draw("colz");
647     c1->SaveAs("results_tb3/ObsLimit_mSql_mGl_tb3.pdf");
648    
649     // Expected Limit in squark - gluino mass
650     TH2F*hexplimit_qg = new TH2F("explimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Limit [pb]",
651 auterman 1.4 60,200,800,40,200,900);
652 auterman 1.1 plotTools->Area(hexplimit_qg, MSquarkL, MGluino, ExpXsecLimit);
653     hexplimit_qg->SetMinimum(0.01);
654     hexplimit_qg->Draw("colz");
655     c1->SaveAs("results_tb3/ExpLimit_mSql_mGl_tb3.pdf");
656    
657     // Signal Acceptance in squark - gluino mass
658     TH2F*hsigacc_qg = new TH2F("sigacc_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; Signal Acceptance",
659 auterman 1.4 60,200,800,40,200,900);
660 auterman 1.1 plotTools->Area(hsigacc_qg, MSquarkL, MGluino, SignalAcceptance);
661     hsigacc_qg->SetMinimum(0.01);
662     hsigacc_qg->SetMaximum(1.0);
663     hsigacc_qg->Draw("colz");
664     c1->SaveAs("results_tb3/SigAcc_mSql_mGl_tb3.pdf");
665    
666     // Exp. Limit on Number of Signal Events in squark - gluino mass
667     c1->SetLogz(0);
668     TH2F*hexplimitnsig_qg = new TH2F("explimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL exp. limit signal events [# ]",
669 auterman 1.4 60,200,800,40,200,900);
670 auterman 1.1 plotTools->Area(hexplimitnsig_qg, MSquarkL, MGluino, ExpNSignLimit);
671     hexplimitnsig_qg->SetMinimum(0.0);
672     hexplimitnsig_qg->SetMaximum(20);
673     hexplimitnsig_qg->Draw("colz");
674     c1->SaveAs("results_tb3/ExpLimitOnNSig_mSql_mGl_tb3.pdf");
675    
676     // Obs. Limit on Number of Signal Events in squark - gluino mass
677     TH2F*hobslimitnsig_qg = new TH2F("obslimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL obs. limit signal events [# ]",
678 auterman 1.4 60,200,800,40,200,900);
679 auterman 1.1 plotTools->Area(hobslimitnsig_qg, MSquarkL, MGluino, ObsNSignLimit);
680     hobslimitnsig_qg->SetMinimum(0.0);
681     hobslimitnsig_qg->SetMaximum(20);
682     hobslimitnsig_qg->Draw("colz");
683     c1->SaveAs("results_tb3/ObsLimitOnNSig_mSql_mGl_tb3.pdf");
684    
685     c1->SetLogz(0);
686     // Expected Exclusion in squark - gluino mass
687     TH2F*hexpexcl_qg = new TH2F("expexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Exclusion",
688 auterman 1.4 60,200,800,40,200,900);
689 auterman 1.1 plotTools->Area(hexpexcl_qg, MSquarkL, MGluino, ExpExclCL);
690     hexpexcl_qg->Draw("colz");
691     c1->SaveAs("results_tb3/ExpExclusion_mSql_mGl_tb3.pdf");
692    
693     // Observed Exclusion in squark - gluino mass
694     TH2F*hobsexcl_qg = new TH2F("obsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
695 auterman 1.4 60,200,800,40,200,900);
696 auterman 1.1 plotTools->Area(hobsexcl_qg, MSquarkL, MGluino, ObsExclCL);
697     //std::vector<TGraph *> vobsexcl_qg = plotTools->GetContours(hobsexcl_qg);
698     hobsexcl_qg->Draw("colz");
699     //for (std::vector<TGraph *>::iterator g=vobsexcl_qg.begin();g!=vobsexcl_qg.end();++g){
700     // if (! *g) continue;
701     // // (*g)->Draw("l");
702     //}
703     c1->SaveAs("results_tb3/ObsExclusion_mSql_mGl_tb3.pdf");
704    
705     // TestContours in M0 - M1/2
706     TH2F*texcl_qg = new TH2F("texcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
707 auterman 1.4 60,200,800,40,200,900);
708 auterman 1.1 TH2F*tPLobsexcl_qg=(TH2F*)texcl_qg->Clone();
709     plotTools->Area(tPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
710     TH2F*tPLexpexcl_qg=(TH2F*)texcl_qg->Clone();
711     plotTools->Area(tPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
712     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hexpexcl_qg,3);
713     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hobsexcl_qg,3);
714     std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLobsexcl_qg,3);
715     //std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLexpexcl_qg,3);
716     //hPLexpexcl_qg
717     //hexcl_qg->Draw("colz");
718     //hexpexcl_qg->Draw("colz");
719     //hobsexcl_qg->Draw("colz");
720     tPLobsexcl_qg->Draw("colz");
721     int col_gl=kBlue-10;
722     for (std::vector<TGraph*>::iterator cont=contours_qg.begin(); cont!=contours_qg.end(); ++cont){
723     if (! *cont) continue;
724     double x, y;
725     (*cont)->GetPoint(0, x, y);
726     (*cont)->SetLineColor(col_gl);(*cont)->SetLineWidth(3);
727     (*cont)->Draw("l");
728     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col_gl++);
729     char val[20];
730     sprintf(val,"%d",(int)(cont-contours_qg.begin()));
731     l.DrawLatex(x,y,val);
732     if (cont-contours_qg.begin()>3) break;
733     }
734     c1->SaveAs("results_tb3/ExclusionTestContours_mSql_mGl_tb3.pdf");
735    
736     // Observed Exclusion in squark - gluino mass
737     TH2F*hPLobsexcl_qg = new TH2F("plobsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
738 auterman 1.4 60,200,800,40,200,900);
739 auterman 1.1 plotTools->Area(hPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
740     //hPLobsexcl_qg->Draw("colz");
741     //c1->SaveAs("results_tb3/PL_ObsExclusion_mSql_mGl_tb3.pdf");
742    
743    
744    
745     TH2F*hexcl_qg = new TH2F("hexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
746 auterman 1.4 50,200,800,30,200,900);
747 auterman 1.5 TGraph * gexpexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCL, 3,0, 2,2);
748     TGraph * gexpexcl_qg_LO = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCL, 3,0, 2,4);
749     TGraph * gobsexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,NLOObsExclCL, 3,0, 2,1);
750 auterman 1.4 TGraph * gMCMCexpexcl_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCExpExclusion,3,0, 3,2);
751     TGraph * gMCMCobsexcl_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCObsExclusion,3,0, 3,1);
752 auterman 1.5 TGraph * gCLsExpExclHT_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCL, 3,0, 1,2);
753     TGraph * gCLsExpExclHT_qg_LO = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCL, 3,0, 1,4);
754     TGraph * gCLsObsExclHT_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOObsExclCL, 3,0, 1,1);
755     TGraph * gCLsExpExclHTm1_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCLm1sigma,3,0, 5,2);
756     TGraph * gCLsExpExclHTp1_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCLp1sigma,3,0, 5,2);
757     Smooth(gexpexcl_qg, 11);
758     Smooth(gobsexcl_qg, 11);
759     Smooth(gCLsExpExclHT_qg, 11);
760     Smooth(gCLsObsExclHT_qg, 11);
761     Smooth(gCLsExpExclHTm1_qg, 11);
762     Smooth(gCLsExpExclHTp1_qg, 11);
763 auterman 1.4 TGraph * gCLsExp1Sigma_qg = MakeBand(gCLsExpExclHTp1_qg, gCLsExpExclHTm1_qg);
764 auterman 1.1 hexcl_qg->Draw("");
765 auterman 1.4 //
766     if (gCLsExp1Sigma_qg) gCLsExp1Sigma_qg->Draw("lf");
767     if (gobsexcl_qg) gobsexcl_qg->Draw("l");
768 auterman 1.1 if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->Draw("l");
769 auterman 1.4 if (gexpexcl_qg) gexpexcl_qg->Draw("l");
770 auterman 1.1 if (gCLsExpExclHT_qg) gCLsExpExclHT_qg->Draw("l");
771 auterman 1.5 if (gexpexcl_qg_LO) gexpexcl_qg_LO->Draw("l");
772     if (gCLsExpExclHT_qg_LO) gCLsExpExclHT_qg_LO->Draw("l");
773 auterman 1.4 //
774 auterman 1.1 TLegend * leg_qg = new TLegend(0.45,0.78,0.85,0.89);
775     leg_qg->SetBorderSize(0);leg_qg->SetFillColor(0);
776 auterman 1.5 TGraph * expLeg_qg = (TGraph*)gCLsExpExclHT_qg->Clone();expLeg_qg->SetFillStyle(gCLsExp1Sigma_qg->GetFillStyle());expLeg_qg->SetFillColor(gCLsExp1Sigma_qg->GetFillColor());
777     if (gobsexcl_qg) leg_qg->AddEntry(gobsexcl_qg,"NLO Observed (MHT, CLs)","l");
778     if (gexpexcl_qg) leg_qg->AddEntry(gexpexcl_qg,"NLO Expected (MHT, CLs)","l");
779     if (gexpexcl_qg_LO) leg_qg->AddEntry(gexpexcl_qg_LO,"LO Expected (MHT, CLs)","l");
780     if (gCLsObsExclHT_qg) leg_qg->AddEntry(gCLsObsExclHT_qg,"NLO Observed (HT, CLs)","l");
781     if (gCLsExpExclHT_qg) leg_qg->AddEntry(expLeg_qg,"NLO Expected (HT, CLs)","lf");
782     if (gCLsExpExclHT_qg_LO) leg_qg->AddEntry(gCLsExpExclHT_qg_LO,"LO Expected (HT, CLs)","l");
783 auterman 1.1 //if (gPLobsexcl_qg) leg_qg->AddEntry(gPLobsexcl_qg,"Observed (PL, RooStat)","l");
784     //if (gPLexpexcl_qg) leg_qg->AddEntry(gPLexpexcl_qg,"Expected (PL, RooStat)","l");
785     leg_qg->Draw();
786     c1->SaveAs("results_tb3/Exclusion_mSql_mGl_tb3.pdf");
787 auterman 1.4 //c1->SaveAs("plot_tb10.pdf");
788    
789    
790 auterman 1.1
791     c1->SetLogy(1);
792     c1->SetLogx(1);
793     TH2F*hUncertScan = new TH2F("hUncertScan",";relative signal uncertainty; number of signal events",
794     10,0.1,0.6,10,0.9,200);
795     //hUncertScan->GetXaxis()->SetNdivisions(505, false);
796     //hUncertScan->SetMinimum(1);
797     TGraph * gCLsExpUncert = new TGraph(0);
798     TGraph * gCLsObsUncert = new TGraph(0);
799     TGraph * gPLExpUncert = new TGraph(0);
800     TGraph * gPLObsUncert = new TGraph(0);
801     TGraph * gFCExpUncert = new TGraph(0);
802     TGraph * gFCObsUncert = new TGraph(0);
803     TGraph * gMCMCExpUncert= new TGraph(0);
804     TGraph * gMCMCObsUncert= new TGraph(0);
805     plotTools->Graph(gCLsExpUncert, SignalRelUncertainty, ExpNSignLimit,1);
806     plotTools->Graph(gCLsObsUncert, SignalRelUncertainty, ObsNSignLimit,1);
807     plotTools->Graph(gPLExpUncert, SignalRelUncertainty, PLExpNSignLimit,1);
808     plotTools->Graph(gPLObsUncert, SignalRelUncertainty, PLObsNSignLimit, 1);
809     plotTools->Graph(gFCExpUncert, SignalRelUncertainty, FCExpNSignLimit,1);
810     plotTools->Graph(gFCObsUncert, SignalRelUncertainty, FCObsNSignLimit, 1);
811     plotTools->Graph(gMCMCExpUncert,SignalRelUncertainty, MCMCExpNSignLimit,1);
812     plotTools->Graph(gMCMCObsUncert,SignalRelUncertainty, MCMCObsNSignLimit, 1);
813     gCLsExpUncert->SetLineStyle(8);
814     gPLObsUncert->SetLineColor(2);
815     gPLExpUncert->SetLineColor(2); gPLExpUncert->SetLineStyle(8);
816     gFCObsUncert->SetLineColor(3);
817     gFCExpUncert->SetLineColor(3); gFCExpUncert->SetLineStyle(8);
818     gMCMCObsUncert->SetLineColor(4);
819     gMCMCExpUncert->SetLineColor(4); gMCMCExpUncert->SetLineStyle(8);
820     hUncertScan->Draw("h");
821     gCLsExpUncert->Draw("l");
822     gCLsObsUncert->Draw("l");
823     gPLObsUncert->Draw("l");
824     gPLExpUncert->Draw("l");
825     gFCObsUncert->Draw("l");
826     gFCExpUncert->Draw("l");
827     gMCMCObsUncert->Draw("l");
828     gMCMCExpUncert->Draw("l");
829     TLatex l; l.SetTextSize(0.03); l.SetTextColor(1);
830     l.DrawLatex(0.025,25,"excluded");
831     TMarker m; m.SetMarkerStyle(29); m.SetMarkerColor(2);
832     m.DrawMarker(0.128, 28.5);l.DrawLatex(0.14,28.5,"LM1");
833     m.DrawMarker(0.147, 77.4);l.DrawLatex(0.16,77.4,"LM0");
834    
835     TLegend * leg_S = new TLegend(0.5,0.14,0.85,0.38);
836     leg_S->SetBorderSize(0);leg_S->SetFillColor(0);
837     leg_S->SetHeader("95% CL upper limits");
838     leg_S->AddEntry(gCLsExpUncert,"Expected (CLs, TLimit)","l");
839     leg_S->AddEntry(gCLsObsUncert,"Observed (CLs, TLimit)","l");
840     leg_S->AddEntry(gPLExpUncert,"Expected (PL, RooStat)","l");
841     leg_S->AddEntry(gPLObsUncert,"Observed (PL, RooStat)","l");
842     leg_S->AddEntry(gFCObsUncert,"Observed (FC, RooStat)","l");
843     leg_S->AddEntry(gFCExpUncert,"Expected (FC, RooStat)","l");
844     leg_S->AddEntry(gMCMCObsUncert,"Observed (MCMC, RooStat)","l");
845     leg_S->AddEntry(gMCMCExpUncert,"Expected (MCMC, RooStat)","l");
846     leg_S->Draw();
847     c1->SaveAs("results_tb3/UncertaintyScan.pdf");
848    
849     //theApp.Run();
850     }
851    
852    
853     int main(int argc, char** argv)
854     {
855     return plot(argc, argv);
856     }