]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVGEN/AliGenMUONlib.cxx
AliCaloPID: Correct matching rejection in case of recalculation in the analysis,...
[u/mrichter/AliRoot.git] / EVGEN / AliGenMUONlib.cxx
CommitLineData
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 32ClassImp(AliGenMUONlib)
33//
34// Pions
75e0cc59 35Double_t AliGenMUONlib::PtPion(const Double_t *px, const 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//
75e0cc59 64Double_t AliGenMUONlib::YPion( const Double_t *py, const 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 79Int_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
93Double_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};
a4f206bf 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//____________________________________________________________
75e0cc59 114Double_t AliGenMUONlib::PtKaon( const Double_t *px, const Double_t */*dummy*/)
753690b0 115{
d90f80fd 116// Kaon pT
a4f206bf 117 return PtScal(*px,2);
753690b0 118}
119
120// y-distribution
fe4da5cc 121//____________________________________________________________
75e0cc59 122Double_t AliGenMUONlib::YKaon( const Double_t *py, const 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 139Int_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//____________________________________________________________
a4f206bf 154Double_t AliGenMUONlib::PtJpsiPP7000( const Double_t *px, const Double_t */*dummy*/)
155{
156// J/Psi pT
157//
158// pp 7 TeV
159// using ALICE data at 2.5<y<4, see arXiv:1103.2394
160
161 const Double_t kpt0 = 2.44;
162 const Double_t kxn = 3.9;
163 Double_t x=*px;
164 //
165 Double_t pass1 = 1.+0.36*(x/kpt0)*(x/kpt0);
166 return x/TMath::Power(pass1,kxn);
167}
168
169Double_t AliGenMUONlib::PtJpsiPP2760( const Double_t *px, const Double_t */*dummy*/)
170{
171// J/Psi pT
172//
173// pp 2.76 TeV
174// from the fit of RHIC + LHC data, see arXiv:1103.2394
175
176 const Double_t kpt0 = 2.31;
177 const Double_t kxn = 3.9;
178 Double_t x=*px;
179 //
180 Double_t pass1 = 1.+0.36*(x/kpt0)*(x/kpt0);
181 return x/TMath::Power(pass1,kxn);
182}
183
184Double_t AliGenMUONlib::PtJpsiPbPb2760( const Double_t *px, const Double_t *dummy)
185{
186// J/Psi pT
187//
188// PbPb 2.76 TeV, for EKS98 with minimum bias shadowing factor 0.66
189//
190 Double_t c[5] = {6.01022e-01, 4.70988e-02, -2.27917e-03, 3.09885e-05, 1.31955e-06};
191 Double_t x=*px;
192 Double_t y;
193 Int_t j;
194 y = c[j = 4];
195 while (j > 0) y = y * x + c[--j];
196 //
197 Double_t d = 1.+c[4]*TMath::Power(x,4);
198 return y/d * AliGenMUONlib::PtJpsiPP2760(px,dummy);
199}
200
75e0cc59 201Double_t AliGenMUONlib::PtJpsi( const Double_t *px, const Double_t */*dummy*/)
fe4da5cc 202{
d90f80fd 203// J/Psi pT
204 const Double_t kpt0 = 4.;
205 const Double_t kxn = 3.6;
fe4da5cc 206 Double_t x=*px;
207 //
d90f80fd 208 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
209 return x/TMath::Power(pass1,kxn);
fe4da5cc 210}
05932df6 211
75e0cc59 212Double_t AliGenMUONlib::PtJpsiCDFscaled( const Double_t *px, const Double_t */*dummy*/)
0e137c25 213{
214// J/Psi pT
9e9ae065 215//
216// PbPb 5.5 TeV
217// scaled from CDF data at 2 TeV
218// see S.Grigoryan, PWG3 Meeting, 27th Oct 2008
219
220 const Double_t kpt0 = 5.100;
221 const Double_t kxn = 4.102;
222 Double_t x=*px;
223 //
224 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
225 return x/TMath::Power(pass1,kxn);
226}
227
75e0cc59 228Double_t AliGenMUONlib::PtJpsiCDFscaledPP( const Double_t *px, const Double_t */*dummy*/)
9ff13849 229{
230// J/Psi pT
231//
232// pp 14 TeV
9ff13849 233// scaled from CDF data at 2 TeV
234
9e9ae065 235 const Double_t kpt0 = 5.630;
236 const Double_t kxn = 4.071;
237 Double_t x=*px;
238 //
239 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
240 return x/TMath::Power(pass1,kxn);
241}
242
75e0cc59 243Double_t AliGenMUONlib::PtJpsiCDFscaledPP10( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 244{
245// J/Psi pT
246//
247// pp 10 TeV
248// scaled from CDF data at 2 TeV
249
250 const Double_t kpt0 = 5.334;
251 const Double_t kxn = 4.071;
252 Double_t x=*px;
253 //
254 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
255 return x/TMath::Power(pass1,kxn);
256}
257
9fd56238 258Double_t AliGenMUONlib::PtJpsiCDFscaledPP9( const Double_t *px, const Double_t */*dummy*/)
259{
260// J/Psi pT
261//
262// pp 8.8 TeV
263// scaled from CDF data at 2 TeV
264//
265 const Double_t kpt0 = 5.245;
266 const Double_t kxn = 4.071;
267 Double_t x=*px;
268 //
269 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
270 return x/TMath::Power(pass1,kxn);
271}
272
273Double_t AliGenMUONlib::PtJpsiCDFscaledPP7( const Double_t *px, const Double_t */*dummy*/)
274{
275// J/Psi pT
276//
277// pp 7 TeV
278// scaled from CDF data at 2 TeV
279
280 const Double_t kpt0 = 5.072;
281 const Double_t kxn = 4.071;
282 Double_t x=*px;
283 //
284 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
285 return x/TMath::Power(pass1,kxn);
286}
287
288Double_t AliGenMUONlib::PtJpsiCDFscaledPP4( const Double_t *px, const Double_t */*dummy*/)
289{
290// J/Psi pT
291//
292// pp 3.94 TeV
293// scaled from CDF data at 2 TeV
294//
295 const Double_t kpt0 = 4.647;
296 const Double_t kxn = 4.071;
297 Double_t x=*px;
298 //
299 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
300 return x/TMath::Power(pass1,kxn);
301}
302
a4f206bf 303Double_t AliGenMUONlib::PtJpsiCDFscaledPP3( const Double_t *px, const Double_t */*dummy*/)
304{
305// J/Psi pT
306//
307// pp 2.76 TeV
308// scaled from CDF data at 1.9 TeV
309//
310 const Double_t kpt0 = 4.435;
311 const Double_t kxn = 4.071;
312 Double_t x=*px;
313 //
314 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
315 return x/TMath::Power(pass1,kxn);
316}
317
318Double_t AliGenMUONlib::PtJpsiCDFscaledPP2( const Double_t *px, const Double_t */*dummy*/)
319{
320// J/Psi pT
321//
322// pp 1.9 TeV
323// fit of the CDF data at 1.9 TeV
324//
325 const Double_t kpt0 = 4.233;
326 const Double_t kxn = 4.071;
327 Double_t x=*px;
328 //
329 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
330 return x/TMath::Power(pass1,kxn);
331}
332
9fd56238 333Double_t AliGenMUONlib::PtJpsiCDFscaledPPb9( const Double_t *px, const Double_t *dummy)
334{
335// J/Psi pT
336//
337// pPb 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.80
338//
339 Double_t c[5] = {6.42774e-01, 1.86168e-02, -6.77296e-04, 8.93512e-06, 1.31586e-07};
340 Double_t x=*px;
341 Double_t y;
342 Int_t j;
343 y = c[j = 4];
344 while (j > 0) y = y * x + c[--j];
345 //
346 Double_t d = 1.+c[4]*TMath::Power(x,4);
347 return y/d * AliGenMUONlib::PtJpsiCDFscaledPP9(px,dummy);
348}
349
350Double_t AliGenMUONlib::PtJpsiCDFscaledPbP9( const Double_t *px, const Double_t *dummy)
351{
352// J/Psi pT
353//
354// Pbp 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.80
355//
356 Double_t c[5] = {8.58557e-01, 5.39791e-02, -4.75180e-03, 2.49463e-04, 5.52396e-05};
357 Double_t x=*px;
358 Double_t y;
359 Int_t j;
360 y = c[j = 4];
361 while (j > 0) y = y * x + c[--j];
362 //
363 Double_t d = 1.+c[4]*TMath::Power(x,4);
364 return y/d * AliGenMUONlib::PtJpsiCDFscaledPP9(px,dummy);
365}
366
367Double_t AliGenMUONlib::PtJpsiCDFscaledPbPb4( const Double_t *px, const Double_t *dummy)
368{
369// J/Psi pT
370//
371// PbPb 3.94 TeV, for EKS98 with minimum bias shadowing factor 0.66
372//
373 Double_t c[5] = {6.01022e-01, 4.70988e-02, -2.27917e-03, 3.09885e-05, 1.31955e-06};
374 Double_t x=*px;
375 Double_t y;
376 Int_t j;
377 y = c[j = 4];
378 while (j > 0) y = y * x + c[--j];
379 //
380 Double_t d = 1.+c[4]*TMath::Power(x,4);
381 return y/d * AliGenMUONlib::PtJpsiCDFscaledPP4(px,dummy);
382}
383
75e0cc59 384Double_t AliGenMUONlib::PtJpsiFlat( const Double_t */*px*/, const Double_t */*dummy*/ )
4ca8d070 385{
386 return 1.;
387}
388
75e0cc59 389Double_t AliGenMUONlib::PtJpsiPbPb( const Double_t *px, const Double_t */*dummy*/)
05932df6 390{
1af7144e 391// J/Psi pT spectrum
05932df6 392//
393// R. Vogt 2002
394// PbPb 5.5 TeV
395// MRST HO
396// mc = 1.4 GeV, pt-kick 1 GeV
397//
1af7144e 398 Float_t x = px[0];
399 Float_t c[8] = {
400 -2.13098e+00, 9.46552e+00, -5.06799e+00, 1.27260e+00,
401 -1.83806e-01, 1.55853e-02, -7.23241e-04, 1.42105e-05
05932df6 402 };
1af7144e 403
3d905dd7 404 Double_t y;
36349df1 405 if (x < 10.) {
3d905dd7 406 Int_t j;
407 y = c[j = 7];
408 while (j > 0) y = y * x +c[--j];
409 y = x * TMath::Exp(y);
410 } else {
411 y = 0.;
412 }
1af7144e 413 return y;
05932df6 414}
17d28ba5 415
75e0cc59 416Double_t AliGenMUONlib::PtJpsiBPbPb( const Double_t *px, const Double_t */*dummy*/)
17d28ba5 417{
418// J/Psi pT spectrum
419// B -> J/Psi X
420 Double_t x0 = 4.0384;
421 Double_t n = 3.0288;
422
423 Double_t x = px[0];
424 Double_t y = x / TMath::Power((1. + (x/x0)*(x/x0)), n);
425
426 return y;
427}
428
429
75e0cc59 430Double_t AliGenMUONlib::PtJpsiPP( const Double_t *px, const Double_t */*dummy*/)
bb6e81ac 431{
432// J/Psi pT spectrum
433//
434// R. Vogt 2002
435// pp 14 TeV
436// MRST HO
437// mc = 1.4 GeV, pt-kick 1 GeV
438//
439 Float_t x = px[0];
440 Float_t c[4] = {8.47471e+00, -1.93567e+00, 1.50271e-01, -5.51212e-03};
441
442 Double_t y;
443 if (x < 10.) {
444 Int_t j;
445 y = c[j = 3];
446 while (j > 0) y = y * x +c[--j];
447 y = x * TMath::Exp(y);
448 } else {
449 y = 0.;
450 }
451 return y;
452}
453
fe4da5cc 454//
455// y-distribution
456//____________________________________________________________
a4f206bf 457Double_t AliGenMUONlib::YJpsiPP7000( const Double_t *px, const Double_t */*dummy*/)
458{
459// J/Psi y
460//
461// pp 7 TeV
462// from the fit of RHIC + LHC data, see arXiv:1103.2394
463//
464 Double_t x = px[0]/7.72;
465 x = x*x;
466 Double_t y = TMath::Exp(-x/0.383/0.383/2);
467 if(x > 1) y=0;
468 return y;
469}
470
471Double_t AliGenMUONlib::YJpsiPP2760( const Double_t *px, const Double_t */*dummy*/)
472{
473// J/Psi y
474//
475// pp 2.76 TeV
476// from the fit of RHIC + LHC data, see arXiv:1103.2394
477//
478 Double_t x = px[0]/6.79;
479 x = x*x;
480 Double_t y = TMath::Exp(-x/0.383/0.383/2);
481 if(x > 1) y=0;
482 return y;
483}
484
485Double_t AliGenMUONlib::YJpsiPbPb2760( const Double_t *px, const Double_t *dummy)
486{
487// J/Psi y
488//
489// PbPb 2.76 TeV, for EKS98 with minimum bias shadowing factor 0.66
490//
491 Double_t c[4] = {5.95228e-01, 9.45069e-03, 2.44710e-04, -1.32894e-05};
492 Double_t x = px[0]*px[0];
493 Double_t y;
494 Int_t j;
495 y = c[j = 3];
496 while (j > 0) y = y * x + c[--j];
497 if(y<0) y=0;
498
499 return y * AliGenMUONlib::YJpsiPP2760(px,dummy);
500}
501
75e0cc59 502Double_t AliGenMUONlib::YJpsi(const Double_t *py, const Double_t */*dummy*/)
fe4da5cc 503{
d90f80fd 504// J/psi y
505 const Double_t ky0 = 4.;
506 const Double_t kb=1.;
fe4da5cc 507 Double_t yj;
508 Double_t y=TMath::Abs(*py);
509 //
d90f80fd 510 if (y < ky0)
511 yj=kb;
fe4da5cc 512 else
d90f80fd 513 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
fe4da5cc 514 return yj;
515}
05932df6 516
75e0cc59 517Double_t AliGenMUONlib::YJpsiFlat( const Double_t */*py*/, const Double_t */*dummy*/ )
4ca8d070 518{
519 return 1.;
520}
521
05932df6 522
75e0cc59 523Double_t AliGenMUONlib::YJpsiPbPb( const Double_t *px, const Double_t */*dummy*/)
05932df6 524{
525
526//
527// J/Psi y
528//
529//
530// R. Vogt 2002
531// PbPb 5.5 TeV
532// MRST HO
533// mc = 1.4 GeV, pt-kick 1 GeV
534//
1af7144e 535 Double_t c[5] = {-6.03425e+02, 4.98257e+02, -1.38794e+02, 1.62209e+01, -6.85955e-01};
536 Double_t x = TMath::Abs(px[0]);
537 Double_t y;
538
539 if (x < 4.) {
540 y = 31.754;
541 } else if (x < 6) {
542 Int_t j;
543 y = c[j = 4];
544 while (j > 0) y = y * x + c[--j];
545 } else {
546 y =0.;
547 }
548
549 return y;
05932df6 550}
551
75e0cc59 552Double_t AliGenMUONlib::YJpsiCDFscaled( const Double_t *px, const Double_t* dummy)
0e137c25 553{
554 // J/Psi y
555 return AliGenMUONlib::YJpsiPbPb(px, dummy);
556}
557
75e0cc59 558Double_t AliGenMUONlib::YJpsiCDFscaledPP( const Double_t *px, const Double_t* dummy)
9ff13849 559{
560 // J/Psi y
561 return AliGenMUONlib::YJpsiPP(px, dummy);
562}
0e137c25 563
75e0cc59 564Double_t AliGenMUONlib::YJpsiCDFscaledPP10( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 565{
9e9ae065 566// J/Psi y
567//
568// pp 10 TeV
569// scaled from YJpsiPP(14 TeV) using 10 TeV / 14 TeV ratio of y-spectra in LO pQCD.
570// see S.Grigoryan, PWG3 Meeting, 27th Oct 2008
571//
572
573 Double_t c[5] = {2.46681e+01, 8.91486e+01, -3.21227e+01, 3.63075e+00, -1.32047e-01};
574
575 Double_t x = TMath::Abs(px[0]);
576 Double_t y;
577
578 if (x < 3.2) {
579 y = 98.523 - 1.3664 * x * x;
580 } else if (x < 7.5) {
581 Int_t j;
582 y = c[j = 4];
583 while (j > 0) y = y * x + c[--j];
584 } else {
585 y =0.;
586 }
587
588 if(y<0) y=0;
589
590 return y;
591}
592
9fd56238 593Double_t AliGenMUONlib::YJpsiCDFscaledPP9( const Double_t *px, const Double_t */*dummy*/)
594{
595// J/Psi y
596//
597// pp 8.8 TeV
598// rescaling of YJpsiPP(14 TeV) using 8.8 TeV / 14 TeV ratio of y-spectra in LO QCD
599//
600 Double_t c[5] = {3.33882e+02, -1.30980e+02, 2.59082e+01, -3.08935e+00, 1.56375e-01};
601 Double_t x = TMath::Abs(px[0]);
602 Double_t y;
603
604 if (x < 3.7) {
605 y = 99.236 - 1.5498 * x * x;
606 } else if (x < 7.4) {
607 Int_t j;
608 y = c[j = 4];
609 while (j > 0) y = y * x + c[--j];
610 } else {
611 y =0.;
612 }
613
614 if(y<0) y=0;
615
616 return y;
617}
618
619Double_t AliGenMUONlib::YJpsiCDFscaledPP9dummy(Double_t px)
620{
621 return AliGenMUONlib::YJpsiCDFscaledPP9(&px, (Double_t*) 0);
622}
623
624Double_t AliGenMUONlib::YJpsiCDFscaledPP7( const Double_t *px, const Double_t */*dummy*/)
625{
626// J/Psi y
627//
628// pp 7 TeV
629// scaled from YJpsiPP(14 TeV) using 7 TeV / 14 TeV ratio of y-spectra in LO pQCD.
630//
631
632 Double_t c[5] = {6.71181e+02, -3.69240e+02, 8.89644e+01, -1.04937e+01, 4.80959e-01};
633
634 Double_t x = TMath::Abs(px[0]);
635 Double_t y;
636
637 if (x < 4.0) {
638 y = 100.78 - 1.8353 * x * x;
639 } else if (x < 7.3) {
640 Int_t j;
641 y = c[j = 4];
642 while (j > 0) y = y * x + c[--j];
643 } else {
644 y =0.;
645 }
646
647 if(y<0) y=0;
648
649 return y;
650}
651
652Double_t AliGenMUONlib::YJpsiCDFscaledPP4( const Double_t *px, const Double_t */*dummy*/)
653{
654// J/Psi y
655//
656// pp 3.94 TeV
657// rescaling of YJpsiPP(14 TeV) using 3.94 TeV / 14 TeV ratio of y-spectra in LO QCD
658//
659 Double_t c[5] = {4.00785e+02, -1.41159e+01, -3.28599e+01, 5.53048e+00, -2.45151e-01};
660 Double_t x = TMath::Abs(px[0]);
661 Double_t y;
662
663 if (x < 5.5) {
664 y = 107.389 - 2.7454 * x * x;
665 } else if (x < 7.0) {
666 Int_t j;
667 y = c[j = 4];
668 while (j > 0) y = y * x + c[--j];
669 } else {
670 y =0.;
671 }
672
673 if(y<0) y=0;
674
675 return y;
676}
677
a4f206bf 678Double_t AliGenMUONlib::YJpsiCDFscaledPP3( const Double_t *px, const Double_t *dummy)
679{
680// J/Psi y
681 return AliGenMUONlib::YJpsiPP2760(px, dummy);
682}
683
684Double_t AliGenMUONlib::YJpsiCDFscaledPP2( const Double_t *px, const Double_t */*dummy*/)
685{
686// J/Psi y
687//
688// pp 1.9 TeV
689// from the fit of RHIC + LHC data, see arXiv:1103.2394
690//
691 Double_t x = px[0]/6.42;
692 x = x*x;
693 Double_t y = TMath::Exp(-x/0.383/0.383/2);
694 if(x > 1) y=0;
695 return y;
696}
697
75e0cc59 698Double_t AliGenMUONlib::YJpsiPP( const Double_t *px, const Double_t */*dummy*/)
bb6e81ac 699{
700
701//
702// J/Psi y
703//
704//
705// R. Vogt 2002
706// pp 14 TeV
707// MRST HO
708// mc = 1.4 GeV, pt-kick 1 GeV
709//
710
711 Double_t c[5] = {1.38532e+00, 1.00596e+02, -3.46378e+01, 3.94172e+00, -1.48319e-01};
712 Double_t x = TMath::Abs(px[0]);
713 Double_t y;
714
715 if (x < 2.5) {
716 y = 96.455 - 0.8483 * x * x;
717 } else if (x < 7.9) {
718 Int_t j;
719 y = c[j = 4];
720 while (j > 0) y = y * x + c[--j];
721 } else {
722 y =0.;
723 }
724
725 return y;
726}
727
9fd56238 728Double_t AliGenMUONlib::YJpsiCDFscaledPPb9( const Double_t *px, const Double_t */*dummy*/)
729{
730// J/Psi y
731//
732// pPb 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.80
733//
734 Double_t c[7] = {7.52296e-01, 2.49917e-02, 3.36500e-03, 1.91187e-03, 2.92154e-04,
735 -4.16509e-05,-7.62709e-06};
736 Double_t y;
737 Double_t x = px[0] + 0.47; // rapidity shift
738 Int_t j;
739 y = c[j = 6];
740 while (j > 0) y = y * x + c[--j];
741 if(y<0) y=0;
742
743 return y * AliGenMUONlib::YJpsiCDFscaledPP9dummy(x);
744}
745
746Double_t AliGenMUONlib::YJpsiCDFscaledPbP9( const Double_t *px, const Double_t */*dummy*/)
747{
748// J/Psi y
749//
750// Pbp 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.80
751//
752 Double_t c[7] = {7.52296e-01, 2.49917e-02, 3.36500e-03, 1.91187e-03, 2.92154e-04,
753 -4.16509e-05,-7.62709e-06};
754 Double_t y;
755 Double_t x = -px[0] + 0.47; // rapidity shift
756 Int_t j;
757 y = c[j = 6];
758 while (j > 0) y = y * x + c[--j];
759 if(y<0) y=0;
760
761 return y * AliGenMUONlib::YJpsiCDFscaledPP9dummy(x);
762}
763
764Double_t AliGenMUONlib::YJpsiCDFscaledPbPb4( const Double_t *px, const Double_t *dummy)
765{
766// J/Psi y
767//
768// PbPb 3.94 TeV, for EKS98 with minimum bias shadowing factor 0.66
769//
770 Double_t c[4] = {5.95228e-01, 9.45069e-03, 2.44710e-04, -1.32894e-05};
771 Double_t x = px[0]*px[0];
772 Double_t y;
773 Int_t j;
774 y = c[j = 3];
775 while (j > 0) y = y * x + c[--j];
776 if(y<0) y=0;
777
778 return y * AliGenMUONlib::YJpsiCDFscaledPP4(px,dummy);
779}
780
75e0cc59 781Double_t AliGenMUONlib::YJpsiBPbPb( const Double_t *px, const Double_t */*dummy*/)
17d28ba5 782{
783
784//
785// J/Psi from B->J/Psi X
786//
787//
788
789
790 Double_t c[7] = {7.37025e-02, 0., -2.94487e-03, 0., 6.07953e-06, 0., 5.39219e-07};
791
792 Double_t x = TMath::Abs(px[0]);
793 Double_t y;
794
795 if (x > 6.) {
796 y = 0.;
797 } else {
798 Int_t j;
799 y = c[j = 6];
800 while (j > 0) y = y * x + c[--j];
801 }
802
803 return y;
804}
805
806
807
fe4da5cc 808// particle composition
809//
65fb704d 810Int_t AliGenMUONlib::IpJpsi(TRandom *)
fe4da5cc 811{
d90f80fd 812// J/Psi composition
88cb7938 813 return 443;
fe4da5cc 814}
88e5db43 815Int_t AliGenMUONlib::IpPsiP(TRandom *)
816{
817// Psi prime composition
818 return 100443;
819}
0ad09590 820Int_t AliGenMUONlib::IpJpsiFamily(TRandom *)
821{
822// J/Psi composition
823 Int_t ip;
824 Float_t r = gRandom->Rndm();
825 if (r < 0.98) {
826 ip = 443;
827 } else {
828 ip = 100443;
829 }
830 return ip;
831}
832
fe4da5cc 833
88e5db43 834
fe4da5cc 835// Upsilon
836//
837//
838// pt-distribution
839//____________________________________________________________
75e0cc59 840Double_t AliGenMUONlib::PtUpsilon( const Double_t *px, const Double_t */*dummy*/ )
fe4da5cc 841{
d90f80fd 842// Upsilon pT
843 const Double_t kpt0 = 5.3;
844 const Double_t kxn = 2.5;
fe4da5cc 845 Double_t x=*px;
846 //
d90f80fd 847 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
848 return x/TMath::Power(pass1,kxn);
fe4da5cc 849}
05932df6 850
75e0cc59 851Double_t AliGenMUONlib::PtUpsilonCDFscaled( const Double_t *px, const Double_t */*dummy*/ )
0e137c25 852{
853// Upsilon pT
48416d65 854 const Double_t kpt0 = 7.753;
855 const Double_t kxn = 3.042;
0e137c25 856 Double_t x=*px;
857 //
858 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
859 return x/TMath::Power(pass1,kxn);
860}
861
75e0cc59 862Double_t AliGenMUONlib::PtUpsilonCDFscaledPP( const Double_t *px, const Double_t */*dummy*/ )
9ff13849 863{
864// Upsilon pT
865//
866// pp 14 TeV
867//
868// scaled from CDF data at 2 TeV
869
870 const Double_t kpt0 = 8.610;
871 const Double_t kxn = 3.051;
872 Double_t x=*px;
873 //
874 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
875 return x/TMath::Power(pass1,kxn);
876}
877
b33adf51 878Double_t AliGenMUONlib::PtUpsilonCDFscaledPP10( const Double_t *px, const Double_t */*dummy*/)
879{
880// Upsilon pT
881//
882// pp 10 TeV
883//
884// scaled from CDF data at 2 TeV
885
886 const Double_t kpt0 = 8.235;
887 const Double_t kxn = 3.051;
888 Double_t x=*px;
889 //
890 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
891 return x/TMath::Power(pass1,kxn);
892}
893
9fd56238 894Double_t AliGenMUONlib::PtUpsilonCDFscaledPP9( const Double_t *px, const Double_t */*dummy*/)
895{
896// Upsilon pT
897//
898// pp 8.8 TeV
899// scaled from CDF data at 2 TeV
900//
901 const Double_t kpt0 = 8.048;
902 const Double_t kxn = 3.051;
903 Double_t x=*px;
904 //
905 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
906 return x/TMath::Power(pass1,kxn);
907}
908
909Double_t AliGenMUONlib::PtUpsilonCDFscaledPP7( const Double_t *px, const Double_t */*dummy*/)
910{
911// Upsilon pT
912//
913// pp 7 TeV
914//
915// scaled from CDF data at 2 TeV
916
917 const Double_t kpt0 = 7.817;
918 const Double_t kxn = 3.051;
919 Double_t x=*px;
920 //
921 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
922 return x/TMath::Power(pass1,kxn);
923}
924
925Double_t AliGenMUONlib::PtUpsilonCDFscaledPP4( const Double_t *px, const Double_t */*dummy*/)
926{
927// Upsilon pT
928//
929// pp 3.94 TeV
930// scaled from CDF data at 2 TeV
931//
932 const Double_t kpt0 = 7.189;
933 const Double_t kxn = 3.051;
934 Double_t x=*px;
935 //
936 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
937 return x/TMath::Power(pass1,kxn);
938}
939
940Double_t AliGenMUONlib::PtUpsilonCDFscaledPPb9( const Double_t *px, const Double_t *dummy)
941{
942// Upsilon pT
943//
944// pPb 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.90
945//
946 Double_t c[5] = {7.64952e-01, 1.12501e-04, 4.96038e-04, -3.03198e-05, 3.74035e-06};
947 Double_t x=*px;
948 Double_t y;
949 Int_t j;
950 y = c[j = 4];
951 while (j > 0) y = y * x + c[--j];
952 //
953 Double_t d = 1.+c[4]*TMath::Power(x,4);
954 return y/d * AliGenMUONlib::PtUpsilonCDFscaledPP9(px,dummy);
955}
956
957Double_t AliGenMUONlib::PtUpsilonCDFscaledPbP9( const Double_t *px, const Double_t *dummy)
958{
959// Upsilon pT
960//
961// Pbp 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.90
962//
963 Double_t c[5] = {1.09881e+00, 3.08329e-03, -2.00356e-04, 8.28991e-06, 2.52576e-06};
964 Double_t x=*px;
965 Double_t y;
966 Int_t j;
967 y = c[j = 4];
968 while (j > 0) y = y * x + c[--j];
969 //
970 Double_t d = 1.+c[4]*TMath::Power(x,4);
971 return y/d * AliGenMUONlib::PtUpsilonCDFscaledPP9(px,dummy);
972}
973
974Double_t AliGenMUONlib::PtUpsilonCDFscaledPbPb4( const Double_t *px, const Double_t *dummy)
975{
976// Upsilon pT
977//
978// PbPb 3.94 TeV, for EKS98 with minimum bias shadowing factor 0.85
979//
980 Double_t c[5] = {8.65872e-01, 2.05465e-03, 2.56063e-04, -1.65598e-05, 2.29209e-06};
981 Double_t x=*px;
982 Double_t y;
983 Int_t j;
984 y = c[j = 4];
985 while (j > 0) y = y * x + c[--j];
986 //
987 Double_t d = 1.+c[4]*TMath::Power(x,4);
988 return y/d * AliGenMUONlib::PtUpsilonCDFscaledPP4(px,dummy);
989}
990
75e0cc59 991Double_t AliGenMUONlib::PtUpsilonFlat( const Double_t */*px*/, const Double_t */*dummy*/ )
4ca8d070 992{
993 return 1.;
994}
995
75e0cc59 996Double_t AliGenMUONlib::PtUpsilonPbPb( const Double_t *px, const Double_t */*dummy*/)
05932df6 997{
05932df6 998//
999// Upsilon pT
1000//
1001//
1002// R. Vogt 2002
1003// PbPb 5.5 TeV
1004// MRST HO
1005// mc = 1.4 GeV, pt-kick 1 GeV
1006//
1af7144e 1007 Float_t x = px[0];
1008 Double_t c[8] = {
1009 -1.03488e+01, 1.28065e+01, -6.60500e+00, 1.66140e+00,
1010 -2.34293e-01, 1.86925e-02, -7.80708e-04, 1.30610e-05
1011 };
3d905dd7 1012 Double_t y;
1013 if (x < 10.) {
1014 Int_t j;
1015 y = c[j = 7];
1016 while (j > 0) y = y * x +c[--j];
1017 y = x * TMath::Exp(y);
1018 } else {
1019 y = 0.;
1020 }
1af7144e 1021 return y;
05932df6 1022}
1023
75e0cc59 1024Double_t AliGenMUONlib::PtUpsilonPP( const Double_t *px, const Double_t */*dummy*/)
bb6e81ac 1025{
bb6e81ac 1026//
1027// Upsilon pT
1028//
1029//
1030// R. Vogt 2002
1031// pp 14 TeV
1032// MRST HO
1033// mc = 1.4 GeV, pt-kick 1 GeV
1034//
1035 Float_t x = px[0];
1036 Double_t c[8] = {-7.93955e+00, 1.06306e+01, -5.21392e+00, 1.19703e+00,
1037 -1.45718e-01, 8.95151e-03, -2.04806e-04, -1.13053e-06};
1038
1039 Double_t y;
1040 if (x < 10.) {
1041 Int_t j;
1042 y = c[j = 7];
1043 while (j > 0) y = y * x +c[--j];
1044 y = x * TMath::Exp(y);
1045 } else {
1046 y = 0.;
1047 }
1048 return y;
1049}
1050
fe4da5cc 1051//
1052// y-distribution
1053//
1054//____________________________________________________________
75e0cc59 1055Double_t AliGenMUONlib::YUpsilon(const Double_t *py, const Double_t */*dummy*/)
fe4da5cc 1056{
d90f80fd 1057// Upsilon y
1058 const Double_t ky0 = 3.;
1059 const Double_t kb=1.;
fe4da5cc 1060 Double_t yu;
1061 Double_t y=TMath::Abs(*py);
1062 //
d90f80fd 1063 if (y < ky0)
1064 yu=kb;
fe4da5cc 1065 else
d90f80fd 1066 yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
fe4da5cc 1067 return yu;
1068}
05932df6 1069
1070
75e0cc59 1071Double_t AliGenMUONlib::YUpsilonPbPb( const Double_t *px, const Double_t */*dummy*/)
05932df6 1072{
1073
1074//
1075// Upsilon y
1076//
1077//
1078// R. Vogt 2002
1079// PbPb 5.5 TeV
1080// MRST HO
1081// mc = 1.4 GeV, pt-kick 1 GeV
1082//
1083
1af7144e 1084 Double_t c[7] = {3.40036e-01, -3.98882e-07, -4.48398e-03, 8.46411e-08, -6.10854e-04,
1085 -2.99753e-09, 1.28895e-05};
b33adf51 1086 Double_t x = TMath::Abs(px[0]);
1087 if (x > 5.55) return 0.;
1af7144e 1088 Int_t j;
1089 Double_t y = c[j = 6];
1090 while (j > 0) y = y * x +c[--j];
1091 return y;
05932df6 1092}
1093
75e0cc59 1094Double_t AliGenMUONlib::YUpsilonCDFscaled( const Double_t *px, const Double_t *dummy)
0e137c25 1095{
1096 // Upsilon y
1097 return AliGenMUONlib::YUpsilonPbPb(px, dummy);
1098
4ca8d070 1099}
9ff13849 1100
75e0cc59 1101Double_t AliGenMUONlib::YUpsilonCDFscaledPP( const Double_t *px, const Double_t *dummy)
9ff13849 1102{
1103 // Upsilon y
1104 return AliGenMUONlib::YUpsilonPP(px, dummy);
1105
1106}
1107
75e0cc59 1108Double_t AliGenMUONlib::YUpsilonFlat( const Double_t */*px*/, const Double_t */*dummy*/)
4ca8d070 1109{
1110 // Upsilon y
1111 return 1.;
1112
0e137c25 1113}
1114
b33adf51 1115Double_t AliGenMUONlib::YUpsilonCDFscaledPP10( const Double_t *px, const Double_t */*dummy*/)
1116{
b33adf51 1117// Upsilon y
1118//
1119// pp 10 TeV
1120// scaled from YUpsilonPP(14 TeV) using 10 TeV / 14 TeV ratio of y-spectra in LO pQCD.
1121// see S.Grigoryan, PWG3 Meeting, 27th Oct 2008
1122//
9fd56238 1123 Double_t c[4] = {1., -2.17877e-02, -6.52830e-04, 1.40578e-05};
1124 Double_t x = TMath::Abs(px[0]);
1125 if (x > 6.1) return 0.;
1126 Int_t j;
1127 Double_t y = c[j = 3];
1128 while (j > 0) y = y * x*x +c[--j];
1129 return y;
1130}
1131
1132Double_t AliGenMUONlib::YUpsilonCDFscaledPP9( const Double_t *px, const Double_t */*dummy*/)
1133{
1134// Upsilon y
1135//
1136// pp 8.8 TeV
1137// rescaling of YUpsilonPP(14 TeV) using 8.8 TeV / 14 TeV ratio of y-spectra in LO QCD
1138//
1139 Double_t c[4] = {1., -2.37621e-02, -6.29610e-04, 1.47976e-05};
b33adf51 1140 Double_t x = TMath::Abs(px[0]);
1141 if (x > 6.1) return 0.;
1142 Int_t j;
1143 Double_t y = c[j = 3];
1144 while (j > 0) y = y * x*x +c[--j];
1145 return y;
1146}
1147
9fd56238 1148Double_t AliGenMUONlib::YUpsilonCDFscaledPP9dummy(Double_t px)
1149{
1150 return AliGenMUONlib::YUpsilonCDFscaledPP9(&px, (Double_t*) 0);
1151}
1152
1153Double_t AliGenMUONlib::YUpsilonCDFscaledPP7( const Double_t *px, const Double_t */*dummy*/)
1154{
1155// Upsilon y
1156//
1157// pp 7 TeV
1158// scaled from YUpsilonPP(14 TeV) using 7 TeV / 14 TeV ratio of y-spectra in LO pQCD.
1159//
1160 Double_t c[4] = {1., -2.61009e-02, -6.83937e-04, 1.78451e-05};
1161 Double_t x = TMath::Abs(px[0]);
1162 if (x > 6.0) return 0.;
1163 Int_t j;
1164 Double_t y = c[j = 3];
1165 while (j > 0) y = y * x*x +c[--j];
1166 return y;
1167}
1168
1169Double_t AliGenMUONlib::YUpsilonCDFscaledPP4( const Double_t *px, const Double_t */*dummy*/)
1170{
1171// Upsilon y
1172//
1173// pp 3.94 TeV
1174// rescaling of YUpsilonPP(14 TeV) using 3.94 TeV / 14 TeV ratio of y-spectra in LO QCD
1175//
1176 Double_t c[4] = {1., -3.91924e-02, -4.26184e-04, 2.10914e-05};
1177 Double_t x = TMath::Abs(px[0]);
1178 if (x > 5.7) return 0.;
1179 Int_t j;
1180 Double_t y = c[j = 3];
1181 while (j > 0) y = y * x*x +c[--j];
1182
1183 return y;
1184}
1185
75e0cc59 1186Double_t AliGenMUONlib::YUpsilonPP( const Double_t *px, const Double_t */*dummy*/)
bb6e81ac 1187{
1188
1189//
1190// Upsilon y
1191//
1192//
1193// R. Vogt 2002
1194// p p 14. TeV
1195// MRST HO
1196// mc = 1.4 GeV, pt-kick 1 GeV
1197//
1198 Double_t c[7] = {8.91936e-01, -6.46645e-07, -1.52774e-02, 4.28677e-08, -7.01517e-04,
1199 -6.20539e-10, 1.29943e-05};
b33adf51 1200 Double_t x = TMath::Abs(px[0]);
1201 if (x > 6.2) return 0.;
bb6e81ac 1202 Int_t j;
1203 Double_t y = c[j = 6];
1204 while (j > 0) y = y * x +c[--j];
1205 return y;
1206}
1207
9fd56238 1208Double_t AliGenMUONlib::YUpsilonCDFscaledPPb9( const Double_t *px, const Double_t */*dummy*/)
1209{
1210// Upsilon y
1211//
1212// pPb 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.90
1213//
1214 Double_t c[7] = {8.71829e-01, 4.77467e-02, 8.09671e-03, 6.45294e-04, -2.15730e-04,
1215 -4.67538e-05,-2.11683e-06};
1216 Double_t y;
1217 Double_t x = px[0] + 0.47; // rapidity shift
1218 Int_t j;
1219 y = c[j = 6];
1220 while (j > 0) y = y * x + c[--j];
1221 if(y<0) y=0;
1222
1223 return y * AliGenMUONlib::YUpsilonCDFscaledPP9dummy(x);
1224}
1225
1226Double_t AliGenMUONlib::YUpsilonCDFscaledPbP9( const Double_t *px, const Double_t */*dummy*/)
1227{
1228// Upsilon y
1229//
1230// Pbp 8.8 TeV, for EKS98 with minimum bias shadowing factor 0.90
1231//
1232 Double_t c[7] = {8.71829e-01, 4.77467e-02, 8.09671e-03, 6.45294e-04, -2.15730e-04,
1233 -4.67538e-05,-2.11683e-06};
1234 Double_t y;
1235 Double_t x = -px[0] + 0.47; // rapidity shift
1236 Int_t j;
1237 y = c[j = 6];
1238 while (j > 0) y = y * x + c[--j];
1239 if(y<0) y=0;
1240
1241 return y * AliGenMUONlib::YUpsilonCDFscaledPP9dummy(x);
1242}
1243
1244Double_t AliGenMUONlib::YUpsilonCDFscaledPbPb4( const Double_t *px, const Double_t *dummy)
1245{
1246// Upsilon y
1247//
1248// PbPb 3.94 TeV, for EKS98 with minimum bias shadowing factor 0.85
1249//
1250 Double_t c[4] = {8.27837e-01, 1.70115e-02, -1.26046e-03, 1.52091e-05};
1251 Double_t x = px[0]*px[0];
1252 Double_t y;
1253 Int_t j;
1254 y = c[j = 3];
1255 while (j > 0) y = y * x + c[--j];
1256 if(y<0) y=0;
1257
1258 return y * AliGenMUONlib::YUpsilonCDFscaledPP4(px,dummy);
1259}
1260
1261
fe4da5cc 1262// particle composition
1263//
65fb704d 1264Int_t AliGenMUONlib::IpUpsilon(TRandom *)
fe4da5cc 1265{
d90f80fd 1266// y composition
88cb7938 1267 return 553;
fe4da5cc 1268}
88e5db43 1269Int_t AliGenMUONlib::IpUpsilonP(TRandom *)
1270{
1271// y composition
1272 return 100553;
1273}
1274Int_t AliGenMUONlib::IpUpsilonPP(TRandom *)
1275{
1276// y composition
1277 return 200553;
1278}
0ad09590 1279Int_t AliGenMUONlib::IpUpsilonFamily(TRandom *)
1280{
1281// y composition
1282 Int_t ip;
1283 Float_t r = gRandom->Rndm();
1284
1285 if (r < 0.712) {
1286 ip = 553;
1287 } else if (r < 0.896) {
1288 ip = 100553;
1289 } else {
1290 ip = 200553;
1291 }
1292 return ip;
1293}
fe4da5cc 1294
88e5db43 1295
fe4da5cc 1296//
1297// Phi
1298//
1299//
1300// pt-distribution (by scaling of pion distribution)
1301//____________________________________________________________
75e0cc59 1302Double_t AliGenMUONlib::PtPhi( const Double_t *px, const Double_t */*dummy*/)
fe4da5cc 1303{
d90f80fd 1304// Phi pT
a4f206bf 1305 return PtScal(*px,7);
fe4da5cc 1306}
1307// y-distribution
75e0cc59 1308Double_t AliGenMUONlib::YPhi( const Double_t *px, const Double_t */*dummy*/)
fe4da5cc 1309{
d90f80fd 1310// Phi y
1311 Double_t *dum=0;
1312 return YJpsi(px,dum);
fe4da5cc 1313}
1314// particle composition
1315//
65fb704d 1316Int_t AliGenMUONlib::IpPhi(TRandom *)
fe4da5cc 1317{
d90f80fd 1318// Phi composition
89512a3b 1319 return 333;
1320}
1321
1322//
1323// omega
1324//
1325//
1326// pt-distribution (by scaling of pion distribution)
1327//____________________________________________________________
75e0cc59 1328Double_t AliGenMUONlib::PtOmega( const Double_t *px, const Double_t */*dummy*/)
89512a3b 1329{
1330// Omega pT
a4f206bf 1331 return PtScal(*px,5);
89512a3b 1332}
1333// y-distribution
75e0cc59 1334Double_t AliGenMUONlib::YOmega( const Double_t *px, const Double_t */*dummy*/)
89512a3b 1335{
1336// Omega y
1337 Double_t *dum=0;
1338 return YJpsi(px,dum);
1339}
1340// particle composition
1341//
1342Int_t AliGenMUONlib::IpOmega(TRandom *)
1343{
1344// Omega composition
1345 return 223;
1346}
1347
1348
1349//
1350// Eta
1351//
1352//
1353// pt-distribution (by scaling of pion distribution)
1354//____________________________________________________________
75e0cc59 1355Double_t AliGenMUONlib::PtEta( const Double_t *px, const Double_t */*dummy*/)
89512a3b 1356{
1357// Eta pT
a4f206bf 1358 return PtScal(*px,3);
89512a3b 1359}
1360// y-distribution
75e0cc59 1361Double_t AliGenMUONlib::YEta( const Double_t *px, const Double_t */*dummy*/)
89512a3b 1362{
1363// Eta y
1364 Double_t *dum=0;
1365 return YJpsi(px,dum);
1366}
1367// particle composition
1368//
1369Int_t AliGenMUONlib::IpEta(TRandom *)
1370{
1371// Eta composition
1372 return 221;
fe4da5cc 1373}
1374
1375//
1376// Charm
1377//
1378//
1379// pt-distribution
1380//____________________________________________________________
75e0cc59 1381Double_t AliGenMUONlib::PtCharm( const Double_t *px, const Double_t */*dummy*/)
fe4da5cc 1382{
d90f80fd 1383// Charm pT
bd0276a8 1384 const Double_t kpt0 = 2.25;
1385 const Double_t kxn = 3.17;
fe4da5cc 1386 Double_t x=*px;
1387 //
bd0276a8 1388 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1389 return x/TMath::Power(pass1,kxn);
1390}
1391
75e0cc59 1392Double_t AliGenMUONlib::PtCharmCentral( const Double_t *px, const Double_t */*dummy*/)
bd0276a8 1393{
1394// Charm pT
1395 const Double_t kpt0 = 2.12;
1396 const Double_t kxn = 2.78;
bd0276a8 1397 Double_t x=*px;
1398 //
1399 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
d90f80fd 1400 return x/TMath::Power(pass1,kxn);
fe4da5cc 1401}
75e0cc59 1402Double_t AliGenMUONlib::PtCharmF0M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1403{
1404// FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
1405// PtCharmFiMjSkPP = PtCharmF0M0S0PP * (dN(i,j,k)/dpt / dN(0,0,0)/dpt)_MNR
1406// i=0,1,2; j=0,1,2; k=0,1,...,6
1407// dN(i,j,k)/dpt - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
1408// http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
1409// calculations for the following inputs:
1410// Peterson fragmentation function (F) with \epsilon_c = 0.02, 0.002 & 0.11
1411// for i=0,1 & 2 respectively; quark mass (M) of 1.5, 1.3 & 1.7 GeV
1412// for j=0,1 & 2 respectively;
1413// factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
1414// with a/b = 1/1, 1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2
1415// for k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
1416// (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
1417// June 2008, Smbat.Grigoryan@cern.ch
1418
1419// Charm pT
1420// Pythia6.214 (kCharmppMNRwmi, PDF = CTEQ5L, quark mass = 1.2 GeV, PtHard > 2.76 GeV/c)
1421// for pp collisions at 14 TeV with one c-cbar pair per event.
1422// Corresponding NLO total cross section is 5.68 mb
1423
1424
1425 const Double_t kpt0 = 2.2930;
1426 const Double_t kxn = 3.1196;
1427 Double_t c[3]={-5.2180e-01,1.8753e-01,2.8669e-02};
1428 Double_t x=*px;
1429 //
1430 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1431 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1432}
75e0cc59 1433Double_t AliGenMUONlib::PtCharmF1M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1434{
1435// Charm pT
1436// Corresponding NLO total cross section is 6.06 mb
1437 const Double_t kpt0 = 2.8669;
1438 const Double_t kxn = 3.1044;
1439 Double_t c[3]={-4.6714e-01,1.5005e-01,4.5003e-02};
1440 Double_t x=*px;
1441 //
1442 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1443 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1444}
75e0cc59 1445Double_t AliGenMUONlib::PtCharmF2M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1446{
1447// Charm pT
1448// Corresponding NLO total cross section is 6.06 mb
1449 const Double_t kpt0 = 1.8361;
1450 const Double_t kxn = 3.2966;
1451 Double_t c[3]={-6.1550e-01,2.6498e-01,1.0728e-02};
1452 Double_t x=*px;
1453 //
1454 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1455 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1456}
75e0cc59 1457Double_t AliGenMUONlib::PtCharmF0M1S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1458{
1459// Charm pT
1460// Corresponding NLO total cross section is 7.69 mb
1461 const Double_t kpt0 = 2.1280;
1462 const Double_t kxn = 3.1397;
1463 Double_t c[3]={-5.4021e-01,2.0944e-01,2.5211e-02};
1464 Double_t x=*px;
1465 //
1466 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1467 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1468}
75e0cc59 1469Double_t AliGenMUONlib::PtCharmF0M2S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1470{
1471// Charm pT
1472// Corresponding NLO total cross section is 4.81 mb
1473 const Double_t kpt0 = 2.4579;
1474 const Double_t kxn = 3.1095;
1475 Double_t c[3]={-5.1497e-01,1.7532e-01,3.2429e-02};
1476 Double_t x=*px;
1477 //
1478 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1479 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1480}
75e0cc59 1481Double_t AliGenMUONlib::PtCharmF0M0S1PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1482{
1483// Charm pT
1484// Corresponding NLO total cross section is 14.09 mb
1485 const Double_t kpt0 = 2.1272;
1486 const Double_t kxn = 3.1904;
1487 Double_t c[3]={-4.6088e-01,2.1918e-01,2.3055e-02};
1488 Double_t x=*px;
1489 //
1490 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1491 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1492}
75e0cc59 1493Double_t AliGenMUONlib::PtCharmF0M0S2PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1494{
1495// Charm pT
1496// Corresponding NLO total cross section is 1.52 mb
1497 const Double_t kpt0 = 2.8159;
1498 const Double_t kxn = 3.0857;
1499 Double_t c[3]={-6.4691e-01,2.0289e-01,2.4922e-02};
1500 Double_t x=*px;
1501 //
1502 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1503 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1504}
75e0cc59 1505Double_t AliGenMUONlib::PtCharmF0M0S3PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1506{
1507// Charm pT
1508// Corresponding NLO total cross section is 3.67 mb
1509 const Double_t kpt0 = 2.7297;
1510 const Double_t kxn = 3.3019;
1511 Double_t c[3]={-6.2216e-01,1.9031e-01,1.5341e-02};
1512 Double_t x=*px;
1513 //
1514 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1515 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1516}
75e0cc59 1517Double_t AliGenMUONlib::PtCharmF0M0S4PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1518{
1519// Charm pT
1520// Corresponding NLO total cross section is 3.38 mb
1521 const Double_t kpt0 = 2.3894;
1522 const Double_t kxn = 3.1075;
1523 Double_t c[3]={-4.9742e-01,1.7032e-01,2.5994e-02};
1524 Double_t x=*px;
1525 //
1526 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1527 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1528}
75e0cc59 1529Double_t AliGenMUONlib::PtCharmF0M0S5PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1530{
1531// Charm pT
1532// Corresponding NLO total cross section is 10.37 mb
1533 const Double_t kpt0 = 2.0187;
1534 const Double_t kxn = 3.3011;
1535 Double_t c[3]={-3.9869e-01,2.9248e-01,1.1763e-02};
1536 Double_t x=*px;
1537 //
1538 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1539 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1540}
75e0cc59 1541Double_t AliGenMUONlib::PtCharmF0M0S6PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1542{
1543// Charm pT
1544// Corresponding NLO total cross section is 7.22 mb
1545 const Double_t kpt0 = 2.1089;
1546 const Double_t kxn = 3.1848;
1547 Double_t c[3]={-4.6275e-01,1.8114e-01,2.1363e-02};
1548 Double_t x=*px;
1549 //
1550 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1551 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
1552}
1553
fe4da5cc 1554// y-distribution
75e0cc59 1555Double_t AliGenMUONlib::YCharm( const Double_t *px, const Double_t */*dummy*/)
fe4da5cc 1556{
ec772ba2 1557// Charm y :: Carrer & Dainese : ALICE-INT-2003-019 v.3 (hep-ph/0311225)
1558// Pythia tuned to reproduce the distribution given by the HVQMNR program based on NLO calculations (pQCD)
1559// shadowing + kt broadening
1560
1561 Double_t x=px[0];
1562 Double_t c[2]={-2.42985e-03,-2.31001e-04};
1563 Double_t y=1+(c[0]*TMath::Power(x,2))+(c[1]*TMath::Power(x,4));
1564 Double_t ycharm;
1565
1566 if (TMath::Abs(x)>8) {
1567 ycharm=0.;
1568 }
1569 else {
1570 ycharm=TMath::Power(y,3);
1571 }
1572
1573 return ycharm;
fe4da5cc 1574}
75e0cc59 1575Double_t AliGenMUONlib::YCharmF0M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1576{
1577// FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
1578// YCharmFiMjSkPP = YCharmF0M0S0PP * (dN(i,j,k)/dy / dN(0,0,0)/dy)_MNR
1579// i=0,1,2; j=0,1,2; k=0,1,...,6
1580// dN(i,j,k)/dy - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
1581// http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
1582// calculations for the following inputs:
1583// Peterson fragmentation function (F) with \epsilon_c = 0.02, 0.002 & 0.11
1584// for i=0,1 & 2 respectively; quark mass (M) of 1.5, 1.3 & 1.7 GeV
1585// for j=0,1 & 2 respectively;
1586// factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
1587// with a/b = 1/1,1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2 for
1588// k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
1589// (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
1590// June 2008, Smbat.Grigoryan@cern.ch
1591
1592// Charm y
1593// Pythia6.214 (kCharmppMNRwmi, PDF = CTEQ5L, quark mass = 1.2 GeV, PtHard > 2.76 GeV/c)
1594// for pp collisions at 14 TeV with one c-cbar pair per event.
1595// Corresponding NLO total cross section is 5.68 mb
1596
1597 Double_t x=px[0];
1598 Double_t c[2]={7.0909e-03,6.1967e-05};
1599 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1600 Double_t ycharm;
1601
1602 if (TMath::Abs(x)>9) {
1603 ycharm=0.;
1604 }
1605 else {
1606 ycharm=TMath::Power(y,3);
1607 }
1608
1609 return ycharm;
1610}
75e0cc59 1611Double_t AliGenMUONlib::YCharmF1M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1612{
1613// Charm y
1614// Corresponding NLO total cross section is 6.06 mb
1615 Double_t x=px[0];
1616 Double_t c[2]={6.9707e-03,6.0971e-05};
1617 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1618 Double_t ycharm;
1619
1620 if (TMath::Abs(x)>9) {
1621 ycharm=0.;
1622 }
1623 else {
1624 ycharm=TMath::Power(y,3);
1625 }
1626
1627 return ycharm;
1628}
75e0cc59 1629Double_t AliGenMUONlib::YCharmF2M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1630{
1631// Charm y
1632// Corresponding NLO total cross section is 6.06 mb
1633 Double_t x=px[0];
1634 Double_t c[2]={7.1687e-03,6.5303e-05};
1635 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1636 Double_t ycharm;
1637
1638 if (TMath::Abs(x)>9) {
1639 ycharm=0.;
1640 }
1641 else {
1642 ycharm=TMath::Power(y,3);
1643 }
1644
1645 return ycharm;
1646}
75e0cc59 1647Double_t AliGenMUONlib::YCharmF0M1S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1648{
1649// Charm y
1650// Corresponding NLO total cross section is 7.69 mb
1651 Double_t x=px[0];
1652 Double_t c[2]={5.9090e-03,7.1854e-05};
1653 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1654 Double_t ycharm;
1655
1656 if (TMath::Abs(x)>9) {
1657 ycharm=0.;
1658 }
1659 else {
1660 ycharm=TMath::Power(y,3);
1661 }
1662
1663 return ycharm;
1664}
75e0cc59 1665Double_t AliGenMUONlib::YCharmF0M2S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1666{
1667// Charm y
1668// Corresponding NLO total cross section is 4.81 mb
1669 Double_t x=px[0];
1670 Double_t c[2]={8.0882e-03,5.5872e-05};
1671 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1672 Double_t ycharm;
1673
1674 if (TMath::Abs(x)>9) {
1675 ycharm=0.;
1676 }
1677 else {
1678 ycharm=TMath::Power(y,3);
1679 }
1680
1681 return ycharm;
1682}
75e0cc59 1683Double_t AliGenMUONlib::YCharmF0M0S1PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1684{
1685// Charm y
1686// Corresponding NLO total cross section is 14.09 mb
1687 Double_t x=px[0];
1688 Double_t c[2]={7.2520e-03,6.2691e-05};
1689 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1690 Double_t ycharm;
1691
1692 if (TMath::Abs(x)>9) {
1693 ycharm=0.;
1694 }
1695 else {
1696 ycharm=TMath::Power(y,3);
1697 }
1698
1699 return ycharm;
1700}
75e0cc59 1701Double_t AliGenMUONlib::YCharmF0M0S2PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1702{
1703// Charm y
1704// Corresponding NLO total cross section is 1.52 mb
1705 Double_t x=px[0];
1706 Double_t c[2]={1.1040e-04,1.4498e-04};
1707 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1708 Double_t ycharm;
1709
1710 if (TMath::Abs(x)>9) {
1711 ycharm=0.;
1712 }
1713 else {
1714 ycharm=TMath::Power(y,3);
1715 }
1716
1717 return ycharm;
1718}
75e0cc59 1719Double_t AliGenMUONlib::YCharmF0M0S3PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1720{
1721// Charm y
1722// Corresponding NLO total cross section is 3.67 mb
1723 Double_t x=px[0];
1724 Double_t c[2]={-3.1328e-03,1.8270e-04};
1725 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1726 Double_t ycharm;
1727
1728 if (TMath::Abs(x)>9) {
1729 ycharm=0.;
1730 }
1731 else {
1732 ycharm=TMath::Power(y,3);
1733 }
1734
1735 return ycharm;
1736}
75e0cc59 1737Double_t AliGenMUONlib::YCharmF0M0S4PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1738{
1739// Charm y
1740// Corresponding NLO total cross section is 3.38 mb
1741 Double_t x=px[0];
1742 Double_t c[2]={7.0865e-03,6.2532e-05};
1743 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1744 Double_t ycharm;
1745
1746 if (TMath::Abs(x)>9) {
1747 ycharm=0.;
1748 }
1749 else {
1750 ycharm=TMath::Power(y,3);
1751 }
1752
1753 return ycharm;
1754}
75e0cc59 1755Double_t AliGenMUONlib::YCharmF0M0S5PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1756{
1757// Charm y
1758// Corresponding NLO total cross section is 10.37 mb
1759 Double_t x=px[0];
1760 Double_t c[2]={7.7070e-03,5.3533e-05};
1761 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1762 Double_t ycharm;
1763
1764 if (TMath::Abs(x)>9) {
1765 ycharm=0.;
1766 }
1767 else {
1768 ycharm=TMath::Power(y,3);
1769 }
1770
1771 return ycharm;
1772}
75e0cc59 1773Double_t AliGenMUONlib::YCharmF0M0S6PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1774{
1775// Charm y
1776// Corresponding NLO total cross section is 7.22 mb
1777 Double_t x=px[0];
1778 Double_t c[2]={7.9195e-03,5.3823e-05};
1779 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1780 Double_t ycharm;
1781
1782 if (TMath::Abs(x)>9) {
1783 ycharm=0.;
1784 }
1785 else {
1786 ycharm=TMath::Power(y,3);
1787 }
1788
1789 return ycharm;
1790}
fe4da5cc 1791
ec772ba2 1792
65fb704d 1793Int_t AliGenMUONlib::IpCharm(TRandom *ran)
fe4da5cc 1794{
d90f80fd 1795// Charm composition
65fb704d 1796 Float_t random;
fe4da5cc 1797 Int_t ip;
1798// 411,421,431,4122
65fb704d 1799 random = ran->Rndm();
ec772ba2 1800// Taux de production Carrer & Dainese : ALICE-INT-2003-019 v.3
1801// >>>>> cf. tab 4 p 11
1802
1803 if (random < 0.30) {
1804 ip=421;
1805 } else if (random < 0.60) {
1806 ip=-421;
1807 } else if (random < 0.70) {
1808 ip=411;
1809 } else if (random < 0.80) {
1810 ip=-411;
1811 } else if (random < 0.86) {
1812 ip=431;
1813 } else if (random < 0.92) {
1814 ip=-431;
1815 } else if (random < 0.96) {
1816 ip=4122;
fe4da5cc 1817 } else {
ec772ba2 1818 ip=-4122;
fe4da5cc 1819 }
fe4da5cc 1820
1821 return ip;
1822}
1823
fe4da5cc 1824//
1825// Beauty
1826//
1827//
1828// pt-distribution
1829//____________________________________________________________
75e0cc59 1830Double_t AliGenMUONlib::PtBeauty( const Double_t *px, const Double_t */*dummy*/)
fe4da5cc 1831{
d90f80fd 1832// Beauty pT
bd0276a8 1833 const Double_t kpt0 = 6.53;
1834 const Double_t kxn = 3.59;
1835 Double_t x=*px;
1836 //
1837 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1838 return x/TMath::Power(pass1,kxn);
1839}
1840
75e0cc59 1841Double_t AliGenMUONlib::PtBeautyCentral( const Double_t *px, const Double_t */*dummy*/)
bd0276a8 1842{
1843// Beauty pT
1844 const Double_t kpt0 = 6.14;
1845 const Double_t kxn = 2.93;
fe4da5cc 1846 Double_t x=*px;
1847 //
d90f80fd 1848 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1849 return x/TMath::Power(pass1,kxn);
fe4da5cc 1850}
75e0cc59 1851Double_t AliGenMUONlib::PtBeautyF0M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1852{
1853// FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
1854// PtBeautyFiMjSkPP = PtBeautyF0M0S0PP * (dN(i,j,k)/dpt / dN(0,0,0)/dpt)_MNR
1855// i=0,1,2; j=0,1,2; k=0,1,...,6
1856// dN(i,j,k)/dpt - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
1857// http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
1858// calculations for the following inputs:
1859// Peterson fragmentation function (F) with \epsilon_b = 0.001, 0.0002 & 0.004
1860// for i=0,1 & 2 respectively; quark mass (M) of 4.75, 4.5 & 5.0 GeV
1861// for j=0,1 & 2 respectively;
1862// factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
1863// with a/b = 1/1, 1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2 for
1864// k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
1865// (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
1866// June 2008, Smbat.Grigoryan@cern.ch
1867
1868// Beauty pT
1869// Pythia6.214 (kBeautyppMNRwmi, PDF = CTEQ5L, quark mass = 4.75 GeV, PtHard > 2.76 GeV/c)
1870// for pp collisions at 14 TeV with one b-bbar pair per event.
1871// Corresponding NLO total cross section is 0.494 mb
1872
1873 const Double_t kpt0 = 8.0575;
1874 const Double_t kxn = 3.1921;
1875 Double_t x=*px;
1876 //
1877 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1878 return x/TMath::Power(pass1,kxn);
1879}
75e0cc59 1880Double_t AliGenMUONlib::PtBeautyF1M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1881{
1882// Beauty pT
1883// Corresponding NLO total cross section is 0.445 mb
1884 const Double_t kpt0 = 8.6239;
1885 const Double_t kxn = 3.2911;
1886 Double_t x=*px;
1887 //
1888 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1889 return x/TMath::Power(pass1,kxn);
1890}
75e0cc59 1891Double_t AliGenMUONlib::PtBeautyF2M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1892{
1893// Beauty pT
1894// Corresponding NLO total cross section is 0.445 mb
1895 const Double_t kpt0 = 7.3367;
1896 const Double_t kxn = 3.0692;
1897 Double_t x=*px;
1898 //
1899 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1900 return x/TMath::Power(pass1,kxn);
1901}
75e0cc59 1902Double_t AliGenMUONlib::PtBeautyF0M1S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1903{
1904// Beauty pT
1905// Corresponding NLO total cross section is 0.518 mb
1906 const Double_t kpt0 = 7.6409;
1907 const Double_t kxn = 3.1364;
1908 Double_t x=*px;
1909 //
1910 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1911 return x/TMath::Power(pass1,kxn);
1912}
75e0cc59 1913Double_t AliGenMUONlib::PtBeautyF0M2S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1914{
1915// Beauty pT
1916// Corresponding NLO total cross section is 0.384 mb
1917 const Double_t kpt0 = 8.4948;
1918 const Double_t kxn = 3.2546;
1919 Double_t x=*px;
1920 //
1921 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1922 return x/TMath::Power(pass1,kxn);
1923}
75e0cc59 1924Double_t AliGenMUONlib::PtBeautyF0M0S1PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1925{
1926// Beauty pT
1927// Corresponding NLO total cross section is 0.648 mb
1928 const Double_t kpt0 = 7.6631;
1929 const Double_t kxn = 3.1621;
1930 Double_t x=*px;
1931 //
1932 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1933 return x/TMath::Power(pass1,kxn);
1934}
75e0cc59 1935Double_t AliGenMUONlib::PtBeautyF0M0S2PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1936{
1937// Beauty pT
1938// Corresponding NLO total cross section is 0.294 mb
1939 const Double_t kpt0 = 8.7245;
1940 const Double_t kxn = 3.2213;
1941 Double_t x=*px;
1942 //
1943 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1944 return x/TMath::Power(pass1,kxn);
1945}
75e0cc59 1946Double_t AliGenMUONlib::PtBeautyF0M0S3PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1947{
1948// Beauty pT
1949// Corresponding NLO total cross section is 0.475 mb
1950 const Double_t kpt0 = 8.5296;
1951 const Double_t kxn = 3.2187;
1952 Double_t x=*px;
1953 //
1954 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1955 return x/TMath::Power(pass1,kxn);
1956}
75e0cc59 1957Double_t AliGenMUONlib::PtBeautyF0M0S4PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1958{
1959// Beauty pT
1960// Corresponding NLO total cross section is 0.324 mb
1961 const Double_t kpt0 = 7.9440;
1962 const Double_t kxn = 3.1614;
1963 Double_t x=*px;
1964 //
1965 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1966 return x/TMath::Power(pass1,kxn);
1967}
75e0cc59 1968Double_t AliGenMUONlib::PtBeautyF0M0S5PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1969{
1970// Beauty pT
1971// Corresponding NLO total cross section is 0.536 mb
1972 const Double_t kpt0 = 8.2408;
1973 const Double_t kxn = 3.3029;
1974 Double_t x=*px;
1975 //
1976 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1977 return x/TMath::Power(pass1,kxn);
1978}
75e0cc59 1979Double_t AliGenMUONlib::PtBeautyF0M0S6PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 1980{
1981// Beauty pT
1982// Corresponding NLO total cross section is 0.420 mb
1983 const Double_t kpt0 = 7.8041;
1984 const Double_t kxn = 3.2094;
1985 Double_t x=*px;
1986 //
1987 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1988 return x/TMath::Power(pass1,kxn);
1989}
1990
fe4da5cc 1991// y-distribution
75e0cc59 1992Double_t AliGenMUONlib::YBeauty( const Double_t *px, const Double_t */*dummy*/)
fe4da5cc 1993{
ec772ba2 1994// Beauty y :: Carrer & Dainese : ALICE-INT-2003-019 v.3 (hep-ph/0311225)
1995// Pythia tuned to reproduce the distribution given by the HVQMNR program based on NLO calculations (pQCD)
1996// shadowing + kt broadening
1997
1998 Double_t x=px[0];
1999 Double_t c[2]={-1.27590e-02,-2.42731e-04};
2000 Double_t y=1+c[0]*TMath::Power(x,2)+c[1]*TMath::Power(x,4);
2001 Double_t ybeauty;
2002
2003 if (TMath::Abs(x)>6) {
2004 ybeauty=0.;
2005 }
2006 else {
2007 ybeauty=TMath::Power(y,3);
2008 }
2009
2010 return ybeauty;
fe4da5cc 2011}
75e0cc59 2012Double_t AliGenMUONlib::YBeautyF0M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2013{
2014// FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
2015// YBeautyFiMjSkPP = YBeautyF0M0S0PP * (dN(i,j,k)/dy / dN(0,0,0)/dy)_MNR
2016// i=0,1,2; j=0,1,2; k=0,1,...,6
2017// dN(i,j,k)/dy - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
2018// http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
2019// calculations for the following inputs:
2020// Peterson fragmentation function (F) with \epsilon_b = 0.001, 0.0002 & 0.004
2021// for i=0,1 & 2 respectively; quark mass (M) of 4.75, 4.5 & 5.0 GeV
2022// for j=0,1 & 2 respectively;
2023// factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
2024// with a/b = 1/1, 1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2
2025// for k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
2026// (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
2027// June 2008, Smbat.Grigoryan@cern.ch
2028
2029// Beauty y
2030// Pythia6.214 (kBeautyppMNRwmi, PDF = CTEQ5L, quark mass = 4.75 GeV, PtHard > 2.76 GeV/c)
2031// for pp collisions at 14 TeV with one b-bbar pair per event.
2032// Corresponding NLO total cross section is 0.494 mb
2033
fe4da5cc 2034
9e9ae065 2035 Double_t x=px[0];
2036 Double_t c[2]={1.2350e-02,9.2667e-05};
2037 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2038 Double_t ybeauty;
2039
2040 if (TMath::Abs(x)>7.6) {
2041 ybeauty=0.;
2042 }
2043 else {
2044 ybeauty=TMath::Power(y,3);
2045 }
2046
2047 return ybeauty;
2048}
75e0cc59 2049Double_t AliGenMUONlib::YBeautyF1M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2050{
2051// Beauty y
2052// Corresponding NLO total cross section is 0.445 mb
2053 Double_t x=px[0];
2054 Double_t c[2]={1.2292e-02,9.1847e-05};
2055 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2056 Double_t ybeauty;
2057
2058 if (TMath::Abs(x)>7.6) {
2059 ybeauty=0.;
2060 }
2061 else {
2062 ybeauty=TMath::Power(y,3);
2063 }
2064
2065 return ybeauty;
2066}
75e0cc59 2067Double_t AliGenMUONlib::YBeautyF2M0S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2068{
2069// Beauty y
2070// Corresponding NLO total cross section is 0.445 mb
2071 Double_t x=px[0];
2072 Double_t c[2]={1.2436e-02,9.3709e-05};
2073 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2074 Double_t ybeauty;
2075
2076 if (TMath::Abs(x)>7.6) {
2077 ybeauty=0.;
2078 }
2079 else {
2080 ybeauty=TMath::Power(y,3);
2081 }
2082
2083 return ybeauty;
2084}
75e0cc59 2085Double_t AliGenMUONlib::YBeautyF0M1S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2086{
2087// Beauty y
2088// Corresponding NLO total cross section is 0.518 mb
2089 Double_t x=px[0];
2090 Double_t c[2]={1.1714e-02,1.0068e-04};
2091 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2092 Double_t ybeauty;
2093
2094 if (TMath::Abs(x)>7.6) {
2095 ybeauty=0.;
2096 }
2097 else {
2098 ybeauty=TMath::Power(y,3);
2099 }
2100
2101 return ybeauty;
2102}
75e0cc59 2103Double_t AliGenMUONlib::YBeautyF0M2S0PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2104{
2105// Beauty y
2106// Corresponding NLO total cross section is 0.384 mb
2107 Double_t x=px[0];
2108 Double_t c[2]={1.2944e-02,8.5500e-05};
2109 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2110 Double_t ybeauty;
2111
2112 if (TMath::Abs(x)>7.6) {
2113 ybeauty=0.;
2114 }
2115 else {
2116 ybeauty=TMath::Power(y,3);
2117 }
2118
2119 return ybeauty;
2120}
75e0cc59 2121Double_t AliGenMUONlib::YBeautyF0M0S1PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2122{
2123// Beauty y
2124// Corresponding NLO total cross section is 0.648 mb
2125 Double_t x=px[0];
2126 Double_t c[2]={1.2455e-02,9.2713e-05};
2127 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2128 Double_t ybeauty;
2129
2130 if (TMath::Abs(x)>7.6) {
2131 ybeauty=0.;
2132 }
2133 else {
2134 ybeauty=TMath::Power(y,3);
2135 }
2136
2137 return ybeauty;
2138}
75e0cc59 2139Double_t AliGenMUONlib::YBeautyF0M0S2PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2140{
2141// Beauty y
2142// Corresponding NLO total cross section is 0.294 mb
2143 Double_t x=px[0];
2144 Double_t c[2]={1.0897e-02,1.1878e-04};
2145 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2146 Double_t ybeauty;
2147
2148 if (TMath::Abs(x)>7.6) {
2149 ybeauty=0.;
2150 }
2151 else {
2152 ybeauty=TMath::Power(y,3);
2153 }
2154
2155 return ybeauty;
2156}
75e0cc59 2157Double_t AliGenMUONlib::YBeautyF0M0S3PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2158{
2159// Beauty y
2160// Corresponding NLO total cross section is 0.475 mb
2161 Double_t x=px[0];
2162 Double_t c[2]={1.0912e-02,1.1858e-04};
2163 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2164 Double_t ybeauty;
2165
2166 if (TMath::Abs(x)>7.6) {
2167 ybeauty=0.;
2168 }
2169 else {
2170 ybeauty=TMath::Power(y,3);
2171 }
2172
2173 return ybeauty;
2174}
75e0cc59 2175Double_t AliGenMUONlib::YBeautyF0M0S4PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2176{
2177// Beauty y
2178// Corresponding NLO total cross section is 0.324 mb
2179 Double_t x=px[0];
2180 Double_t c[2]={1.2378e-02,9.2490e-05};
2181 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2182 Double_t ybeauty;
2183
2184 if (TMath::Abs(x)>7.6) {
2185 ybeauty=0.;
2186 }
2187 else {
2188 ybeauty=TMath::Power(y,3);
2189 }
2190
2191 return ybeauty;
2192}
75e0cc59 2193Double_t AliGenMUONlib::YBeautyF0M0S5PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2194{
2195// Beauty y
2196// Corresponding NLO total cross section is 0.536 mb
2197 Double_t x=px[0];
2198 Double_t c[2]={1.2886e-02,8.2912e-05};
2199 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2200 Double_t ybeauty;
2201
2202 if (TMath::Abs(x)>7.6) {
2203 ybeauty=0.;
2204 }
2205 else {
2206 ybeauty=TMath::Power(y,3);
2207 }
2208
2209 return ybeauty;
2210}
75e0cc59 2211Double_t AliGenMUONlib::YBeautyF0M0S6PP( const Double_t *px, const Double_t */*dummy*/)
9e9ae065 2212{
2213// Beauty y
2214// Corresponding NLO total cross section is 0.420 mb
2215 Double_t x=px[0];
2216 Double_t c[2]={1.3106e-02,8.0115e-05};
2217 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
2218 Double_t ybeauty;
2219
2220 if (TMath::Abs(x)>7.6) {
2221 ybeauty=0.;
2222 }
2223 else {
2224 ybeauty=TMath::Power(y,3);
2225 }
2226
2227 return ybeauty;
2228}
ec772ba2 2229
65fb704d 2230Int_t AliGenMUONlib::IpBeauty(TRandom *ran)
fe4da5cc 2231{
d90f80fd 2232// Beauty Composition
65fb704d 2233 Float_t random;
fe4da5cc 2234 Int_t ip;
ec772ba2 2235 random = ran->Rndm();
2236
2237// Taux de production Carrer & Dainese : ALICE-INT-2003-019 v.3
2238// >>>>> cf. tab 4 p 11
2239
2240 if (random < 0.20) {
2241 ip=511;
2242 } else if (random < 0.40) {
2243 ip=-511;
2244 } else if (random < 0.605) {
2245 ip=521;
2246 } else if (random < 0.81) {
2247 ip=-521;
2248 } else if (random < 0.87) {
2249 ip=531;
2250 } else if (random < 0.93) {
2251 ip=-531;
2252 } else if (random < 0.965) {
2253 ip=5122;
fe4da5cc 2254 } else {
ec772ba2 2255 ip=-5122;
fe4da5cc 2256 }
fe4da5cc 2257
ec772ba2 2258 return ip;
fe4da5cc 2259}
2260
ec772ba2 2261
75e0cc59 2262typedef Double_t (*GenFunc) (const Double_t*, const Double_t*);
53904666 2263GenFunc AliGenMUONlib::GetPt(Int_t param, const char* tname) const
fe4da5cc 2264{
d90f80fd 2265// Return pointer to pT parameterisation
05932df6 2266 TString sname = TString(tname);
fe4da5cc 2267 GenFunc func;
753690b0 2268 switch (param)
fe4da5cc 2269 {
34f60c01 2270 case kPhi:
fe4da5cc 2271 func=PtPhi;
2272 break;
89512a3b 2273 case kOmega:
2274 func=PtOmega;
2275 break;
2276 case kEta:
2277 func=PtEta;
2278 break;
0ad09590 2279 case kJpsiFamily:
88e5db43 2280 case kPsiP:
ba8bf3f5 2281 case kChic1:
2282 case kChic2:
34f60c01 2283 case kJpsi:
bb6e81ac 2284 if (sname == "Vogt" || sname == "Vogt PbPb") {
05932df6 2285 func=PtJpsiPbPb;
bb6e81ac 2286 } else if (sname == "Vogt pp") {
2287 func=PtJpsiPP;
a4f206bf 2288 } else if (sname == "pp 7") {
2289 func=PtJpsiPP7000;
2290 } else if (sname == "pp 2.76") {
2291 func=PtJpsiPP2760;
2292 } else if (sname == "PbPb 2.76") {
2293 func=PtJpsiPbPb2760;
0e137c25 2294 } else if (sname == "CDF scaled") {
2295 func=PtJpsiCDFscaled;
9ff13849 2296 } else if (sname == "CDF pp") {
2297 func=PtJpsiCDFscaledPP;
9e9ae065 2298 } else if (sname == "CDF pp 10") {
2299 func=PtJpsiCDFscaledPP10;
9fd56238 2300 } else if (sname == "CDF pp 8.8") {
2301 func=PtJpsiCDFscaledPP9;
94a2994d 2302 } else if (sname == "CDF pp 7" || sname == "CDF pp 7 flat y") {
9fd56238 2303 func=PtJpsiCDFscaledPP7;
2304 } else if (sname == "CDF pp 3.94") {
2305 func=PtJpsiCDFscaledPP4;
a4f206bf 2306 } else if (sname == "CDF pp 2.76") {
2307 func=PtJpsiCDFscaledPP3;
2308 } else if (sname == "CDF pp 1.9") {
2309 func=PtJpsiCDFscaledPP2;
9fd56238 2310 } else if (sname == "CDF pPb 8.8") {
2311 func=PtJpsiCDFscaledPPb9;
2312 } else if (sname == "CDF Pbp 8.8") {
2313 func=PtJpsiCDFscaledPbP9;
2314 } else if (sname == "CDF PbPb 3.94") {
2315 func=PtJpsiCDFscaledPbPb4;
94a2994d 2316 } else if (sname == "Flat" || sname == "CDF pp 7 flat pt") {
4ca8d070 2317 func=PtJpsiFlat;
05932df6 2318 } else {
2319 func=PtJpsi;
2320 }
fe4da5cc 2321 break;
17d28ba5 2322 case kJpsiFromB:
2323 func = PtJpsiBPbPb;
2324 break;
0ad09590 2325 case kUpsilonFamily:
88e5db43 2326 case kUpsilonP:
2327 case kUpsilonPP:
34f60c01 2328 case kUpsilon:
bb6e81ac 2329 if (sname == "Vogt" || sname == "Vogt PbPb") {
05932df6 2330 func=PtUpsilonPbPb;
bb6e81ac 2331 } else if (sname == "Vogt pp") {
2332 func=PtUpsilonPP;
0e137c25 2333 } else if (sname == "CDF scaled") {
2334 func=PtUpsilonCDFscaled;
9ff13849 2335 } else if (sname == "CDF pp") {
2336 func=PtUpsilonCDFscaledPP;
b33adf51 2337 } else if (sname == "CDF pp 10") {
2338 func=PtUpsilonCDFscaledPP10;
9fd56238 2339 } else if (sname == "CDF pp 8.8") {
2340 func=PtUpsilonCDFscaledPP9;
2341 } else if (sname == "CDF pp 7") {
2342 func=PtUpsilonCDFscaledPP7;
2343 } else if (sname == "CDF pp 3.94") {
2344 func=PtUpsilonCDFscaledPP4;
2345 } else if (sname == "CDF pPb 8.8") {
2346 func=PtUpsilonCDFscaledPPb9;
2347 } else if (sname == "CDF Pbp 8.8") {
2348 func=PtUpsilonCDFscaledPbP9;
2349 } else if (sname == "CDF PbPb 3.94") {
2350 func=PtUpsilonCDFscaledPbPb4;
4ca8d070 2351 } else if (sname == "Flat") {
2352 func=PtUpsilonFlat;
05932df6 2353 } else {
2354 func=PtUpsilon;
2355 }
0ad09590 2356 break;
34f60c01 2357 case kCharm:
9e9ae065 2358 if (sname == "F0M0S0 pp") {
2359 func=PtCharmF0M0S0PP;
2360 } else if (sname == "F1M0S0 pp") {
2361 func=PtCharmF1M0S0PP;
2362 } else if (sname == "F2M0S0 pp") {
2363 func=PtCharmF2M0S0PP;
2364 } else if (sname == "F0M1S0 pp") {
2365 func=PtCharmF0M1S0PP;
2366 } else if (sname == "F0M2S0 pp") {
2367 func=PtCharmF0M2S0PP;
2368 } else if (sname == "F0M0S1 pp") {
2369 func=PtCharmF0M0S1PP;
2370 } else if (sname == "F0M0S2 pp") {
2371 func=PtCharmF0M0S2PP;
2372 } else if (sname == "F0M0S3 pp") {
2373 func=PtCharmF0M0S3PP;
2374 } else if (sname == "F0M0S4 pp") {
2375 func=PtCharmF0M0S4PP;
2376 } else if (sname == "F0M0S5 pp") {
2377 func=PtCharmF0M0S5PP;
2378 } else if (sname == "F0M0S6 pp") {
2379 func=PtCharmF0M0S6PP;
2380 } else if (sname == "central") {
bd0276a8 2381 func=PtCharmCentral;
2382 } else {
2383 func=PtCharm;
2384 }
fe4da5cc 2385 break;
34f60c01 2386 case kBeauty:
9e9ae065 2387 if (sname == "F0M0S0 pp") {
2388 func=PtBeautyF0M0S0PP;
2389 } else if (sname == "F1M0S0 pp") {
2390 func=PtBeautyF1M0S0PP;
2391 } else if (sname == "F2M0S0 pp") {
2392 func=PtBeautyF2M0S0PP;
2393 } else if (sname == "F0M1S0 pp") {
2394 func=PtBeautyF0M1S0PP;
2395 } else if (sname == "F0M2S0 pp") {
2396 func=PtBeautyF0M2S0PP;
2397 } else if (sname == "F0M0S1 pp") {
2398 func=PtBeautyF0M0S1PP;
2399 } else if (sname == "F0M0S2 pp") {
2400 func=PtBeautyF0M0S2PP;
2401 } else if (sname == "F0M0S3 pp") {
2402 func=PtBeautyF0M0S3PP;
2403 } else if (sname == "F0M0S4 pp") {
2404 func=PtBeautyF0M0S4PP;
2405 } else if (sname == "F0M0S5 pp") {
2406 func=PtBeautyF0M0S5PP;
2407 } else if (sname == "F0M0S6 pp") {
2408 func=PtBeautyF0M0S6PP;
2409 } else if (sname == "central") {
bd0276a8 2410 func=PtBeautyCentral;
2411 } else {
2412 func=PtBeauty;
2413 }
fe4da5cc 2414 break;
34f60c01 2415 case kPion:
753690b0 2416 func=PtPion;
2417 break;
34f60c01 2418 case kKaon:
753690b0 2419 func=PtKaon;
2420 break;
6b450aa0 2421 case kChic0:
2422 func=PtChic0;
00935af2 2423 break;
6b450aa0 2424 case kChic:
2425 func=PtChic;
00935af2 2426 break;
119b35c7 2427 default:
2428 func=0;
2429 printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
fe4da5cc 2430 }
2431 return func;
2432}
2433
53904666 2434GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname) const
fe4da5cc 2435{
ac3faee4 2436 //
2437 // Return pointer to y- parameterisation
2438 //
05932df6 2439 TString sname = TString(tname);
fe4da5cc 2440 GenFunc func;
753690b0 2441 switch (param)
fe4da5cc 2442 {
34f60c01 2443 case kPhi:
fe4da5cc 2444 func=YPhi;
2445 break;
89512a3b 2446 case kEta:
2447 func=YEta;
2448 break;
2449 case kOmega:
2450 func=YOmega;
2451 break;
0ad09590 2452 case kJpsiFamily:
88e5db43 2453 case kPsiP:
ba8bf3f5 2454 case kChic1:
2455 case kChic2:
34f60c01 2456 case kJpsi:
bb6e81ac 2457 if (sname == "Vogt" || sname == "Vogt PbPb") {
05932df6 2458 func=YJpsiPbPb;
bb6e81ac 2459 } else if (sname == "Vogt pp"){
2460 func=YJpsiPP;
a4f206bf 2461 } else if (sname == "pp 7") {
2462 func=YJpsiPP7000;
2463 } else if (sname == "pp 2.76") {
2464 func=YJpsiPP2760;
2465 } else if (sname == "PbPb 2.76") {
2466 func=YJpsiPbPb2760;
0e137c25 2467 } else if (sname == "CDF scaled") {
2468 func=YJpsiCDFscaled;
9ff13849 2469 } else if (sname == "CDF pp") {
2470 func=YJpsiCDFscaledPP;
9e9ae065 2471 } else if (sname == "CDF pp 10") {
2472 func=YJpsiCDFscaledPP10;
9fd56238 2473 } else if (sname == "CDF pp 8.8") {
2474 func=YJpsiCDFscaledPP9;
94a2994d 2475 } else if (sname == "CDF pp 7" || sname == "CDF pp 7 flat pt") {
9fd56238 2476 func=YJpsiCDFscaledPP7;
2477 } else if (sname == "CDF pp 3.94") {
2478 func=YJpsiCDFscaledPP4;
a4f206bf 2479 } else if (sname == "CDF pp 2.76") {
2480 func=YJpsiCDFscaledPP3;
2481 } else if (sname == "CDF pp 1.9") {
2482 func=YJpsiCDFscaledPP2;
9fd56238 2483 } else if (sname == "CDF pPb 8.8") {
2484 func=YJpsiCDFscaledPPb9;
2485 } else if (sname == "CDF Pbp 8.8") {
2486 func=YJpsiCDFscaledPbP9;
2487 } else if (sname == "CDF PbPb 3.94") {
2488 func=YJpsiCDFscaledPbPb4;
94a2994d 2489 } else if (sname == "Flat" || sname == "CDF pp 7 flat y") {
4ca8d070 2490 func=YJpsiFlat;
05932df6 2491 } else {
2492 func=YJpsi;
2493 }
17d28ba5 2494 break;
2495 case kJpsiFromB:
2496 func = YJpsiBPbPb;
fe4da5cc 2497 break;
0ad09590 2498 case kUpsilonFamily:
88e5db43 2499 case kUpsilonP:
2500 case kUpsilonPP:
34f60c01 2501 case kUpsilon:
bb6e81ac 2502 if (sname == "Vogt" || sname == "Vogt PbPb") {
05932df6 2503 func=YUpsilonPbPb;
bb6e81ac 2504 } else if (sname == "Vogt pp") {
2505 func = YUpsilonPP;
0e137c25 2506 } else if (sname == "CDF scaled") {
2507 func=YUpsilonCDFscaled;
9ff13849 2508 } else if (sname == "CDF pp") {
2509 func=YUpsilonCDFscaledPP;
b33adf51 2510 } else if (sname == "CDF pp 10") {
2511 func=YUpsilonCDFscaledPP10;
9fd56238 2512 } else if (sname == "CDF pp 8.8") {
2513 func=YUpsilonCDFscaledPP9;
2514 } else if (sname == "CDF pp 7") {
2515 func=YUpsilonCDFscaledPP7;
2516 } else if (sname == "CDF pp 3.94") {
2517 func=YUpsilonCDFscaledPP4;
2518 } else if (sname == "CDF pPb 8.8") {
2519 func=YUpsilonCDFscaledPPb9;
2520 } else if (sname == "CDF Pbp 8.8") {
2521 func=YUpsilonCDFscaledPbP9;
2522 } else if (sname == "CDF PbPb 3.94") {
2523 func=YUpsilonCDFscaledPbPb4;
4ca8d070 2524 } else if (sname == "Flat") {
2525 func=YUpsilonFlat;
05932df6 2526 } else {
2527 func=YUpsilon;
2528 }
fe4da5cc 2529 break;
34f60c01 2530 case kCharm:
9e9ae065 2531 if (sname == "F0M0S0 pp") {
2532 func=YCharmF0M0S0PP;
2533 } else if (sname == "F1M0S0 pp") {
2534 func=YCharmF1M0S0PP;
2535 } else if (sname == "F2M0S0 pp") {
2536 func=YCharmF2M0S0PP;
2537 } else if (sname == "F0M1S0 pp") {
2538 func=YCharmF0M1S0PP;
2539 } else if (sname == "F0M2S0 pp") {
2540 func=YCharmF0M2S0PP;
2541 } else if (sname == "F0M0S1 pp") {
2542 func=YCharmF0M0S1PP;
2543 } else if (sname == "F0M0S2 pp") {
2544 func=YCharmF0M0S2PP;
2545 } else if (sname == "F0M0S3 pp") {
2546 func=YCharmF0M0S3PP;
2547 } else if (sname == "F0M0S4 pp") {
2548 func=YCharmF0M0S4PP;
2549 } else if (sname == "F0M0S5 pp") {
2550 func=YCharmF0M0S5PP;
2551 } else if (sname == "F0M0S6 pp") {
2552 func=YCharmF0M0S6PP;
2553 } else {
2554 func=YCharm;
2555 }
fe4da5cc 2556 break;
34f60c01 2557 case kBeauty:
9e9ae065 2558 if (sname == "F0M0S0 pp") {
2559 func=YBeautyF0M0S0PP;
2560 } else if (sname == "F1M0S0 pp") {
2561 func=YBeautyF1M0S0PP;
2562 } else if (sname == "F2M0S0 pp") {
2563 func=YBeautyF2M0S0PP;
2564 } else if (sname == "F0M1S0 pp") {
2565 func=YBeautyF0M1S0PP;
2566 } else if (sname == "F0M2S0 pp") {
2567 func=YBeautyF0M2S0PP;
2568 } else if (sname == "F0M0S1 pp") {
2569 func=YBeautyF0M0S1PP;
2570 } else if (sname == "F0M0S2 pp") {
2571 func=YBeautyF0M0S2PP;
2572 } else if (sname == "F0M0S3 pp") {
2573 func=YBeautyF0M0S3PP;
2574 } else if (sname == "F0M0S4 pp") {
2575 func=YBeautyF0M0S4PP;
2576 } else if (sname == "F0M0S5 pp") {
2577 func=YBeautyF0M0S5PP;
2578 } else if (sname == "F0M0S6 pp") {
2579 func=YBeautyF0M0S6PP;
2580 } else {
2581 func=YBeauty;
2582 }
fe4da5cc 2583 break;
34f60c01 2584 case kPion:
753690b0 2585 func=YPion;
2586 break;
34f60c01 2587 case kKaon:
753690b0 2588 func=YKaon;
2589 break;
6b450aa0 2590 case kChic0:
2591 func=YChic0;
00935af2 2592 break;
6b450aa0 2593 case kChic:
2594 func=YChic;
00935af2 2595 break;
119b35c7 2596 default:
2597 func=0;
2598 printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
fe4da5cc 2599 }
2600 return func;
2601}
00935af2 2602
2603//
2604// Chi
2605//
2606//
2607// pt-distribution
2608//____________________________________________________________
75e0cc59 2609Double_t AliGenMUONlib::PtChic0( const Double_t *px, const Double_t */*dummy*/)
00935af2 2610{
2611// Chi_c1 pT
2612 const Double_t kpt0 = 4.;
2613 const Double_t kxn = 3.6;
2614 Double_t x=*px;
2615 //
2616 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
2617 return x/TMath::Power(pass1,kxn);
2618}
75e0cc59 2619Double_t AliGenMUONlib::PtChic1( const Double_t *px, const Double_t */*dummy*/)
00935af2 2620{
2621// Chi_c1 pT
2622 const Double_t kpt0 = 4.;
2623 const Double_t kxn = 3.6;
2624 Double_t x=*px;
2625 //
2626 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
2627 return x/TMath::Power(pass1,kxn);
2628}
75e0cc59 2629Double_t AliGenMUONlib::PtChic2( const Double_t *px, const Double_t */*dummy*/)
00935af2 2630{
2631// Chi_c2 pT
2632 const Double_t kpt0 = 4.;
2633 const Double_t kxn = 3.6;
2634 Double_t x=*px;
2635 //
2636 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
2637 return x/TMath::Power(pass1,kxn);
2638}
75e0cc59 2639Double_t AliGenMUONlib::PtChic( const Double_t *px, const Double_t */*dummy*/)
00935af2 2640{
2641// Chi_c family pT
2642 const Double_t kpt0 = 4.;
2643 const Double_t kxn = 3.6;
2644 Double_t x=*px;
2645 //
2646 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
2647 return x/TMath::Power(pass1,kxn);
2648}
2649
2650//
2651// y-distribution
2652//____________________________________________________________
75e0cc59 2653Double_t AliGenMUONlib::YChic0(const Double_t *py, const Double_t */*dummy*/)
00935af2 2654{
2655// Chi-1c y
2656 const Double_t ky0 = 4.;
2657 const Double_t kb=1.;
2658 Double_t yj;
2659 Double_t y=TMath::Abs(*py);
2660 //
2661 if (y < ky0)
2662 yj=kb;
2663 else
2664 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
2665 return yj;
2666}
2667
75e0cc59 2668Double_t AliGenMUONlib::YChic1(const Double_t *py, const Double_t */*dummy*/)
00935af2 2669{
2670// Chi-1c y
2671 const Double_t ky0 = 4.;
2672 const Double_t kb=1.;
2673 Double_t yj;
2674 Double_t y=TMath::Abs(*py);
2675 //
2676 if (y < ky0)
2677 yj=kb;
2678 else
2679 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
2680 return yj;
2681}
2682
75e0cc59 2683Double_t AliGenMUONlib::YChic2(const Double_t *py, const Double_t */*dummy*/)
00935af2 2684{
2685// Chi-2c y
2686 const Double_t ky0 = 4.;
2687 const Double_t kb=1.;
2688 Double_t yj;
2689 Double_t y=TMath::Abs(*py);
2690 //
2691 if (y < ky0)
2692 yj=kb;
2693 else
2694 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
2695 return yj;
2696}
2697
75e0cc59 2698Double_t AliGenMUONlib::YChic(const Double_t *py, const Double_t */*dummy*/)
00935af2 2699{
2700// Chi_c family y
2701 const Double_t ky0 = 4.;
2702 const Double_t kb=1.;
2703 Double_t yj;
2704 Double_t y=TMath::Abs(*py);
2705 //
2706 if (y < ky0)
2707 yj=kb;
2708 else
2709 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
2710 return yj;
2711}
2712
2713// particle composition
2714//
6b450aa0 2715Int_t AliGenMUONlib::IpChic0(TRandom *)
00935af2 2716{
2717// Chi composition
2718 return 10441;
2719}
2720//
6b450aa0 2721Int_t AliGenMUONlib::IpChic1(TRandom *)
00935af2 2722{
2723// Chi composition
2724 return 20443;
2725}
6b450aa0 2726Int_t AliGenMUONlib::IpChic2(TRandom *)
00935af2 2727{
2728// Chi_c2 prime composition
2729 return 445;
2730}
6b450aa0 2731Int_t AliGenMUONlib::IpChic(TRandom *)
00935af2 2732{
2733// Chi composition
2734 Int_t ip;
2735 Float_t r = gRandom->Rndm();
2736 if (r < 0.001) {
2737 ip = 10441;
2738 } else if( r < 0.377 ) {
2739 ip = 20443;
2740 } else {
2741 ip = 445;
2742 }
2743 return ip;
2744}
2745
2746
2747//_____________________________________________________________
2748
65fb704d 2749typedef Int_t (*GenFuncIp) (TRandom *);
198bb1c7 2750GenFuncIp AliGenMUONlib::GetIp(Int_t param, const char* /*tname*/) const
fe4da5cc 2751{
d90f80fd 2752// Return pointer to particle type parameterisation
fe4da5cc 2753 GenFuncIp func;
753690b0 2754 switch (param)
fe4da5cc 2755 {
34f60c01 2756 case kPhi:
fe4da5cc 2757 func=IpPhi;
2758 break;
89512a3b 2759 case kEta:
2760 func=IpEta;
2761 break;
2762 case kOmega:
2763 func=IpOmega;
2764 break;
0ad09590 2765 case kJpsiFamily:
2766 func=IpJpsiFamily;
2767 break;
88e5db43 2768 case kPsiP:
2769 func=IpPsiP;
2770 break;
34f60c01 2771 case kJpsi:
17d28ba5 2772 case kJpsiFromB:
fe4da5cc 2773 func=IpJpsi;
2774 break;
34f60c01 2775 case kUpsilon:
fe4da5cc 2776 func=IpUpsilon;
2777 break;
0ad09590 2778 case kUpsilonFamily:
2779 func=IpUpsilonFamily;
2780 break;
88e5db43 2781 case kUpsilonP:
2782 func=IpUpsilonP;
2783 break;
2784 case kUpsilonPP:
2785 func=IpUpsilonPP;
2786 break;
34f60c01 2787 case kCharm:
fe4da5cc 2788 func=IpCharm;
2789 break;
34f60c01 2790 case kBeauty:
fe4da5cc 2791 func=IpBeauty;
2792 break;
34f60c01 2793 case kPion:
753690b0 2794 func=IpPion;
2795 break;
34f60c01 2796 case kKaon:
753690b0 2797 func=IpKaon;
2798 break;
6b450aa0 2799 case kChic0:
2800 func=IpChic0;
00935af2 2801 break;
6b450aa0 2802 case kChic1:
2803 func=IpChic1;
00935af2 2804 break;
6b450aa0 2805 case kChic2:
2806 func=IpChic2;
00935af2 2807 break;
6b450aa0 2808 case kChic:
2809 func=IpChic;
00935af2 2810 break;
119b35c7 2811 default:
2812 func=0;
2813 printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");
fe4da5cc 2814 }
2815 return func;
2816}
2817
2818
753690b0 2819
05932df6 2820Float_t AliGenMUONlib::Interpolate(Float_t x, Float_t* y, Float_t x0,
2821 Float_t dx,
2822 Int_t n, Int_t no)
2823{
2824//
2825// Neville's alorithm for interpolation
2826//
2827// x: x-value
2828// y: Input array
2829// x0: minimum x
2830// dx: step size
2831// n: number of data points
2832// no: order of polynom
2833//
2834 Float_t* c = new Float_t[n];
2835 Float_t* d = new Float_t[n];
2836 Int_t m, i;
2837 for (i = 0; i < n; i++) {
2838 c[i] = y[i];
2839 d[i] = y[i];
2840 }
2841
2842 Int_t ns = int((x - x0)/dx);
2843
2844 Float_t y1 = y[ns];
2845 ns--;
2846 for (m = 0; m < no; m++) {
2847 for (i = 0; i < n-m; i++) {
2848 Float_t ho = x0 + Float_t(i) * dx - x;
2849 Float_t hp = x0 + Float_t(i+m+1) * dx - x;
2850 Float_t w = c[i+1] - d[i];
2851 Float_t den = ho-hp;
2852 den = w/den;
2853 d[i] = hp * den;
2854 c[i] = ho * den;
2855 }
2856 Float_t dy;
2857
2858 if (2*ns < (n-m-1)) {
2859 dy = c[ns+1];
2860 } else {
2861 dy = d[ns--];
2862 }
2863 y1 += dy;}
2864 delete[] c;
2865 delete[] d;
2866
2867 return y1;
2868}
2869
753690b0 2870