ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/plot3tb.cc
Revision: 1.9
Committed: Wed Jun 22 15:03:36 2011 UTC (13 years, 10 months ago) by auterman
Content type: text/plain
Branch: MAIN
CVS Tags: JHEP2010, HEAD
Changes since 1.8: +171 -73 lines
Log Message:
2010 RA2 paper

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.9 //genpoints->Fill("limits_MHT_tb3_20110303/filelist_tb3.txt");
89     //genpoints->Fill("limits_MHT_20110609/filelist_tb3.txt");
90     genpoints->Fill("limits_moriond_MHT.old/filelist_tb3.txt");
91 auterman 1.1
92     TheLimits * genpointsHT = new TheLimits();
93 auterman 1.9 //genpointsHT->Fill("limits_HT_tb3_20110303/filelist_tb3.txt");
94     //genpointsHT->Fill("limits_HT_20110609/filelist_tb3.txt");
95     genpointsHT->Fill("limits_moriond_HT.old/filelist_tb3.txt");
96 auterman 1.1
97    
98     //Replace read limits with specific numbers
99     //genpoints->OverwriteLimits("ABCD_MHT");
100    
101 auterman 1.4 genpoints->FillGeneratorMasses("GenScan_tb3.dat");
102 auterman 1.1 genpoints->match();
103 auterman 1.4 genpointsHT->FillGeneratorMasses("GenScan_tb3.dat");
104 auterman 1.1 genpointsHT->match();
105    
106     //the plotting ----------------------------------------------------------------------
107     //plotting helper functions
108     PlotTools<SusyScan> * plotTools = new PlotTools<SusyScan>(genpoints->GetScan());
109     PlotTools<SusyScan> * plotToolsHT = new PlotTools<SusyScan>(genpointsHT->GetScan());
110     PlotTools<GeneratorMasses> * plotMasses = new PlotTools<GeneratorMasses>(genpoints->GetGeneratorMasses());
111    
112     //iso mass lines
113     TGraph * gl500 = plotMasses->Line(Mzero, Mhalf, MGluino, 500);
114     TGraph * sq500 = plotMasses->Line(Mzero, Mhalf, MSquarkL, 500, 10);
115     sq500->SetLineWidth(2); sq500->SetLineColor(7);
116    
117     TGraph * chi100 = plotMasses->Line(Mzero, Mhalf, MChi1, 50, 20);
118     TGraph * cha200 = plotMasses->Line(Mzero, Mhalf, MCha1, 200, 20);
119     cha200->SetLineColor(2);
120    
121     //the histograms
122     c1->SetLogz(1);
123     //h->SetMaximum(27);
124     //h->SetMinimum(0.01);
125    
126     /**/
127     // cross-section in M0 - M1/2
128 auterman 1.9 c1->SetLogz(0);
129     c1->SetRightMargin ( 0.2 );
130 auterman 1.1 TH2F*hxsec = new TH2F("xsec",";m_{0} [GeV]; m_{1/2} [GeV]; cross section [pb]",
131 auterman 1.9 50,0,504.9,25,100,350);
132     hxsec->SetNdivisions(505);
133     plotTools->Area(hxsec, Mzero, Mhalf, NLOXsection);
134     hxsec->SetMaximum(50);
135 auterman 1.1 hxsec->SetMinimum(0.01);
136     //sq500->Draw();
137     //gl500->Draw();
138     hxsec->Draw("colz");
139 auterman 1.9 c1->SaveAs("results_tb3/XsectionMHT_m0_m12_tb3.pdf");
140    
141     c1->SetLogz(0);
142     TH2F*hxsecHT = new TH2F("xsecHT",";m_{0} [GeV]; m_{1/2} [GeV]; cross section [pb]",
143     50,0,504.9,25,100,350);
144     hxsecHT->SetNdivisions(505);
145     plotToolsHT->Area(hxsecHT, Mzero, Mhalf, NLOXsection);
146     hxsecHT->SetMaximum(50);
147     hxsecHT->SetMinimum(0.01);
148     //sq500->Draw();
149     //gl500->Draw();
150     hxsecHT->Draw("colz");
151     c1->SaveAs("results_tb3/XsectionHT_m0_m12_tb3.pdf");
152 auterman 1.1
153     // Observed Limit in M0 - M1/2
154     TH2F*hobslimit = new TH2F("obslimit",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Limit [pb]",
155 auterman 1.9 50,0,504.9,25,100,350);
156 auterman 1.1 plotTools->Area(hobslimit, Mzero, Mhalf, ObsXsecLimit);
157     hobslimit->SetMinimum(0.01);
158     hobslimit->Draw("colz");
159     c1->SaveAs("results_tb3/ObsLimit_m0_m12_tb3.pdf");
160    
161     // Expected Limit in M0 - M1/2
162     TH2F*hexplimit = new TH2F("explimit",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Limit [pb]",
163 auterman 1.9 50,0,504.9,25,100,350);
164 auterman 1.1 plotTools->Area(hexplimit, Mzero, Mhalf, ExpXsecLimit);
165     hexplimit->SetMinimum(0.01);
166     hexplimit->Draw("colz");
167     c1->SaveAs("results_tb3/ExpLimit_m0_m12_tb3.pdf");
168    
169     // Signal Acceptance in M0 - M1/2
170 auterman 1.9 c1->SetRightMargin ( 0.2 );
171     c1->SetTopMargin ( 0.11 );
172     c1->SetLogz(0);
173 auterman 1.1 TH2F*hsigacc = new TH2F("sigacc",";m_{0} [GeV]; m_{1/2} [GeV]; Signal Acceptance",
174 auterman 1.9 50,0,504.9,25,100,350);
175     plotTools->Area(hsigacc, Mzero, Mhalf, NLOSignalAcceptance);
176     hsigacc->SetNdivisions(505);
177     hsigacc->SetMinimum(0.0);
178     hsigacc->SetMaximum(0.35);
179     hsigacc->SetContour(14);
180     hsigacc->GetZaxis()->SetTitleOffset(1.5);
181 auterman 1.1 hsigacc->Draw("colz");
182 auterman 1.9 TLatex as; as.SetTextSize(0.025); as.SetTextFont(42);//ms.SetTextColor(12);
183     as.DrawLatex(520,461,"MHT selection, tan #beta=3, #mu>0, A_{0}=0");
184     as.SetTextSize(0.04);
185     as.DrawLatex( 50,461,"CMS");
186     c1->SaveAs("results_tb3/SigAccMHT_m0_m12_tb3.pdf");
187    
188    
189     // Signal Acceptance in M0 - M1/2
190     TH2F*hsigaccHT = new TH2F("sigaccHT",";m_{0} [GeV]; m_{1/2} [GeV]; Signal Acceptance",
191     50,0,504.9,25,100,350);
192     hsigaccHT->SetNdivisions(505);
193     plotToolsHT->Area(hsigaccHT, Mzero, Mhalf, NLOSignalAcceptance);
194     hsigaccHT->SetMinimum(0.0);
195     hsigaccHT->SetMaximum(0.35);
196     hsigaccHT->SetContour(14);
197     hsigaccHT->GetZaxis()->SetTitleOffset(1.5);
198     hsigaccHT->Draw("colz");
199     as.SetTextSize(0.025); as.SetTextFont(42);//ms.SetTextColor(12);
200     as.DrawLatex(525,461,"HT selection, tan #beta=3, #mu>0, A_{0}=0");
201     as.SetTextSize(0.04);
202     as.DrawLatex( 50,461,"CMS");
203     c1->SaveAs("results_tb3/SigAccHT_m0_m12_tb3.pdf");
204     c1->SetTopMargin ( 0.1 );
205    
206 auterman 1.1
207     // Exp. Limit on Number of Signal Events in M0 - M1/2
208     c1->SetLogz(0);
209     TH2F*hexplimitnsig = new TH2F("explimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL exp. limit signal events [# ]",
210 auterman 1.9 50,0,504.9,25,100,350);
211 auterman 1.1 plotTools->Area(hexplimitnsig, Mzero, Mhalf, ExpNSignLimit);
212     hexplimitnsig->SetMinimum(0.0);
213     hexplimitnsig->SetMaximum(20);
214     hexplimitnsig->Draw("colz");
215     c1->SaveAs("results_tb3/ExpLimitOnNSig_m0_m12_tb3.pdf");
216    
217     // Obs. Limit on Number of Signal Events in M0 - M1/2
218     TH2F*hobslimitnsig = new TH2F("obslimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL obs. limit signal events [# ]",
219 auterman 1.9 50,0,504.9,25,100,350);
220 auterman 1.1 plotTools->Area(hobslimitnsig, Mzero, Mhalf, ObsNSignLimit);
221     hobslimitnsig->SetMinimum(0.0);
222     hobslimitnsig->SetMaximum(20);
223     hobslimitnsig->Draw("colz");
224     c1->SaveAs("results_tb3/ObsLimitOnNSig_m0_m12_tb3.pdf");
225    
226     c1->SetLogz(0);
227     // Expected Exclusion in M0 - M1/2
228     TH2F*hexpexcl = new TH2F("expexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
229 auterman 1.9 50,0,504.9,35,100,450);
230     plotTools->Area(hexpexcl, Mzero, Mhalf, NLOExpExclCL);
231 auterman 1.1 hexpexcl->Draw("colz");
232 auterman 1.9 c1->SaveAs("results_tb3/ExpExclusionMHT_m0_m12_tb3.pdf");
233 auterman 1.1
234     // Observed Exclusion in M0 - M1/2
235     TH2F*hobsexcl = new TH2F("obsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
236 auterman 1.9 50,0,504.9,35,100,450);
237     plotTools->Area(hobsexcl, Mzero, Mhalf, NLOObsExclCL);
238 auterman 1.1 hobsexcl->Draw("colz");
239 auterman 1.9 c1->SaveAs("results_tb3/ObsExclusionMHT_m0_m12_tb3.pdf");
240 auterman 1.1
241     // Observed Exclusion in M0 - M1/2
242 auterman 1.9 //TH2F*hPLobsexcl = new TH2F("plobsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
243     // 50,0,504.9,35,100,450);
244     //plotTools->Area(hPLobsexcl, Mzero, Mhalf, PLObsExclusion);
245     //hPLobsexcl->Draw("colz");
246     //c1->SaveAs("results_tb3/PL_ObsExclusion_m0_m12_tb3.pdf");
247 auterman 1.1
248 auterman 1.6 // TestContours in M0 - M1/2 ===================================================================
249 auterman 1.1 TH2F*texcl = new TH2F("texcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
250 auterman 1.9 50,0,504.9,35,100,450);
251 auterman 1.1 TH2F*texpexcl=(TH2F*)texcl->Clone();
252 auterman 1.8 plotToolsHT->Area(texpexcl, Mzero, Mhalf, NLOExpNoSigExclCL);
253 auterman 1.6 std::vector<TGraph*> contours = plotToolsHT->GetContours(texpexcl,3);
254 auterman 1.1 texpexcl->Draw("colz");
255     int col=kBlue-10;
256     for (std::vector<TGraph*>::iterator cont=contours.begin(); cont!=contours.end(); ++cont){
257     if (! *cont) continue;
258     double x, y;
259     (*cont)->GetPoint(0, x, y);
260     (*cont)->SetLineColor(col);
261     (*cont)->Draw("l");
262     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col++);
263     char val[20];
264     sprintf(val,"%d",(int)(cont-contours.begin()));
265     l.DrawLatex(x,y,val);
266     }
267 auterman 1.8 c1->SaveAs("results/ExclusionTestContours_m0_m12_tb3.pdf");
268 auterman 1.9 c1->SaveAs("results_tb3/ExclusionTestContours_m0_m12_tb3.pdf");
269 auterman 1.1
270    
271     // Exclusion in M0 - M1/2
272 auterman 1.9 c1->SetRightMargin ( 0.1 );
273     TH2F*hexcl = new TH2F("hexcl",";m_{0} (GeV); m_{1/2} (GeV); 95% CL Expected Exclusion",
274     50,0,504.9,35,100,450);
275     //hexcl->SetNdivisions(505);
276     TH2F*hs = new TH2F("hs","",50,0,504.9,35,100,450);
277 auterman 1.8 TGraph * gexpexcl = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpExclCL, 3,3, 2,2);
278 auterman 1.6 TGraph * gexpexcl_LO = plotTools ->GetContour(hs,Mzero,Mhalf,ExpExclCL, 3,0, 2,4);
279 auterman 1.8 TGraph * gobsexcl = plotTools ->GetContour(hs,Mzero,Mhalf,NLOObsExclCL, 3,3, 2,1);
280     TGraph * gobsexcl_LO = plotTools ->GetContour(hs,Mzero,Mhalf,ObsExclCL, 3,0, 2,1);
281 auterman 1.6 TGraph * gMCMCexpexcl = plotToolsHT->GetContour(hs,Mzero,Mhalf,MCMCExpExclusion, 3,0, 3,2);
282     TGraph * gMCMCobsexcl = plotToolsHT->GetContour(hs,Mzero,Mhalf,MCMCObsExclusion, 3,0, 3,1);
283     TGraph * gFCexpexclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOFCExpExclusion, 3,0, 3,2);
284     TGraph * gFCexpexclHT_LO = plotToolsHT->GetContour(hs,Mzero,Mhalf,FCExpExclusion, 3,0, 3,4);
285     TGraph * gFCexpexclMHT = plotTools->GetContour(hs,Mzero,Mhalf,NLOFCExpExclusion, 3,0, 3,2);
286     TGraph * gFCexpexclMHT_LO = plotTools->GetContour(hs,Mzero,Mhalf,FCExpExclusion, 3,0, 3,4);
287     TGraph * gFCobsexclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOFCObsExclusion, 3,0, 3,1);
288     TGraph * gFCobsexclMHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOFCObsExclusion, 3,0, 3,1);
289 auterman 1.8 TGraph * gCLsExpExclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpExclCL, 3,3, 1,2);
290     TGraph * gCLsObsExclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOObsExclCL, 3,3, 1,1);
291 auterman 1.6 TGraph * gCLsExpExclHT_LO = plotToolsHT->GetContour(hs,Mzero,Mhalf,ExpExclCL, 3,0, 1,4);
292 auterman 1.7 TGraph * gCLsObsExclHT_LO = plotToolsHT->GetContour(hs,Mzero,Mhalf,ObsExclCL, 3,0, 2,1);
293 auterman 1.6 TGraph * gCLsExpExclHTm1 = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpExclCLm1sigma,3,2, 5,2);
294     TGraph * gCLsExpExclHTp1 = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpExclCLp1sigma,3,2, 5,2);
295     TGraph * gCLsExpExclMHTm1 = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpExclCLm1sigma, 3,2, 5,2);
296     TGraph * gCLsExpExclMHTp1 = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpExclCLp1sigma, 3,2, 5,2);
297     TGraph * gCheck1 = (TGraph*)gobsexcl->Clone();
298     TGraph * gCheck2 = (TGraph*)gexpexcl->Clone();
299 auterman 1.7 Smooth( gCLsObsExclHT, 27); gCLsObsExclHT->SetLineWidth( 3 );
300     Smooth( gCLsExpExclHT, 27 ); gCLsExpExclHT->SetLineWidth( 3 );
301     Smooth( gCLsObsExclHT_LO, 27); gCLsObsExclHT_LO->SetLineWidth( 2 );
302     Smooth( gCLsExpExclHT_LO, 27 ); gCLsExpExclHT_LO->SetLineWidth( 3 );
303     Smooth( gexpexcl, 27 );
304     Smooth( gobsexcl_LO, 27 );
305     //Smooth( gobsexcl, 27 );
306     Smooth( gobsexcl, 27 );
307     Smooth( gexpexcl_LO, 27 );
308     Smooth( gFCexpexclHT, 27 );
309     Smooth( gFCexpexclHT_LO, 27 );gFCexpexclHT_LO->SetLineWidth( 3 );
310     Smooth( gFCexpexclMHT, 27 );
311     Smooth( gFCexpexclMHT_LO, 27 );
312     Smooth( gFCobsexclHT, 27 );gFCobsexclHT->SetLineWidth( 2 );
313     Smooth( gFCobsexclMHT, 27 );
314     Smooth( gCLsExpExclHTm1, 27 );
315     Smooth( gCLsExpExclHTp1, 27 );
316     Smooth( gCLsExpExclMHTm1, 27 );
317     Smooth( gCLsExpExclMHTp1, 27 );
318 auterman 1.6 TGraph * CLsObsNLO = plotToolsHT->ChooseBest(gCLsObsExclHT,gobsexcl, gCLsObsExclHT,gobsexcl);
319 auterman 1.7 TGraph * CLsObsLO = plotToolsHT->ChooseBest(gCLsObsExclHT_LO,gobsexcl_LO, gCLsObsExclHT_LO,gobsexcl_LO);
320 auterman 1.6 TGraph * CLsExpNLO = plotToolsHT->ChooseBest(gCLsExpExclHT,gexpexcl, gCLsExpExclHT,gexpexcl);
321     TGraph * CLsExpLO = plotToolsHT->ChooseBest(gCLsExpExclHT_LO,gexpexcl_LO, gCLsExpExclHT_LO,gexpexcl_LO);
322     TGraph * FCExpLO = plotToolsHT->ChooseBest(gFCexpexclHT_LO,gFCexpexclMHT_LO,gFCexpexclHT_LO,gFCexpexclMHT_LO);
323 auterman 1.7 TGraph * FCExpNLO = plotToolsHT->ChooseBest(gFCexpexclHT,gFCexpexclMHT,gFCexpexclHT,gFCexpexclMHT);
324 auterman 1.6 TGraph * FCObsNLO = plotToolsHT->ChooseBest(gFCobsexclHT,gFCobsexclMHT,gFCobsexclHT,gFCobsexclMHT);
325     TGraph * gCLsExpExclp1 = plotToolsHT->ChooseBest(gCLsExpExclHTp1,gCLsExpExclMHTp1, gCLsExpExclHTp1,gCLsExpExclMHTp1);
326     TGraph * gCLsExpExclm1 = plotToolsHT->ChooseBest(gCLsExpExclHTm1,gCLsExpExclMHTm1, gCLsExpExclHTm1,gCLsExpExclMHTm1);
327     TGraph * gCLsExp1Sigma = MakeBand(gCLsExpExclp1, gCLsExpExclm1);
328     hexcl->GetYaxis()->SetTitleOffset(1.3);
329 auterman 1.7 hexcl->GetXaxis()->SetTitleOffset(0.92);
330 auterman 1.6 hexcl->Draw("colz");
331 auterman 1.1 //set old exclusion Limits
332 auterman 1.7 TGraph* Atlas = Atlas_m0_m12_tb3_obs();
333     Atlas->SetLineColor( 28 );
334 auterman 1.3 TGraph* LEP_ch = set_lep_ch(3);
335     TGraph* LEP_sl = set_lep_sl(3);//slepton curve
336     TGraph* TEV_sg_cdf = set_tev_sg_cdf(3);//squark gluino cdf
337     TGraph* TEV_sg_d0 = set_tev_sg_d0(3);//squark gluino d0
338     //TGraph* TEV_tlp_cdf = set_tev_tlp_cdf(10);//trilepton cdf
339     //TGraph* TEV_tlp_d0 = set_tev_tlp_d0(10);//trilepton d0
340     TGraph* stau = set_tev_stau(3);//stau
341     TGraph* TEV_sn_d0_1 = set_sneutrino_d0_1(3);
342     TGraph* TEV_sn_d0_2 = set_sneutrino_d0_2(3);
343 auterman 1.2 TGraphErrors* First = getObserved_NLO_tanBeta3();
344     TGraphErrors* Second = getExpected_NLO_tanBeta3();//getLO_jetMultis();
345     TGraphErrors* Third = getLO_tanBeta3();
346 auterman 1.1 First->GetXaxis()->SetRangeUser(0,505);
347     First->GetYaxis()->SetRangeUser(80,500);
348     First->GetXaxis()->SetTitle("m_{0} (GeV)");
349     First->GetYaxis()->SetTitle("m_{1/2} (GeV)");
350     TSpline3 *sFirst = new TSpline3("sFirst",First);
351     sFirst->SetLineColor(kBlue);
352 auterman 1.5 //sFirst->SetLineWidth(3);
353 auterman 1.1 TSpline3 *sSecond = new TSpline3("sSecond",Second);
354     sSecond->SetLineColor(kBlue);
355     sSecond->SetLineStyle(2);
356 auterman 1.5 //sSecond->SetLineWidth(3);
357 auterman 1.1 TSpline3 *sThird = new TSpline3("sThird",Third);
358 auterman 1.5 sThird->SetLineColor(kBlue);
359 auterman 1.1 sThird->SetLineStyle(4);
360 auterman 1.5 //sThird->SetLineWidth(3);
361 auterman 1.6 //gCheck1->Draw("same");
362     //gCheck2->Draw("same");
363     //gexpexcl->Draw("l");
364     //gobsexcl->Draw("l");
365     //gexpexcl_LO->Draw("l");
366     //gCLsExpExclHT_LO->Draw("l");
367     //gCLsObsExclHT->Draw("l");
368     //gCLsExpExclHT->Draw("l");
369     //gFCexpexclHT_LO->Draw("l");
370     //gFCexpexclMHT_LO->Draw("l");
371 auterman 1.5 if (gCLsExp1Sigma) gCLsExp1Sigma->Draw("lf");
372 auterman 1.1 TEV_sn_d0_1->Draw("fsame");
373 auterman 1.7 TEV_sn_d0_2->Draw("fsame"); //only for tb=3
374     stau->Draw("fsame");
375 auterman 1.1 LEP_ch->Draw("fsame");
376     LEP_sl->Draw("fsame");
377 auterman 1.7 TEV_sg_cdf->Draw("fsame");
378     TEV_sg_cdf->Draw("lsame");
379     TEV_sg_d0->Draw("fsame");
380     TEV_sg_d0->Draw("lsame");
381 auterman 1.1 sFirst->Draw("same");
382 auterman 1.7 TLatex b; b.SetTextSize(0.02); b.SetTextColor(1);
383     b.DrawLatex( 10,435,"#tilde{#tau} LSP");
384    
385     //sSecond->Draw("same");
386     //sThird->Draw("same");
387     Atlas->Draw("c,same");
388     TLatex ms; ms.SetTextSize(0.025); ms.SetTextFont(42);//ms.SetTextColor(12);
389 auterman 1.9 //ms.DrawLatex(395,508,"tan #beta=3, #mu>0, A_{0}=0");
390 auterman 1.7 //gCheck1->Draw("same");
391     //gCheck2->Draw("same");
392 auterman 1.9 //TLegend* legexp = new TLegend(0.66,0.65,0.98,0.93,NULL,"brNDC");
393     TLegend* legexp = new TLegend(0.61,0.61,0.93,0.88,NULL,"brNDC");
394     legexp->SetFillColor(0);legexp->SetShadowColor(0);legexp->SetFillStyle(4000);legexp->SetTextFont(42);legexp->SetTextSize(0.025);legexp->SetBorderSize(0);
395 auterman 1.7 //TEV_sg_cdf.SetLineColor(1);
396 auterman 1.9 legexp->SetHeader("CMS tan #beta=3, #mu>0, A_{0}=0");
397     legexp->AddEntry(TEV_sg_cdf,"CDF #tilde{#font[12]{g}}, #tilde{#font[12]{q}}, #scale[0.8]{tan #beta=5, #mu<0}","f");
398 auterman 1.7 legexp->AddEntry(TEV_sg_d0,"D0 #tilde{#font[12]{g}}, #tilde{#font[12]{q}}, #scale[0.8]{#mu<0}","f");
399     //ch_gr.SetLineColor(1);
400     legexp->AddEntry(LEP_ch,"LEP2 #tilde{#chi}_{1}^{#pm}","f");
401     //sl_gr.SetLineColor(1);
402     legexp->AddEntry(LEP_sl,"LEP2 #tilde{#font[12]{l}}^{#pm}","f"); //NOT FOR tb=50!
403     //if(tanbeta == 3)
404     legexp->AddEntry(TEV_sn_d0_1,"D0 #chi^{#pm}_{1}, #chi^{0}_{2}","f");
405     legexp->AddEntry(sFirst, "CMS #alpha_{T}");
406 auterman 1.9 //legexp->AddEntry(Atlas, "Atlas","l");
407 auterman 1.7 legexp->Draw();
408    
409 auterman 1.6 CLsObsNLO->Draw("l");
410 auterman 1.7 CLsObsLO->Draw("l");
411 auterman 1.6 CLsExpNLO->Draw("l");
412 auterman 1.7 //FCExpNLO->Draw("l");
413 auterman 1.6
414 auterman 1.7 //constant ssqquark and gluino lines
415     TF1* lnsq[4];
416     TF1* lngl[4];
417     TLatex sqt; sqt.SetTextSize(0.02); sqt.SetTextAngle(-14);sqt.SetTextColor(kGray+2);
418     sqt.DrawLatex(148,218,"#font[92]{#tilde{q}(500)GeV}");
419 auterman 1.9 sqt.DrawLatex(300,365,"#font[92]{#tilde{q}(800)GeV}");
420 auterman 1.7 TLatex glt; glt.SetTextSize(0.02); sqt.SetTextAngle(-4); glt.SetTextColor(kGray+2);
421     glt.DrawLatex(430,184,"#font[92]{#tilde{g}(500)GeV}");
422     //glt.DrawLatex(450,235,"#font[92]{#tilde{g}(650)GeV}");
423     glt.DrawLatex(428,311,"#font[92]{#tilde{g}(800)GeV}");
424     int tanBeta_=3;
425     for(int i = 0; i < 4; i++){
426     lnsq[i] = constant_squark(tanBeta_,i);
427     lngl[i] = constant_gluino(tanBeta_,i);
428     lngl[i]->Draw("same");
429     lnsq[i]->Draw("same");
430     }
431 auterman 1.9 //TLegend * leg = new TLegend(0.3,0.8,0.65,0.93);
432     TLegend * leg = new TLegend(0.25,0.72,0.68,0.88);
433     leg->SetBorderSize(0);leg->SetFillColor(0);leg->SetFillStyle(4000);leg->SetTextFont(42);leg->SetTextSize(0.025);
434 auterman 1.6 TGraph * expLeg = (TGraph*)CLsExpNLO->Clone();expLeg->SetFillStyle(gCLsExp1Sigma->GetFillStyle());expLeg->SetFillColor(gCLsExp1Sigma->GetFillColor());
435 auterman 1.9 leg->SetHeader("L_{int} = 36 pb^{-1}, #sqrt{s} = 7 TeV");
436 auterman 1.7 leg->AddEntry(CLsObsNLO,"Observed, NLO","l");
437     leg->AddEntry(CLsObsLO, "Observed, LO","l");
438     leg->AddEntry(expLeg, "Expected #pm 1#sigma, NLO","lf");
439     //leg->AddEntry(FCExpLO, "Expected, FC, NLO","l");
440 auterman 1.1 leg->Draw();
441     gPad->RedrawAxis();
442 auterman 1.7 c1->SaveAs("results/Exclusion_m0_m12_tb3.pdf");
443    
444     hexcl->Draw("");
445     gCLsExp1Sigma->SetName("CLsNLO_Exp1SigmaUncertaintyTb3");
446     CLsObsNLO->SetName("CLsNLO_ObservedTb3");
447     CLsExpNLO->SetName("CLsNLO_ExpectedTb3");
448     CLsExpLO->SetName("CLsLO_ExpectedTb3");
449     gCLsExp1Sigma->Draw("l");
450     CLsObsNLO->Draw("l");
451     CLsExpNLO->Draw("l");
452     CLsObsLO->Draw("l");
453     c1->SaveAs("results/LimitContours_tb3.C");
454 auterman 1.1
455 auterman 1.7 // plotToolsHT->Print(Xsection, Mzero,Mhalf,gCLsObsExclHT, 10);
456 auterman 1.4
457 auterman 1.8
458    
459     hexcl->Draw("colz");
460     LEP_ch->Draw("fsame");
461     LEP_sl->Draw("fsame");
462     TEV_sg_cdf->Draw("fsame");
463     TEV_sg_cdf->Draw("lsame");
464     TEV_sg_d0->Draw("fsame");
465     TEV_sg_d0->Draw("lsame");
466     if (gCLsExp1Sigma) gCLsExp1Sigma->Draw("lf");
467     sFirst->Draw("same");
468     Atlas->Draw("c,same");
469 auterman 1.9 ms.DrawLatex(395,508,"tan #beta=3, #mu>0, A_{0}=0");
470 auterman 1.8 CLsObsNLO->Draw("l");
471     //CLsObsLO->Draw("l");
472     CLsExpNLO->Draw("l");
473     //FCExpNLO->Draw("l");
474     //Jim's limits///////////////////////////////////////////////////////////////////////////////
475     TGraph* JimObsHT = Jim_ht_tb3(0);
476     TGraph* JimObsMHT = Jim_mht_tb3(0);
477     TGraph* JimExpHT = Jim_ht_tb3(1);
478     TGraph* JimExpMHT = Jim_mht_tb3(1);
479     TGraph* JimExpHTup = Jim_ht_tb3(2);
480     TGraph* JimExpMHTup = Jim_mht_tb3(2);
481     TGraph* JimExpHTdn = Jim_ht_tb3(3);
482     TGraph* JimExpMHTdn = Jim_mht_tb3(3);
483     Smooth(JimObsHT, 2);
484     Smooth(JimObsMHT,2);
485     Smooth(JimExpHT, 2);
486     Smooth(JimExpMHT,2);
487     Smooth(JimExpHTup, 2);
488     Smooth(JimExpMHTup,2);
489     Smooth(JimExpHTdn, 2);
490     Smooth(JimExpMHTdn,2);
491     TGraph * JimObs = plotToolsHT->ChooseBest(JimObsHT,JimObsMHT,JimObsHT,JimObsMHT);
492     TGraph * JimExp = plotToolsHT->ChooseBest(JimExpHT,JimExpMHT,JimExpHT,JimExpMHT);
493     TGraph * JimExpup = plotToolsHT->ChooseBest(JimExpHTup,JimExpMHTup,JimExpHTup,JimExpMHTup);
494     TGraph * JimExpdn = plotToolsHT->ChooseBest(JimExpHTdn,JimExpMHTdn,JimExpHTdn,JimExpMHTdn);
495     TGraph * JimExp1Sigma = MakeBand(JimExpup, JimExpdn);JimExp1Sigma->SetFillStyle(3001);
496     TGraph * JimLeg = (TGraph*)JimExp->Clone();JimLeg->SetFillStyle(JimExp1Sigma->GetFillStyle());JimLeg->SetFillColor(JimExp1Sigma->GetFillColor());
497     JimExp1Sigma->Draw("f");
498     JimObs->Draw("c");
499     JimExp->Draw("c");
500     stau->Draw("fsame");
501     b.DrawLatex( 10,435,"#tilde{#tau} LSP");
502     //constant ssqquark and gluino lines
503     sqt.DrawLatex(148,218,"#font[92]{#tilde{q}(500)GeV}");
504     sqt.DrawLatex(220,385,"#font[92]{#tilde{q}(800)GeV}");
505     glt.DrawLatex(430,184,"#font[92]{#tilde{g}(500)GeV}");
506     glt.DrawLatex(428,311,"#font[92]{#tilde{g}(800)GeV}");
507     for(int i = 0; i < 4; i++){
508     lngl[i]->Draw("same");
509     lnsq[i]->Draw("same");
510     }
511     legexp->Draw();
512     TLegend * legBayes = new TLegend(0.3,0.8,0.65,0.93);
513     legBayes->SetBorderSize(0);legBayes->SetFillColor(0);legBayes->SetFillStyle(4000);legBayes->SetTextFont(42);
514     legBayes->SetHeader("L_{int} = 36/pb, #sqrt{s} = 7 TeV");
515     legBayes->AddEntry(JimObs, "Observed, Bayes","l");
516     legBayes->AddEntry(JimLeg, "Expected #pm 1#sigma, Bayes","lf");
517     legBayes->AddEntry(CLsObsNLO,"Observed, CLs","l");
518     legBayes->AddEntry(expLeg, "Expected #pm 1#sigma, CLs","lf");
519     legBayes->Draw();
520     gPad->RedrawAxis();
521     c1->SaveAs("results/Exclusion_m0_m12_tb3_Bayes.pdf");
522    
523    
524     //The RA1-style Expected limits - no-signal hypothesis *only* for pseudo data ///////////////////////////////
525     TGraph * gCLsExpNoSExclMHT = plotTools ->GetContour(hs,Mzero,Mhalf,NLOExpNoSigExclCL, 3,2, 1,2);
526     TGraph * gCLsExpNoSExclHT = plotToolsHT->GetContour(hs,Mzero,Mhalf,NLOExpNoSigExclCL, 3,2, 1,2);
527     TGraph * gCLsExpNoSExclHTm1 = plotToolsHT->ModifyExpSigma(gCLsExpExclHTm1, gCLsExpExclHT, gCLsExpNoSExclHT);
528     TGraph * gCLsExpNoSExclHTp1 = plotToolsHT->ModifyExpSigma(gCLsExpExclHTp1, gCLsExpExclHT, gCLsExpNoSExclHT);
529     TGraph * gCLsExpNoSExclMHTm1 = plotTools ->ModifyExpSigma(gCLsExpExclMHTm1,gCLsExpExclHT, gCLsExpNoSExclHT);
530     TGraph * gCLsExpNoSExclMHTp1 = plotTools ->ModifyExpSigma(gCLsExpExclMHTp1,gCLsExpExclHT, gCLsExpNoSExclHT);
531     Smooth( gCLsExpNoSExclMHT, 27 ); gCLsExpNoSExclMHT->SetLineWidth( 3 );
532     Smooth( gCLsExpNoSExclHT, 27 ); gCLsExpNoSExclHT->SetLineWidth( 3 );
533     Smooth( gCLsExpNoSExclHTm1, 27 );
534     Smooth( gCLsExpNoSExclHTp1, 27 );
535     Smooth( gCLsExpNoSExclMHTm1, 27 );
536     Smooth( gCLsExpNoSExclMHTp1, 27 );
537     TGraph * CLsExpNoSNLO = plotToolsHT->ChooseBest(gCLsExpNoSExclHT,gCLsExpNoSExclMHT, gCLsExpNoSExclHT,gCLsExpNoSExclMHT);
538     TGraph * gCLsExpNoSExclp1 = plotToolsHT->ChooseBest(gCLsExpNoSExclHTp1,gCLsExpNoSExclMHTp1, gCLsExpNoSExclHTp1,gCLsExpNoSExclMHTp1);
539     TGraph * gCLsExpNoSExclm1 = plotToolsHT->ChooseBest(gCLsExpNoSExclHTm1,gCLsExpNoSExclMHTm1, gCLsExpNoSExclHTm1,gCLsExpNoSExclMHTm1);
540     TGraph * gCLsExpNoS1Sigma = MakeBand(gCLsExpNoSExclp1, gCLsExpNoSExclm1);gCLsExpNoS1Sigma->SetFillStyle(4010);
541     hexcl->Draw("colz");
542     LEP_ch->Draw("fsame");
543     LEP_sl->Draw("fsame");
544     TEV_sg_cdf->Draw("fsame");
545     TEV_sg_cdf->Draw("lsame");
546     TEV_sg_d0->Draw("fsame");
547     TEV_sg_d0->Draw("lsame");
548 auterman 1.9 //ms.DrawLatex(400,458,"tan #beta=3, #mu>0, A_{0}=0");
549 auterman 1.8 gCLsExpNoS1Sigma->Draw("lf,same");
550     sFirst->Draw("same");
551 auterman 1.9 //sAtlas->Draw("c,same");
552 auterman 1.8 CLsObsNLO->Draw("l,same");
553     CLsObsLO->Draw("l,same");
554     CLsExpNoSNLO->Draw("l,same");
555     //FCExpNLO->Draw("l");
556     stau->Draw("fsame");
557     b.DrawLatex( 10,435,"#tilde{#tau} LSP");
558     //constant ssqquark and gluino lines
559     sqt.DrawLatex(148,218,"#font[92]{#tilde{q}(500)GeV}");
560 auterman 1.9 sqt.DrawLatex(210,360,"#font[92]{#tilde{q}(800)GeV}");
561 auterman 1.8 glt.DrawLatex(430,184,"#font[92]{#tilde{g}(500)GeV}");
562 auterman 1.9 glt.DrawLatex(430,310,"#font[92]{#tilde{g}(800)GeV}");
563 auterman 1.8 for(int i = 0; i < 4; i++){
564     lngl[i]->Draw("same");
565     lnsq[i]->Draw("same");
566     }
567     legexp->Draw();
568     leg->Draw();
569     gPad->RedrawAxis();
570     c1->SaveAs("results/Exclusion_m0_m12_tb3_NoSigHypPseudoData.pdf");
571 auterman 1.9 c1->SaveAs("results_tb3/Exclusion_m0_m12_tb3_NoSigHypPseudoData.pdf");
572 auterman 1.8
573    
574    
575 auterman 1.1 // Signal Contamination in M0 - M1/2
576 auterman 1.9 c1->SetRightMargin ( 0.2 );
577 auterman 1.1 c1->SetLogz(0);
578     TH2F*hsigcont = new TH2F("sigcont",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
579 auterman 1.9 50,0,504.9,25,100,350);
580 auterman 1.1 plotToolsHT->Area(hsigcont, Mzero, Mhalf, SignalContamination);
581     hsigcont->SetMinimum(0.01);
582     hsigcont->SetMaximum(20);
583     hsigcont->Draw("colz");
584     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
585     c1->SaveAs("results_tb3/SignalContamination_HT_m0_m12_tb3.pdf");
586    
587     // Signal Contamination in M0 - M1/2
588     c1->SetLogz(0);
589     TH2F*hsigcontMHT = new TH2F("sigcontMHT",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
590 auterman 1.9 50,0,504.9,25,100,350);
591 auterman 1.1 plotTools->Area(hsigcontMHT, Mzero, Mhalf, SignalContamination);
592     hsigcontMHT->SetMinimum(0.01);
593     hsigcontMHT->SetMaximum(20);
594     hsigcontMHT->Draw("colz");
595     if (gobsexcl) gobsexcl->Draw("l");
596     c1->SaveAs("results_tb3/SignalContamination_MHT_m0_m12_tb3.pdf");
597    
598 auterman 1.5
599     // Signal JEC Uncertainty MHT
600     c1->SetLogz(0);
601     TH2F*hsig_jec_mht = new TH2F("sigjecmht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal JEC uncertainty",
602 auterman 1.9 50,0,504.9,25,100,350);
603 auterman 1.5 plotTools->Area(hsig_jec_mht, Mzero, Mhalf, SignalUncertJEC);
604     hsig_jec_mht->SetMinimum(0.0);
605     hsig_jec_mht->SetMaximum(0.25);
606     hsig_jec_mht->SetContour(10);
607     hsig_jec_mht->Draw("colz");
608     if (gobsexcl) gobsexcl->Draw("l");
609     c1->SaveAs("results_tb3/SigJEC_MHT_m0_m12_tb3.pdf");
610    
611     // Signal JEC Uncertainty HT
612     c1->SetLogz(0);
613     TH2F*hsig_jec_ht = new TH2F("sigjecht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal JEC uncertainty",
614 auterman 1.9 50,0,504.9,25,100,350);
615 auterman 1.6 plotToolsHT->Area(hsig_jec_ht, Mzero, Mhalf, SignalUncertJEC);
616 auterman 1.5 hsig_jec_ht->SetMinimum(0.0);
617     hsig_jec_ht->SetMaximum(0.25);
618     hsig_jec_ht->SetContour(10);
619     hsig_jec_ht->Draw("colz");
620     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
621     c1->SaveAs("results_tb3/SigJEC_HT_m0_m12_tb3.pdf");
622    
623 auterman 1.1
624 auterman 1.5 // Signal MuIso Uncertainty MHT
625     c1->SetLogz(0);
626     TH2F*hsig_MuIso_mht = new TH2F("sigMuIsomht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
627 auterman 1.9 50,0,504.9,25,100,350);
628 auterman 1.5 plotTools->Area(hsig_MuIso_mht, Mzero, Mhalf, SignalUncertMuIso);
629     hsig_MuIso_mht->SetMinimum(0.0);
630     hsig_MuIso_mht->SetMaximum(0.05);
631     hsig_MuIso_mht->SetContour(5);
632     hsig_MuIso_mht->Draw("colz");
633     if (gobsexcl) gobsexcl->Draw("l");
634     c1->SaveAs("results_tb3/SigMuIso_MHT_m0_m12_tb3.pdf");
635    
636     // Signal MuIso Uncertainty HT
637     c1->SetLogz(0);
638     TH2F*hsig_MuIso_ht = new TH2F("sigMuIsoht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal #mu_{iso} uncertainty",
639 auterman 1.9 50,0,504.9,25,100,350);
640 auterman 1.6 plotToolsHT->Area(hsig_MuIso_ht, Mzero, Mhalf, SignalUncertMuIso);
641 auterman 1.5 hsig_MuIso_ht->SetMinimum(0.0);
642     hsig_MuIso_ht->SetMaximum(0.05);
643     hsig_MuIso_ht->SetContour(5);
644     hsig_MuIso_ht->Draw("colz");
645     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
646     c1->SaveAs("results_tb3/SigMuIso_HT_m0_m12_tb3.pdf");
647    
648    
649 auterman 1.9 // Signal PDF Uncertainty MHT
650     c1->SetLogz(0);
651     TH2F*hsig_PDF_mht = new TH2F("sigPDFmht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal PDF uncertainty",
652     50,0,504.9,25,100,350);
653     plotTools->Area(hsig_PDF_mht, Mzero, Mhalf, SignalUncertPDF);
654     hsig_PDF_mht->SetMinimum(0.0);hsig_PDF_mht->GetZaxis()->SetTitleOffset(1.3);
655     hsig_PDF_mht->SetMaximum(0.20);
656     hsig_PDF_mht->SetContour(10);
657     hsig_PDF_mht->Draw("colz");
658     if (gobsexcl) gobsexcl->Draw("l");
659     c1->SaveAs("results_tb3/SigPDF_MHT_m0_m12_tb3.pdf");
660    
661     // Signal PDF Uncertainty HT
662     c1->SetLogz(0);
663     TH2F*hsig_PDF_ht = new TH2F("sigPDFht",";m_{0} [GeV]; m_{1/2} [GeV]; Signal PDF uncertainty",
664     50,0,504.9,25,100,350);
665     plotToolsHT->Area(hsig_PDF_ht, Mzero, Mhalf, SignalUncertPDF);
666     hsig_PDF_ht->SetMinimum(0.0);hsig_PDF_ht->GetZaxis()->SetTitleOffset(1.3);
667     hsig_PDF_ht->SetMaximum(0.20);
668     hsig_PDF_ht->SetContour(10);
669     hsig_PDF_ht->Draw("colz");
670     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
671     c1->SaveAs("results_tb3/SigPDF_HT_m0_m12_tb3.pdf");
672    
673    
674    
675 auterman 1.5 // Signal kFactor Uncertainty MHT
676     c1->SetLogz(0);
677 auterman 1.9 TH2F*hsig_kFactorUncert_mht = new TH2F("sigkFactorUncertmht",";m_{0} [GeV]; m_{1/2} [GeV]; signal NLO scale uncertainty",
678     50,0,504.9,25,100,350);
679     plotTools->Area(hsig_kFactorUncert_mht, Mzero, Mhalf, SignalUncertKfactor);
680     hsig_kFactorUncert_mht->SetMinimum(0.1);hsig_kFactorUncert_mht->GetZaxis()->SetTitleOffset(1.3);
681     hsig_kFactorUncert_mht->SetMaximum(0.2);
682     hsig_kFactorUncert_mht->SetContour(10);
683     hsig_kFactorUncert_mht->Draw("colz");
684 auterman 1.5 if (gobsexcl) gobsexcl->Draw("l");
685 auterman 1.9 c1->SaveAs("results_tb3/SigkFactorUncert_MHT_m0_m12_tb3.pdf");
686 auterman 1.5
687     // Signal kFactor Uncertainty HT
688     c1->SetLogz(0);
689 auterman 1.9 TH2F*hsig_kFactorUncert_ht = new TH2F("sigkFactorUncertht",";m_{0} [GeV]; m_{1/2} [GeV]; signal NLO scale uncertainty",
690     50,0,504.9,25,100,350);
691     plotToolsHT->Area(hsig_kFactorUncert_ht, Mzero, Mhalf, SignalUncertKfactor);
692     hsig_kFactorUncert_ht->SetMinimum(0.1);hsig_kFactorUncert_ht->GetZaxis()->SetTitleOffset(1.3);
693     hsig_kFactorUncert_ht->SetMaximum(0.2);
694     hsig_kFactorUncert_ht->SetContour(10);
695     hsig_kFactorUncert_ht->Draw("colz");
696     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
697     c1->SaveAs("results_tb3/SigkFactorUncert_HT_m0_m12_tb3.pdf");
698    
699     // Signal kFactor HT
700     c1->SetLogz(0);
701     TH2F*hsig_kFactor_ht = new TH2F("sigkFactorht",";m_{0} [GeV]; m_{1/2} [GeV]; NLO signal k-factor",
702     50,0,504.9,25,100,350);
703     plotToolsHT->Area(hsig_kFactor_ht, Mzero, Mhalf, SignalKfactor);
704     hsig_kFactor_ht->SetMinimum(1.0);hsig_kFactor_ht->GetZaxis()->SetTitleOffset(1.3);
705     hsig_kFactor_ht->SetMaximum(2.4);
706     hsig_kFactor_ht->SetContour(7);
707 auterman 1.5 hsig_kFactor_ht->Draw("colz");
708     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
709     c1->SaveAs("results_tb3/SigkFactor_HT_m0_m12_tb3.pdf");
710 auterman 1.9
711     // Signal kFactor MHT
712     c1->SetLogz(0);
713     TH2F*hsig_kFactor_mht = new TH2F("sigkFactormht",";m_{0} [GeV]; m_{1/2} [GeV]; NLO signal k-factor",
714     50,0,504.9,25,100,350);
715     plotTools->Area(hsig_kFactor_mht, Mzero, Mhalf, SignalKfactor);
716     hsig_kFactor_mht->SetMinimum(1.0);hsig_kFactor_ht->GetZaxis()->SetTitleOffset(1.3);
717     hsig_kFactor_mht->SetMaximum(2.4);
718     hsig_kFactor_mht->SetContour(7);
719     hsig_kFactor_mht->Draw("colz");
720     if (gobsexcl) gobsexcl->Draw("l");
721     c1->SaveAs("results_tb3/SigkFactor_MHT_m0_m12_tb3.pdf");
722    
723 auterman 1.1 //-----------------------------------------------------------------------------------
724     c1->SetLogz(1);
725    
726     TGraph * mz500 = plotMasses->Line( MSquarkL, MGluino, Mzero, 500, 1);
727     TGraph * mh250 = plotMasses->Line( MSquarkL, MGluino, Mhalf, 250, 1);
728    
729     // cross-section in squark - gluino mass
730     TH2F*hxsec_qg = new TH2F("xsec_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; cross section [pb]",
731 auterman 1.4 60,200,800,40,200,900);
732 auterman 1.1 plotTools->Area(hxsec_qg, MSquarkL, MGluino, Xsection);
733     hxsec_qg->SetMinimum(0.01);
734     hxsec_qg->Draw("colz");
735     mz500->Draw();
736     mh250->Draw();
737     c1->SaveAs("results_tb3/Xsection_mSql_mGl_tb3.pdf");
738    
739     // Observed Limit in squark - gluino mass
740     TH2F*hobslimit_qg = new TH2F("obslimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Limit [pb]",
741 auterman 1.4 60,200,800,40,200,900);
742 auterman 1.1 plotTools->Area(hobslimit_qg, MSquarkL, MGluino, ObsXsecLimit);
743     hobslimit_qg->SetMinimum(0.01);
744     hobslimit_qg->Draw("colz");
745     c1->SaveAs("results_tb3/ObsLimit_mSql_mGl_tb3.pdf");
746    
747     // Expected Limit in squark - gluino mass
748     TH2F*hexplimit_qg = new TH2F("explimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Limit [pb]",
749 auterman 1.4 60,200,800,40,200,900);
750 auterman 1.1 plotTools->Area(hexplimit_qg, MSquarkL, MGluino, ExpXsecLimit);
751     hexplimit_qg->SetMinimum(0.01);
752     hexplimit_qg->Draw("colz");
753     c1->SaveAs("results_tb3/ExpLimit_mSql_mGl_tb3.pdf");
754    
755     // Signal Acceptance in squark - gluino mass
756     TH2F*hsigacc_qg = new TH2F("sigacc_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; Signal Acceptance",
757 auterman 1.4 60,200,800,40,200,900);
758 auterman 1.1 plotTools->Area(hsigacc_qg, MSquarkL, MGluino, SignalAcceptance);
759     hsigacc_qg->SetMinimum(0.01);
760     hsigacc_qg->SetMaximum(1.0);
761     hsigacc_qg->Draw("colz");
762     c1->SaveAs("results_tb3/SigAcc_mSql_mGl_tb3.pdf");
763    
764     // Exp. Limit on Number of Signal Events in squark - gluino mass
765     c1->SetLogz(0);
766     TH2F*hexplimitnsig_qg = new TH2F("explimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL exp. limit signal events [# ]",
767 auterman 1.4 60,200,800,40,200,900);
768 auterman 1.1 plotTools->Area(hexplimitnsig_qg, MSquarkL, MGluino, ExpNSignLimit);
769     hexplimitnsig_qg->SetMinimum(0.0);
770     hexplimitnsig_qg->SetMaximum(20);
771     hexplimitnsig_qg->Draw("colz");
772     c1->SaveAs("results_tb3/ExpLimitOnNSig_mSql_mGl_tb3.pdf");
773    
774     // Obs. Limit on Number of Signal Events in squark - gluino mass
775     TH2F*hobslimitnsig_qg = new TH2F("obslimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL obs. limit signal events [# ]",
776 auterman 1.4 60,200,800,40,200,900);
777 auterman 1.1 plotTools->Area(hobslimitnsig_qg, MSquarkL, MGluino, ObsNSignLimit);
778     hobslimitnsig_qg->SetMinimum(0.0);
779     hobslimitnsig_qg->SetMaximum(20);
780     hobslimitnsig_qg->Draw("colz");
781     c1->SaveAs("results_tb3/ObsLimitOnNSig_mSql_mGl_tb3.pdf");
782    
783     c1->SetLogz(0);
784     // Expected Exclusion in squark - gluino mass
785     TH2F*hexpexcl_qg = new TH2F("expexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Exclusion",
786 auterman 1.4 60,200,800,40,200,900);
787 auterman 1.1 plotTools->Area(hexpexcl_qg, MSquarkL, MGluino, ExpExclCL);
788     hexpexcl_qg->Draw("colz");
789     c1->SaveAs("results_tb3/ExpExclusion_mSql_mGl_tb3.pdf");
790    
791     // Observed Exclusion in squark - gluino mass
792     TH2F*hobsexcl_qg = new TH2F("obsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
793 auterman 1.4 60,200,800,40,200,900);
794 auterman 1.1 plotTools->Area(hobsexcl_qg, MSquarkL, MGluino, ObsExclCL);
795     //std::vector<TGraph *> vobsexcl_qg = plotTools->GetContours(hobsexcl_qg);
796     hobsexcl_qg->Draw("colz");
797     //for (std::vector<TGraph *>::iterator g=vobsexcl_qg.begin();g!=vobsexcl_qg.end();++g){
798     // if (! *g) continue;
799     // // (*g)->Draw("l");
800     //}
801     c1->SaveAs("results_tb3/ObsExclusion_mSql_mGl_tb3.pdf");
802    
803     // TestContours in M0 - M1/2
804     TH2F*texcl_qg = new TH2F("texcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
805 auterman 1.4 60,200,800,40,200,900);
806 auterman 1.1 TH2F*tPLobsexcl_qg=(TH2F*)texcl_qg->Clone();
807     plotTools->Area(tPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
808     TH2F*tPLexpexcl_qg=(TH2F*)texcl_qg->Clone();
809     plotTools->Area(tPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
810     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hexpexcl_qg,3);
811     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hobsexcl_qg,3);
812     std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLobsexcl_qg,3);
813     //std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLexpexcl_qg,3);
814     //hPLexpexcl_qg
815     //hexcl_qg->Draw("colz");
816     //hexpexcl_qg->Draw("colz");
817     //hobsexcl_qg->Draw("colz");
818     tPLobsexcl_qg->Draw("colz");
819     int col_gl=kBlue-10;
820     for (std::vector<TGraph*>::iterator cont=contours_qg.begin(); cont!=contours_qg.end(); ++cont){
821     if (! *cont) continue;
822     double x, y;
823     (*cont)->GetPoint(0, x, y);
824     (*cont)->SetLineColor(col_gl);(*cont)->SetLineWidth(3);
825     (*cont)->Draw("l");
826     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col_gl++);
827     char val[20];
828     sprintf(val,"%d",(int)(cont-contours_qg.begin()));
829     l.DrawLatex(x,y,val);
830     if (cont-contours_qg.begin()>3) break;
831     }
832     c1->SaveAs("results_tb3/ExclusionTestContours_mSql_mGl_tb3.pdf");
833    
834     // Observed Exclusion in squark - gluino mass
835     TH2F*hPLobsexcl_qg = new TH2F("plobsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
836 auterman 1.4 60,200,800,40,200,900);
837 auterman 1.1 plotTools->Area(hPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
838     //hPLobsexcl_qg->Draw("colz");
839     //c1->SaveAs("results_tb3/PL_ObsExclusion_mSql_mGl_tb3.pdf");
840    
841    
842    
843     TH2F*hexcl_qg = new TH2F("hexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
844 auterman 1.4 50,200,800,30,200,900);
845 auterman 1.5 TGraph * gexpexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCL, 3,0, 2,2);
846     TGraph * gexpexcl_qg_LO = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCL, 3,0, 2,4);
847     TGraph * gobsexcl_qg = plotTools->GetContour(hexcl_qg,MSquarkL,MGluino,NLOObsExclCL, 3,0, 2,1);
848 auterman 1.4 TGraph * gMCMCexpexcl_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCExpExclusion,3,0, 3,2);
849     TGraph * gMCMCobsexcl_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,MCMCObsExclusion,3,0, 3,1);
850 auterman 1.5 TGraph * gCLsExpExclHT_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCL, 3,0, 1,2);
851     TGraph * gCLsExpExclHT_qg_LO = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,ExpExclCL, 3,0, 1,4);
852     TGraph * gCLsObsExclHT_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOObsExclCL, 3,0, 1,1);
853     TGraph * gCLsExpExclHTm1_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCLm1sigma,3,0, 5,2);
854     TGraph * gCLsExpExclHTp1_qg = plotToolsHT->GetContour(hexcl_qg,MSquarkL,MGluino,NLOExpExclCLp1sigma,3,0, 5,2);
855     Smooth(gexpexcl_qg, 11);
856     Smooth(gobsexcl_qg, 11);
857     Smooth(gCLsExpExclHT_qg, 11);
858     Smooth(gCLsObsExclHT_qg, 11);
859     Smooth(gCLsExpExclHTm1_qg, 11);
860     Smooth(gCLsExpExclHTp1_qg, 11);
861 auterman 1.4 TGraph * gCLsExp1Sigma_qg = MakeBand(gCLsExpExclHTp1_qg, gCLsExpExclHTm1_qg);
862 auterman 1.1 hexcl_qg->Draw("");
863 auterman 1.4 //
864     if (gCLsExp1Sigma_qg) gCLsExp1Sigma_qg->Draw("lf");
865     if (gobsexcl_qg) gobsexcl_qg->Draw("l");
866 auterman 1.1 if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->Draw("l");
867 auterman 1.4 if (gexpexcl_qg) gexpexcl_qg->Draw("l");
868 auterman 1.1 if (gCLsExpExclHT_qg) gCLsExpExclHT_qg->Draw("l");
869 auterman 1.5 if (gexpexcl_qg_LO) gexpexcl_qg_LO->Draw("l");
870     if (gCLsExpExclHT_qg_LO) gCLsExpExclHT_qg_LO->Draw("l");
871 auterman 1.4 //
872 auterman 1.1 TLegend * leg_qg = new TLegend(0.45,0.78,0.85,0.89);
873     leg_qg->SetBorderSize(0);leg_qg->SetFillColor(0);
874 auterman 1.5 TGraph * expLeg_qg = (TGraph*)gCLsExpExclHT_qg->Clone();expLeg_qg->SetFillStyle(gCLsExp1Sigma_qg->GetFillStyle());expLeg_qg->SetFillColor(gCLsExp1Sigma_qg->GetFillColor());
875     if (gobsexcl_qg) leg_qg->AddEntry(gobsexcl_qg,"NLO Observed (MHT, CLs)","l");
876     if (gexpexcl_qg) leg_qg->AddEntry(gexpexcl_qg,"NLO Expected (MHT, CLs)","l");
877     if (gexpexcl_qg_LO) leg_qg->AddEntry(gexpexcl_qg_LO,"LO Expected (MHT, CLs)","l");
878     if (gCLsObsExclHT_qg) leg_qg->AddEntry(gCLsObsExclHT_qg,"NLO Observed (HT, CLs)","l");
879     if (gCLsExpExclHT_qg) leg_qg->AddEntry(expLeg_qg,"NLO Expected (HT, CLs)","lf");
880     if (gCLsExpExclHT_qg_LO) leg_qg->AddEntry(gCLsExpExclHT_qg_LO,"LO Expected (HT, CLs)","l");
881 auterman 1.1 //if (gPLobsexcl_qg) leg_qg->AddEntry(gPLobsexcl_qg,"Observed (PL, RooStat)","l");
882     //if (gPLexpexcl_qg) leg_qg->AddEntry(gPLexpexcl_qg,"Expected (PL, RooStat)","l");
883     leg_qg->Draw();
884     c1->SaveAs("results_tb3/Exclusion_mSql_mGl_tb3.pdf");
885 auterman 1.4 //c1->SaveAs("plot_tb10.pdf");
886    
887    
888 auterman 1.1
889     c1->SetLogy(1);
890     c1->SetLogx(1);
891     TH2F*hUncertScan = new TH2F("hUncertScan",";relative signal uncertainty; number of signal events",
892     10,0.1,0.6,10,0.9,200);
893     //hUncertScan->GetXaxis()->SetNdivisions(505, false);
894     //hUncertScan->SetMinimum(1);
895     TGraph * gCLsExpUncert = new TGraph(0);
896     TGraph * gCLsObsUncert = new TGraph(0);
897     TGraph * gPLExpUncert = new TGraph(0);
898     TGraph * gPLObsUncert = new TGraph(0);
899     TGraph * gFCExpUncert = new TGraph(0);
900     TGraph * gFCObsUncert = new TGraph(0);
901     TGraph * gMCMCExpUncert= new TGraph(0);
902     TGraph * gMCMCObsUncert= new TGraph(0);
903     plotTools->Graph(gCLsExpUncert, SignalRelUncertainty, ExpNSignLimit,1);
904     plotTools->Graph(gCLsObsUncert, SignalRelUncertainty, ObsNSignLimit,1);
905     plotTools->Graph(gPLExpUncert, SignalRelUncertainty, PLExpNSignLimit,1);
906     plotTools->Graph(gPLObsUncert, SignalRelUncertainty, PLObsNSignLimit, 1);
907     plotTools->Graph(gFCExpUncert, SignalRelUncertainty, FCExpNSignLimit,1);
908     plotTools->Graph(gFCObsUncert, SignalRelUncertainty, FCObsNSignLimit, 1);
909     plotTools->Graph(gMCMCExpUncert,SignalRelUncertainty, MCMCExpNSignLimit,1);
910     plotTools->Graph(gMCMCObsUncert,SignalRelUncertainty, MCMCObsNSignLimit, 1);
911     gCLsExpUncert->SetLineStyle(8);
912     gPLObsUncert->SetLineColor(2);
913     gPLExpUncert->SetLineColor(2); gPLExpUncert->SetLineStyle(8);
914     gFCObsUncert->SetLineColor(3);
915     gFCExpUncert->SetLineColor(3); gFCExpUncert->SetLineStyle(8);
916     gMCMCObsUncert->SetLineColor(4);
917     gMCMCExpUncert->SetLineColor(4); gMCMCExpUncert->SetLineStyle(8);
918     hUncertScan->Draw("h");
919     gCLsExpUncert->Draw("l");
920     gCLsObsUncert->Draw("l");
921     gPLObsUncert->Draw("l");
922     gPLExpUncert->Draw("l");
923     gFCObsUncert->Draw("l");
924     gFCExpUncert->Draw("l");
925     gMCMCObsUncert->Draw("l");
926     gMCMCExpUncert->Draw("l");
927     TLatex l; l.SetTextSize(0.03); l.SetTextColor(1);
928     l.DrawLatex(0.025,25,"excluded");
929     TMarker m; m.SetMarkerStyle(29); m.SetMarkerColor(2);
930     m.DrawMarker(0.128, 28.5);l.DrawLatex(0.14,28.5,"LM1");
931     m.DrawMarker(0.147, 77.4);l.DrawLatex(0.16,77.4,"LM0");
932    
933     TLegend * leg_S = new TLegend(0.5,0.14,0.85,0.38);
934     leg_S->SetBorderSize(0);leg_S->SetFillColor(0);
935     leg_S->SetHeader("95% CL upper limits");
936     leg_S->AddEntry(gCLsExpUncert,"Expected (CLs, TLimit)","l");
937     leg_S->AddEntry(gCLsObsUncert,"Observed (CLs, TLimit)","l");
938     leg_S->AddEntry(gPLExpUncert,"Expected (PL, RooStat)","l");
939     leg_S->AddEntry(gPLObsUncert,"Observed (PL, RooStat)","l");
940     leg_S->AddEntry(gFCObsUncert,"Observed (FC, RooStat)","l");
941     leg_S->AddEntry(gFCExpUncert,"Expected (FC, RooStat)","l");
942     leg_S->AddEntry(gMCMCObsUncert,"Observed (MCMC, RooStat)","l");
943     leg_S->AddEntry(gMCMCExpUncert,"Expected (MCMC, RooStat)","l");
944     leg_S->Draw();
945     c1->SaveAs("results_tb3/UncertaintyScan.pdf");
946    
947     //theApp.Run();
948     }
949    
950    
951     int main(int argc, char** argv)
952     {
953     return plot(argc, argv);
954     }