]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenMUONlib.cxx
Make separate, specialized geometries for RPhi and RhoZ views.
[u/mrichter/AliRoot.git] / EVGEN / AliGenMUONlib.cxx
index b2dad8e77a3b1e140c7687dd7061b9e978001ab0..6b9b9a7b76d77ad57d27e6d821a8acf884264a55 100644 (file)
@@ -173,6 +173,27 @@ Double_t AliGenMUONlib::PtJpsiCDFscaled( Double_t *px, Double_t */*dummy*/)
   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
@@ -189,7 +210,7 @@ Double_t AliGenMUONlib::PtJpsiPbPb( Double_t *px, Double_t */*dummy*/)
     };
     
     Double_t y;
-    if (x < 15.) {
+    if (x < 10.) {
        Int_t j;
        y = c[j = 7];
        while (j > 0) y  = y * x +c[--j];
@@ -256,6 +277,11 @@ Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t */*dummy*/)
   return yj;
 }
 
+Double_t AliGenMUONlib::YJpsiFlat( Double_t */*py*/, Double_t */*dummy*/ )
+{
+  return 1.;
+}
+
 
 Double_t AliGenMUONlib::YJpsiPbPb( Double_t *px, Double_t */*dummy*/)
 {
@@ -292,6 +318,11 @@ Double_t AliGenMUONlib::YJpsiCDFscaled( Double_t *px, Double_t* dummy)
     return AliGenMUONlib::YJpsiPbPb(px, dummy);
 }
 
+Double_t AliGenMUONlib::YJpsiCDFscaledPP( Double_t *px, Double_t* dummy)
+{
+    // J/Psi y 
+    return AliGenMUONlib::YJpsiPP(px, dummy);
+}
 
 Double_t AliGenMUONlib::YJpsiPP( Double_t *px, Double_t */*dummy*/)
 {
@@ -404,6 +435,27 @@ Double_t AliGenMUONlib::PtUpsilonCDFscaled( Double_t *px, Double_t */*dummy*/ )
   return x/TMath::Power(pass1,kxn);
 }
 
+Double_t AliGenMUONlib::PtUpsilonCDFscaledPP( Double_t *px, Double_t */*dummy*/ )
+{
+// Upsilon pT
+//
+// pp 14 TeV
+//
+// scaled from CDF data at 2 TeV
+
+  const Double_t kpt0 = 8.610;
+  const Double_t kxn  = 3.051;
+  Double_t x=*px;
+  //
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
+}
+
+Double_t AliGenMUONlib::PtUpsilonFlat( Double_t */*px*/, Double_t */*dummy*/ )
+{
+  return 1.;
+}
+
 Double_t AliGenMUONlib::PtUpsilonPbPb( Double_t *px, Double_t */*dummy*/)
 {
 
@@ -512,6 +564,20 @@ Double_t AliGenMUONlib::YUpsilonCDFscaled( Double_t *px, Double_t *dummy)
     
 }
 
+Double_t AliGenMUONlib::YUpsilonCDFscaledPP( Double_t *px, Double_t *dummy)
+{
+    // Upsilon y
+    return AliGenMUONlib::YUpsilonPP(px, dummy);
+    
+}
+
+Double_t AliGenMUONlib::YUpsilonFlat( Double_t */*px*/, Double_t */*dummy*/)
+{
+    // Upsilon y
+    return 1.;
+    
+}
+
 Double_t AliGenMUONlib::YUpsilonPP( Double_t *px, Double_t */*dummy*/)
 {
 
@@ -680,11 +746,26 @@ Double_t AliGenMUONlib::PtCharmCentral( Double_t *px, Double_t */*dummy*/)
 //                  y-distribution
 Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t */*dummy*/)
 {
-// Charm y
-    Double_t *dum=0;
-    return YJpsi(px,dum);
+// Charm y :: Carrer & Dainese : ALICE-INT-2003-019 v.3 (hep-ph/0311225) 
+// Pythia tuned to reproduce the distribution given by the HVQMNR program based on NLO calculations (pQCD)
+// shadowing + kt broadening 
+
+    Double_t x=px[0];
+    Double_t c[2]={-2.42985e-03,-2.31001e-04};
+    Double_t y=1+(c[0]*TMath::Power(x,2))+(c[1]*TMath::Power(x,4));
+    Double_t ycharm;
+    
+    if (TMath::Abs(x)>8) {
+      ycharm=0.;
+    }
+    else {
+      ycharm=TMath::Power(y,3);
+    }
+    
+    return ycharm;
 }
 
