1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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.
24 // andreas.morsch@cern.ch
30 #include "AliGenMUONlib.h"
32 ClassImp(AliGenMUONlib)
35 Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t* /*dummy*/)
38 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
39 // POWER LAW FOR PT > 500 MEV
40 // MT SCALING BELOW (T=160 MEV)
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;
48 Double_t y, y1, xmpi2, ynorm, a;
51 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
53 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
56 y=a*TMath::Power(kp0/(kp0+x),kxn);
58 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
64 Double_t AliGenMUONlib::YPion( Double_t *py, Double_t */*dummy*/)
67 Double_t y=TMath::Abs(*py);
69 const Double_t ka = 7000.;
70 const Double_t kdy = 4.;
71 Double_t ex = y*y/(2*kdy*kdy);
72 return ka*TMath::Exp(-ex);
74 return 1.16526e+04+y*-3.79886e+03+y*y*4.31130e+02;
77 // particle composition
79 Int_t AliGenMUONlib::IpPion(TRandom *ran)
82 if (ran->Rndm() < 0.5) {
89 //____________________________________________________________
93 Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
95 // SCALING EN MASSE PAR RAPPORT A PTPI
96 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
97 const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
98 // VALUE MESON/PI AT 5 GEV
99 const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
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];
104 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
105 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
106 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2;
107 return fmtscal*ptpion;
113 //____________________________________________________________
114 Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t */*dummy*/)
117 return PtScal(*px,2);
121 //____________________________________________________________
122 Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t */*dummy*/)
125 Double_t y=TMath::Abs(*py);
127 const Double_t ka = 1000.;
128 const Double_t kdy = 4.;
130 Double_t ex = y*y/(2*kdy*kdy);
131 return ka*TMath::Exp(-ex);
134 return 1.16526e+04+y*-3.79886e+03+y*y*4.31130e+02;
137 // particle composition
139 Int_t AliGenMUONlib::IpKaon(TRandom *ran)
142 if (ran->Rndm() < 0.5) {
153 //____________________________________________________________
154 Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t */*dummy*/)
157 const Double_t kpt0 = 4.;
158 const Double_t kxn = 3.6;
161 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
162 return x/TMath::Power(pass1,kxn);
165 Double_t AliGenMUONlib::PtJpsiCDFscaled( Double_t *px, Double_t */*dummy*/)
170 // scaled from CDF data at 2 TeV
171 // see S.Grigoryan, PWG3 Meeting, 27th Oct 2008
173 const Double_t kpt0 = 5.100;
174 const Double_t kxn = 4.102;
177 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
178 return x/TMath::Power(pass1,kxn);
181 Double_t AliGenMUONlib::PtJpsiCDFscaledold( Double_t *px, Double_t */*dummy*/)
186 // scaled from CDF "old" data at 2 TeV
188 const Double_t kpt0 = 4.703;
189 const Double_t kxn = 3.826;
192 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
193 return x/TMath::Power(pass1,kxn);
196 Double_t AliGenMUONlib::PtJpsiCDFscaledPP( Double_t *px, Double_t */*dummy*/)
201 // scaled from CDF data at 2 TeV
203 const Double_t kpt0 = 5.630;
204 const Double_t kxn = 4.071;
207 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
208 return x/TMath::Power(pass1,kxn);
211 Double_t AliGenMUONlib::PtJpsiCDFscaledPPold( Double_t *px, Double_t */*dummy*/)
216 // scaled from CDF "old" data at 2 TeV
218 const Double_t kpt0 = 5.355;
219 const Double_t kxn = 3.821;
222 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
223 return x/TMath::Power(pass1,kxn);
226 Double_t AliGenMUONlib::PtJpsiCDFscaledPP10( Double_t *px, Double_t */*dummy*/)
231 // scaled from CDF data at 2 TeV
233 const Double_t kpt0 = 5.334;
234 const Double_t kxn = 4.071;
237 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
238 return x/TMath::Power(pass1,kxn);
241 Double_t AliGenMUONlib::PtJpsiFlat( Double_t */*px*/, Double_t */*dummy*/ )
246 Double_t AliGenMUONlib::PtJpsiPbPb( Double_t *px, Double_t */*dummy*/)
253 // mc = 1.4 GeV, pt-kick 1 GeV
257 -2.13098e+00, 9.46552e+00, -5.06799e+00, 1.27260e+00,
258 -1.83806e-01, 1.55853e-02, -7.23241e-04, 1.42105e-05
265 while (j > 0) y = y * x +c[--j];
266 y = x * TMath::Exp(y);
273 Double_t AliGenMUONlib::PtJpsiBPbPb( Double_t *px, Double_t */*dummy*/)
277 Double_t x0 = 4.0384;
281 Double_t y = x / TMath::Power((1. + (x/x0)*(x/x0)), n);
287 Double_t AliGenMUONlib::PtJpsiPP( Double_t *px, Double_t */*dummy*/)
294 // mc = 1.4 GeV, pt-kick 1 GeV
297 Float_t c[4] = {8.47471e+00, -1.93567e+00, 1.50271e-01, -5.51212e-03};
303 while (j > 0) y = y * x +c[--j];
304 y = x * TMath::Exp(y);
313 //____________________________________________________________
314 Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t */*dummy*/)
317 const Double_t ky0 = 4.;
318 const Double_t kb=1.;
320 Double_t y=TMath::Abs(*py);
325 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
329 Double_t AliGenMUONlib::YJpsiFlat( Double_t */*py*/, Double_t */*dummy*/ )
335 Double_t AliGenMUONlib::YJpsiPbPb( Double_t *px, Double_t */*dummy*/)
345 // mc = 1.4 GeV, pt-kick 1 GeV
347 Double_t c[5] = {-6.03425e+02, 4.98257e+02, -1.38794e+02, 1.62209e+01, -6.85955e-01};
348 Double_t x = TMath::Abs(px[0]);
356 while (j > 0) y = y * x + c[--j];
364 Double_t AliGenMUONlib::YJpsiCDFscaled( Double_t *px, Double_t* dummy)
367 return AliGenMUONlib::YJpsiPbPb(px, dummy);
370 Double_t AliGenMUONlib::YJpsiCDFscaledold( Double_t *px, Double_t* dummy)
373 return AliGenMUONlib::YJpsiPbPb(px, dummy);
376 Double_t AliGenMUONlib::YJpsiCDFscaledPP( Double_t *px, Double_t* dummy)
379 return AliGenMUONlib::YJpsiPP(px, dummy);
382 Double_t AliGenMUONlib::YJpsiCDFscaledPPold( Double_t *px, Double_t* dummy)
385 return AliGenMUONlib::YJpsiPP(px, dummy);
388 Double_t AliGenMUONlib::YJpsiCDFscaledPP10( Double_t *px, Double_t */*dummy*/)
395 // scaled from YJpsiPP(14 TeV) using 10 TeV / 14 TeV ratio of y-spectra in LO pQCD.
396 // see S.Grigoryan, PWG3 Meeting, 27th Oct 2008
399 Double_t c[5] = {2.46681e+01, 8.91486e+01, -3.21227e+01, 3.63075e+00, -1.32047e-01};
401 Double_t x = TMath::Abs(px[0]);
405 y = 98.523 - 1.3664 * x * x;
406 } else if (x < 7.5) {
409 while (j > 0) y = y * x + c[--j];
419 Double_t AliGenMUONlib::YJpsiPP( Double_t *px, Double_t */*dummy*/)
429 // mc = 1.4 GeV, pt-kick 1 GeV
432 Double_t c[5] = {1.38532e+00, 1.00596e+02, -3.46378e+01, 3.94172e+00, -1.48319e-01};
433 Double_t x = TMath::Abs(px[0]);
437 y = 96.455 - 0.8483 * x * x;
438 } else if (x < 7.9) {
441 while (j > 0) y = y * x + c[--j];
449 Double_t AliGenMUONlib::YJpsiBPbPb( Double_t *px, Double_t */*dummy*/)
453 // J/Psi from B->J/Psi X
458 Double_t c[7] = {7.37025e-02, 0., -2.94487e-03, 0., 6.07953e-06, 0., 5.39219e-07};
460 Double_t x = TMath::Abs(px[0]);
468 while (j > 0) y = y * x + c[--j];
476 // particle composition
478 Int_t AliGenMUONlib::IpJpsi(TRandom *)
483 Int_t AliGenMUONlib::IpPsiP(TRandom *)
485 // Psi prime composition
488 Int_t AliGenMUONlib::IpJpsiFamily(TRandom *)
492 Float_t r = gRandom->Rndm();
507 //____________________________________________________________
508 Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t */*dummy*/ )
511 const Double_t kpt0 = 5.3;
512 const Double_t kxn = 2.5;
515 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
516 return x/TMath::Power(pass1,kxn);
519 Double_t AliGenMUONlib::PtUpsilonCDFscaled( Double_t *px, Double_t */*dummy*/ )
522 const Double_t kpt0 = 7.753;
523 const Double_t kxn = 3.042;
526 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
527 return x/TMath::Power(pass1,kxn);
530 Double_t AliGenMUONlib::PtUpsilonCDFscaledPP( Double_t *px, Double_t */*dummy*/ )
536 // scaled from CDF data at 2 TeV
538 const Double_t kpt0 = 8.610;
539 const Double_t kxn = 3.051;
542 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
543 return x/TMath::Power(pass1,kxn);
546 Double_t AliGenMUONlib::PtUpsilonFlat( Double_t */*px*/, Double_t */*dummy*/ )
551 Double_t AliGenMUONlib::PtUpsilonPbPb( Double_t *px, Double_t */*dummy*/)
561 // mc = 1.4 GeV, pt-kick 1 GeV
565 -1.03488e+01, 1.28065e+01, -6.60500e+00, 1.66140e+00,
566 -2.34293e-01, 1.86925e-02, -7.80708e-04, 1.30610e-05
572 while (j > 0) y = y * x +c[--j];
573 y = x * TMath::Exp(y);
580 Double_t AliGenMUONlib::PtUpsilonPP( Double_t *px, Double_t */*dummy*/)
590 // mc = 1.4 GeV, pt-kick 1 GeV
593 Double_t c[8] = {-7.93955e+00, 1.06306e+01, -5.21392e+00, 1.19703e+00,
594 -1.45718e-01, 8.95151e-03, -2.04806e-04, -1.13053e-06};
600 while (j > 0) y = y * x +c[--j];
601 y = x * TMath::Exp(y);
611 //____________________________________________________________
612 Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t */*dummy*/)
615 const Double_t ky0 = 3.;
616 const Double_t kb=1.;
618 Double_t y=TMath::Abs(*py);
623 yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
628 Double_t AliGenMUONlib::YUpsilonPbPb( Double_t *px, Double_t */*dummy*/)
638 // mc = 1.4 GeV, pt-kick 1 GeV
641 Double_t c[7] = {3.40036e-01, -3.98882e-07, -4.48398e-03, 8.46411e-08, -6.10854e-04,
642 -2.99753e-09, 1.28895e-05};
645 if (TMath::Abs(x) > 5.55) return 0.;
647 Double_t y = c[j = 6];
648 while (j > 0) y = y * x +c[--j];
652 Double_t AliGenMUONlib::YUpsilonCDFscaled( Double_t *px, Double_t *dummy)
655 return AliGenMUONlib::YUpsilonPbPb(px, dummy);
659 Double_t AliGenMUONlib::YUpsilonCDFscaledPP( Double_t *px, Double_t *dummy)
662 return AliGenMUONlib::YUpsilonPP(px, dummy);
666 Double_t AliGenMUONlib::YUpsilonFlat( Double_t */*px*/, Double_t */*dummy*/)
673 Double_t AliGenMUONlib::YUpsilonPP( Double_t *px, Double_t */*dummy*/)
683 // mc = 1.4 GeV, pt-kick 1 GeV
685 Double_t c[7] = {8.91936e-01, -6.46645e-07, -1.52774e-02, 4.28677e-08, -7.01517e-04,
686 -6.20539e-10, 1.29943e-05};
689 if (TMath::Abs(x) > 6.2) return 0.;
691 Double_t y = c[j = 6];
692 while (j > 0) y = y * x +c[--j];
696 // particle composition
698 Int_t AliGenMUONlib::IpUpsilon(TRandom *)
703 Int_t AliGenMUONlib::IpUpsilonP(TRandom *)
708 Int_t AliGenMUONlib::IpUpsilonPP(TRandom *)
713 Int_t AliGenMUONlib::IpUpsilonFamily(TRandom *)
717 Float_t r = gRandom->Rndm();
721 } else if (r < 0.896) {
734 // pt-distribution (by scaling of pion distribution)
735 //____________________________________________________________
736 Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t */*dummy*/)
739 return PtScal(*px,7);
742 Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t */*dummy*/)
746 return YJpsi(px,dum);
748 // particle composition
750 Int_t AliGenMUONlib::IpPhi(TRandom *)
760 // pt-distribution (by scaling of pion distribution)
761 //____________________________________________________________
762 Double_t AliGenMUONlib::PtOmega( Double_t *px, Double_t */*dummy*/)
765 return PtScal(*px,5);
768 Double_t AliGenMUONlib::YOmega( Double_t *px, Double_t */*dummy*/)
772 return YJpsi(px,dum);
774 // particle composition
776 Int_t AliGenMUONlib::IpOmega(TRandom *)
787 // pt-distribution (by scaling of pion distribution)
788 //____________________________________________________________
789 Double_t AliGenMUONlib::PtEta( Double_t *px, Double_t */*dummy*/)
792 return PtScal(*px,3);
795 Double_t AliGenMUONlib::YEta( Double_t *px, Double_t */*dummy*/)
799 return YJpsi(px,dum);
801 // particle composition
803 Int_t AliGenMUONlib::IpEta(TRandom *)
814 //____________________________________________________________
815 Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t */*dummy*/)
818 const Double_t kpt0 = 2.25;
819 const Double_t kxn = 3.17;
822 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
823 return x/TMath::Power(pass1,kxn);
826 Double_t AliGenMUONlib::PtCharmCentral( Double_t *px, Double_t */*dummy*/)
829 const Double_t kpt0 = 2.12;
830 const Double_t kxn = 2.78;
833 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
834 return x/TMath::Power(pass1,kxn);
836 Double_t AliGenMUONlib::PtCharmF0M0S0PP( Double_t *px, Double_t */*dummy*/)
838 // FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
839 // PtCharmFiMjSkPP = PtCharmF0M0S0PP * (dN(i,j,k)/dpt / dN(0,0,0)/dpt)_MNR
840 // i=0,1,2; j=0,1,2; k=0,1,...,6
841 // dN(i,j,k)/dpt - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
842 // http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
843 // calculations for the following inputs:
844 // Peterson fragmentation function (F) with \epsilon_c = 0.02, 0.002 & 0.11
845 // for i=0,1 & 2 respectively; quark mass (M) of 1.5, 1.3 & 1.7 GeV
846 // for j=0,1 & 2 respectively;
847 // factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
848 // with a/b = 1/1, 1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2
849 // for k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
850 // (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
851 // June 2008, Smbat.Grigoryan@cern.ch
854 // Pythia6.214 (kCharmppMNRwmi, PDF = CTEQ5L, quark mass = 1.2 GeV, PtHard > 2.76 GeV/c)
855 // for pp collisions at 14 TeV with one c-cbar pair per event.
856 // Corresponding NLO total cross section is 5.68 mb
859 const Double_t kpt0 = 2.2930;
860 const Double_t kxn = 3.1196;
861 Double_t c[3]={-5.2180e-01,1.8753e-01,2.8669e-02};
864 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
865 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
867 Double_t AliGenMUONlib::PtCharmF1M0S0PP( Double_t *px, Double_t */*dummy*/)
870 // Corresponding NLO total cross section is 6.06 mb
871 const Double_t kpt0 = 2.8669;
872 const Double_t kxn = 3.1044;
873 Double_t c[3]={-4.6714e-01,1.5005e-01,4.5003e-02};
876 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
877 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
879 Double_t AliGenMUONlib::PtCharmF2M0S0PP( Double_t *px, Double_t */*dummy*/)
882 // Corresponding NLO total cross section is 6.06 mb
883 const Double_t kpt0 = 1.8361;
884 const Double_t kxn = 3.2966;
885 Double_t c[3]={-6.1550e-01,2.6498e-01,1.0728e-02};
888 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
889 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
891 Double_t AliGenMUONlib::PtCharmF0M1S0PP( Double_t *px, Double_t */*dummy*/)
894 // Corresponding NLO total cross section is 7.69 mb
895 const Double_t kpt0 = 2.1280;
896 const Double_t kxn = 3.1397;
897 Double_t c[3]={-5.4021e-01,2.0944e-01,2.5211e-02};
900 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
901 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
903 Double_t AliGenMUONlib::PtCharmF0M2S0PP( Double_t *px, Double_t */*dummy*/)
906 // Corresponding NLO total cross section is 4.81 mb
907 const Double_t kpt0 = 2.4579;
908 const Double_t kxn = 3.1095;
909 Double_t c[3]={-5.1497e-01,1.7532e-01,3.2429e-02};
912 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
913 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
915 Double_t AliGenMUONlib::PtCharmF0M0S1PP( Double_t *px, Double_t */*dummy*/)
918 // Corresponding NLO total cross section is 14.09 mb
919 const Double_t kpt0 = 2.1272;
920 const Double_t kxn = 3.1904;
921 Double_t c[3]={-4.6088e-01,2.1918e-01,2.3055e-02};
924 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
925 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
927 Double_t AliGenMUONlib::PtCharmF0M0S2PP( Double_t *px, Double_t */*dummy*/)
930 // Corresponding NLO total cross section is 1.52 mb
931 const Double_t kpt0 = 2.8159;
932 const Double_t kxn = 3.0857;
933 Double_t c[3]={-6.4691e-01,2.0289e-01,2.4922e-02};
936 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
937 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
939 Double_t AliGenMUONlib::PtCharmF0M0S3PP( Double_t *px, Double_t */*dummy*/)
942 // Corresponding NLO total cross section is 3.67 mb
943 const Double_t kpt0 = 2.7297;
944 const Double_t kxn = 3.3019;
945 Double_t c[3]={-6.2216e-01,1.9031e-01,1.5341e-02};
948 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
949 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
951 Double_t AliGenMUONlib::PtCharmF0M0S4PP( Double_t *px, Double_t */*dummy*/)
954 // Corresponding NLO total cross section is 3.38 mb
955 const Double_t kpt0 = 2.3894;
956 const Double_t kxn = 3.1075;
957 Double_t c[3]={-4.9742e-01,1.7032e-01,2.5994e-02};
960 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
961 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
963 Double_t AliGenMUONlib::PtCharmF0M0S5PP( Double_t *px, Double_t */*dummy*/)
966 // Corresponding NLO total cross section is 10.37 mb
967 const Double_t kpt0 = 2.0187;
968 const Double_t kxn = 3.3011;
969 Double_t c[3]={-3.9869e-01,2.9248e-01,1.1763e-02};
972 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
973 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
975 Double_t AliGenMUONlib::PtCharmF0M0S6PP( Double_t *px, Double_t */*dummy*/)
978 // Corresponding NLO total cross section is 7.22 mb
979 const Double_t kpt0 = 2.1089;
980 const Double_t kxn = 3.1848;
981 Double_t c[3]={-4.6275e-01,1.8114e-01,2.1363e-02};
984 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
985 return x/TMath::Power(pass1,kxn)*(1.+c[0]*x+c[1]*x*x)/(1.+c[2]*x*x);
989 Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t */*dummy*/)
991 // Charm y :: Carrer & Dainese : ALICE-INT-2003-019 v.3 (hep-ph/0311225)
992 // Pythia tuned to reproduce the distribution given by the HVQMNR program based on NLO calculations (pQCD)
993 // shadowing + kt broadening
996 Double_t c[2]={-2.42985e-03,-2.31001e-04};
997 Double_t y=1+(c[0]*TMath::Power(x,2))+(c[1]*TMath::Power(x,4));
1000 if (TMath::Abs(x)>8) {
1004 ycharm=TMath::Power(y,3);
1009 Double_t AliGenMUONlib::YCharmF0M0S0PP( Double_t *px, Double_t */*dummy*/)
1011 // FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
1012 // YCharmFiMjSkPP = YCharmF0M0S0PP * (dN(i,j,k)/dy / dN(0,0,0)/dy)_MNR
1013 // i=0,1,2; j=0,1,2; k=0,1,...,6
1014 // dN(i,j,k)/dy - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
1015 // http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
1016 // calculations for the following inputs:
1017 // Peterson fragmentation function (F) with \epsilon_c = 0.02, 0.002 & 0.11
1018 // for i=0,1 & 2 respectively; quark mass (M) of 1.5, 1.3 & 1.7 GeV
1019 // for j=0,1 & 2 respectively;
1020 // factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
1021 // with a/b = 1/1,1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2 for
1022 // k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
1023 // (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
1024 // June 2008, Smbat.Grigoryan@cern.ch
1027 // Pythia6.214 (kCharmppMNRwmi, PDF = CTEQ5L, quark mass = 1.2 GeV, PtHard > 2.76 GeV/c)
1028 // for pp collisions at 14 TeV with one c-cbar pair per event.
1029 // Corresponding NLO total cross section is 5.68 mb
1032 Double_t c[2]={7.0909e-03,6.1967e-05};
1033 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1036 if (TMath::Abs(x)>9) {
1040 ycharm=TMath::Power(y,3);
1045 Double_t AliGenMUONlib::YCharmF1M0S0PP( Double_t *px, Double_t */*dummy*/)
1048 // Corresponding NLO total cross section is 6.06 mb
1050 Double_t c[2]={6.9707e-03,6.0971e-05};
1051 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1054 if (TMath::Abs(x)>9) {
1058 ycharm=TMath::Power(y,3);
1063 Double_t AliGenMUONlib::YCharmF2M0S0PP( Double_t *px, Double_t */*dummy*/)
1066 // Corresponding NLO total cross section is 6.06 mb
1068 Double_t c[2]={7.1687e-03,6.5303e-05};
1069 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1072 if (TMath::Abs(x)>9) {
1076 ycharm=TMath::Power(y,3);
1081 Double_t AliGenMUONlib::YCharmF0M1S0PP( Double_t *px, Double_t */*dummy*/)
1084 // Corresponding NLO total cross section is 7.69 mb
1086 Double_t c[2]={5.9090e-03,7.1854e-05};
1087 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1090 if (TMath::Abs(x)>9) {
1094 ycharm=TMath::Power(y,3);
1099 Double_t AliGenMUONlib::YCharmF0M2S0PP( Double_t *px, Double_t */*dummy*/)
1102 // Corresponding NLO total cross section is 4.81 mb
1104 Double_t c[2]={8.0882e-03,5.5872e-05};
1105 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1108 if (TMath::Abs(x)>9) {
1112 ycharm=TMath::Power(y,3);
1117 Double_t AliGenMUONlib::YCharmF0M0S1PP( Double_t *px, Double_t */*dummy*/)
1120 // Corresponding NLO total cross section is 14.09 mb
1122 Double_t c[2]={7.2520e-03,6.2691e-05};
1123 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1126 if (TMath::Abs(x)>9) {
1130 ycharm=TMath::Power(y,3);
1135 Double_t AliGenMUONlib::YCharmF0M0S2PP( Double_t *px, Double_t */*dummy*/)
1138 // Corresponding NLO total cross section is 1.52 mb
1140 Double_t c[2]={1.1040e-04,1.4498e-04};
1141 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1144 if (TMath::Abs(x)>9) {
1148 ycharm=TMath::Power(y,3);
1153 Double_t AliGenMUONlib::YCharmF0M0S3PP( Double_t *px, Double_t */*dummy*/)
1156 // Corresponding NLO total cross section is 3.67 mb
1158 Double_t c[2]={-3.1328e-03,1.8270e-04};
1159 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1162 if (TMath::Abs(x)>9) {
1166 ycharm=TMath::Power(y,3);
1171 Double_t AliGenMUONlib::YCharmF0M0S4PP( Double_t *px, Double_t */*dummy*/)
1174 // Corresponding NLO total cross section is 3.38 mb
1176 Double_t c[2]={7.0865e-03,6.2532e-05};
1177 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1180 if (TMath::Abs(x)>9) {
1184 ycharm=TMath::Power(y,3);
1189 Double_t AliGenMUONlib::YCharmF0M0S5PP( Double_t *px, Double_t */*dummy*/)
1192 // Corresponding NLO total cross section is 10.37 mb
1194 Double_t c[2]={7.7070e-03,5.3533e-05};
1195 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1198 if (TMath::Abs(x)>9) {
1202 ycharm=TMath::Power(y,3);
1207 Double_t AliGenMUONlib::YCharmF0M0S6PP( Double_t *px, Double_t */*dummy*/)
1210 // Corresponding NLO total cross section is 7.22 mb
1212 Double_t c[2]={7.9195e-03,5.3823e-05};
1213 Double_t y=1-(c[0]*TMath::Power(x,2))-(c[1]*TMath::Power(x,4));
1216 if (TMath::Abs(x)>9) {
1220 ycharm=TMath::Power(y,3);
1227 Int_t AliGenMUONlib::IpCharm(TRandom *ran)
1229 // Charm composition
1233 random = ran->Rndm();
1234 // Taux de production Carrer & Dainese : ALICE-INT-2003-019 v.3
1235 // >>>>> cf. tab 4 p 11
1237 if (random < 0.30) {
1239 } else if (random < 0.60) {
1241 } else if (random < 0.70) {
1243 } else if (random < 0.80) {
1245 } else if (random < 0.86) {
1247 } else if (random < 0.92) {
1249 } else if (random < 0.96) {
1263 //____________________________________________________________
1264 Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t */*dummy*/)
1267 const Double_t kpt0 = 6.53;
1268 const Double_t kxn = 3.59;
1271 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1272 return x/TMath::Power(pass1,kxn);
1275 Double_t AliGenMUONlib::PtBeautyCentral( Double_t *px, Double_t */*dummy*/)
1278 const Double_t kpt0 = 6.14;
1279 const Double_t kxn = 2.93;
1282 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1283 return x/TMath::Power(pass1,kxn);
1285 Double_t AliGenMUONlib::PtBeautyF0M0S0PP( Double_t *px, Double_t */*dummy*/)
1287 // FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
1288 // PtBeautyFiMjSkPP = PtBeautyF0M0S0PP * (dN(i,j,k)/dpt / dN(0,0,0)/dpt)_MNR
1289 // i=0,1,2; j=0,1,2; k=0,1,...,6
1290 // dN(i,j,k)/dpt - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
1291 // http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
1292 // calculations for the following inputs:
1293 // Peterson fragmentation function (F) with \epsilon_b = 0.001, 0.0002 & 0.004
1294 // for i=0,1 & 2 respectively; quark mass (M) of 4.75, 4.5 & 5.0 GeV
1295 // for j=0,1 & 2 respectively;
1296 // factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
1297 // with a/b = 1/1, 1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2 for
1298 // k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
1299 // (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
1300 // June 2008, Smbat.Grigoryan@cern.ch
1303 // Pythia6.214 (kBeautyppMNRwmi, PDF = CTEQ5L, quark mass = 4.75 GeV, PtHard > 2.76 GeV/c)
1304 // for pp collisions at 14 TeV with one b-bbar pair per event.
1305 // Corresponding NLO total cross section is 0.494 mb
1307 const Double_t kpt0 = 8.0575;
1308 const Double_t kxn = 3.1921;
1311 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1312 return x/TMath::Power(pass1,kxn);
1314 Double_t AliGenMUONlib::PtBeautyF1M0S0PP( Double_t *px, Double_t */*dummy*/)
1317 // Corresponding NLO total cross section is 0.445 mb
1318 const Double_t kpt0 = 8.6239;
1319 const Double_t kxn = 3.2911;
1322 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1323 return x/TMath::Power(pass1,kxn);
1325 Double_t AliGenMUONlib::PtBeautyF2M0S0PP( Double_t *px, Double_t */*dummy*/)
1328 // Corresponding NLO total cross section is 0.445 mb
1329 const Double_t kpt0 = 7.3367;
1330 const Double_t kxn = 3.0692;
1333 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1334 return x/TMath::Power(pass1,kxn);
1336 Double_t AliGenMUONlib::PtBeautyF0M1S0PP( Double_t *px, Double_t */*dummy*/)
1339 // Corresponding NLO total cross section is 0.518 mb
1340 const Double_t kpt0 = 7.6409;
1341 const Double_t kxn = 3.1364;
1344 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1345 return x/TMath::Power(pass1,kxn);
1347 Double_t AliGenMUONlib::PtBeautyF0M2S0PP( Double_t *px, Double_t */*dummy*/)
1350 // Corresponding NLO total cross section is 0.384 mb
1351 const Double_t kpt0 = 8.4948;
1352 const Double_t kxn = 3.2546;
1355 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1356 return x/TMath::Power(pass1,kxn);
1358 Double_t AliGenMUONlib::PtBeautyF0M0S1PP( Double_t *px, Double_t */*dummy*/)
1361 // Corresponding NLO total cross section is 0.648 mb
1362 const Double_t kpt0 = 7.6631;
1363 const Double_t kxn = 3.1621;
1366 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1367 return x/TMath::Power(pass1,kxn);
1369 Double_t AliGenMUONlib::PtBeautyF0M0S2PP( Double_t *px, Double_t */*dummy*/)
1372 // Corresponding NLO total cross section is 0.294 mb
1373 const Double_t kpt0 = 8.7245;
1374 const Double_t kxn = 3.2213;
1377 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1378 return x/TMath::Power(pass1,kxn);
1380 Double_t AliGenMUONlib::PtBeautyF0M0S3PP( Double_t *px, Double_t */*dummy*/)
1383 // Corresponding NLO total cross section is 0.475 mb
1384 const Double_t kpt0 = 8.5296;
1385 const Double_t kxn = 3.2187;
1388 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1389 return x/TMath::Power(pass1,kxn);
1391 Double_t AliGenMUONlib::PtBeautyF0M0S4PP( Double_t *px, Double_t */*dummy*/)
1394 // Corresponding NLO total cross section is 0.324 mb
1395 const Double_t kpt0 = 7.9440;
1396 const Double_t kxn = 3.1614;
1399 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1400 return x/TMath::Power(pass1,kxn);
1402 Double_t AliGenMUONlib::PtBeautyF0M0S5PP( Double_t *px, Double_t */*dummy*/)
1405 // Corresponding NLO total cross section is 0.536 mb
1406 const Double_t kpt0 = 8.2408;
1407 const Double_t kxn = 3.3029;
1410 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1411 return x/TMath::Power(pass1,kxn);
1413 Double_t AliGenMUONlib::PtBeautyF0M0S6PP( Double_t *px, Double_t */*dummy*/)
1416 // Corresponding NLO total cross section is 0.420 mb
1417 const Double_t kpt0 = 7.8041;
1418 const Double_t kxn = 3.2094;
1421 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1422 return x/TMath::Power(pass1,kxn);
1426 Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t */*dummy*/)
1428 // Beauty y :: Carrer & Dainese : ALICE-INT-2003-019 v.3 (hep-ph/0311225)
1429 // Pythia tuned to reproduce the distribution given by the HVQMNR program based on NLO calculations (pQCD)
1430 // shadowing + kt broadening
1433 Double_t c[2]={-1.27590e-02,-2.42731e-04};
1434 Double_t y=1+c[0]*TMath::Power(x,2)+c[1]*TMath::Power(x,4);
1437 if (TMath::Abs(x)>6) {
1441 ybeauty=TMath::Power(y,3);
1446 Double_t AliGenMUONlib::YBeautyF0M0S0PP( Double_t *px, Double_t */*dummy*/)
1448 // FiMjSkPP define theoretical uncertainties around F0M0S0PP as follows:
1449 // YBeautyFiMjSkPP = YBeautyF0M0S0PP * (dN(i,j,k)/dy / dN(0,0,0)/dy)_MNR
1450 // i=0,1,2; j=0,1,2; k=0,1,...,6
1451 // dN(i,j,k)/dy - spectra obtained by A.Dainese (hep-ph/0601164, p.88;
1452 // http://www-zeus.desy.de/~corradi/benchmarks) from NLO pQCD (MNR)
1453 // calculations for the following inputs:
1454 // Peterson fragmentation function (F) with \epsilon_b = 0.001, 0.0002 & 0.004
1455 // for i=0,1 & 2 respectively; quark mass (M) of 4.75, 4.5 & 5.0 GeV
1456 // for j=0,1 & 2 respectively;
1457 // factorisation \mu_F = a*mt and renormalisation \mu_R = b*mt scales (S)
1458 // with a/b = 1/1, 1/0.5, 0.5/1, 0.5/0.5, 1/2, 2/1 & 2/2
1459 // for k = 0, 1, 2, 3, 4, 5 & 6 respectively; CTEQ6.1 PDF set
1460 // (PDF uncertainty not considered since is small, see hep-ph/0601164, p.89).
1461 // June 2008, Smbat.Grigoryan@cern.ch
1464 // Pythia6.214 (kBeautyppMNRwmi, PDF = CTEQ5L, quark mass = 4.75 GeV, PtHard > 2.76 GeV/c)
1465 // for pp collisions at 14 TeV with one b-bbar pair per event.
1466 // Corresponding NLO total cross section is 0.494 mb
1470 Double_t c[2]={1.2350e-02,9.2667e-05};
1471 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1474 if (TMath::Abs(x)>7.6) {
1478 ybeauty=TMath::Power(y,3);
1483 Double_t AliGenMUONlib::YBeautyF1M0S0PP( Double_t *px, Double_t */*dummy*/)
1486 // Corresponding NLO total cross section is 0.445 mb
1488 Double_t c[2]={1.2292e-02,9.1847e-05};
1489 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1492 if (TMath::Abs(x)>7.6) {
1496 ybeauty=TMath::Power(y,3);
1501 Double_t AliGenMUONlib::YBeautyF2M0S0PP( Double_t *px, Double_t */*dummy*/)
1504 // Corresponding NLO total cross section is 0.445 mb
1506 Double_t c[2]={1.2436e-02,9.3709e-05};
1507 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1510 if (TMath::Abs(x)>7.6) {
1514 ybeauty=TMath::Power(y,3);
1519 Double_t AliGenMUONlib::YBeautyF0M1S0PP( Double_t *px, Double_t */*dummy*/)
1522 // Corresponding NLO total cross section is 0.518 mb
1524 Double_t c[2]={1.1714e-02,1.0068e-04};
1525 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1528 if (TMath::Abs(x)>7.6) {
1532 ybeauty=TMath::Power(y,3);
1537 Double_t AliGenMUONlib::YBeautyF0M2S0PP( Double_t *px, Double_t */*dummy*/)
1540 // Corresponding NLO total cross section is 0.384 mb
1542 Double_t c[2]={1.2944e-02,8.5500e-05};
1543 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1546 if (TMath::Abs(x)>7.6) {
1550 ybeauty=TMath::Power(y,3);
1555 Double_t AliGenMUONlib::YBeautyF0M0S1PP( Double_t *px, Double_t */*dummy*/)
1558 // Corresponding NLO total cross section is 0.648 mb
1560 Double_t c[2]={1.2455e-02,9.2713e-05};
1561 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1564 if (TMath::Abs(x)>7.6) {
1568 ybeauty=TMath::Power(y,3);
1573 Double_t AliGenMUONlib::YBeautyF0M0S2PP( Double_t *px, Double_t */*dummy*/)
1576 // Corresponding NLO total cross section is 0.294 mb
1578 Double_t c[2]={1.0897e-02,1.1878e-04};
1579 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1582 if (TMath::Abs(x)>7.6) {
1586 ybeauty=TMath::Power(y,3);
1591 Double_t AliGenMUONlib::YBeautyF0M0S3PP( Double_t *px, Double_t */*dummy*/)
1594 // Corresponding NLO total cross section is 0.475 mb
1596 Double_t c[2]={1.0912e-02,1.1858e-04};
1597 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1600 if (TMath::Abs(x)>7.6) {
1604 ybeauty=TMath::Power(y,3);
1609 Double_t AliGenMUONlib::YBeautyF0M0S4PP( Double_t *px, Double_t */*dummy*/)
1612 // Corresponding NLO total cross section is 0.324 mb
1614 Double_t c[2]={1.2378e-02,9.2490e-05};
1615 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1618 if (TMath::Abs(x)>7.6) {
1622 ybeauty=TMath::Power(y,3);
1627 Double_t AliGenMUONlib::YBeautyF0M0S5PP( Double_t *px, Double_t */*dummy*/)
1630 // Corresponding NLO total cross section is 0.536 mb
1632 Double_t c[2]={1.2886e-02,8.2912e-05};
1633 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1636 if (TMath::Abs(x)>7.6) {
1640 ybeauty=TMath::Power(y,3);
1645 Double_t AliGenMUONlib::YBeautyF0M0S6PP( Double_t *px, Double_t */*dummy*/)
1648 // Corresponding NLO total cross section is 0.420 mb
1650 Double_t c[2]={1.3106e-02,8.0115e-05};
1651 Double_t y=1-c[0]*TMath::Power(x,2)-c[1]*TMath::Power(x,4);
1654 if (TMath::Abs(x)>7.6) {
1658 ybeauty=TMath::Power(y,3);
1664 Int_t AliGenMUONlib::IpBeauty(TRandom *ran)
1666 // Beauty Composition
1669 random = ran->Rndm();
1671 // Taux de production Carrer & Dainese : ALICE-INT-2003-019 v.3
1672 // >>>>> cf. tab 4 p 11
1674 if (random < 0.20) {
1676 } else if (random < 0.40) {
1678 } else if (random < 0.605) {
1680 } else if (random < 0.81) {
1682 } else if (random < 0.87) {
1684 } else if (random < 0.93) {
1686 } else if (random < 0.965) {
1696 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
1697 GenFunc AliGenMUONlib::GetPt(Int_t param, const char* tname) const
1699 // Return pointer to pT parameterisation
1700 TString sname = TString(tname);
1716 if (sname == "Vogt" || sname == "Vogt PbPb") {
1718 } else if (sname == "Vogt pp") {
1720 } else if (sname == "CDF scaled") {
1721 func=PtJpsiCDFscaled;
1722 } else if (sname == "CDF pp") {
1723 func=PtJpsiCDFscaledPP;
1724 } else if (sname == "CDF pp 10") {
1725 func=PtJpsiCDFscaledPP10;
1726 } else if (sname == "CDF scaled old") {
1727 func=PtJpsiCDFscaledold;
1728 } else if (sname == "CDF pp old") {
1729 func=PtJpsiCDFscaledPPold;
1730 } else if (sname == "Flat") {
1739 case kUpsilonFamily:
1743 if (sname == "Vogt" || sname == "Vogt PbPb") {
1745 } else if (sname == "Vogt pp") {
1747 } else if (sname == "CDF scaled") {
1748 func=PtUpsilonCDFscaled;
1749 } else if (sname == "CDF pp") {
1750 func=PtUpsilonCDFscaledPP;
1751 } else if (sname == "Flat") {
1758 if (sname == "F0M0S0 pp") {
1759 func=PtCharmF0M0S0PP;
1760 } else if (sname == "F1M0S0 pp") {
1761 func=PtCharmF1M0S0PP;
1762 } else if (sname == "F2M0S0 pp") {
1763 func=PtCharmF2M0S0PP;
1764 } else if (sname == "F0M1S0 pp") {
1765 func=PtCharmF0M1S0PP;
1766 } else if (sname == "F0M2S0 pp") {
1767 func=PtCharmF0M2S0PP;
1768 } else if (sname == "F0M0S1 pp") {
1769 func=PtCharmF0M0S1PP;
1770 } else if (sname == "F0M0S2 pp") {
1771 func=PtCharmF0M0S2PP;
1772 } else if (sname == "F0M0S3 pp") {
1773 func=PtCharmF0M0S3PP;
1774 } else if (sname == "F0M0S4 pp") {
1775 func=PtCharmF0M0S4PP;
1776 } else if (sname == "F0M0S5 pp") {
1777 func=PtCharmF0M0S5PP;
1778 } else if (sname == "F0M0S6 pp") {
1779 func=PtCharmF0M0S6PP;
1780 } else if (sname == "central") {
1781 func=PtCharmCentral;
1787 if (sname == "F0M0S0 pp") {
1788 func=PtBeautyF0M0S0PP;
1789 } else if (sname == "F1M0S0 pp") {
1790 func=PtBeautyF1M0S0PP;
1791 } else if (sname == "F2M0S0 pp") {
1792 func=PtBeautyF2M0S0PP;
1793 } else if (sname == "F0M1S0 pp") {
1794 func=PtBeautyF0M1S0PP;
1795 } else if (sname == "F0M2S0 pp") {
1796 func=PtBeautyF0M2S0PP;
1797 } else if (sname == "F0M0S1 pp") {
1798 func=PtBeautyF0M0S1PP;
1799 } else if (sname == "F0M0S2 pp") {
1800 func=PtBeautyF0M0S2PP;
1801 } else if (sname == "F0M0S3 pp") {
1802 func=PtBeautyF0M0S3PP;
1803 } else if (sname == "F0M0S4 pp") {
1804 func=PtBeautyF0M0S4PP;
1805 } else if (sname == "F0M0S5 pp") {
1806 func=PtBeautyF0M0S5PP;
1807 } else if (sname == "F0M0S6 pp") {
1808 func=PtBeautyF0M0S6PP;
1809 } else if (sname == "central") {
1810 func=PtBeautyCentral;
1835 printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
1840 GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname) const
1843 // Return pointer to y- parameterisation
1845 TString sname = TString(tname);
1861 if (sname == "Vogt" || sname == "Vogt PbPb") {
1863 } else if (sname == "Vogt pp"){
1865 } else if (sname == "CDF scaled") {
1866 func=YJpsiCDFscaled;
1867 } else if (sname == "CDF pp") {
1868 func=YJpsiCDFscaledPP;
1869 } else if (sname == "CDF pp 10") {
1870 func=YJpsiCDFscaledPP10;
1871 } else if (sname == "CDF scaled old") {
1872 func=YJpsiCDFscaledold;
1873 } else if (sname == "CDF pp old") {
1874 func=YJpsiCDFscaledPPold;
1875 } else if (sname == "Flat") {
1884 case kUpsilonFamily:
1888 if (sname == "Vogt" || sname == "Vogt PbPb") {
1890 } else if (sname == "Vogt pp") {
1892 } else if (sname == "CDF scaled") {
1893 func=YUpsilonCDFscaled;
1894 } else if (sname == "CDF pp") {
1895 func=YUpsilonCDFscaledPP;
1896 } else if (sname == "Flat") {
1903 if (sname == "F0M0S0 pp") {
1904 func=YCharmF0M0S0PP;
1905 } else if (sname == "F1M0S0 pp") {
1906 func=YCharmF1M0S0PP;
1907 } else if (sname == "F2M0S0 pp") {
1908 func=YCharmF2M0S0PP;
1909 } else if (sname == "F0M1S0 pp") {
1910 func=YCharmF0M1S0PP;
1911 } else if (sname == "F0M2S0 pp") {
1912 func=YCharmF0M2S0PP;
1913 } else if (sname == "F0M0S1 pp") {
1914 func=YCharmF0M0S1PP;
1915 } else if (sname == "F0M0S2 pp") {
1916 func=YCharmF0M0S2PP;
1917 } else if (sname == "F0M0S3 pp") {
1918 func=YCharmF0M0S3PP;
1919 } else if (sname == "F0M0S4 pp") {
1920 func=YCharmF0M0S4PP;
1921 } else if (sname == "F0M0S5 pp") {
1922 func=YCharmF0M0S5PP;
1923 } else if (sname == "F0M0S6 pp") {
1924 func=YCharmF0M0S6PP;
1930 if (sname == "F0M0S0 pp") {
1931 func=YBeautyF0M0S0PP;
1932 } else if (sname == "F1M0S0 pp") {
1933 func=YBeautyF1M0S0PP;
1934 } else if (sname == "F2M0S0 pp") {
1935 func=YBeautyF2M0S0PP;
1936 } else if (sname == "F0M1S0 pp") {
1937 func=YBeautyF0M1S0PP;
1938 } else if (sname == "F0M2S0 pp") {
1939 func=YBeautyF0M2S0PP;
1940 } else if (sname == "F0M0S1 pp") {
1941 func=YBeautyF0M0S1PP;
1942 } else if (sname == "F0M0S2 pp") {
1943 func=YBeautyF0M0S2PP;
1944 } else if (sname == "F0M0S3 pp") {
1945 func=YBeautyF0M0S3PP;
1946 } else if (sname == "F0M0S4 pp") {
1947 func=YBeautyF0M0S4PP;
1948 } else if (sname == "F0M0S5 pp") {
1949 func=YBeautyF0M0S5PP;
1950 } else if (sname == "F0M0S6 pp") {
1951 func=YBeautyF0M0S6PP;
1976 printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
1986 //____________________________________________________________
1987 Double_t AliGenMUONlib::PtChic0( Double_t *px, Double_t */*dummy*/)
1990 const Double_t kpt0 = 4.;
1991 const Double_t kxn = 3.6;
1994 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
1995 return x/TMath::Power(pass1,kxn);
1997 Double_t AliGenMUONlib::PtChic1( Double_t *px, Double_t */*dummy*/)
2000 const Double_t kpt0 = 4.;
2001 const Double_t kxn = 3.6;
2004 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
2005 return x/TMath::Power(pass1,kxn);
2007 Double_t AliGenMUONlib::PtChic2( Double_t *px, Double_t */*dummy*/)
2010 const Double_t kpt0 = 4.;
2011 const Double_t kxn = 3.6;
2014 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
2015 return x/TMath::Power(pass1,kxn);
2017 Double_t AliGenMUONlib::PtChic( Double_t *px, Double_t */*dummy*/)
2020 const Double_t kpt0 = 4.;
2021 const Double_t kxn = 3.6;
2024 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
2025 return x/TMath::Power(pass1,kxn);
2030 //____________________________________________________________
2031 Double_t AliGenMUONlib::YChic0(Double_t *py, Double_t */*dummy*/)
2034 const Double_t ky0 = 4.;
2035 const Double_t kb=1.;
2037 Double_t y=TMath::Abs(*py);
2042 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
2046 Double_t AliGenMUONlib::YChic1(Double_t *py, Double_t */*dummy*/)
2049 const Double_t ky0 = 4.;
2050 const Double_t kb=1.;
2052 Double_t y=TMath::Abs(*py);
2057 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
2061 Double_t AliGenMUONlib::YChic2(Double_t *py, Double_t */*dummy*/)
2064 const Double_t ky0 = 4.;
2065 const Double_t kb=1.;
2067 Double_t y=TMath::Abs(*py);
2072 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
2076 Double_t AliGenMUONlib::YChic(Double_t *py, Double_t */*dummy*/)
2079 const Double_t ky0 = 4.;
2080 const Double_t kb=1.;
2082 Double_t y=TMath::Abs(*py);
2087 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
2091 // particle composition
2093 Int_t AliGenMUONlib::IpChic0(TRandom *)
2099 Int_t AliGenMUONlib::IpChic1(TRandom *)
2104 Int_t AliGenMUONlib::IpChic2(TRandom *)
2106 // Chi_c2 prime composition
2109 Int_t AliGenMUONlib::IpChic(TRandom *)
2113 Float_t r = gRandom->Rndm();
2116 } else if( r < 0.377 ) {
2125 //_____________________________________________________________
2127 typedef Int_t (*GenFuncIp) (TRandom *);
2128 GenFuncIp AliGenMUONlib::GetIp(Int_t param, const char* /*tname*/) const
2130 // Return pointer to particle type parameterisation
2156 case kUpsilonFamily:
2157 func=IpUpsilonFamily;
2191 printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");
2198 Float_t AliGenMUONlib::Interpolate(Float_t x, Float_t* y, Float_t x0,
2203 // Neville's alorithm for interpolation
2209 // n: number of data points
2210 // no: order of polynom
2212 Float_t* c = new Float_t[n];
2213 Float_t* d = new Float_t[n];
2215 for (i = 0; i < n; i++) {
2220 Int_t ns = int((x - x0)/dx);
2224 for (m = 0; m < no; m++) {
2225 for (i = 0; i < n-m; i++) {
2226 Float_t ho = x0 + Float_t(i) * dx - x;
2227 Float_t hp = x0 + Float_t(i+m+1) * dx - x;
2228 Float_t w = c[i+1] - d[i];
2229 Float_t den = ho-hp;
2236 if (2*ns < (n-m-1)) {