]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/SPECTRA/Nuclei/B2/macros/PriorProbabilities.C
some fixes for A>2
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / B2 / macros / PriorProbabilities.C
CommitLineData
6b91e8c0 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16// macro for prior probabilities
17// author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
18
77dac0a6 19void SetParameters(Double_t* prob, Double_t c0, Double_t c1, Double_t c2, Double_t c3, Double_t c4, Double_t c5, Double_t c6, Double_t c7, Double_t c8)
6b91e8c0 20{
21//
22// assign values to an array
23//
24 prob[0] = c0;
25 prob[1] = c1;
26 prob[2] = c2;
27 prob[3] = c3;
28 prob[4] = c4;
29 prob[5] = c5;
30 prob[6] = c6;
31 prob[7] = c7;
32 prob[8] = c8;
33}
34
35Bool_t PriorProbabilities(Double_t* prob, const TString& periodname, const TString& tracksel)
36{
37//
38// Prior probabilities for the different samples and track selection criteria.
39// Obtained from several iterations of the analysis program
40//
41 TString period = periodname;
42 period.ToLower();
43
44 TString trksel = tracksel;
45 trksel.ToLower();
46
47 if(period == "lhc10c900") // pp 900 GeV
48 {
49 if (trksel=="its_tpc_dca")
50 {
51 SetParameters(prob, 0.0229385, 2.13852e-06, 0.868889, 0.0596281, 0.0484369, 0.00010232, 2.54977e-06, 0, 0);
52 }
53 else if (trksel == "its_tpc_dca_spd")
54 {
55 SetParameters(prob, 0.00670787, 1.03214e-06, 0.887492, 0.0627365, 0.0429736, 8.72157e-05, 2.06428e-06, 0, 0);
56 }
57 else if(trksel=="its_tpc_nsigma_spd")
58 {
59 SetParameters(prob, 0.00598811, 0.000283397, 0.889894, 0.0655886, 0.0382077, 3.76161e-05, 8.51043e-08, 0, 0);
60 }
61 else if(trksel == "its_tpc_tof_nsigma")
62 {
63 SetParameters(prob, 0.00968656, 0.00230198, 0.844375, 0.084224, 0.059334, 7.8127e-05, 7.89161e-07, 0, 0);
64 }
65 else if(trksel == "its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
66 {
67 SetParameters(prob, 0.0123784, 0.00368129, 0.830011, 0.0795686, 0.0742296, 0.000127461, 2.99204e-06, 1.19682e-07, 0);
68 }
69 else // its_tpc_nsigma
70 {
71 SetParameters(prob, 0.0181447, 1.09966e-06, 0.880063, 0.0635145, 0.0382359, 4.06874e-05, 1.83277e-07, 0, 0);
72 }
73 }
74
75 else if( period.Contains("lhc10b")
76 || period.Contains("lhc10c")
77 || period.Contains("lhc10d")
78 || period.Contains("lhc10e") ) // pp 7 TeV
79 {
80 if(trksel=="its_tpc_dca")
81 {
82 SetParameters(prob, 0.0250199, 0.00330477, 0.856905, 0.0621491, 0.0524821, 0.000136071, 3.44981e-06, 6.86137e-08, 0);
83 }
84 else if(trksel=="its_tpc_dca_spd")
85 {
86 SetParameters(prob, 0.00883871, 0.00306025, 0.877528, 0.0646921, 0.0457766, 0.000102032, 2.23315e-06, 3.71013e-08, 0);
87 }
88 else if(trksel=="its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
89 {
90 SetParameters(prob, 0.0155752, 0.0130319, 0.813626, 0.0808387, 0.0767456, 0.000177436, 4.32771e-06, 3.93428e-07, 0);
91 }
92 else // its_tpc_nsigma
93 {
94 SetParameters(prob, 0.0207349, 0.000587565, 0.871052, 0.0673557, 0.0402021, 6.74649e-05, 0, 0, 0);
95 }
96 }
97
98 else if(period == "lhc10h") // heavy ions 2.76 TeV, 20% centrality
99 {
100 if(trksel=="its_tpc_dca")
101 {
102 SetParameters(prob, 0.032994, 0.012492, 0.824044, 0.0809969, 0.0492257, 0.000242368, 5.01681e-06, 3.34454e-07, 0);
103 }
104 else if(trksel=="its_tpc_dca_spd")
105 {
106 SetParameters(prob, 0.0262206, 0.00398172, 0.845586, 0.081878, 0.0421142, 0.000215343, 3.92153e-06, 0, 0);
107 }
108 else if(trksel=="its_tpc_nsigma")
109 {
110 SetParameters(prob, 0.0279673, 0.00329778, 0.845802, 0.085995, 0.0367557, 0.000179264, 2.62155e-06, 2.49671e-07, 1.24836e-07);
111 }
112 else if(trksel=="its_tpc_tof_dca")
113 {
114 SetParameters(prob, 0.017615, 0.00752739, 0.784779, 0.109672, 0.080031, 0.000370991, 3.95272e-06, 8.47012e-07, 0);
115 }
116 else if(trksel=="its_tpc_tof_dca_spd")
117 {
118 SetParameters(prob, 0.0130896, 0.0079917, 0.797236, 0.112833, 0.0685078, 0.000338538, 3.07762e-06, 0, 0);
119 }
120 else if(trksel=="its_tpc_tof_nsigma")
121 {
122 SetParameters(prob, 0.0157654, 0.00721323, 0.79879, 0.117158, 0.0607624, 0.000308557, 1.26199e-06, 6.30996e-07, 0);
123 }
124 else
125 {
126 SetParameters(prob, 0.032994, 0.012492, 0.824044, 0.0809969, 0.0492257, 0.000242368, 5.01681e-06, 3.34454e-07, 3.34454e-07);
127 }
128 }
129
130 else if(period == "lhc11a_wosdd") // pp 2.76 TeV without SDD pass3
131 {
132 if(trksel=="its_tpc_dca")
133 {
134 SetParameters(prob, 0.0172658, 0.0179012, 0.857385, 0.0590938, 0.0482499, 0.000104021, 8.05072e-07, 0, 0);
135 }
136 else if(trksel == "its_tpc_dca_spd")
137 {
138 SetParameters(prob, 0.00808143, 0.016243, 0.873576, 0.0593675, 0.0426588, 7.27021e-05, 6.45822e-07, 0, 0);
139 }
140 else if(trksel=="its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
141 {
142 SetParameters(prob, 0.0113244, 0.0275349, 0.790324, 0.0899881, 0.0806648, 0.000161212, 2.45189e-06, 0, 0);
143 }
144 else
145 {
146 SetParameters(prob, 0.0132164, 0.0209664, 0.864317, 0.0624972, 0.0389603, 4.30391e-05, 0, 0, 0);
147 }
148 }
149
150 else if(period == "lhc11a_wsdd") // pp 2.76 TeV without SDD pass3
151 {
152 if(trksel=="its_tpc_dca")
153 {
154 SetParameters(prob, 0.0198007, 0.0130987, 0.857079, 0.0604184, 0.0494965, 0.000104874, 1.5572e-06, 0, 0);
155 }
156 else if(trksel == "its_tpc_dca_spd")
157 {
158 SetParameters(prob, 0.00808143, 0.016243, 0.873576, 0.0593675, 0.0426588, 7.27021e-05, 6.45822e-07, 0, 0);
159 }
160 else if(trksel == "its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
161 {
162 SetParameters(prob, 0.0206518, 0.00922775, 0.859646, 0.0595307, 0.0508038, 0.000137122, 3.02079e-06, 0, 0);
163 }
164 else
165 {
166 SetParameters(prob, 0.0150916, 0.0122592, 0.868485, 0.0649622, 0.0391601, 4.18627e-05, 0, 0, 0);
167 }
168 }
169
170 // --------- simulation ----------
171
172 else if(period == "lhc12a5a")
173 {
174 if(trksel == "its_tpc_dca")
175 {
176 SetParameters(prob, 0.00269435, 0.00142106, 0.0831012, 0.00522487, 0.371055, 0.332289, 0.0602906, 0.0830945, 0.0608297);
177 }
178 else if(trksel == "its_tpc_dca_spd")
179 {
180 SetParameters(prob, 0.000903954, 0.000740461, 0.0787924, 0.0052352, 0.377698, 0.331812, 0.0598412, 0.0834821, 0.0614951);
181 }
182 else if(trksel == "its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
183 {
184 SetParameters(prob, 0.000699209, 0.000628928, 0.0488789, 0.00274458, 0.378142, 0.35414, 0.0643921, 0.0830996, 0.0672741);
185 }
186 else
187 {
188 SetParameters(prob, 0.00177397, 0.000490646, 0.0745835, 0.00552979, 0.383725, 0.331756, 0.0592882, 0.0827403, 0.0601128);
189 }
190 }
191
192 else if(period == "lhc12a5bb")
193 {
194 if(trksel == "its_tpc_dca")
195 {
196 SetParameters(prob, 0.00370442, 0.00158498, 0.108206, 0.00792265, 0.375296, 0.33667, 0.0610851, 0.0715099, 0.034021);
197 }
198 else if(trksel == "its_tpc_tof_dca")
199 {
200 SetParameters(prob, 0.00112885, 0.000832592, 0.0672591, 0.00469105, 0.385956, 0.361319, 0.0655949, 0.0767322, 0.0364865);
201 }
202 }
203
204 else if(period == "lhc12a5bc")
205 {
206 if(trksel == "its_tpc_dca")
207 {
208 SetParameters(prob, 0.00370442, 0.00158498, 0.108206, 0.00792265, 0.375296, 0.33667, 0.0610851, 0.0715099, 0.034021);
209 }
210 else if(trksel == "its_tpc_tof_dca")
211 {
212 SetParameters(prob, 0.00112885, 0.000832592, 0.0672591, 0.00469105, 0.385956, 0.361319, 0.0655949, 0.0767322, 0.0364865);
213 }
214 }
215
216 else if(period == "lhc12a5bd")
217 {
218 if(trksel == "its_tpc_dca")
219 {
220 SetParameters(prob, 0.00389124, 0.00181114, 0.10725, 0.00753775, 0.361361, 0.322078, 0.0584554, 0.0785471, 0.0590672);
221 }
222 else if(trksel == "its_tpc_dca_spd")
223 {
224 SetParameters(prob, 0.00129393, 0.000963743, 0.102737, 0.00760901, 0.36841, 0.322256, 0.0581189, 0.0791033, 0.0595082);
225 }
226 else if(trksel == "its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
227 {
228 SetParameters(prob, 0.00122986, 0.000908924, 0.0696766, 0.00462655, 0.385381, 0.360127, 0.0653381, 0.0762508, 0.0364611);
229 }
230 else
231 {
232 SetParameters(prob, 0.00265834, 0.000648637, 0.0985374, 0.00801093, 0.373786, 0.322076, 0.0576089, 0.0782477, 0.0584268);
233 }
234 }
235
236 else if(period == "lhc12a5be")
237 {
238 if(trksel == "its_tpc_tof_dca")
239 {
240 SetParameters(prob, 0.00114523, 0.000795738, 0.0666132, 0.00465889, 0.386032, 0.36171, 0.0656093, 0.0767938, 0.0366419);
241 }
242 else
243 {
244 SetParameters(prob, 0.00114523, 0.000795738, 0.0666132, 0.00465889, 0.386032, 0.36171, 0.0656093, 0.0767938, 0.0366419);
245 }
246 }
247
248 else if(period == "lhc12a5c_wosdd" || period == "lhc12a5c_wsdd")
249 {
250 if(trksel == "its_tpc_dca_spd")
251 {
252 SetParameters(prob, 0.00140969, 0.00100911, 0.0901532, 0.00627527, 0.375878, 0.333126, 0.0601881, 0.0752193, 0.0567413);
253 }
254 else if(trksel == "its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
255 {
256 SetParameters(prob, 0.00254534, 0.00138188, 0.0920481, 0.00642957, 0.381436, 0.344603, 0.0627622, 0.0736729, 0.0351211);
257 }
258 else
259 {
260 SetParameters(prob, 0.00254534, 0.00138188, 0.0920481, 0.00642957, 0.381436, 0.344603, 0.0627622, 0.0736729, 0.0351211);
261 }
262 }
263
264 else if(period == "lhc10e12")
265 {
266 if(trksel=="its_tpc_dca")
267 {
268 SetParameters(prob, 0.0274572, 0.0132276, 0.868083, 0.0579849, 0.0332055, 2.94442e-05, 1.1225e-05, 0, 8.63465e-07);
269 }
270 else if(trksel=="its_tpc_dca_spd")
271 {
272 SetParameters(prob, 0.00902306, 0.00879859, 0.891372, 0.0600273, 0.0307466, 2.43343e-05, 7.44928e-06, 0, 4.96619e-07);
273 }
274 else if(trksel=="its_tpc_tof_dca")
275 {
276 SetParameters(prob, 0.0113533, 0.0104639, 0.877447, 0.0577014, 0.0429803, 3.77285e-05, 1.40853e-05, 0, 2.51523e-06);
277 }
278 else
279 {
280 SetParameters(prob, 0.0228473, 0.00644153, 0.881383, 0.061429, 0.0278978, 1.21828e-06, 2.81142e-07, 0, 0);
281 }
282 }
283
284 else if(period == "lhc10e13")
285 {
286 if(trksel=="its_tpc_dca")
287 {
288 SetParameters(prob, 0.0275037, 0.0129471, 0.864088, 0.0566767, 0.03875, 2.46576e-05, 9.52441e-06, 0, 5.29134e-07);
289 }
290 else if(trksel=="its_tpc_dca_spd")
291 {
292 SetParameters(prob, 0.00881856, 0.00853512, 0.887761, 0.0587557, 0.03611, 1.46288e-05, 5.01096e-06, 0, 4.0411e-07);
293 }
294 else if(trksel=="its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
295 {
296 SetParameters(prob, 0.0118565, 0.0102582, 0.869917, 0.0579405, 0.0499923, 2.71412e-05, 8.44393e-06, 0, 0);
297 }
298 else
299 {
300 SetParameters(prob, 0.0227488, 0.00644463, 0.877399, 0.0598542, 0.033552, 1.08815e-06, 3.43625e-07, 0, 0);
301 }
302 }
303
304 else if(period == "lhc10f6a")
305 {
306 if(trksel=="its_tpc_dca")
307 {
308 SetParameters(prob, 0.0301784, 0.0130575, 0.849464, 0.0631854, 0.0440839, 1.65739e-05, 8.28697e-06, 0, 5.52465e-06);
309 }
310 else if(trksel=="its_tpc_dca_spd")
311 {
312 SetParameters(prob, 0.0101971, 0.00853634, 0.875408, 0.0657018, 0.0401396, 1.18943e-05, 4.23147e-06, 0, 8.53405e-07);
313 }
314 else if(trksel=="its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
315 {
316 SetParameters(prob, 0.0149055, 0.0105359, 0.852053, 0.0663013, 0.0561727, 2.17209e-05, 9.18959e-06, 0, 8.35418e-07);
317 }
318 else
319 {
320 SetParameters(prob, 0.0248513, 0.00652446, 0.863878, 0.0670812, 0.0376654, 3.27516e-05, 2.45637e-05, 0, 5.4586e-06);
321 }
322 }
323
324 else if(period == "lhc11e3a_wsdd") // from the grid without SDD
325 {
326 if(trksel=="its_tpc_dca")
327 {
328 SetParameters(prob, 0.0288269, 0.0143436, 0.85568, 0.0600814, 0.0410309, 2.04805e-05, 1.56616e-05, 0, 1.20474e-06);
329 }
330 else if(trksel == "its_tpc_dca_spd")
331 {
332 SetParameters(prob, 0.0104567, 0.00998477, 0.878832, 0.0622996, 0.0384064, 1.43839e-05, 5.60782e-06, 0, 7.60383e-07);
333 }
334 else if(trksel=="its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
335 {
336 SetParameters(prob, 0.0129161, 0.0117642, 0.852733, 0.0671011, 0.0554566, 2.17717e-05, 5.44293e-06, 0, 1.36073e-06);
337 }
338 else
339 {
340 SetParameters(prob, 0.0249858, 0.00773001, 0.87308, 0.0601418, 0.0340623, 0, 0, 0, 0);
341 }
342 }
343
344 else if(period == "lhc11e3a_wosdd") // from the grid without SDD
345 {
346 if(trksel=="its_tpc_dca")
347 {
348 SetParameters(prob, 0.0222021, 0.0131403, 0.862641, 0.0613467, 0.0406294, 2.3342e-05, 1.55613e-05, 0, 1.29678e-06);
349 }
350 else if(trksel == "its_tpc_dca_spd")
351 {
352 SetParameters(prob, 0.0104567, 0.00998477, 0.878832, 0.0622996, 0.0384064, 1.43839e-05, 5.60782e-06, 0, 7.60383e-07);
353 }
354 else if(trksel=="its_tpc_tof_dca" || trksel == "its_tpc_tof_dca_spd")
355 {
356 SetParameters(prob, 0.0118237, 0.0110965, 0.855035, 0.0672175, 0.0547956, 2.49547e-05, 6.23867e-06, 0, 6.93185e-07);
357 }
358 else
359 {
360 SetParameters(prob, 0.0186686, 0.00736997, 0.875823, 0.062905, 0.0352281, 4.98982e-06, 0, 0, 0);
361 }
362 }
363
364 else
365 {
366 std::cout << "Setting equal probabilities to all particle species: " << periodname << ", " << trksel << std::endl;
367
368 SetParameters(prob, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11);
369
370 return kFALSE;
371 }
372
373 return kTRUE;
374}