Removing try/catch-es
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / Fit / GetE735Ratios.C
1 TH1F* GetE735Ratios(Int_t ratio, Int_t energy) {
2
3   Int_t nbins = 10;
4
5   const Float_t binsKpi [] = {0.25,0.30, 0.35, 0.40,0.50,0.60,0.70,0.95,1.15,1.35,1.55};
6   const Float_t binsPpi [] = {0.30, 0.35, 0.40,0.50,0.60,0.70,0.95,1.15,1.35,1.55,1.75};
7   enum {kEn300,kEn540,kEn1000,kEn1800,kNenergy};
8
9   
10   TH1F * hKpi[kNenergy] ;
11   TH1F * hPpi[kNenergy] ;
12   
13   const Int_t markers[] = {24,25,27,28};
14
15   for(Int_t iener = 0; iener < kNenergy; iener++){
16     hKpi[iener] = new TH1F(TString("hKpi")+long(iener),TString("hKpi")+long(iener),nbins,binsKpi);
17     hPpi[iener] = new TH1F(TString("hPpi")+long(iener),TString("hPpi")+long(iener),nbins,binsPpi);
18     hKpi[iener]->SetMarkerStyle(markers[iener]);
19     hPpi[iener]->SetMarkerStyle(markers[iener]);    
20   }
21   
22
23
24   // 300
25   hKpi[kEn300]  ->SetBinContent(0 , 8.1  /100);
26   hKpi[kEn300]  ->SetBinContent(1 , 7.5  /100);
27   hKpi[kEn300]  ->SetBinContent(2 , 9.5  /100);
28   hKpi[kEn300]  ->SetBinContent(3 , 16.1 /100);
29   hKpi[kEn300]  ->SetBinContent(4 , 16.4 /100);
30   hKpi[kEn300]  ->SetBinContent(5 , 17.9 /100);
31   hKpi[kEn300]  ->SetBinContent(6 , 19.4 /100);
32   hKpi[kEn300]  ->SetBinContent(7 , 23.8 /100);
33   hKpi[kEn300]  ->SetBinContent(8 , 25.7 /100);
34   hKpi[kEn300]  ->SetBinContent(9 , 0    /100);
35   hKpi[kEn300]  ->SetBinError  (0 , 1.7/100);
36   hKpi[kEn300]  ->SetBinError  (1 , 1.4/100);
37   hKpi[kEn300]  ->SetBinError  (2 , 1.6/100);
38   hKpi[kEn300]  ->SetBinError  (3 , 1.5/100);
39   hKpi[kEn300]  ->SetBinError  (4 , 2.5/100);
40   hKpi[kEn300]  ->SetBinError  (5 , 3.5/100);
41   hKpi[kEn300]  ->SetBinError  (6 , 2.4/100);
42   hKpi[kEn300]  ->SetBinError  (7 , 4.9/100);
43   hKpi[kEn300]  ->SetBinError  (8 , 7.5/100);
44   hKpi[kEn300]  ->SetBinError  (9 , 0  /100);
45
46   hKpi[kEn540]  ->SetBinContent(0 , 3.3 /100);
47   hKpi[kEn540]  ->SetBinContent(1 , 12.7/100);
48   hKpi[kEn540]  ->SetBinContent(2 , 10.6/100);
49   hKpi[kEn540]  ->SetBinContent(3 , 13.1/100);
50   hKpi[kEn540]  ->SetBinContent(4 , 16.9/100);
51   hKpi[kEn540]  ->SetBinContent(5 , 17.3/100);
52   hKpi[kEn540]  ->SetBinContent(6 , 20.2/100);
53   hKpi[kEn540]  ->SetBinContent(7 , 21.2/100);
54   hKpi[kEn540]  ->SetBinContent(8 , 25.0/100);
55   hKpi[kEn540]  ->SetBinContent(9 , 31.2/100);
56   hKpi[kEn540]  ->SetBinError  (0 , 0.9/100);
57   hKpi[kEn540]  ->SetBinError  (1 , 1.1/100);
58   hKpi[kEn540]  ->SetBinError  (2 , 0.9/100);
59   hKpi[kEn540]  ->SetBinError  (3 , 0.7/100);
60   hKpi[kEn540]  ->SetBinError  (4 , 1.6/100);
61   hKpi[kEn540]  ->SetBinError  (5 , 1.7/100);
62   hKpi[kEn540]  ->SetBinError  (6 , 1.4/100);
63   hKpi[kEn540]  ->SetBinError  (7 , 2.1/100);
64   hKpi[kEn540]  ->SetBinError  (8 , 3.2/100);
65   hKpi[kEn540]  ->SetBinError  (9 , 4.9/100);
66
67   hKpi[kEn1000] ->SetBinContent(0 , 9.2 /100);
68   hKpi[kEn1000] ->SetBinContent(1 , 10.4/100);
69   hKpi[kEn1000] ->SetBinContent(2 , 9.3 /100);
70   hKpi[kEn1000] ->SetBinContent(3 , 11.8/100);
71   hKpi[kEn1000] ->SetBinContent(4 , 15.3/100);
72   hKpi[kEn1000] ->SetBinContent(5 , 19.8/100);
73   hKpi[kEn1000] ->SetBinContent(6 , 19.8/100);
74   hKpi[kEn1000] ->SetBinContent(7 , 25.9/100);
75   hKpi[kEn1000] ->SetBinContent(8 , 27.8/100);
76   hKpi[kEn1000] ->SetBinContent(9 , 32.8/100);
77   hKpi[kEn1000] ->SetBinError  (0 , 0.7/100);
78   hKpi[kEn1000] ->SetBinError  (1 , 0.7/100);
79   hKpi[kEn1000] ->SetBinError  (2 , 0.7/100);
80   hKpi[kEn1000] ->SetBinError  (3 , 0.7/100);
81   hKpi[kEn1000] ->SetBinError  (4 , 1.2/100);
82   hKpi[kEn1000] ->SetBinError  (5 , 1.5/100);
83   hKpi[kEn1000] ->SetBinError  (6 , 1.2/100);
84   hKpi[kEn1000] ->SetBinError  (7 , 1.9/100);
85   hKpi[kEn1000] ->SetBinError  (8 , 2.6/100);
86   hKpi[kEn1000] ->SetBinError  (9 , 3.9/100);
87
88   hKpi[kEn1800] ->SetBinContent(0 , 7.8 /100);
89   hKpi[kEn1800] ->SetBinContent(1 , 9.1 /100);
90   hKpi[kEn1800] ->SetBinContent(2 , 9.7 /100);
91   hKpi[kEn1800] ->SetBinContent(3 , 13.9/100);
92   hKpi[kEn1800] ->SetBinContent(4 , 16.2/100);
93   hKpi[kEn1800] ->SetBinContent(5 , 18.1/100);
94   hKpi[kEn1800] ->SetBinContent(6 , 21.6/100);
95   hKpi[kEn1800] ->SetBinContent(7 , 24.6/100);
96   hKpi[kEn1800] ->SetBinContent(8 , 25.8/100);
97   hKpi[kEn1800] ->SetBinContent(9 , 25.2/100);
98   hKpi[kEn1800] ->SetBinError  (0 , 0.3/100);
99   hKpi[kEn1800] ->SetBinError  (1 , 0.3/100);
100   hKpi[kEn1800] ->SetBinError  (2 , 0.3/100);
101   hKpi[kEn1800] ->SetBinError  (3 , 0.3/100);
102   hKpi[kEn1800] ->SetBinError  (4 , 0.6/100);
103   hKpi[kEn1800] ->SetBinError  (5 , 0.7/100);
104   hKpi[kEn1800] ->SetBinError  (6 , 0.7/100);
105   hKpi[kEn1800] ->SetBinError  (7 , 0.8/100);
106   hKpi[kEn1800] ->SetBinError  (8 , 0.9/100);
107   hKpi[kEn1800] ->SetBinError  (9 , 1.0/100);
108
109   if (ratio == 0) return hKpi[energy];
110   else            return hPpi[energy];
111
112 }