ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/PlotScript/GlobalFunctions.h
Revision: 1.6
Committed: Sat Jan 29 11:00:19 2011 UTC (14 years, 3 months ago) by auterman
Content type: text/plain
Branch: MAIN
Changes since 1.5: +2 -0 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 auterman 1.1 #include "SusyScan.h"
2     #include "GeneratorMasses.h"
3    
4 auterman 1.5 #include "TGraph.h"
5     #include "TGraphErrors.h"
6     #include "TSpline.h"
7    
8 auterman 1.1 #include <cmath>
9    
10    
11 auterman 1.3 double Luminosity = 36.3; //[pb^-1]
12 auterman 1.1 double Mzero(const SusyScan* p){ return p->Mzero; }
13     double Mhalf(const SusyScan* p){ return p->Mhalf; }
14     double MGluino(const SusyScan* p){ return p->MGL; }
15     double MSquarkL(const SusyScan* p){ return p->MUL; }
16     double MSquarkR(const SusyScan* p){ return p->MUR; }
17     double MChi1(const SusyScan* p){ return p->MZ1; }
18     double MChi2(const SusyScan* p){ return p->MZ2; }
19     double MChi3(const SusyScan* p){ return p->MZ3; }
20     double MChi4(const SusyScan* p){ return p->MZ4; }
21     double MCha1(const SusyScan* p){ return p->MW1; }
22     double MCha2(const SusyScan* p){ return p->MW2; }
23     double Xsection(const SusyScan* p){ return p->Xsection; }
24     double ExpXsecLimit(const SusyScan* p){ return p->ExpXsecLimit; }
25     double ObsXsecLimit(const SusyScan* p){ return p->ObsXsecLimit; }
26 auterman 1.5 double Signal(const SusyScan* p){ return p->signal; }
27     double SignalUncertainty(const SusyScan* p){ return p->signal_uncertainty; }
28     double SignalRelUncertainty(const SusyScan* p){ return p->signal_uncertainty/p->signal; }
29 auterman 1.4 double ExpExclusion(const SusyScan* p){ return (ExpXsecLimit(p)<Xsection(p)&&ExpXsecLimit(p)>0.01?1:0.01); }
30     double ObsExclusion(const SusyScan* p){ return (ObsXsecLimit(p)<Xsection(p)&&ObsXsecLimit(p)>0.01?1:0.01); }
31 auterman 1.6 double ExpExclCL(const SusyScan* p){ return (p->CLs_b_xsec<=0.05 ? 1:0.01); }
32     double ObsExclCL(const SusyScan* p){ return (p->CLs_xsec<=0.05 ? 1:0.01); }
33 auterman 1.1 double SoverSqrtB(const SusyScan* p){ return p->signal/(sqrt(p->background)+p->background_uncertainty+p->signal_uncertainty); }
34     double XsecOverObserved(const SusyScan* p){ return (ObsXsecLimit(p)==0 ? 9999. : Xsection(p)/ObsXsecLimit(p)); }
35 auterman 1.3 double XsecOverExpected(const SusyScan* p){ return (ExpXsecLimit(p)==0 ? 9999. : Xsection(p)/ExpXsecLimit(p)); }
36 auterman 1.1 double SignalAcceptance(const SusyScan* p){ return p->signal / (Luminosity*Xsection(p)); }
37 auterman 1.5 double ExpNSignLimit(const SusyScan* p){ return p->ExpNsigLimit; }
38     double ObsNSignLimit(const SusyScan* p){ return p->ObsNsigLimit; }
39 auterman 1.3 double PLExpNSignLimit(const SusyScan* p){ return p->PLExpNsigLimit; }
40 auterman 1.5 double PLObsNSignLimit(const SusyScan* p){ return p->PLObsNsigLimit; }
41 auterman 1.3 double PLExpXsecLimit(const SusyScan* p){ return p->PLExpXsecLimit; }
42     double PLObsXsecLimit(const SusyScan* p){ return p->PLObsXsecLimit; }
43 auterman 1.4 double PLExpExclusion(const SusyScan* p){ return (PLExpXsecLimit(p)<Xsection(p)&&PLExpXsecLimit(p)>0.01?1:0.01); }
44     double PLObsExclusion(const SusyScan* p){ return (PLObsXsecLimit(p)<Xsection(p)&&PLObsXsecLimit(p)>0.01?1:0.01); }
45 auterman 1.5 double FCExpNSignLimit(const SusyScan* p){ return p->FCExpNsigLimit; }
46     double FCObsNSignLimit(const SusyScan* p){ return p->FCObsNsigLimit; }
47     double FCExpXsecLimit(const SusyScan* p){ return p->FCExpXsecLimit; }
48     double FCObsXsecLimit(const SusyScan* p){ return p->FCObsXsecLimit; }
49     double FCExpExclusion(const SusyScan* p){ return (FCExpXsecLimit(p)<Xsection(p)&&FCExpXsecLimit(p)>0.01?1:0.01); }
50     double FCObsExclusion(const SusyScan* p){ return (FCObsXsecLimit(p)<Xsection(p)&&FCObsXsecLimit(p)>0.01?1:0.01); }
51     double MCMCExpNSignLimit(const SusyScan* p){ return p->MCMCExpNsigLimit; }
52     double MCMCObsNSignLimit(const SusyScan* p){ return p->MCMCObsNsigLimit; }
53     double MCMCExpXsecLimit(const SusyScan* p){ return p->MCMCExpXsecLimit; }
54     double MCMCObsXsecLimit(const SusyScan* p){ return p->MCMCObsXsecLimit; }
55     double MCMCExpExclusion(const SusyScan* p){ return (MCMCExpXsecLimit(p)<Xsection(p)&&MCMCExpXsecLimit(p)>0.01?1:0.01); }
56     double MCMCObsExclusion(const SusyScan* p){ return (MCMCObsXsecLimit(p)<Xsection(p)&&MCMCObsXsecLimit(p)>0.01?1:0.01); }
57 auterman 1.1
58     double Mzero(const GeneratorMasses* p){ return p->Mzero; }
59     double Mhalf(const GeneratorMasses* p){ return p->Mhalf; }
60     double MGluino(const GeneratorMasses* p){ return p->MGL; }
61     double MSquarkL(const GeneratorMasses* p){ return p->MUL; }
62     double MSquarkR(const GeneratorMasses* p){ return p->MUR; }
63     double MChi1(const GeneratorMasses* p){ return p->MZ1; }
64     double MChi2(const GeneratorMasses* p){ return p->MZ2; }
65     double MChi3(const GeneratorMasses* p){ return p->MZ3; }
66     double MChi4(const GeneratorMasses* p){ return p->MZ4; }
67     double MCha1(const GeneratorMasses* p){ return p->MW1; }
68     double MCha2(const GeneratorMasses* p){ return p->MW2; }
69 auterman 1.5
70    
71     //RA1 Contours
72     TGraph* set_sneutrino_d0_1(){
73     double sn_m0[9]={0,0,55,90,100,110,100,55,0};
74     double sn_m12[9]={0,140,220,240,240,230,210,150,0};
75    
76     TGraph* sn_d0_gr = new TGraph(9,sn_m0,sn_m12);
77    
78     sn_d0_gr->SetFillColor(kGreen+3);
79     sn_d0_gr->SetFillStyle(1001);
80    
81    
82     return sn_d0_gr;
83     }
84    
85     TGraph* set_sneutrino_d0_2(){
86     double sn_m0[5]={0,50,105,190,0};
87     double sn_m12[5]={0,140,205,140,0};
88    
89     TGraph* sn_d0_gr_2 = new TGraph(5,sn_m0,sn_m12);
90    
91     sn_d0_gr_2->SetFillColor(kGreen+3);
92     sn_d0_gr_2->SetFillStyle(1001);
93    
94    
95     return sn_d0_gr_2;
96     }
97    
98    
99    
100     TGraph* set_lep_ch(){
101    
102     double ch_m0[5];
103     double ch_m12[5];
104    
105    
106     ch_m0[0] = 0;
107     ch_m0[1] = 0;
108     ch_m0[2] = 600;
109     ch_m0[3] = 1000;
110     ch_m0[4] = 1000;
111    
112     ch_m12[0] = 0;
113     ch_m12[1] = 130;
114     ch_m12[2] = 120;
115     ch_m12[3] = 113;
116     ch_m12[4] = 0;
117    
118    
119     TGraph* ch_gr = new TGraph(5,ch_m0,ch_m12);
120    
121     ch_gr->SetFillColor(3);
122     ch_gr->SetFillStyle(1001);
123    
124     return ch_gr;
125    
126     }
127    
128    
129     TGraph* set_lep_sl(){
130    
131    
132    
133     double sl_m0[] = {0,0,30,50,60,75,80,90,100};
134     double sl_m12[] = {0,245,240,220,200,150,100,50,0};
135    
136     TGraph* lep_sl = new TGraph(9,sl_m0,sl_m12);
137    
138     lep_sl->SetFillColor(5);
139     lep_sl->SetFillStyle(1001);
140    
141     return lep_sl;
142     }
143    
144     TGraph* set_tev_sg_cdf(){
145    
146     double sg_m0[] = {0,50,100,150,200,250,300,350,400,450,500,550,600,600};
147     double sg_m12[] = {0,170,160,155,150,122,116,112,110,106,105,100,98,0};
148     TGraph* sg_gr = new TGraph(14,sg_m0,sg_m12);
149    
150     sg_gr->SetFillColor(2);
151     sg_gr->SetFillStyle(1001);
152    
153     return sg_gr;
154    
155     }
156    
157     TGraph* set_tev_sg_d0(){
158     double sgd_m0[] = {0,50,100,150,200,250,300,350,400,450,500,550,600,600};
159     double sgd_m12[] = {0,173,170,168,160,150,140,130,125,120,120,120,120,0};
160     TGraph* sgd_gr = new TGraph(14,sgd_m0,sgd_m12);
161    
162     sgd_gr->SetFillColor(41);
163     sgd_gr->SetFillStyle(1001);
164    
165     return sgd_gr;
166    
167     }
168    
169     TGraph* set_tev_tlp_cdf(){
170     double tlp1_m0[] = {0,20,40,60,70,80,90,80,70,60};
171     double tlp1_m12[] = {170,185,200,215,220,215,210,190,175,160};
172     TGraph* tlp1_gr = new TGraph(10,tlp1_m0,tlp1_m12);
173    
174     tlp1_gr->SetFillColor(4);
175     tlp1_gr->SetFillStyle(1001);
176    
177     return tlp1_gr;
178     }
179    
180     TGraph* set_tev_tlp_d0(){
181     double tlp2_m0[] = {70,80,90,100,105,110,120,130,140};
182     double tlp2_m12[] = {160,172,184,196,205,195,185,173,160};
183     TGraph* tlp2_gr = new TGraph(9,tlp2_m0,tlp2_m12);
184    
185     tlp2_gr->SetFillColor(4);
186     tlp2_gr->SetFillStyle(1001);
187    
188     return tlp2_gr;
189    
190     }
191    
192     TGraph* set_tev_stau(){
193     double st_m0[] = {0,30,200,0,0};
194     double st_m12[] = {230,240,1000,1000,230};
195     TGraph* st_gr = new TGraph(5,st_m0,st_m12);
196    
197     st_gr->SetFillColor(40);
198     st_gr->SetFillStyle(1001);
199    
200    
201     return st_gr;
202    
203     }
204    
205    
206     TGraphErrors* getLO_signalCont(){
207    
208    
209    
210     Int_t nl = 9;
211     Double_t xl[9];
212     Double_t yl[9];
213     Double_t exl[9];
214     Double_t eyl[9];
215    
216     // cout << " n " << hist->GetXaxis()->GetNbins() << endl;
217    
218     for(int i = 0; i < nl; i++){
219     exl[i] = 5;
220     eyl[i] = 5;
221    
222     }
223    
224     xl[0] = 0;
225     yl[0] = 265;
226     xl[1] = 100;
227     yl[1] = 258;
228     xl[2] = 200;
229     yl[2] = 250;
230     xl[3] = 250;
231     yl[3] = 240;
232     xl[4] = 300;
233     yl[4] = 210;
234     xl[5] = 340;
235     yl[5] = 177;
236     xl[6] = 400;
237     yl[6] = 140;
238     xl[7] = 460;
239     yl[7] = 120;
240     xl[8] = 490;
241     yl[8] =100;
242    
243    
244    
245    
246    
247    
248     TGraphErrors* gr1 = new TGraphErrors(nl,xl,yl,exl,eyl);
249     gr1->SetMarkerColor(kGreen+2);
250     gr1->SetMarkerStyle(21);
251    
252    
253     //gr1->Draw("LP");
254    
255     TSpline3 *s = new TSpline3("grs",gr1);
256     s->SetLineColor(kGreen+2);
257     s->SetLineStyle(4);
258     s->SetLineWidth(3);
259    
260    
261     return gr1;
262    
263    
264    
265     }
266    
267    
268     TGraphErrors* getExpected_NLOunc(){
269    
270     Int_t nl = 11;
271     Double_t xl[11];
272     Double_t yl[11];
273     Double_t exl[11];
274     Double_t eyl[11];
275    
276     // cout << " n " << hist->GetXaxis()->GetNbins() << endl;
277    
278     for(int i = 0; i < nl; i++){
279     exl[i] = 5;
280     eyl[i] = 5;
281    
282     }
283    
284     xl[0] = 35;
285     yl[0] = 283;
286     xl[1] = 100;
287     yl[1] = 280;
288     xl[2] = 150;
289     yl[2] = 279;
290     xl[3] = 200;
291     yl[3] = 275;
292     xl[4] = 250;
293     yl[4] = 270;
294     xl[5] = 300;
295     yl[5] = 255;
296     xl[6] = 350;
297     yl[6] = 225;
298     xl[7] = 400;
299     yl[7] = 195;
300     xl[8] = 450;
301     yl[8] = 175;
302     xl[9] = 500;
303     yl[9] = 155;
304     xl[10] = 550;
305     yl[10] = 50;
306    
307    
308    
309     TGraphErrors* gr1 = new TGraphErrors(nl,xl,yl,exl,eyl);
310     gr1->SetMarkerColor(kWhite);
311    
312    
313     return gr1;
314    
315    
316    
317    
318    
319     }
320    
321    
322     TGraphErrors* getObserved_NLOunc(){
323    
324     Int_t nl = 11;
325     Double_t xl[11];
326     Double_t yl[11];
327     Double_t exl[11];
328     Double_t eyl[11];
329    
330     // cout << " n " << hist->GetXaxis()->GetNbins() << endl;
331    
332     for(int i = 0; i < nl; i++){
333     exl[i] = 5;
334     eyl[i] = 5;
335    
336     }
337    
338     xl[0] = 35;
339     yl[0] = 272;
340     xl[1] = 100;
341     yl[1] = 270;
342     xl[2] = 150;
343     yl[2] = 268;
344     xl[3] = 200;
345     yl[3] = 265;
346     xl[4] = 250;
347     yl[4] = 255;
348     xl[5] = 300;
349     yl[5] = 236;
350     xl[6] = 350;
351     yl[6] = 198;
352     xl[7] = 400;
353     yl[7] = 168;
354     xl[8] = 450;
355     yl[8] = 150;
356     xl[9] = 490;
357     yl[9] = 135;
358     xl[10] = 503;
359     yl[10] = 120;
360    
361    
362    
363     TGraphErrors* gr1 = new TGraphErrors(nl,xl,yl,exl,eyl);
364     gr1->SetMarkerColor(kWhite);
365     gr1->SetLineColor(kWhite);
366     // gr1->SetMarkerStyle(21);
367    
368    
369     //gr1->Draw("LP");
370    
371     TSpline3 *s = new TSpline3("grs",gr1);
372     s->SetLineColor(kRed);
373     // s->SetLineStyle(2);
374     s->SetLineWidth(3);
375    
376    
377     return gr1;
378    
379    
380    
381    
382    
383     }
384