+
 Int_t AliGenMUONlib::IpCharm(TRandom *ran)
 {  
 // Charm composition
@@ -692,21 +773,30 @@ Int_t AliGenMUONlib::IpCharm(TRandom *ran)
     Int_t ip;
 //    411,421,431,4122
     random = ran->Rndm();
-    if (random < 0.5) {
-       ip=411;
-    } else if (random < 0.75) {
-       ip=421;
-    } else if (random < 0.90) {
-       ip=431;
+//  Taux de production Carrer & Dainese : ALICE-INT-2003-019 v.3  
+//  >>>>> cf. tab 4 p 11
+  
+    if (random < 0.30) {                       
+        ip=421;
+    } else if (random < 0.60) {
+        ip=-421;
+    } else if (random < 0.70) {
+        ip=411;
+    } else if (random < 0.80) {
+        ip=-411;
+    } else if (random < 0.86) {
+        ip=431;
+    } else if (random < 0.92) {
+        ip=-431;       
+    } else if (random < 0.96) {
+        ip=4122;
     } else {
-       ip=4122;
+        ip=-4122;
     }
-    if (ran->Rndm() < 0.5) {ip=-ip;}
     
     return ip;
 }
 
-
 //
 //                        Beauty
 //
@@ -737,31 +827,58 @@ Double_t AliGenMUONlib::PtBeautyCentral( Double_t *px, Double_t */*dummy*/)
 //                     y-distribution
 Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t */*dummy*/)
 {
-// Beauty y
-    Double_t *dum=0;
-    return YJpsi(px,dum);
+// Beauty y :: Carrer & Dainese : ALICE-INT-2003-019 v.3 (hep-ph/0311225) 
+// Pythia tuned to reproduce the distribution given by the HVQMNR program based on NLO calculations (pQCD)
+// shadowing + kt broadening 
+
+    Double_t x=px[0];
+    Double_t c[2]={-1.27590e-02,-2.42731e-04};
+    Double_t y=1+c[0]*TMath::Power(x,2)+c[1]*TMath::Power(x,4);
+    Double_t ybeauty;
+    
+    if (TMath::Abs(x)>6) {
+      ybeauty=0.;
+    }
+    else {
+      ybeauty=TMath::Power(y,3);
+    }
+    
+    return ybeauty;
 }
 
+
 Int_t AliGenMUONlib::IpBeauty(TRandom *ran)
 {  
 // Beauty Composition
     Float_t random;
     Int_t ip;
-    random = ran->Rndm();
-    if (random < 0.5) {
-       ip=511;
-    } else if (random < 0.75) {
-       ip=521;
-    } else if (random < 0.90) {
-       ip=531;
+    random = ran->Rndm(); 
+    
+//  Taux de production Carrer & Dainese : ALICE-INT-2003-019 v.3  
+//  >>>>> cf. tab 4 p 11
+    
+ if (random < 0.20) {                       
+        ip=511;
+    } else if (random < 0.40) {
+        ip=-511;
+    } else if (random < 0.605) {
+        ip=521;
+    } else if (random < 0.81) {
+        ip=-521;
+    } else if (random < 0.87) {
+        ip=531;
+    } else if (random < 0.93) {
+        ip=-531;       
+    } else if (random < 0.965) {
+        ip=5122;
     } else {
-       ip=5122;
+        ip=-5122;
     }
-    if (ran->Rndm() < 0.5) {ip=-ip;}
     
   return ip;
+ return ip;
 }
 
+
 typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
 GenFunc AliGenMUONlib::GetPt(Int_t param,  const char* tname) const
 {
@@ -788,6 +905,10 @@ GenFunc AliGenMUONlib::GetPt(Int_t param,  const char* tname) const
            func=PtJpsiPP;
        } else if (sname == "CDF scaled") {
            func=PtJpsiCDFscaled;
+       } else if (sname == "CDF pp") {
+           func=PtJpsiCDFscaledPP;
+       } else if (sname == "Flat") {
+           func=PtJpsiFlat;
        } else {
            func=PtJpsi;
        }
@@ -805,6 +926,10 @@ GenFunc AliGenMUONlib::GetPt(Int_t param,  const char* tname) const
            func=PtUpsilonPP;
        } else if (sname == "CDF scaled") {
            func=PtUpsilonCDFscaled;
+       } else if (sname == "CDF pp") {
+           func=PtUpsilonCDFscaledPP;
+       } else if (sname == "Flat") {
+           func=PtUpsilonFlat;
        } else {
            func=PtUpsilon;
        }
@@ -829,6 +954,18 @@ GenFunc AliGenMUONlib::GetPt(Int_t param,  const char* tname) const
     case kKaon:
        func=PtKaon;
        break;
+    case kChi_c0:
+       func=PtChi_c0;
+       break;
+    case kChi_c1:
+       func=PtChi_c1;
+       break;
+    case kChi_c2:
+       func=PtChi_c2;
+       break;
+    case kChi_c:
+       func=PtChi_c;
+       break;
     default:
         func=0;
         printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
@@ -863,6 +1000,10 @@ GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname) const
            func=YJpsiPP;
        } else if (sname == "CDF scaled") {
            func=YJpsiCDFscaled;
+       } else if (sname == "CDF pp") {
+           func=YJpsiCDFscaledPP;
+       } else if (sname == "Flat") {
+           func=YJpsiFlat;
        } else {
            func=YJpsi;
        }
@@ -880,6 +1021,10 @@ GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname) const
            func = YUpsilonPP;
        } else if (sname == "CDF scaled") {
            func=YUpsilonCDFscaled;
+       } else if (sname == "CDF pp") {
+           func=YUpsilonCDFscaledPP;
+       } else if (sname == "Flat") {
+           func=YUpsilonFlat;
        } else {
            func=YUpsilon;
        }
