ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/plot.cc
Revision: 1.13
Committed: Wed Feb 9 08:51:32 2011 UTC (14 years, 3 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.12: +58 -81 lines
Log Message:
adding executables for tb3 and tb50

File Contents

# User Rev Content
1 auterman 1.1 #include "plot.h"
2     #include "SusyScan.h"
3 auterman 1.2 #include "GeneratorMasses.h"
4 auterman 1.4 #include "PlotTools.h"
5 auterman 1.2 #include "TheLimits.h"
6 auterman 1.6 #include "GlobalFunctions.h"
7 auterman 1.1
8     #include "TRint.h"
9     #include "TROOT.h"
10     #include "TObjArray.h"
11     #include "TStyle.h"
12    
13     #include "TChain.h"
14     #include "TFile.h"
15 auterman 1.2 #include "TGraph.h"
16 auterman 1.1 #include "TH1.h"
17     #include "TH2.h"
18     #include "TH2F.h"
19     #include "TTree.h"
20     #include "TKey.h"
21     #include "Riostream.h"
22     #include "TCanvas.h"
23 auterman 1.8 #include "TLegend.h"
24 auterman 1.9 #include "TLatex.h"
25 auterman 1.10 #include "TMarker.h"
26 auterman 1.1
27     #include <string>
28 auterman 1.2 #include <cmath>
29 auterman 1.9 #include <stdio.h>
30 auterman 1.1
31     int plot(int argc, char** argv)
32     {
33 auterman 1.6 //interactive root session
34 auterman 1.7 //TApplication theApp("App", 0, 0);
35 auterman 1.2 if (gROOT->IsBatch()) {
36     fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]);
37     return 1;
38     }
39    
40 auterman 1.6 //Style stuff
41 auterman 1.1 gStyle->SetHistFillColor(0);
42     gStyle->SetPalette(1);
43     gStyle->SetCanvasColor(0);
44     gStyle->SetCanvasBorderMode(0);
45     gStyle->SetPadColor(0);
46     gStyle->SetPadBorderMode(0);
47     gStyle->SetFrameBorderMode(0);
48    
49     gStyle->SetTitleFillColor(0);
50     gStyle->SetTitleBorderSize(0);
51     gStyle->SetTitleX(0.10);
52     gStyle->SetTitleY(0.98);
53     gStyle->SetTitleW(0.8);
54     gStyle->SetTitleH(0.06);
55    
56     gStyle->SetErrorX(0);
57     gStyle->SetStatColor(0);
58     gStyle->SetStatBorderSize(0);
59     gStyle->SetStatX(0);
60     gStyle->SetStatY(0);
61     gStyle->SetStatW(0);
62     gStyle->SetStatH(0);
63    
64     gStyle->SetTitleFont(22);
65     gStyle->SetLabelFont(22,"X");
66     gStyle->SetLabelFont(22,"Y");
67     gStyle->SetLabelFont(22,"Z");
68     gStyle->SetLabelSize(0.03,"X");
69     gStyle->SetLabelSize(0.03,"Y");
70     gStyle->SetLabelSize(0.03,"Z");
71    
72     //gROOT->SetStyle("MyStyle");
73     TCanvas * c1 = new TCanvas("c1","c1",600,600);
74     c1->SetFillStyle ( 4000 );
75     c1->SetLeftMargin ( 0.15 );
76     c1->SetRightMargin ( 0.15 );
77     c1->SetBottomMargin( 0.10 );
78     c1->cd();
79    
80 auterman 1.6 //Get limits and generator masses ---------------------------------------------------
81 auterman 1.4 TheLimits * genpoints = new TheLimits();
82 auterman 1.11 //genpoints->Fill(argc, argv);
83     genpoints->Fill("limits_MHT/filelist.txt");
84    
85     TheLimits * genpointsHT = new TheLimits();
86     genpointsHT->Fill("limits_HT/filelist.txt");
87 auterman 1.12
88     TheLimits * genpointsHT_SC = new TheLimits();
89 auterman 1.13 genpointsHT_SC->Fill("limits_HT_SigCont/filelist.txt");
90    
91     TheLimits * genpointsMHT_SC = new TheLimits();
92     genpointsMHT_SC->Fill("limits_MHT_SigCont/filelist.txt");
93 auterman 1.11
94 auterman 1.10
95     //Replace read limits with specific numbers
96     //genpoints->OverwriteLimits("ABCD_MHT");
97    
98 auterman 1.5 genpoints->FillGeneratorMasses("tb10_mu1_a0_massscan.dat");
99     genpoints->match();
100 auterman 1.11 genpointsHT->FillGeneratorMasses("tb10_mu1_a0_massscan.dat");
101     genpointsHT->match();
102 auterman 1.12 genpointsHT_SC->FillGeneratorMasses("tb10_mu1_a0_massscan.dat");
103     genpointsHT_SC->match();
104 auterman 1.13 genpointsMHT_SC->FillGeneratorMasses("tb10_mu1_a0_massscan.dat");
105     genpointsMHT_SC->match();
106 auterman 1.2
107 auterman 1.6 //the plotting ----------------------------------------------------------------------
108 auterman 1.7 //plotting helper functions
109 auterman 1.4 PlotTools<SusyScan> * plotTools = new PlotTools<SusyScan>(genpoints->GetScan());
110 auterman 1.11 PlotTools<SusyScan> * plotToolsHT = new PlotTools<SusyScan>(genpointsHT->GetScan());
111 auterman 1.12 PlotTools<SusyScan> * plotToolsHT_SC = new PlotTools<SusyScan>(genpointsHT_SC->GetScan());
112 auterman 1.13 PlotTools<SusyScan> * plotToolsMHT_SC = new PlotTools<SusyScan>(genpointsHT_SC->GetScan());
113 auterman 1.6 PlotTools<GeneratorMasses> * plotMasses = new PlotTools<GeneratorMasses>(genpoints->GetGeneratorMasses());
114 auterman 1.2
115 auterman 1.7 //iso mass lines
116     TGraph * gl500 = plotMasses->Line(Mzero, Mhalf, MGluino, 500);
117     TGraph * sq500 = plotMasses->Line(Mzero, Mhalf, MSquarkL, 500, 10);
118     sq500->SetLineWidth(2); sq500->SetLineColor(7);
119    
120     TGraph * chi100 = plotMasses->Line(Mzero, Mhalf, MChi1, 50, 20);
121     TGraph * cha200 = plotMasses->Line(Mzero, Mhalf, MCha1, 200, 20);
122     cha200->SetLineColor(2);
123    
124     //the histograms
125     c1->SetLogz(1);
126     //h->SetMaximum(27);
127     //h->SetMinimum(0.01);
128 auterman 1.10
129     /**/
130 auterman 1.7 // cross-section in M0 - M1/2
131     TH2F*hxsec = new TH2F("xsec",";m_{0} [GeV]; m_{1/2} [GeV]; cross section [pb]",
132     100,0,1009.9,50,0,500);
133     plotTools->Area(hxsec, Mzero, Mhalf, Xsection);
134     hxsec->SetMinimum(0.01);
135     //sq500->Draw();
136     //gl500->Draw();
137     hxsec->Draw("colz");
138 auterman 1.10 c1->SaveAs("results/Xsection_m0_m12_tb10.pdf");
139 auterman 1.7 std::string wait;
140     //std::cin>>wait;
141 auterman 1.10
142 auterman 1.7 // Observed Limit in M0 - M1/2
143     TH2F*hobslimit = new TH2F("obslimit",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Limit [pb]",
144     100,0,1009.9,50,0,500);
145     plotTools->Area(hobslimit, Mzero, Mhalf, ObsXsecLimit);
146     hobslimit->SetMinimum(0.01);
147     hobslimit->Draw("colz");
148 auterman 1.10 c1->SaveAs("results/ObsLimit_m0_m12_tb10.pdf");
149 auterman 1.7
150     // Expected Limit in M0 - M1/2
151     TH2F*hexplimit = new TH2F("explimit",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Limit [pb]",
152     100,0,1009.9,50,0,500);
153     plotTools->Area(hexplimit, Mzero, Mhalf, ExpXsecLimit);
154     hexplimit->SetMinimum(0.01);
155     hexplimit->Draw("colz");
156 auterman 1.10 c1->SaveAs("results/ExpLimit_m0_m12_tb10.pdf");
157 auterman 1.7
158 auterman 1.13 // Signal Acceptance in M0 - M1/2
159 auterman 1.7 TH2F*hsigacc = new TH2F("sigacc",";m_{0} [GeV]; m_{1/2} [GeV]; Signal Acceptance",
160     100,0,1009.9,50,0,500);
161     plotTools->Area(hsigacc, Mzero, Mhalf, SignalAcceptance);
162     hsigacc->SetMinimum(0.01);
163     hsigacc->SetMaximum(1.0);
164     hsigacc->Draw("colz");
165     chi100->Draw();
166     cha200->Draw();
167     gl500 ->Draw();
168     sq500 ->Draw();
169 auterman 1.10 c1->SaveAs("results/SigAcc_m0_m12_tb10.pdf");
170 auterman 1.7
171     // Exp. Limit on Number of Signal Events in M0 - M1/2
172 auterman 1.8 c1->SetLogz(0);
173 auterman 1.7 TH2F*hexplimitnsig = new TH2F("explimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL exp. limit signal events [# ]",
174     100,0,1009.9,50,0,500);
175     plotTools->Area(hexplimitnsig, Mzero, Mhalf, ExpNSignLimit);
176 auterman 1.10 hexplimitnsig->SetMinimum(0.0);
177     hexplimitnsig->SetMaximum(20);
178 auterman 1.7 hexplimitnsig->Draw("colz");
179 auterman 1.10 c1->SaveAs("results/ExpLimitOnNSig_m0_m12_tb10.pdf");
180 auterman 1.7
181     // Obs. Limit on Number of Signal Events in M0 - M1/2
182     TH2F*hobslimitnsig = new TH2F("obslimitnsig",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL obs. limit signal events [# ]",
183 auterman 1.2 100,0,1009.9,50,0,500);
184 auterman 1.7 plotTools->Area(hobslimitnsig, Mzero, Mhalf, ObsNSignLimit);
185 auterman 1.10 hobslimitnsig->SetMinimum(0.0);
186     hobslimitnsig->SetMaximum(20);
187 auterman 1.7 hobslimitnsig->Draw("colz");
188 auterman 1.10 c1->SaveAs("results/ObsLimitOnNSig_m0_m12_tb10.pdf");
189 auterman 1.7
190     c1->SetLogz(0);
191     // Expected Exclusion in M0 - M1/2
192     TH2F*hexpexcl = new TH2F("expexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
193 auterman 1.8 100,0,1009.9,35,100,450);
194 auterman 1.11 plotTools->Area(hexpexcl, Mzero, Mhalf, ExpExclCL);
195 auterman 1.7 hexpexcl->Draw("colz");
196 auterman 1.10 c1->SaveAs("results/ExpExclusion_m0_m12_tb10.pdf");
197 auterman 1.7
198     // Observed Exclusion in M0 - M1/2
199     TH2F*hobsexcl = new TH2F("obsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
200 auterman 1.8 100,0,1009.9,35,100,450);
201 auterman 1.11 plotTools->Area(hobsexcl, Mzero, Mhalf, ObsExclCL);
202 auterman 1.7 hobsexcl->Draw("colz");
203 auterman 1.10 c1->SaveAs("results/ObsExclusion_m0_m12_tb10.pdf");
204 auterman 1.7
205 auterman 1.8 // Observed Exclusion in M0 - M1/2
206     TH2F*hPLobsexcl = new TH2F("plobsexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Observed Exclusion",
207     100,0,1009.9,35,100,450);
208     plotTools->Area(hPLobsexcl, Mzero, Mhalf, PLObsExclusion);
209     hPLobsexcl->Draw("colz");
210 auterman 1.10 c1->SaveAs("results/PL_ObsExclusion_m0_m12_tb10.pdf");
211 auterman 1.8
212 auterman 1.9 // TestContours in M0 - M1/2
213 auterman 1.10 TH2F*texcl = new TH2F("texcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
214     100,0,1009.9,35,100,450);
215 auterman 1.11 TH2F*texpexcl=(TH2F*)texcl->Clone();
216     plotTools->Area(texpexcl, Mzero, Mhalf, MCMCExpExclusion);
217     TH2F*tobsexcl=(TH2F*)texcl->Clone();
218     plotTools->Area(tobsexcl, Mzero, Mhalf, MCMCObsExclusion);
219     std::vector<TGraph*> contours = plotTools->GetContours(texpexcl,3);
220     //std::vector<TGraph*> contours = plotTools->GetContours(tobsexcl,3);
221 auterman 1.9 //hPLexpexcl
222     //hexcl->Draw("colz");
223     //hexpexcl->Draw("colz");
224     //hobsexcl->Draw("colz");
225 auterman 1.11 texpexcl->Draw("colz");
226 auterman 1.10 int col=kBlue-10;
227 auterman 1.9 for (std::vector<TGraph*>::iterator cont=contours.begin(); cont!=contours.end(); ++cont){
228     if (! *cont) continue;
229     double x, y;
230     (*cont)->GetPoint(0, x, y);
231     (*cont)->SetLineColor(col);
232     (*cont)->Draw("l");
233     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col++);
234     char val[20];
235 auterman 1.13 sprintf(val,"%d",(int)(cont-contours.begin()));
236 auterman 1.9 l.DrawLatex(x,y,val);
237 auterman 1.11 //if (cont-contours.begin()>3) break;
238 auterman 1.9 }
239 auterman 1.10 c1->SaveAs("results/ExclusionTestContours_m0_m12_tb10.pdf");
240 auterman 1.9
241 auterman 1.13
242 auterman 1.8 // Exclusion in M0 - M1/2
243     TH2F*hexcl = new TH2F("hexcl",";m_{0} [GeV]; m_{1/2} [GeV]; 95% CL Expected Exclusion",
244     100,0,1009.9,35,100,450);
245 auterman 1.13 TGraph * gexpexcl = plotTools ->GetContour(hexcl,Mzero,Mhalf,ExpExclCL, 3,0, 2,2);
246     TGraph * gobsexcl = plotTools ->GetContour(hexcl,Mzero,Mhalf,ObsExclCL, 3,0, 2,1);
247     TGraph * gMCMCexpexcl = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,MCMCExpExclusion,3,0, 3,2);
248     TGraph * gMCMCobsexcl = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,MCMCObsExclusion,3,0, 3,1);
249     TGraph * gCLsExpExclHT_SC = plotToolsHT_SC->GetContour(hexcl,Mzero,Mhalf,ExpExclCL, 3,0, 4,2);
250     TGraph * gCLsExpExclHT = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,ExpExclCL, 3,0, 1,2);
251     TGraph * gCLsObsExclHT = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,ObsExclCL, 3,0, 1,1);
252     TGraph * gCLsExpExclHTm1 = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,ExpExclCLm1sigma,3,0, 5,2);
253     TGraph * gCLsExpExclHTp1 = plotToolsHT ->GetContour(hexcl,Mzero,Mhalf,ExpExclCLp1sigma,3,0, 5,2);
254     TGraph * gCLsExp1Sigma = MakeBand(gCLsExpExclHTp1, gCLsExpExclHTm1);
255     hexcl->Draw("colz");
256     if (gCLsExp1Sigma) gCLsExp1Sigma->Draw("lf");
257     if (gexpexcl) gexpexcl->Draw("l");
258     if (gCLsExpExclHT_SC) gCLsExpExclHT_SC->Draw("l");
259     if (gCLsExpExclHT) gCLsExpExclHT->Draw("l");
260     if (gMCMCexpexcl) gMCMCexpexcl->Draw("l");
261     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
262     //if (gobsexcl) gobsexcl->Draw("l");
263     //if (gPLobsexcl) gPLobsexcl->Draw("l");
264     //if (gFCobsexcl) gFCobsexcl->Draw("l");
265     //if (gMCMCobsexcl) gMCMCobsexcl->Draw("l");
266     //if (gFCexpexcl) gFCexpexcl->Draw("l");
267     //if (gPLexpexcl) gPLexpexcl->Draw("l");
268     //if (gFCexpexcl) gFCexpexcl->Draw("l");
269 auterman 1.10 //set old exclusion Limits
270     TGraph* LEP_ch = set_lep_ch();
271     TGraph* LEP_sl = set_lep_sl();//slepton curve
272     TGraph* TEV_sg_cdf = set_tev_sg_cdf();//squark gluino cdf
273     TGraph* TEV_sg_d0 = set_tev_sg_d0();//squark gluino d0
274     TGraph* TEV_tlp_cdf = set_tev_tlp_cdf();//trilepton cdf
275     TGraph* TEV_tlp_d0 = set_tev_tlp_d0();//trilepton d0
276     TGraph* stau = set_tev_stau();//stau
277     TGraph* TEV_sn_d0_1 = set_sneutrino_d0_1();
278     TGraph* TEV_sn_d0_2 = set_sneutrino_d0_2();
279     TGraphErrors* First = getObserved_NLOunc();
280     TGraphErrors* Second = getExpected_NLOunc();//getLO_jetMultis();
281     TGraphErrors* Third = getLO_signalCont();
282     First->GetXaxis()->SetRangeUser(0,505);
283     First->GetYaxis()->SetRangeUser(80,500);
284     First->GetXaxis()->SetTitle("m_{0} (GeV)");
285     First->GetYaxis()->SetTitle("m_{1/2} (GeV)");
286     TSpline3 *sFirst = new TSpline3("sFirst",First);
287     sFirst->SetLineColor(kBlue);
288     sFirst->SetLineWidth(3);
289     TSpline3 *sSecond = new TSpline3("sSecond",Second);
290     sSecond->SetLineColor(kBlue);
291     sSecond->SetLineStyle(2);
292     sSecond->SetLineWidth(3);
293     TSpline3 *sThird = new TSpline3("sThird",Third);
294     sThird->SetLineColor(kGreen+2);
295     sThird->SetLineStyle(4);
296     sThird->SetLineWidth(3);
297     TEV_sn_d0_1->Draw("fsame");
298     TEV_sn_d0_2->Draw("fsame");
299     TEV_sg_d0->Draw("fsame");
300     TEV_sg_cdf->Draw("fsame");
301     LEP_ch->Draw("fsame");
302     LEP_sl->Draw("fsame");
303     stau->Draw("fsame");
304     sFirst->Draw("same");
305     sSecond->Draw("same");
306     TLatex b; b.SetTextSize(0.02); b.SetTextColor(1);
307     b.DrawLatex( 10,420,"#tilde{#tau} LSP");
308     b.DrawLatex( 6,150,"LEP2");
309     b.DrawLatex( 22,138,"#tilde{l}^{#pm}");
310     b.DrawLatex(360,110,"LEP2 #tilde{#chi}^{#pm}");
311     b.DrawLatex(100,140,"CDF");
312     b.DrawLatex(248,129,"D0 #tilde{g}, #tilde{q}");
313     b.DrawLatex( 80,180,"D0 #tilde{#nu}");
314     TLegend * leg = new TLegend(0.45,0.7,0.85,0.89);
315 auterman 1.8 leg->SetBorderSize(0);leg->SetFillColor(0);
316 auterman 1.12 //if (gobsexcl) leg->AddEntry(gobsexcl,"Observed (MHT, CLs, TLimit)","l");
317     if (gexpexcl) leg->AddEntry(gexpexcl,"LO Expected (MHT, CLs, TLimit)","l");
318     if (gCLsObsExclHT) leg->AddEntry(gCLsObsExclHT,"LO Observed (HT, CLs, TLimit)","l");
319     if (gCLsExpExclHT) leg->AddEntry(gCLsExpExclHT,"LO Expected (HT, CLs, TLimit)","l");
320     if (gCLsExpExclHT_SC) leg->AddEntry(gCLsExpExclHT_SC,"LO Expected (HT, CLs, sig cont)","l");
321 auterman 1.11 //if (gPLobsexcl) leg->AddEntry(gPLobsexcl,"Observed (PL, RooStat)","l");
322     //if (gPLexpexcl) leg->AddEntry(gPLexpexcl,"Expected (PL, RooStat)","l");
323 auterman 1.10 //if (gFCobsexcl) leg->AddEntry(gFCobsexcl,"Observed (FC, RooStat)","l");
324     //if (gFCexpexcl) leg->AddEntry(gFCexpexcl,"Expected (FC, RooStat)","l");
325 auterman 1.12 //if (gMCMCobsexcl) leg->AddEntry(gMCMCobsexcl,"Observed (MHT, MCMC, RooStat)","l");
326     if (gMCMCexpexcl) leg->AddEntry(gMCMCexpexcl,"LO Expected (HT, MCMC, RooStat)","l");
327 auterman 1.10 if (sFirst) leg->AddEntry(sFirst, "RA1 NLO Observed");
328     if (sSecond) leg->AddEntry(sSecond,"RA1 NLO Expected");
329 auterman 1.8 leg->Draw();
330 auterman 1.10 gPad->RedrawAxis();
331 auterman 1.13 c1->SaveAs("results/Exclusion_m0_m12_tb10.pdf");
332 auterman 1.8
333 auterman 1.13 // Signal Contamination in M0 - M1/2
334     c1->SetLogz(0);
335     TH2F*hsigcont = new TH2F("sigcont",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
336     100,0,1009.9,50,0,500);
337     plotToolsHT_SC->Area(hsigcont, Mzero, Mhalf, SignalContamination);
338     hsigcont->SetMinimum(0.01);
339     hsigcont->SetMaximum(20);
340     hsigcont->Draw("colz");
341     if (gCLsObsExclHT) gCLsObsExclHT->Draw("l");
342     c1->SaveAs("results/SignalContamination_HT_m0_m12_tb10.pdf");
343    
344     // Signal Contamination in M0 - M1/2
345     c1->SetLogz(0);
346     TH2F*hsigcontMHT = new TH2F("sigcontMHT",";m_{0} [GeV]; m_{1/2}; number of signal in bkg yield [events]",
347     100,0,1009.9,50,0,500);
348     plotToolsMHT_SC->Area(hsigcontMHT, Mzero, Mhalf, SignalContamination);
349     hsigcontMHT->SetMinimum(0.01);
350     hsigcontMHT->SetMaximum(20);
351     hsigcontMHT->Draw("colz");
352     if (gobsexcl) gobsexcl->Draw("l");
353     c1->SaveAs("results/SignalContamination_MHT_m0_m12_tb10.pdf");
354    
355 auterman 1.1
356 auterman 1.2
357 auterman 1.7 //-----------------------------------------------------------------------------------
358     c1->SetLogz(1);
359    
360     TGraph * mz500 = plotMasses->Line( MSquarkL, MGluino, Mzero, 500, 1);
361     TGraph * mh250 = plotMasses->Line( MSquarkL, MGluino, Mhalf, 250, 1);
362    
363 auterman 1.8 // cross-section in squark - gluino mass
364 auterman 1.7 TH2F*hxsec_qg = new TH2F("xsec_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; cross section [pb]",
365     60,200,1400,50,200,1200);
366     plotTools->Area(hxsec_qg, MSquarkL, MGluino, Xsection);
367     hxsec_qg->SetMinimum(0.01);
368     hxsec_qg->Draw("colz");
369     mz500->Draw();
370     mh250->Draw();
371 auterman 1.10 c1->SaveAs("results/Xsection_mSql_mGl_tb10.pdf");
372 auterman 1.7
373 auterman 1.8 // Observed Limit in squark - gluino mass
374 auterman 1.7 TH2F*hobslimit_qg = new TH2F("obslimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Limit [pb]",
375     60,200,1400,50,200,1200);
376     plotTools->Area(hobslimit_qg, MSquarkL, MGluino, ObsXsecLimit);
377     hobslimit_qg->SetMinimum(0.01);
378     hobslimit_qg->Draw("colz");
379 auterman 1.10 c1->SaveAs("results/ObsLimit_mSql_mGl_tb10.pdf");
380 auterman 1.7
381 auterman 1.8 // Expected Limit in squark - gluino mass
382 auterman 1.7 TH2F*hexplimit_qg = new TH2F("explimit_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Limit [pb]",
383     60,200,1400,50,200,1200);
384     plotTools->Area(hexplimit_qg, MSquarkL, MGluino, ExpXsecLimit);
385     hexplimit_qg->SetMinimum(0.01);
386     hexplimit_qg->Draw("colz");
387 auterman 1.10 c1->SaveAs("results/ExpLimit_mSql_mGl_tb10.pdf");
388 auterman 1.7
389 auterman 1.8 // Signal Acceptance in squark - gluino mass
390 auterman 1.7 TH2F*hsigacc_qg = new TH2F("sigacc_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; Signal Acceptance",
391     60,200,1400,50,200,1200);
392     plotTools->Area(hsigacc_qg, MSquarkL, MGluino, SignalAcceptance);
393     hsigacc_qg->SetMinimum(0.01);
394     hsigacc_qg->SetMaximum(1.0);
395     hsigacc_qg->Draw("colz");
396 auterman 1.10 c1->SaveAs("results/SigAcc_mSql_mGl_tb10.pdf");
397 auterman 1.7
398 auterman 1.8 // Exp. Limit on Number of Signal Events in squark - gluino mass
399     c1->SetLogz(0);
400 auterman 1.7 TH2F*hexplimitnsig_qg = new TH2F("explimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL exp. limit signal events [# ]",
401     60,200,1400,50,200,1200);
402     plotTools->Area(hexplimitnsig_qg, MSquarkL, MGluino, ExpNSignLimit);
403 auterman 1.10 hexplimitnsig_qg->SetMinimum(0.0);
404     hexplimitnsig_qg->SetMaximum(20);
405 auterman 1.7 hexplimitnsig_qg->Draw("colz");
406 auterman 1.10 c1->SaveAs("results/ExpLimitOnNSig_mSql_mGl_tb10.pdf");
407 auterman 1.6
408 auterman 1.8 // Obs. Limit on Number of Signal Events in squark - gluino mass
409 auterman 1.7 TH2F*hobslimitnsig_qg = new TH2F("obslimitnsig_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL obs. limit signal events [# ]",
410     60,200,1400,50,200,1200);
411     plotTools->Area(hobslimitnsig_qg, MSquarkL, MGluino, ObsNSignLimit);
412 auterman 1.10 hobslimitnsig_qg->SetMinimum(0.0);
413     hobslimitnsig_qg->SetMaximum(20);
414 auterman 1.7 hobslimitnsig_qg->Draw("colz");
415 auterman 1.10 c1->SaveAs("results/ObsLimitOnNSig_mSql_mGl_tb10.pdf");
416 auterman 1.7
417     c1->SetLogz(0);
418 auterman 1.8 // Expected Exclusion in squark - gluino mass
419 auterman 1.7 TH2F*hexpexcl_qg = new TH2F("expexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Expected Exclusion",
420 auterman 1.2 60,200,1400,50,200,1200);
421 auterman 1.11 plotTools->Area(hexpexcl_qg, MSquarkL, MGluino, ExpExclCL);
422 auterman 1.7 hexpexcl_qg->Draw("colz");
423 auterman 1.10 c1->SaveAs("results/ExpExclusion_mSql_mGl_tb10.pdf");
424 auterman 1.2
425 auterman 1.8 // Observed Exclusion in squark - gluino mass
426 auterman 1.7 TH2F*hobsexcl_qg = new TH2F("obsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
427     60,200,1400,50,200,1200);
428 auterman 1.11 plotTools->Area(hobsexcl_qg, MSquarkL, MGluino, ObsExclCL);
429 auterman 1.8 //std::vector<TGraph *> vobsexcl_qg = plotTools->GetContours(hobsexcl_qg);
430 auterman 1.7 hobsexcl_qg->Draw("colz");
431 auterman 1.8 //for (std::vector<TGraph *>::iterator g=vobsexcl_qg.begin();g!=vobsexcl_qg.end();++g){
432     // if (! *g) continue;
433     // // (*g)->Draw("l");
434     //}
435 auterman 1.10 c1->SaveAs("results/ObsExclusion_mSql_mGl_tb10.pdf");
436 auterman 1.2
437 auterman 1.9 // TestContours in M0 - M1/2
438     TH2F*texcl_qg = new TH2F("texcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
439     60,200,1400,50,200,1200);
440     TH2F*tPLobsexcl_qg=(TH2F*)texcl_qg->Clone();
441     plotTools->Area(tPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
442 auterman 1.10 TH2F*tPLexpexcl_qg=(TH2F*)texcl_qg->Clone();
443     plotTools->Area(tPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
444 auterman 1.9 //std::vector<TGraph*> contours_qg = plotTools->GetContours(hexpexcl_qg,3);
445     //std::vector<TGraph*> contours_qg = plotTools->GetContours(hobsexcl_qg,3);
446     std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLobsexcl_qg,3);
447 auterman 1.10 //std::vector<TGraph*> contours_qg = plotTools->GetContours(tPLexpexcl_qg,3);
448 auterman 1.9 //hPLexpexcl_qg
449     //hexcl_qg->Draw("colz");
450     //hexpexcl_qg->Draw("colz");
451     //hobsexcl_qg->Draw("colz");
452     tPLobsexcl_qg->Draw("colz");
453     int col_gl=kBlue-10;
454     for (std::vector<TGraph*>::iterator cont=contours_qg.begin(); cont!=contours_qg.end(); ++cont){
455     if (! *cont) continue;
456     double x, y;
457     (*cont)->GetPoint(0, x, y);
458     (*cont)->SetLineColor(col_gl);(*cont)->SetLineWidth(3);
459     (*cont)->Draw("l");
460     TLatex l; l.SetTextSize(0.04); l.SetTextColor(col_gl++);
461     char val[20];
462 auterman 1.13 sprintf(val,"%d",(int)(cont-contours_qg.begin()));
463 auterman 1.9 l.DrawLatex(x,y,val);
464 auterman 1.10 if (cont-contours_qg.begin()>3) break;
465 auterman 1.9 }
466 auterman 1.10 c1->SaveAs("results/ExclusionTestContours_mSql_mGl_tb10.pdf");
467 auterman 1.9
468 auterman 1.8 // Observed Exclusion in squark - gluino mass
469     TH2F*hPLobsexcl_qg = new TH2F("plobsexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
470     60,200,1400,50,200,1200);
471     plotTools->Area(hPLobsexcl_qg, MSquarkL, MGluino, PLObsExclusion);
472 auterman 1.10 //hPLobsexcl_qg->Draw("colz");
473     //c1->SaveAs("results/PL_ObsExclusion_mSql_mGl_tb10.pdf");
474 auterman 1.8
475 auterman 1.11
476    
477    
478    
479 auterman 1.10 // Exclusion in squark - gluino mass ----------------------------------------
480 auterman 1.8 TH2F*hexcl_qg = new TH2F("hexcl_qg",";m_{#tilde{q}} [GeV]; m_{#tilde{g}} [GeV]; 95% CL Observed Exclusion",
481     60,200,1400,50,200,1200);
482 auterman 1.10 TGraph * gexpexcl_qg = plotTools->GetContour(hexpexcl_qg,3,0);
483 auterman 1.8 if (gexpexcl_qg) gexpexcl_qg->SetLineStyle(2);
484 auterman 1.10 TGraph * gobsexcl_qg = plotTools->GetContour(hobsexcl_qg,3,0);
485 auterman 1.8 TH2F*hPLexpexcl_qg=(TH2F*)hexcl_qg->Clone();
486 auterman 1.10 plotTools->Area(hPLexpexcl_qg, MSquarkL, MGluino, PLExpExclusion);
487     TGraph * gPLexpexcl_qg = plotTools->GetContour(hPLexpexcl_qg,3,0);
488     if (gPLexpexcl_qg) {gPLexpexcl_qg->SetLineStyle(2);gPLexpexcl_qg->SetLineColor(2);}
489     TGraph * gPLobsexcl_qg = plotTools->GetContour(hPLobsexcl_qg,3,0);
490     if (gPLobsexcl_qg) gPLobsexcl_qg->SetLineColor(2);
491 auterman 1.11 TH2F*hCLsExpHT_qg=(TH2F*)hexcl_qg->Clone();
492     TH2F*hCLsObsHT_qg=(TH2F*)hexcl_qg->Clone();
493     plotToolsHT->Area(hCLsExpHT_qg, MSquarkL, MGluino, ExpExclCL);
494     plotToolsHT->Area(hCLsObsHT_qg, MSquarkL, MGluino, ObsExclCL);
495     TGraph * gCLsExpExclHT_qg = plotTools->GetContour(hCLsExpHT_qg,3,0);
496     TGraph * gCLsObsExclHT_qg = plotTools->GetContour(hCLsObsHT_qg,3,0);
497     if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->SetLineColor(2);
498     if (gCLsExpExclHT_qg) {gCLsExpExclHT_qg->SetLineStyle(2);gCLsExpExclHT_qg->SetLineColor(2);}
499 auterman 1.10 hexcl_qg->Draw("");
500 auterman 1.9 if (gobsexcl_qg) gobsexcl_qg->Draw("l");
501 auterman 1.11 if (gCLsObsExclHT_qg) gCLsObsExclHT_qg->Draw("l");
502 auterman 1.9 if (gexpexcl_qg) gexpexcl_qg->Draw("l");
503 auterman 1.11 //if (gPLobsexcl_qg) gPLobsexcl_qg->Draw("l");
504     //if (gPLexpexcl_qg) gPLexpexcl_qg->Draw("l");
505     if (gCLsExpExclHT_qg) gCLsExpExclHT_qg->Draw("l");
506 auterman 1.8 TLegend * leg_qg = new TLegend(0.45,0.78,0.85,0.89);
507     leg_qg->SetBorderSize(0);leg_qg->SetFillColor(0);
508 auterman 1.11 if (gobsexcl_qg) leg_qg->AddEntry(gobsexcl_qg,"Observed (MHT, CLs, TLimit)","l");
509     if (gexpexcl_qg) leg_qg->AddEntry(gexpexcl_qg,"Expected (MHT, CLs, TLimit)","l");
510     if (gCLsObsExclHT_qg) leg_qg->AddEntry(gCLsObsExclHT_qg,"Observed (HT, CLs, TLimit)","l");
511     if (gCLsExpExclHT_qg) leg_qg->AddEntry(gCLsExpExclHT_qg,"Expected (HT, CLs, TLimit)","l");
512     //if (gPLobsexcl_qg) leg_qg->AddEntry(gPLobsexcl_qg,"Observed (PL, RooStat)","l");
513     //if (gPLexpexcl_qg) leg_qg->AddEntry(gPLexpexcl_qg,"Expected (PL, RooStat)","l");
514 auterman 1.8 leg_qg->Draw();
515 auterman 1.10 c1->SaveAs("results/Exclusion_mSql_mGl_tb10.pdf");
516 auterman 1.1
517 auterman 1.10 //c1->SaveAs("plot_tb10.pdf");
518 auterman 1.2
519 auterman 1.10 c1->SetLogy(1);
520     c1->SetLogx(1);
521     TH2F*hUncertScan = new TH2F("hUncertScan",";relative signal uncertainty; number of signal events",
522     10,0.1,0.6,10,0.9,200);
523     //hUncertScan->GetXaxis()->SetNdivisions(505, false);
524     //hUncertScan->SetMinimum(1);
525     TGraph * gCLsExpUncert = new TGraph(0);
526     TGraph * gCLsObsUncert = new TGraph(0);
527     TGraph * gPLExpUncert = new TGraph(0);
528     TGraph * gPLObsUncert = new TGraph(0);
529     TGraph * gFCExpUncert = new TGraph(0);
530     TGraph * gFCObsUncert = new TGraph(0);
531     TGraph * gMCMCExpUncert= new TGraph(0);
532     TGraph * gMCMCObsUncert= new TGraph(0);
533     plotTools->Graph(gCLsExpUncert, SignalRelUncertainty, ExpNSignLimit,1);
534     plotTools->Graph(gCLsObsUncert, SignalRelUncertainty, ObsNSignLimit,1);
535     plotTools->Graph(gPLExpUncert, SignalRelUncertainty, PLExpNSignLimit,1);
536     plotTools->Graph(gPLObsUncert, SignalRelUncertainty, PLObsNSignLimit, 1);
537     plotTools->Graph(gFCExpUncert, SignalRelUncertainty, FCExpNSignLimit,1);
538     plotTools->Graph(gFCObsUncert, SignalRelUncertainty, FCObsNSignLimit, 1);
539     plotTools->Graph(gMCMCExpUncert,SignalRelUncertainty, MCMCExpNSignLimit,1);
540     plotTools->Graph(gMCMCObsUncert,SignalRelUncertainty, MCMCObsNSignLimit, 1);
541     gCLsExpUncert->SetLineStyle(8);
542     gPLObsUncert->SetLineColor(2);
543     gPLExpUncert->SetLineColor(2); gPLExpUncert->SetLineStyle(8);
544     gFCObsUncert->SetLineColor(3);
545     gFCExpUncert->SetLineColor(3); gFCExpUncert->SetLineStyle(8);
546     gMCMCObsUncert->SetLineColor(4);
547     gMCMCExpUncert->SetLineColor(4); gMCMCExpUncert->SetLineStyle(8);
548     hUncertScan->Draw("h");
549     gCLsExpUncert->Draw("l");
550     gCLsObsUncert->Draw("l");
551     gPLObsUncert->Draw("l");
552     gPLExpUncert->Draw("l");
553 auterman 1.11 gFCObsUncert->Draw("l");
554     gFCExpUncert->Draw("l");
555     gMCMCObsUncert->Draw("l");
556     gMCMCExpUncert->Draw("l");
557 auterman 1.10 TLatex l; l.SetTextSize(0.03); l.SetTextColor(1);
558     l.DrawLatex(0.025,25,"excluded");
559     TMarker m; m.SetMarkerStyle(29); m.SetMarkerColor(2);
560     m.DrawMarker(0.128, 28.5);l.DrawLatex(0.14,28.5,"LM1");
561     m.DrawMarker(0.147, 77.4);l.DrawLatex(0.16,77.4,"LM0");
562    
563     TLegend * leg_S = new TLegend(0.5,0.14,0.85,0.38);
564     leg_S->SetBorderSize(0);leg_S->SetFillColor(0);
565     leg_S->SetHeader("95% CL upper limits");
566     leg_S->AddEntry(gCLsExpUncert,"Expected (CLs, TLimit)","l");
567     leg_S->AddEntry(gCLsObsUncert,"Observed (CLs, TLimit)","l");
568     leg_S->AddEntry(gPLExpUncert,"Expected (PL, RooStat)","l");
569     leg_S->AddEntry(gPLObsUncert,"Observed (PL, RooStat)","l");
570 auterman 1.11 leg_S->AddEntry(gFCObsUncert,"Observed (FC, RooStat)","l");
571     leg_S->AddEntry(gFCExpUncert,"Expected (FC, RooStat)","l");
572     leg_S->AddEntry(gMCMCObsUncert,"Observed (MCMC, RooStat)","l");
573     leg_S->AddEntry(gMCMCExpUncert,"Expected (MCMC, RooStat)","l");
574 auterman 1.10 leg_S->Draw();
575     c1->SaveAs("results/UncertaintyScan.pdf");
576 auterman 1.2
577 auterman 1.7 //theApp.Run();
578 auterman 1.1 }
579    
580    
581     int main(int argc, char** argv)
582     {
583     return plot(argc, argv);
584     }