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