]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenMUONlib.cxx
Coverity
[u/mrichter/AliRoot.git] / EVGEN / AliGenMUONlib.cxx
index 17021148f413f8cc0322806a45499164d6e5d2db..ca7a12060e182f784b2d0fb9ed233072420b5f35 100644 (file)
@@ -151,6 +151,53 @@ Int_t AliGenMUONlib::IpKaon(TRandom *ran)
 //
 //                pt-distribution
 //____________________________________________________________
+Double_t AliGenMUONlib::PtJpsiPP7000( const Double_t *px, const Double_t */*dummy*/)
+{
+// J/Psi pT
+//
+// pp 7 TeV
+// using ALICE data at 2.5<y<4, see arXiv:1103.2394
+
+  const Double_t kpt0 = 2.44;
+  const Double_t kxn  = 3.9;
+  Double_t x=*px;
+  //
+  Double_t pass1 = 1.+0.36*(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
+}
+
+Double_t AliGenMUONlib::PtJpsiPP2760( const Double_t *px, const Double_t */*dummy*/)
+{
+// J/Psi pT
+//
+// pp 2.76 TeV
+// from the fit of RHIC + LHC data, see arXiv:1103.2394
+
+  const Double_t kpt0 = 2.31;
+  const Double_t kxn  = 3.9;
+  Double_t x=*px;
+  //
+  Double_t pass1 = 1.+0.36*(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
+}
+
+Double_t AliGenMUONlib::PtJpsiPbPb2760( const Double_t *px, const Double_t *dummy)
+{
+// J/Psi pT
+//
+// PbPb 2.76 TeV, for EKS98 with minimum bias shadowing factor 0.66
+//
+  Double_t c[5] = {6.01022e-01, 4.70988e-02, -2.27917e-03, 3.09885e-05, 1.31955e-06};
+  Double_t x=*px;
+  Double_t y;
+  Int_t j;
+  y = c[j = 4];
+  while (j > 0) y  = y * x + c[--j];
+  //  
+  Double_t d = 1.+c[4]*TMath::Power(x,4);
+  return y/d * AliGenMUONlib::PtJpsiPP2760(px,dummy);
+}
+
 Double_t AliGenMUONlib::PtJpsi( const Double_t *px, const Double_t */*dummy*/)
 {
 // J/Psi pT
@@ -253,6 +300,36 @@ Double_t AliGenMUONlib::PtJpsiCDFscaledPP4( const Double_t *px, const Double_t *
   return x/TMath::Power(pass1,kxn);
 }
 
+Double_t AliGenMUONlib::PtJpsiCDFscaledPP3( const Double_t *px, const Double_t */*dummy*/)
+{
+// J/Psi pT
+//
+// pp 2.76 TeV
+// scaled from CDF data at 1.9 TeV
+//
+  const Double_t kpt0 = 4.435;
+  const Double_t kxn  = 4.071;
+  Double_t x=*px;
+  //
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
+}
+
+Double_t AliGenMUONlib::PtJpsiCDFscaledPP2( const Double_t *px, const Double_t */*dummy*/)
+{
+// J/Psi pT
+//
+// pp 1.9 TeV
+// fit of the CDF data at 1.9 TeV
+//
+  const Double_t kpt0 = 4.233;
+  const Double_t kxn  = 4.071;
+  Double_t x=*px;
+  //
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
+}
+
 Double_t AliGenMUONlib::PtJpsiCDFscaledPPb9( const Double_t *px, const Double_t *dummy)
 {
 // J/Psi pT
@@ -377,6 +454,51 @@ Double_t AliGenMUONlib::PtJpsiPP( const Double_t *px, const Double_t */*dummy*/)
 //
 //               y-distribution
 //____________________________________________________________
+Double_t AliGenMUONlib::YJpsiPP7000( const Double_t *px, const Double_t */*dummy*/)
+{
+// J/Psi y
+//
+// pp 7 TeV
+// from the fit of RHIC + LHC data, see arXiv:1103.2394
+//
+    Double_t x = px[0]/7.72;
+    x = x*x;
+    Double_t y = TMath::Exp(-x/0.383/0.383/2);
+    if(x > 1) y=0;
+    return y;
+}
+
+Double_t AliGenMUONlib::YJpsiPP2760( const Double_t *px, const Double_t */*dummy*/)
+{
+// J/Psi y
+//
+// pp 2.76 TeV
+// from the fit of RHIC + LHC data, see arXiv:1103.2394
+//
+    Double_t x = px[0]/6.79;
+    x = x*x;
+    Double_t y = TMath::Exp(-x/0.383/0.383/2);
+    if(x > 1) y=0;
+    return y;
+}
+
+Double_t AliGenMUONlib::YJpsiPbPb2760( const Double_t *px, const Double_t *dummy)
+{
+// J/Psi y
+//
+// PbPb 2.76 TeV, for EKS98 with minimum bias shadowing factor 0.66
+//
+    Double_t c[4] = {5.95228e-01, 9.45069e-03, 2.44710e-04, -1.32894e-05}; 
+    Double_t x = px[0]*px[0];
+    Double_t y;
+    Int_t j;
+    y = c[j = 3];
+    while (j > 0) y  = y * x + c[--j];
+    if(y<0) y=0;
+
+    return y * AliGenMUONlib::YJpsiPP2760(px,dummy);
+}
+
 Double_t AliGenMUONlib::YJpsi(const Double_t *py, const Double_t */*dummy*/)
 {
 // J/psi y
@@ -553,6 +675,26 @@ Double_t AliGenMUONlib::YJpsiCDFscaledPP4( const Double_t *px, const Double_t */
     return y;
 }
 
+Double_t AliGenMUONlib::YJpsiCDFscaledPP3( const Double_t *px, const Double_t *dummy)
+{
+// J/Psi y 
+    return AliGenMUONlib::YJpsiPP2760(px, dummy);
+}
+
+Double_t AliGenMUONlib::YJpsiCDFscaledPP2( const Double_t *px, const Double_t */*dummy*/)
+{
+// J/Psi y
+//
+// pp 1.9 TeV
+// from the fit of RHIC + LHC data, see arXiv:1103.2394
+//
+    Double_t x = px[0]/6.42;
+    x = x*x;
+    Double_t y = TMath::Exp(-x/0.383/0.383/2);
+    if(x > 1) y=0;
+    return y;
+}
+
 Double_t AliGenMUONlib::YJpsiPP( const Double_t *px, const Double_t */*dummy*/)
 {
 
@@ -2143,6 +2285,12 @@ GenFunc AliGenMUONlib::GetPt(Int_t param,  const char* tname) const
            func=PtJpsiPbPb;
        } else if (sname == "Vogt pp") {
            func=PtJpsiPP;
+       } else if (sname == "pp 7") {
+           func=PtJpsiPP7000;
+       } else if (sname == "pp 2.76") {
+           func=PtJpsiPP2760;
+       } else if (sname == "PbPb 2.76") {
+           func=PtJpsiPbPb2760;
        } else if (sname == "CDF scaled") {
            func=PtJpsiCDFscaled;
        } else if (sname == "CDF pp") {
@@ -2155,6 +2303,10 @@ GenFunc AliGenMUONlib::GetPt(Int_t param,  const char* tname) const
            func=PtJpsiCDFscaledPP7;
        } else if (sname == "CDF pp 3.94") {
            func=PtJpsiCDFscaledPP4;
+       } else if (sname == "CDF pp 2.76") {
+           func=PtJpsiCDFscaledPP3;
+       } else if (sname == "CDF pp 1.9") {
+           func=PtJpsiCDFscaledPP2;
        } else if (sname == "CDF pPb 8.8") {
            func=PtJpsiCDFscaledPPb9;
        } else if (sname == "CDF Pbp 8.8") {
@@ -2306,6 +2458,12 @@ GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname) const
            func=YJpsiPbPb;
        } else if (sname == "Vogt pp"){
            func=YJpsiPP;
+       } else if (sname == "pp 7") {
+           func=YJpsiPP7000;
+       } else if (sname == "pp 2.76") {
+           func=YJpsiPP2760;
+       } else if (sname == "PbPb 2.76") {
+           func=YJpsiPbPb2760;
        } else if (sname == "CDF scaled") {
            func=YJpsiCDFscaled;
        } else if (sname == "CDF pp") {
@@ -2318,6 +2476,10 @@ GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname) const
            func=YJpsiCDFscaledPP7;
        } else if (sname == "CDF pp 3.94") {
            func=YJpsiCDFscaledPP4;
+       } else if (sname == "CDF pp 2.76") {
+           func=YJpsiCDFscaledPP3;
+       } else if (sname == "CDF pp 1.9") {
+           func=YJpsiCDFscaledPP2;
        } else if (sname == "CDF pPb 8.8") {
            func=YJpsiCDFscaledPPb9;
        } else if (sname == "CDF Pbp 8.8") {