+
+Double_t AliGenMUONlib::PtJpsiCDFscaled( Double_t *px, Double_t */*dummy*/)
+{
+// J/Psi pT
+ const Double_t kpt0 = 4.703;
+ const Double_t kxn = 3.826;
+ Double_t x=*px;
+ //
+ Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+ return x/TMath::Power(pass1,kxn);
+}
+
+Double_t AliGenMUONlib::PtJpsiCDFscaledPP( Double_t *px, Double_t */*dummy*/)
+{
+// J/Psi pT
+//
+// pp 14 TeV
+//
+// scaled from CDF data at 2 TeV
+
+ const Double_t kpt0 = 5.355;
+ const Double_t kxn = 3.821;
+ Double_t x=*px;
+ //
+ Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+ return x/TMath::Power(pass1,kxn);
+}
+
+Double_t AliGenMUONlib::PtJpsiFlat( Double_t */*px*/, Double_t */*dummy*/ )
+{
+ return 1.;
+}
+
+Double_t AliGenMUONlib::PtJpsiPbPb( Double_t *px, Double_t */*dummy*/)
+{
+// J/Psi pT spectrum
+//
+// R. Vogt 2002
+// PbPb 5.5 TeV
+// MRST HO
+// mc = 1.4 GeV, pt-kick 1 GeV
+//
+ Float_t x = px[0];
+ Float_t c[8] = {
+ -2.13098e+00, 9.46552e+00, -5.06799e+00, 1.27260e+00,
+ -1.83806e-01, 1.55853e-02, -7.23241e-04, 1.42105e-05
+ };
+
+ Double_t y;
+ if (x < 10.) {
+ Int_t j;
+ y = c[j = 7];
+ while (j > 0) y = y * x +c[--j];
+ y = x * TMath::Exp(y);
+ } else {
+ y = 0.;
+ }
+ return y;
+}
+
+Double_t AliGenMUONlib::PtJpsiBPbPb( Double_t *px, Double_t */*dummy*/)
+{
+// J/Psi pT spectrum
+// B -> J/Psi X
+ Double_t x0 = 4.0384;
+ Double_t n = 3.0288;
+
+ Double_t x = px[0];
+ Double_t y = x / TMath::Power((1. + (x/x0)*(x/x0)), n);
+
+ return y;
+}
+
+
+Double_t AliGenMUONlib::PtJpsiPP( Double_t *px, Double_t */*dummy*/)
+{
+// J/Psi pT spectrum
+//
+// R. Vogt 2002
+// pp 14 TeV
+// MRST HO
+// mc = 1.4 GeV, pt-kick 1 GeV
+//
+ Float_t x = px[0];
+ Float_t c[4] = {8.47471e+00, -1.93567e+00, 1.50271e-01, -5.51212e-03};
+
+ Double_t y;
+ if (x < 10.) {
+ Int_t j;
+ y = c[j = 3];
+ while (j > 0) y = y * x +c[--j];
+ y = x * TMath::Exp(y);
+ } else {
+ y = 0.;
+ }
+ return y;
+}
+