]>
Commit | Line | Data |
---|---|---|
4c039060 | 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 | ||
88cb7938 | 16 | /* $Id$ */ |
4c039060 | 17 | |
53904666 | 18 | // Library class for particle pt and y distributions used for |
19 | // muon spectrometer simulations. | |
20 | // To be used with AliGenParam. | |
21 | // The following particle typed can be simulated: | |
22 | // pi, K, phi, omega, eta, J/Psi, Upsilon, charm and beauty mesons. | |
23 | // | |
24 | // andreas.morsch@cern.ch | |
25 | // | |
26 | ||
65fb704d | 27 | #include "TMath.h" |
28 | #include "TRandom.h" | |
29 | ||
fe4da5cc | 30 | #include "AliGenMUONlib.h" |
5c3fd7ea | 31 | |
fe4da5cc | 32 | ClassImp(AliGenMUONlib) |
33 | // | |
34 | // Pions | |
198bb1c7 | 35 | Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t* /*dummy*/) |
fe4da5cc | 36 | { |
37 | // | |
38 | // PT-PARAMETERIZATION CDF, PRL 61(88) 1819 | |
39 | // POWER LAW FOR PT > 500 MEV | |
40 | // MT SCALING BELOW (T=160 MEV) | |
41 | // | |
d90f80fd | 42 | const Double_t kp0 = 1.3; |
43 | const Double_t kxn = 8.28; | |
44 | const Double_t kxlim=0.5; | |
45 | const Double_t kt=0.160; | |
46 | const Double_t kxmpi=0.139; | |
47 | const Double_t kb=1.; | |
fe4da5cc | 48 | Double_t y, y1, xmpi2, ynorm, a; |
49 | Double_t x=*px; | |
50 | // | |
d90f80fd | 51 | y1=TMath::Power(kp0/(kp0+kxlim),kxn); |
52 | xmpi2=kxmpi*kxmpi; | |
53 | ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt)); | |
fe4da5cc | 54 | a=ynorm/y1; |
d90f80fd | 55 | if (x > kxlim) |
56 | y=a*TMath::Power(kp0/(kp0+x),kxn); | |
fe4da5cc | 57 | else |
d90f80fd | 58 | y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt); |
fe4da5cc | 59 | return y*x; |
60 | } | |
753690b0 | 61 | // |
62 | // y-distribution | |
63 | // | |
198bb1c7 | 64 | Double_t AliGenMUONlib::YPion( Double_t *py, Double_t */*dummy*/) |
753690b0 | 65 | { |
d90f80fd | 66 | // Pion y |
2280e6af | 67 | Double_t y=TMath::Abs(*py); |
68 | /* | |
d90f80fd | 69 | const Double_t ka = 7000.; |
70 | const Double_t kdy = 4.; | |
d90f80fd | 71 | Double_t ex = y*y/(2*kdy*kdy); |
72 | return ka*TMath::Exp(-ex); | |
2280e6af | 73 | */ |
74 | return 1.16526e+04+y*-3.79886e+03+y*y*4.31130e+02; | |
75 | ||
753690b0 | 76 | } |
77 | // particle composition | |
78 | // | |
65fb704d | 79 | Int_t AliGenMUONlib::IpPion(TRandom *ran) |
753690b0 | 80 | { |
d90f80fd | 81 | // Pion composition |
65fb704d | 82 | if (ran->Rndm() < 0.5) { |
753690b0 | 83 | return 211; |
84 | } else { | |
85 | return -211; | |
86 | } | |
87 | } | |
fe4da5cc | 88 | |
89 | //____________________________________________________________ | |
90 | // | |
91 | // Mt-scaling | |
92 | ||
93 | Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np) | |
94 | { | |
95 | // SCALING EN MASSE PAR RAPPORT A PTPI | |
96 | // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI | |
d90f80fd | 97 | const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0}; |
fe4da5cc | 98 | // VALUE MESON/PI AT 5 GEV |
d90f80fd | 99 | const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0}; |
fe4da5cc | 100 | np--; |
d90f80fd | 101 | Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3); |
102 | Double_t fmax2=f5/kfmax[np]; | |
fe4da5cc | 103 | // PIONS |
104 | Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0); | |
105 | Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/ | |
d90f80fd | 106 | (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2; |
fe4da5cc | 107 | return fmtscal*ptpion; |
108 | } | |
109 | // | |
753690b0 | 110 | // kaon |
111 | // | |
112 | // pt-distribution | |
113 | //____________________________________________________________ | |
198bb1c7 | 114 | Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t */*dummy*/) |
753690b0 | 115 | { |
d90f80fd | 116 | // Kaon pT |
753690b0 | 117 | return PtScal(*px,2); |
118 | } | |
119 | ||
120 | // y-distribution | |
fe4da5cc | 121 | //____________________________________________________________ |
198bb1c7 | 122 | Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t */*dummy*/) |
fe4da5cc | 123 | { |
d90f80fd | 124 | // Kaon y |
2280e6af | 125 | Double_t y=TMath::Abs(*py); |
126 | /* | |
d90f80fd | 127 | const Double_t ka = 1000.; |
128 | const Double_t kdy = 4.; | |
fe4da5cc | 129 | // |
d90f80fd | 130 | Double_t ex = y*y/(2*kdy*kdy); |
131 | return ka*TMath::Exp(-ex); | |
2280e6af | 132 | */ |
133 | ||
134 | return 1.16526e+04+y*-3.79886e+03+y*y*4.31130e+02; | |
753690b0 | 135 | } |
136 | ||
137 | // particle composition | |
138 | // | |
65fb704d | 139 | Int_t AliGenMUONlib::IpKaon(TRandom *ran) |
753690b0 | 140 | { |
d90f80fd | 141 | // Kaon composition |
65fb704d | 142 | if (ran->Rndm() < 0.5) { |
753690b0 | 143 | return 321; |
144 | } else { | |
145 | return -321; | |
146 | } | |
fe4da5cc | 147 | } |
753690b0 | 148 | |
fe4da5cc | 149 | // J/Psi |
150 | // | |
151 | // | |
152 | // pt-distribution | |
153 | //____________________________________________________________ | |
198bb1c7 | 154 | Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t */*dummy*/) |
fe4da5cc | 155 | { |
d90f80fd | 156 | // J/Psi pT |
157 | const Double_t kpt0 = 4.; | |
158 | const Double_t kxn = 3.6; | |
fe4da5cc | 159 | Double_t x=*px; |
160 | // | |
d90f80fd | 161 | Double_t pass1 = 1.+(x/kpt0)*(x/kpt0); |
162 | return x/TMath::Power(pass1,kxn); | |
fe4da5cc | 163 | } |
05932df6 | 164 | |
198bb1c7 | 165 | Double_t AliGenMUONlib::PtJpsiPbPb( Double_t *px, Double_t */*dummy*/) |
05932df6 | 166 | { |
1af7144e | 167 | // J/Psi pT spectrum |
05932df6 | 168 | // |
169 | // R. Vogt 2002 | |
170 | // PbPb 5.5 TeV | |
171 | // MRST HO | |
172 | // mc = 1.4 GeV, pt-kick 1 GeV | |
173 | // | |
1af7144e | 174 | Float_t x = px[0]; |
175 | Float_t c[8] = { | |
176 | -2.13098e+00, 9.46552e+00, -5.06799e+00, 1.27260e+00, | |
177 | -1.83806e-01, 1.55853e-02, -7.23241e-04, 1.42105e-05 | |
05932df6 | 178 | }; |
1af7144e | 179 | |
3d905dd7 | 180 | Double_t y; |
181 | if (x < 10.) { | |
182 | Int_t j; | |
183 | y = c[j = 7]; | |
184 | while (j > 0) y = y * x +c[--j]; | |
185 | y = x * TMath::Exp(y); | |
186 | } else { | |
187 | y = 0.; | |
188 | } | |
1af7144e | 189 | return y; |
05932df6 | 190 | } |
17d28ba5 | 191 | |
192 | Double_t AliGenMUONlib::PtJpsiBPbPb( Double_t *px, Double_t */*dummy*/) | |
193 | { | |
194 | // J/Psi pT spectrum | |
195 | // B -> J/Psi X | |
196 | Double_t x0 = 4.0384; | |
197 | Double_t n = 3.0288; | |
198 | ||
199 | Double_t x = px[0]; | |
200 | Double_t y = x / TMath::Power((1. + (x/x0)*(x/x0)), n); | |
201 | ||
202 | return y; | |
203 | } | |
204 | ||
205 | ||
198bb1c7 | 206 | Double_t AliGenMUONlib::PtJpsiPP( Double_t *px, Double_t */*dummy*/) |
bb6e81ac | 207 | { |
208 | // J/Psi pT spectrum | |
209 | // | |
210 | // R. Vogt 2002 | |
211 | // pp 14 TeV | |
212 | // MRST HO | |
213 | // mc = 1.4 GeV, pt-kick 1 GeV | |
214 | // | |
215 | Float_t x = px[0]; | |
216 | Float_t c[4] = {8.47471e+00, -1.93567e+00, 1.50271e-01, -5.51212e-03}; | |
217 | ||
218 | Double_t y; | |
219 | if (x < 10.) { | |
220 | Int_t j; | |
221 | y = c[j = 3]; | |
222 | while (j > 0) y = y * x +c[--j]; | |
223 | y = x * TMath::Exp(y); | |
224 | } else { | |
225 | y = 0.; | |
226 | } | |
227 | return y; | |
228 | } | |
229 | ||
fe4da5cc | 230 | // |
231 | // y-distribution | |
232 | //____________________________________________________________ | |
198bb1c7 | 233 | Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t */*dummy*/) |
fe4da5cc | 234 | { |
d90f80fd | 235 | // J/psi y |
236 | const Double_t ky0 = 4.; | |
237 | const Double_t kb=1.; | |
fe4da5cc | 238 | Double_t yj; |
239 | Double_t y=TMath::Abs(*py); | |
240 | // | |
d90f80fd | 241 | if (y < ky0) |
242 | yj=kb; | |
fe4da5cc | 243 | else |
d90f80fd | 244 | yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2); |
fe4da5cc | 245 | return yj; |
246 | } | |
05932df6 | 247 | |
248 | ||
198bb1c7 | 249 | Double_t AliGenMUONlib::YJpsiPbPb( Double_t *px, Double_t */*dummy*/) |
05932df6 | 250 | { |
251 | ||
252 | // | |
253 | // J/Psi y | |
254 | // | |
255 | // | |
256 | // R. Vogt 2002 | |
257 | // PbPb 5.5 TeV | |
258 | // MRST HO | |
259 | // mc = 1.4 GeV, pt-kick 1 GeV | |
260 | // | |
1af7144e | 261 | Double_t c[5] = {-6.03425e+02, 4.98257e+02, -1.38794e+02, 1.62209e+01, -6.85955e-01}; |
262 | Double_t x = TMath::Abs(px[0]); | |
263 | Double_t y; | |
264 | ||
265 | if (x < 4.) { | |
266 | y = 31.754; | |
267 | } else if (x < 6) { | |
268 | Int_t j; | |
269 | y = c[j = 4]; | |
270 | while (j > 0) y = y * x + c[--j]; | |
271 | } else { | |
272 | y =0.; | |
273 | } | |
274 | ||
275 | return y; | |
05932df6 | 276 | } |
277 | ||
198bb1c7 | 278 | Double_t AliGenMUONlib::YJpsiPP( Double_t *px, Double_t */*dummy*/) |
bb6e81ac | 279 | { |
280 | ||
281 | // | |
282 | // J/Psi y | |
283 | // | |
284 | // | |
285 | // R. Vogt 2002 | |
286 | // pp 14 TeV | |
287 | // MRST HO | |
288 | // mc = 1.4 GeV, pt-kick 1 GeV | |
289 | // | |
290 | ||
291 | Double_t c[5] = {1.38532e+00, 1.00596e+02, -3.46378e+01, 3.94172e+00, -1.48319e-01}; | |
292 | Double_t x = TMath::Abs(px[0]); | |
293 | Double_t y; | |
294 | ||
295 | if (x < 2.5) { | |
296 | y = 96.455 - 0.8483 * x * x; | |
297 | } else if (x < 7.9) { | |
298 | Int_t j; | |
299 | y = c[j = 4]; | |
300 | while (j > 0) y = y * x + c[--j]; | |
301 | } else { | |
302 | y =0.; | |
303 | } | |
304 | ||
305 | return y; | |
306 | } | |
307 | ||
17d28ba5 | 308 | Double_t AliGenMUONlib::YJpsiBPbPb( Double_t *px, Double_t */*dummy*/) |
309 | { | |
310 | ||
311 | // | |
312 | // J/Psi from B->J/Psi X | |
313 | // | |
314 | // | |
315 | ||
316 | ||
317 | Double_t c[7] = {7.37025e-02, 0., -2.94487e-03, 0., 6.07953e-06, 0., 5.39219e-07}; | |
318 | ||
319 | Double_t x = TMath::Abs(px[0]); | |
320 | Double_t y; | |
321 | ||
322 | if (x > 6.) { | |
323 | y = 0.; | |
324 | } else { | |
325 | Int_t j; | |
326 | y = c[j = 6]; | |
327 | while (j > 0) y = y * x + c[--j]; | |
328 | } | |
329 | ||
330 | return y; | |
331 | } | |
332 | ||
333 | ||
334 | ||
fe4da5cc | 335 | // particle composition |
336 | // | |
65fb704d | 337 | Int_t AliGenMUONlib::IpJpsi(TRandom *) |
fe4da5cc | 338 | { |
d90f80fd | 339 | // J/Psi composition |
88cb7938 | 340 | return 443; |
fe4da5cc | 341 | } |
0ad09590 | 342 | Int_t AliGenMUONlib::IpJpsiFamily(TRandom *) |
343 | { | |
344 | // J/Psi composition | |
345 | Int_t ip; | |
346 | Float_t r = gRandom->Rndm(); | |
347 | if (r < 0.98) { | |
348 | ip = 443; | |
349 | } else { | |
350 | ip = 100443; | |
351 | } | |
352 | return ip; | |
353 | } | |
354 | ||
fe4da5cc | 355 | |
356 | // Upsilon | |
357 | // | |
358 | // | |
359 | // pt-distribution | |
360 | //____________________________________________________________ | |
198bb1c7 | 361 | Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t */*dummy*/ ) |
fe4da5cc | 362 | { |
d90f80fd | 363 | // Upsilon pT |
364 | const Double_t kpt0 = 5.3; | |
365 | const Double_t kxn = 2.5; | |
fe4da5cc | 366 | Double_t x=*px; |
367 | // | |
d90f80fd | 368 | Double_t pass1 = 1.+(x/kpt0)*(x/kpt0); |
369 | return x/TMath::Power(pass1,kxn); | |
fe4da5cc | 370 | } |
05932df6 | 371 | |
198bb1c7 | 372 | Double_t AliGenMUONlib::PtUpsilonPbPb( Double_t *px, Double_t */*dummy*/) |
05932df6 | 373 | { |
374 | ||
375 | // | |
376 | // Upsilon pT | |
377 | // | |
378 | // | |
379 | // R. Vogt 2002 | |
380 | // PbPb 5.5 TeV | |
381 | // MRST HO | |
382 | // mc = 1.4 GeV, pt-kick 1 GeV | |
383 | // | |
1af7144e | 384 | Float_t x = px[0]; |
385 | Double_t c[8] = { | |
386 | -1.03488e+01, 1.28065e+01, -6.60500e+00, 1.66140e+00, | |
387 | -2.34293e-01, 1.86925e-02, -7.80708e-04, 1.30610e-05 | |
388 | }; | |
3d905dd7 | 389 | Double_t y; |
390 | if (x < 10.) { | |
391 | Int_t j; | |
392 | y = c[j = 7]; | |
393 | while (j > 0) y = y * x +c[--j]; | |
394 | y = x * TMath::Exp(y); | |
395 | } else { | |
396 | y = 0.; | |
397 | } | |
1af7144e | 398 | return y; |
05932df6 | 399 | } |
400 | ||
198bb1c7 | 401 | Double_t AliGenMUONlib::PtUpsilonPP( Double_t *px, Double_t */*dummy*/) |
bb6e81ac | 402 | { |
403 | ||
404 | // | |
405 | // Upsilon pT | |
406 | // | |
407 | // | |
408 | // R. Vogt 2002 | |
409 | // pp 14 TeV | |
410 | // MRST HO | |
411 | // mc = 1.4 GeV, pt-kick 1 GeV | |
412 | // | |
413 | Float_t x = px[0]; | |
414 | Double_t c[8] = {-7.93955e+00, 1.06306e+01, -5.21392e+00, 1.19703e+00, | |
415 | -1.45718e-01, 8.95151e-03, -2.04806e-04, -1.13053e-06}; | |
416 | ||
417 | Double_t y; | |
418 | if (x < 10.) { | |
419 | Int_t j; | |
420 | y = c[j = 7]; | |
421 | while (j > 0) y = y * x +c[--j]; | |
422 | y = x * TMath::Exp(y); | |
423 | } else { | |
424 | y = 0.; | |
425 | } | |
426 | return y; | |
427 | } | |
428 | ||
fe4da5cc | 429 | // |
430 | // y-distribution | |
431 | // | |
432 | //____________________________________________________________ | |
198bb1c7 | 433 | Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t */*dummy*/) |
fe4da5cc | 434 | { |
d90f80fd | 435 | // Upsilon y |
436 | const Double_t ky0 = 3.; | |
437 | const Double_t kb=1.; | |
fe4da5cc | 438 | Double_t yu; |
439 | Double_t y=TMath::Abs(*py); | |
440 | // | |
d90f80fd | 441 | if (y < ky0) |
442 | yu=kb; | |
fe4da5cc | 443 | else |
d90f80fd | 444 | yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2); |
fe4da5cc | 445 | return yu; |
446 | } | |
05932df6 | 447 | |
448 | ||
198bb1c7 | 449 | Double_t AliGenMUONlib::YUpsilonPbPb( Double_t *px, Double_t */*dummy*/) |
05932df6 | 450 | { |
451 | ||
452 | // | |
453 | // Upsilon y | |
454 | // | |
455 | // | |
456 | // R. Vogt 2002 | |
457 | // PbPb 5.5 TeV | |
458 | // MRST HO | |
459 | // mc = 1.4 GeV, pt-kick 1 GeV | |
460 | // | |
461 | ||
1af7144e | 462 | Double_t c[7] = {3.40036e-01, -3.98882e-07, -4.48398e-03, 8.46411e-08, -6.10854e-04, |
463 | -2.99753e-09, 1.28895e-05}; | |
464 | ||
465 | Double_t x = px[0]; | |
466 | if (TMath::Abs(x) > 5.55) return 0.; | |
467 | Int_t j; | |
468 | Double_t y = c[j = 6]; | |
469 | while (j > 0) y = y * x +c[--j]; | |
470 | return y; | |
05932df6 | 471 | } |
472 | ||
198bb1c7 | 473 | Double_t AliGenMUONlib::YUpsilonPP( Double_t *px, Double_t */*dummy*/) |
bb6e81ac | 474 | { |
475 | ||
476 | // | |
477 | // Upsilon y | |
478 | // | |
479 | // | |
480 | // R. Vogt 2002 | |
481 | // p p 14. TeV | |
482 | // MRST HO | |
483 | // mc = 1.4 GeV, pt-kick 1 GeV | |
484 | // | |
485 | Double_t c[7] = {8.91936e-01, -6.46645e-07, -1.52774e-02, 4.28677e-08, -7.01517e-04, | |
486 | -6.20539e-10, 1.29943e-05}; | |
487 | ||
488 | Double_t x = px[0]; | |
489 | if (TMath::Abs(x) > 6.2) return 0.; | |
490 | Int_t j; | |
491 | Double_t y = c[j = 6]; | |
492 | while (j > 0) y = y * x +c[--j]; | |
493 | return y; | |
494 | } | |
495 | ||
fe4da5cc | 496 | // particle composition |
497 | // | |
65fb704d | 498 | Int_t AliGenMUONlib::IpUpsilon(TRandom *) |
fe4da5cc | 499 | { |
d90f80fd | 500 | // y composition |
88cb7938 | 501 | return 553; |
fe4da5cc | 502 | } |
0ad09590 | 503 | Int_t AliGenMUONlib::IpUpsilonFamily(TRandom *) |
504 | { | |
505 | // y composition | |
506 | Int_t ip; | |
507 | Float_t r = gRandom->Rndm(); | |
508 | ||
509 | if (r < 0.712) { | |
510 | ip = 553; | |
511 | } else if (r < 0.896) { | |
512 | ip = 100553; | |
513 | } else { | |
514 | ip = 200553; | |
515 | } | |
516 | return ip; | |
517 | } | |
fe4da5cc | 518 | |
519 | // | |
520 | // Phi | |
521 | // | |
522 | // | |
523 | // pt-distribution (by scaling of pion distribution) | |
524 | //____________________________________________________________ | |
198bb1c7 | 525 | Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t */*dummy*/) |
fe4da5cc | 526 | { |
d90f80fd | 527 | // Phi pT |
fe4da5cc | 528 | return PtScal(*px,7); |
529 | } | |
530 | // y-distribution | |
198bb1c7 | 531 | Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t */*dummy*/) |
fe4da5cc | 532 | { |
d90f80fd | 533 | // Phi y |
534 | Double_t *dum=0; | |
535 | return YJpsi(px,dum); | |
fe4da5cc | 536 | } |
537 | // particle composition | |
538 | // | |
65fb704d | 539 | Int_t AliGenMUONlib::IpPhi(TRandom *) |
fe4da5cc | 540 | { |
d90f80fd | 541 | // Phi composition |
89512a3b | 542 | return 333; |
543 | } | |
544 | ||
545 | // | |
546 | // omega | |
547 | // | |
548 | // | |
549 | // pt-distribution (by scaling of pion distribution) | |
550 | //____________________________________________________________ | |
198bb1c7 | 551 | Double_t AliGenMUONlib::PtOmega( Double_t *px, Double_t */*dummy*/) |
89512a3b | 552 | { |
553 | // Omega pT | |
554 | return PtScal(*px,5); | |
555 | } | |
556 | // y-distribution | |
198bb1c7 | 557 | Double_t AliGenMUONlib::YOmega( Double_t *px, Double_t */*dummy*/) |
89512a3b | 558 | { |
559 | // Omega y | |
560 | Double_t *dum=0; | |
561 | return YJpsi(px,dum); | |
562 | } | |
563 | // particle composition | |
564 | // | |
565 | Int_t AliGenMUONlib::IpOmega(TRandom *) | |
566 | { | |
567 | // Omega composition | |
568 | return 223; | |
569 | } | |
570 | ||
571 | ||
572 | // | |
573 | // Eta | |
574 | // | |
575 | // | |
576 | // pt-distribution (by scaling of pion distribution) | |
577 | //____________________________________________________________ | |
198bb1c7 | 578 | Double_t AliGenMUONlib::PtEta( Double_t *px, Double_t */*dummy*/) |
89512a3b | 579 | { |
580 | // Eta pT | |
581 | return PtScal(*px,3); | |
582 | } | |
583 | // y-distribution | |
198bb1c7 | 584 | Double_t AliGenMUONlib::YEta( Double_t *px, Double_t */*dummy*/) |
89512a3b | 585 | { |
586 | // Eta y | |
587 | Double_t *dum=0; | |
588 | return YJpsi(px,dum); | |
589 | } | |
590 | // particle composition | |
591 | // | |
592 | Int_t AliGenMUONlib::IpEta(TRandom *) | |
593 | { | |
594 | // Eta composition | |
595 | return 221; | |
fe4da5cc | 596 | } |
597 | ||
598 | // | |
599 | // Charm | |
600 | // | |
601 | // | |
602 | // pt-distribution | |
603 | //____________________________________________________________ | |
198bb1c7 | 604 | Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t */*dummy*/) |
fe4da5cc | 605 | { |
d90f80fd | 606 | // Charm pT |
607 | const Double_t kpt0 = 4.08; | |
608 | const Double_t kxn = 9.40; | |
2280e6af | 609 | |
fe4da5cc | 610 | Double_t x=*px; |
611 | // | |
2280e6af | 612 | Double_t pass1 = 1.+(x/kpt0); |
d90f80fd | 613 | return x/TMath::Power(pass1,kxn); |
fe4da5cc | 614 | } |
615 | // y-distribution | |
198bb1c7 | 616 | Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t */*dummy*/) |
fe4da5cc | 617 | { |
d90f80fd | 618 | // Charm y |
619 | Double_t *dum=0; | |
620 | return YJpsi(px,dum); | |
fe4da5cc | 621 | } |
622 | ||
65fb704d | 623 | Int_t AliGenMUONlib::IpCharm(TRandom *ran) |
fe4da5cc | 624 | { |
d90f80fd | 625 | // Charm composition |
65fb704d | 626 | Float_t random; |
fe4da5cc | 627 | Int_t ip; |
628 | // 411,421,431,4122 | |
65fb704d | 629 | random = ran->Rndm(); |
630 | if (random < 0.5) { | |
fe4da5cc | 631 | ip=411; |
65fb704d | 632 | } else if (random < 0.75) { |
fe4da5cc | 633 | ip=421; |
65fb704d | 634 | } else if (random < 0.90) { |
fe4da5cc | 635 | ip=431; |
636 | } else { | |
637 | ip=4122; | |
638 | } | |
65fb704d | 639 | if (ran->Rndm() < 0.5) {ip=-ip;} |
fe4da5cc | 640 | |
641 | return ip; | |
642 | } | |
643 | ||
644 | ||
645 | // | |
646 | // Beauty | |
647 | // | |
648 | // | |
649 | // pt-distribution | |
650 | //____________________________________________________________ | |
198bb1c7 | 651 | Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t */*dummy*/) |
fe4da5cc | 652 | { |
d90f80fd | 653 | // Beauty pT |
654 | const Double_t kpt0 = 4.; | |
655 | const Double_t kxn = 3.6; | |
fe4da5cc | 656 | Double_t x=*px; |
657 | // | |
d90f80fd | 658 | Double_t pass1 = 1.+(x/kpt0)*(x/kpt0); |
659 | return x/TMath::Power(pass1,kxn); | |
fe4da5cc | 660 | } |
661 | // y-distribution | |
198bb1c7 | 662 | Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t */*dummy*/) |
fe4da5cc | 663 | { |
d90f80fd | 664 | // Beauty y |
665 | Double_t *dum=0; | |
666 | return YJpsi(px,dum); | |
fe4da5cc | 667 | } |
668 | ||
65fb704d | 669 | Int_t AliGenMUONlib::IpBeauty(TRandom *ran) |
fe4da5cc | 670 | { |
d90f80fd | 671 | // Beauty Composition |
65fb704d | 672 | Float_t random; |
fe4da5cc | 673 | Int_t ip; |
65fb704d | 674 | random = ran->Rndm(); |
675 | if (random < 0.5) { | |
fe4da5cc | 676 | ip=511; |
65fb704d | 677 | } else if (random < 0.75) { |
fe4da5cc | 678 | ip=521; |
65fb704d | 679 | } else if (random < 0.90) { |
fe4da5cc | 680 | ip=531; |
681 | } else { | |
682 | ip=5122; | |
683 | } | |
65fb704d | 684 | if (ran->Rndm() < 0.5) {ip=-ip;} |
fe4da5cc | 685 | |
686 | return ip; | |
687 | } | |
688 | ||
689 | typedef Double_t (*GenFunc) (Double_t*, Double_t*); | |
53904666 | 690 | GenFunc AliGenMUONlib::GetPt(Int_t param, const char* tname) const |
fe4da5cc | 691 | { |
d90f80fd | 692 | // Return pointer to pT parameterisation |
05932df6 | 693 | TString sname = TString(tname); |
fe4da5cc | 694 | GenFunc func; |
753690b0 | 695 | switch (param) |
fe4da5cc | 696 | { |
34f60c01 | 697 | case kPhi: |
fe4da5cc | 698 | func=PtPhi; |
699 | break; | |
89512a3b | 700 | case kOmega: |
701 | func=PtOmega; | |
702 | break; | |
703 | case kEta: | |
704 | func=PtEta; | |
705 | break; | |
0ad09590 | 706 | case kJpsiFamily: |
34f60c01 | 707 | case kJpsi: |
bb6e81ac | 708 | if (sname == "Vogt" || sname == "Vogt PbPb") { |
05932df6 | 709 | func=PtJpsiPbPb; |
bb6e81ac | 710 | } else if (sname == "Vogt pp") { |
711 | func=PtJpsiPP; | |
05932df6 | 712 | } else { |
713 | func=PtJpsi; | |
714 | } | |
fe4da5cc | 715 | break; |
17d28ba5 | 716 | case kJpsiFromB: |
717 | func = PtJpsiBPbPb; | |
718 | break; | |
0ad09590 | 719 | case kUpsilonFamily: |
34f60c01 | 720 | case kUpsilon: |
bb6e81ac | 721 | if (sname == "Vogt" || sname == "Vogt PbPb") { |
05932df6 | 722 | func=PtUpsilonPbPb; |
bb6e81ac | 723 | } else if (sname == "Vogt pp") { |
724 | func=PtUpsilonPP; | |
05932df6 | 725 | } else { |
726 | func=PtUpsilon; | |
727 | } | |
0ad09590 | 728 | break; |
34f60c01 | 729 | case kCharm: |
fe4da5cc | 730 | func=PtCharm; |
731 | break; | |
34f60c01 | 732 | case kBeauty: |
fe4da5cc | 733 | func=PtBeauty; |
734 | break; | |
34f60c01 | 735 | case kPion: |
753690b0 | 736 | func=PtPion; |
737 | break; | |
34f60c01 | 738 | case kKaon: |
753690b0 | 739 | func=PtKaon; |
740 | break; | |
119b35c7 | 741 | default: |
742 | func=0; | |
743 | printf("<AliGenMUONlib::GetPt> unknown parametrisation\n"); | |
fe4da5cc | 744 | } |
745 | return func; | |
746 | } | |
747 | ||
53904666 | 748 | GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname) const |
fe4da5cc | 749 | { |
05932df6 | 750 | TString sname = TString(tname); |
751 | ||
d90f80fd | 752 | // Return pointer to y- parameterisation |
fe4da5cc | 753 | GenFunc func; |
753690b0 | 754 | switch (param) |
fe4da5cc | 755 | { |
34f60c01 | 756 | case kPhi: |
fe4da5cc | 757 | func=YPhi; |
758 | break; | |
89512a3b | 759 | case kEta: |
760 | func=YEta; | |
761 | break; | |
762 | case kOmega: | |
763 | func=YOmega; | |
764 | break; | |
0ad09590 | 765 | case kJpsiFamily: |
34f60c01 | 766 | case kJpsi: |
bb6e81ac | 767 | if (sname == "Vogt" || sname == "Vogt PbPb") { |
05932df6 | 768 | func=YJpsiPbPb; |
bb6e81ac | 769 | } else if (sname == "Vogt pp"){ |
770 | func=YJpsiPP; | |
05932df6 | 771 | } else { |
772 | func=YJpsi; | |
773 | } | |
17d28ba5 | 774 | break; |
775 | case kJpsiFromB: | |
776 | func = YJpsiBPbPb; | |
fe4da5cc | 777 | break; |
0ad09590 | 778 | case kUpsilonFamily: |
34f60c01 | 779 | case kUpsilon: |
bb6e81ac | 780 | if (sname == "Vogt" || sname == "Vogt PbPb") { |
05932df6 | 781 | func=YUpsilonPbPb; |
bb6e81ac | 782 | } else if (sname == "Vogt pp") { |
783 | func = YUpsilonPP; | |
05932df6 | 784 | } else { |
785 | func=YUpsilon; | |
786 | } | |
fe4da5cc | 787 | break; |
34f60c01 | 788 | case kCharm: |
fe4da5cc | 789 | func=YCharm; |
790 | break; | |
34f60c01 | 791 | case kBeauty: |
fe4da5cc | 792 | func=YBeauty; |
793 | break; | |
34f60c01 | 794 | case kPion: |
753690b0 | 795 | func=YPion; |
796 | break; | |
34f60c01 | 797 | case kKaon: |
753690b0 | 798 | func=YKaon; |
799 | break; | |
119b35c7 | 800 | default: |
801 | func=0; | |
802 | printf("<AliGenMUONlib::GetY> unknown parametrisation\n"); | |
fe4da5cc | 803 | } |
804 | return func; | |
805 | } | |
65fb704d | 806 | typedef Int_t (*GenFuncIp) (TRandom *); |
198bb1c7 | 807 | GenFuncIp AliGenMUONlib::GetIp(Int_t param, const char* /*tname*/) const |
fe4da5cc | 808 | { |
d90f80fd | 809 | // Return pointer to particle type parameterisation |
fe4da5cc | 810 | GenFuncIp func; |
753690b0 | 811 | switch (param) |
fe4da5cc | 812 | { |
34f60c01 | 813 | case kPhi: |
fe4da5cc | 814 | func=IpPhi; |
815 | break; | |
89512a3b | 816 | case kEta: |
817 | func=IpEta; | |
818 | break; | |
819 | case kOmega: | |
820 | func=IpOmega; | |
821 | break; | |
0ad09590 | 822 | case kJpsiFamily: |
823 | func=IpJpsiFamily; | |
824 | break; | |
34f60c01 | 825 | case kJpsi: |
17d28ba5 | 826 | case kJpsiFromB: |
fe4da5cc | 827 | func=IpJpsi; |
828 | break; | |
34f60c01 | 829 | case kUpsilon: |
fe4da5cc | 830 | func=IpUpsilon; |
831 | break; | |
0ad09590 | 832 | case kUpsilonFamily: |
833 | func=IpUpsilonFamily; | |
834 | break; | |
34f60c01 | 835 | case kCharm: |
fe4da5cc | 836 | func=IpCharm; |
837 | break; | |
34f60c01 | 838 | case kBeauty: |
fe4da5cc | 839 | func=IpBeauty; |
840 | break; | |
34f60c01 | 841 | case kPion: |
753690b0 | 842 | func=IpPion; |
843 | break; | |
34f60c01 | 844 | case kKaon: |
753690b0 | 845 | func=IpKaon; |
846 | break; | |
119b35c7 | 847 | default: |
848 | func=0; | |
849 | printf("<AliGenMUONlib::GetIp> unknown parametrisation\n"); | |
fe4da5cc | 850 | } |
851 | return func; | |
852 | } | |
853 | ||
854 | ||
753690b0 | 855 | |
05932df6 | 856 | Float_t AliGenMUONlib::Interpolate(Float_t x, Float_t* y, Float_t x0, |
857 | Float_t dx, | |
858 | Int_t n, Int_t no) | |
859 | { | |
860 | // | |
861 | // Neville's alorithm for interpolation | |
862 | // | |
863 | // x: x-value | |
864 | // y: Input array | |
865 | // x0: minimum x | |
866 | // dx: step size | |
867 | // n: number of data points | |
868 | // no: order of polynom | |
869 | // | |
870 | Float_t* c = new Float_t[n]; | |
871 | Float_t* d = new Float_t[n]; | |
872 | Int_t m, i; | |
873 | for (i = 0; i < n; i++) { | |
874 | c[i] = y[i]; | |
875 | d[i] = y[i]; | |
876 | } | |
877 | ||
878 | Int_t ns = int((x - x0)/dx); | |
879 | ||
880 | Float_t y1 = y[ns]; | |
881 | ns--; | |
882 | for (m = 0; m < no; m++) { | |
883 | for (i = 0; i < n-m; i++) { | |
884 | Float_t ho = x0 + Float_t(i) * dx - x; | |
885 | Float_t hp = x0 + Float_t(i+m+1) * dx - x; | |
886 | Float_t w = c[i+1] - d[i]; | |
887 | Float_t den = ho-hp; | |
888 | den = w/den; | |
889 | d[i] = hp * den; | |
890 | c[i] = ho * den; | |
891 | } | |
892 | Float_t dy; | |
893 | ||
894 | if (2*ns < (n-m-1)) { | |
895 | dy = c[ns+1]; | |
896 | } else { | |
897 | dy = d[ns--]; | |
898 | } | |
899 | y1 += dy;} | |
900 | delete[] c; | |
901 | delete[] d; | |
902 | ||
903 | return y1; | |
904 | } | |
905 | ||
753690b0 | 906 |