@@ -896,12 +1041,171 @@ GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname) const
     case kKaon:
        func=YKaon;
        break;
+    case kChi_c0:
+       func=YChi_c0;
+       break;
+    case kChi_c1:
+       func=YChi_c1;
+       break;
+    case kChi_c2:
+       func=YChi_c2;
+       break;
+    case kChi_c:
+       func=YChi_c;
+       break;
     default:
         func=0;
         printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
     }
     return func;
 }
+
+//
+//                    Chi
+//
+//
+//                pt-distribution
+//____________________________________________________________
+Double_t AliGenMUONlib::PtChi_c0( Double_t *px, Double_t */*dummy*/)
+{
+// Chi_c1 pT
+  const Double_t kpt0 = 4.;
+  const Double_t kxn  = 3.6;
+  Double_t x=*px;
+  //
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
+}
+Double_t AliGenMUONlib::PtChi_c1( Double_t *px, Double_t */*dummy*/)
+{
+// Chi_c1 pT
+  const Double_t kpt0 = 4.;
+  const Double_t kxn  = 3.6;
+  Double_t x=*px;
+  //
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
+}
+Double_t AliGenMUONlib::PtChi_c2( Double_t *px, Double_t */*dummy*/)
+{
+// Chi_c2 pT
+  const Double_t kpt0 = 4.;
+  const Double_t kxn  = 3.6;
+  Double_t x=*px;
+  //
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
+}
+Double_t AliGenMUONlib::PtChi_c( Double_t *px, Double_t */*dummy*/)
+{
+// Chi_c family pT
+  const Double_t kpt0 = 4.;
+  const Double_t kxn  = 3.6;
+  Double_t x=*px;
+  //
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
+}
+
+//
+//               y-distribution
+//____________________________________________________________
+Double_t AliGenMUONlib::YChi_c0(Double_t *py, Double_t */*dummy*/)
+{
+// Chi-1c y
+  const Double_t ky0 = 4.;
+ const Double_t kb=1.;
+  Double_t yj;
+  Double_t y=TMath::Abs(*py);
+  //
+  if (y < ky0)
+    yj=kb;
+  else
+    yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
+  return yj;
+}
+
+Double_t AliGenMUONlib::YChi_c1(Double_t *py, Double_t */*dummy*/)
+{
+// Chi-1c y
+  const Double_t ky0 = 4.;
+  const Double_t kb=1.;
+  Double_t yj;
+  Double_t y=TMath::Abs(*py);
+  //
+  if (y < ky0)
+    yj=kb;
+  else
+    yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
+  return yj;
+}
+
+Double_t AliGenMUONlib::YChi_c2(Double_t *py, Double_t */*dummy*/)
+{
+// Chi-2c y
+  const Double_t ky0 = 4.;
+  const Double_t kb=1.;
+  Double_t yj;
+  Double_t y=TMath::Abs(*py);
+  //
+  if (y < ky0)
+    yj=kb;
+  else
+    yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
+  return yj;
+}
+
+Double_t AliGenMUONlib::YChi_c(Double_t *py, Double_t */*dummy*/)
+{
+// Chi_c family y
+  const Double_t ky0 = 4.;
+  const Double_t kb=1.;
+  Double_t yj;
+  Double_t y=TMath::Abs(*py);
+  //
+  if (y < ky0)
+    yj=kb;
+  else
+    yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
+  return yj;
+}
+
+//                 particle composition
+//
+Int_t AliGenMUONlib::IpChi_c0(TRandom *)
+{
+// Chi composition
+    return 10441;
+}
+//
+Int_t AliGenMUONlib::IpChi_c1(TRandom *)
+{
+// Chi composition
+    return 20443;
+}
+Int_t AliGenMUONlib::IpChi_c2(TRandom *)
+{
+// Chi_c2 prime composition
+    return 445;
+}
+Int_t AliGenMUONlib::IpChi_c(TRandom *)
+{
+// Chi composition
+  Int_t ip;
+  Float_t r = gRandom->Rndm();
+  if (r < 0.001) {
+    ip = 10441;
+  } else if( r < 0.377 ) {
+    ip = 20443;
+  } else {
+    ip = 445;
+  }
+  return ip;
+}
+
+
+//_____________________________________________________________
+
 typedef Int_t (*GenFuncIp) (TRandom *);
 GenFuncIp AliGenMUONlib::GetIp(Int_t param,  const char* /*tname*/) const
 {
@@ -952,6 +1256,18 @@ GenFuncIp AliGenMUONlib::GetIp(Int_t param,  const char* /*tname*/) const
     case kKaon:
        func=IpKaon;
        break;
+    case kChi_c0:
+       func=IpChi_c0;
+       break;
+    case kChi_c1:
+       func=IpChi_c1;
+       break;
+    case kChi_c2:
+       func=IpChi_c2;
+       break;
+    case kChi_c:
+        func=IpChi_c;
+        break;
     default:
         func=0;
         printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");