]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenSTRANGElib.cxx
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / EVGEN / AliGenSTRANGElib.cxx
index 2432f6bca59953e3229e79512123f28bbee8aa83..bff4c4b6e8c3273d6b57657185c613a0fbcdcaa3 100644 (file)
@@ -36,8 +36,8 @@
 
 /* $Id$ */
 
-#include "TMath.h"
-#include "TRandom.h"
+#include <TMath.h>
+#include <TRandom.h>
 
 #include "AliGenSTRANGElib.h"
 
@@ -59,19 +59,20 @@ ClassImp(AliGenSTRANGElib)
 //     10=>Omega-antiOmega
 
   //    MASS SCALING RESPECT TO PIONS
-  //    MASS                1=>PI,  2=>K, 3=>ETA,4=>OMEGA,5=>ETA',6=>PHI 
-  const Double_t khm[10] = {0.1396, 0.494,0.547, 0.782,   0.957,  1.02, 
-  //    MASS               7=>BARYON-BARYONBAR  
+  //    MASS                0=>PI,  1=>K, 2=>ETA,3=>OMEGA,4=>ETA',5=>PHI 
+  const Double_t khm[11] = {0.1396, 0.494,0.547, 0.782,   0.957,  1.02, 
+  //    MASS               6=>BARYON-BARYONBAR  
                                  0.938, 
-  //    MASS               8=>Lambda-antiLambda  
+  //    MASS               7=>Lambda-antiLambda  
                                   1.1157,
-  //    MASS               9=>Xi-antiXi  
+  //    MASS               8=>Xi-antiXi  
                                   1.3213, 
-  //    MASS              10=>Omega-antiOmega  
-                                  1.6725};
+  //    MASS               9=>Omega-antiOmega  
+                                  1.6725,
+  //    MASS              10=>Lambda(1520)
+                                  1.5195};
   //     VALUE MESON/PI AT 5 GEV
-  const Double_t kfmax[10]={1., 1., 1., 1., 1., 1., 1., 1., 1., 1.};
-  np--;
+  const Double_t kfmax[11]={1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.};
   Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
   Double_t kfmax2=f5/kfmax[np];
   // PIONS
@@ -82,7 +83,7 @@ ClassImp(AliGenSTRANGElib)
 }
 //============================================================= 
 //
- Double_t AliGenSTRANGElib::PtPion(Double_t *px, Double_t *)
+ Double_t AliGenSTRANGElib::PtPion(const Double_t *px, const Double_t *)
 {
 //     Pion transverse momentum distribtuion taken 
 //     from AliGenMUONlib class, version 3.01 of aliroot
@@ -112,22 +113,22 @@ ClassImp(AliGenSTRANGElib)
 // End Scaling
 //============================================================================
 //    K  A  O  N  
- Double_t AliGenSTRANGElib::PtKaon( Double_t *px, Double_t *)
+ Double_t AliGenSTRANGElib::PtKaon( const Double_t *px, const Double_t *)
 {
 //                kaon
 //                pt-distribution
 //____________________________________________________________
 
-  return PtScal(*px,2);  //  2==> Kaon in the PtScal function
+  return PtScal(*px,1);  //  1==> Kaon in the PtScal function
 }
 
- Double_t AliGenSTRANGElib::YKaon( Double_t *py, Double_t *)
+ Double_t AliGenSTRANGElib::YKaon( const Double_t *py, const Double_t *)
 {
 // y-distribution
 //____________________________________________________________
 
   const Double_t ka    = 1000.;
-  const Double_t kdy   = 4.;
+  const Double_t kdy   = 4.*4;
 
 
   Double_t y=TMath::Abs(*py);
@@ -164,22 +165,22 @@ ClassImp(AliGenSTRANGElib)
 //============================================================================
 //============================================================================
 //    P  H  I   
- Double_t AliGenSTRANGElib::PtPhi( Double_t *px, Double_t *)
+ Double_t AliGenSTRANGElib::PtPhi( const Double_t *px, const Double_t *)
 {
 // phi
 //                pt-distribution
 //____________________________________________________________
 
-  return PtScal(*px,6);  //  6==> Phi in the PtScal function
+  return PtScal(*px,5);  //  5==> Phi in the PtScal function
 }
 
- Double_t AliGenSTRANGElib::YPhi( Double_t *py, Double_t *)
+ Double_t AliGenSTRANGElib::YPhi( const Double_t *py, const Double_t *)
 {
 // y-distribution
 //____________________________________________________________
 
   const Double_t ka    = 1000.;
-  const Double_t kdy   = 4.;
+  const Double_t kdy   = 4.*4;
 
 
   Double_t y=TMath::Abs(*py);
@@ -199,22 +200,22 @@ ClassImp(AliGenSTRANGElib)
 //===================================================================
 //============================================================================
 //    Lambda
- Double_t AliGenSTRANGElib::PtLambda( Double_t *px, Double_t *)
+ Double_t AliGenSTRANGElib::PtLambda( const Double_t *px, const Double_t *)
 {
 // Lambda
 //                pt-distribution
 //____________________________________________________________
 
-  return PtScal(*px,8);  //  8==> Lambda-antiLambda in the PtScal function
+  return PtScal(*px,7);  //  7==> Lambda-antiLambda in the PtScal function
 }
 
- Double_t AliGenSTRANGElib::YLambda( Double_t *py, Double_t *)
+ Double_t AliGenSTRANGElib::YLambda( const Double_t *py, const Double_t *)
 {
 // y-distribution
 //____________________________________________________________
 
   const Double_t ka    = 1000.;
-  const Double_t kdy   = 4.;
+  const Double_t kdy   = 4.*4;
 
 
   Double_t y=TMath::Abs(*py);
@@ -223,33 +224,37 @@ ClassImp(AliGenSTRANGElib)
   return ka*TMath::Exp(-ex);
 }
 
- Int_t AliGenSTRANGElib::IpLambda(TRandom *)
+ Int_t AliGenSTRANGElib::IpLambda(TRandom *ran)
 {
 //                 particle composition
 //                 generation of fixed type of particle
 //
-
-        return  3122; //   Lambda 
+    Float_t random = ran->Rndm();
+    if (random < 0.5) {       
+      return  3122;   //   Lambda 
+    } else {  
+      return -3122;   //   Anti-Lambda
+    }
 }
 // End Lambda
 //============================================================================
 //    XIminus
- Double_t AliGenSTRANGElib::PtXiMinus( Double_t *px, Double_t *)
+ Double_t AliGenSTRANGElib::PtXiMinus( const Double_t *px, const Double_t *)
 {
 // Xi
 //                pt-distribution
 //____________________________________________________________
 
-  return PtScal(*px,9);  //  9==> Xi-antiXi in the PtScal function
+  return PtScal(*px,8);  //  8==> Xi-antiXi in the PtScal function
 }
 
- Double_t AliGenSTRANGElib::YXiMinus( Double_t *py, Double_t *)
+ Double_t AliGenSTRANGElib::YXiMinus( const Double_t *py, const Double_t *)
 {
 // y-distribution
 //____________________________________________________________
 
   const Double_t ka    = 1000.;
-  const Double_t kdy   = 4.;
+  const Double_t kdy   = 4.*4;
 
 
   Double_t y=TMath::Abs(*py);
@@ -258,34 +263,37 @@ ClassImp(AliGenSTRANGElib)
   return ka*TMath::Exp(-ex);
 }
 
- Int_t AliGenSTRANGElib::IpXiMinus(TRandom *)
+ Int_t AliGenSTRANGElib::IpXiMinus(TRandom *ran)
 {
 //                 particle composition
 //                 generation of fixed type of particle
 //
-
-        return  3312; //   Xi- (only)
-//        return  -3312; //   Xi+
+    Float_t random = ran->Rndm();
+    if (random < 0.5) {       
+      return  3312;   //   Xi- 
+    } else {  
+      return -3312;   //   Xi+
+    }
 }
 // End Ximinus
 //============================================================================
 //    Omegaminus
- Double_t AliGenSTRANGElib::PtOmegaMinus( Double_t *px, Double_t *)
+ Double_t AliGenSTRANGElib::PtOmegaMinus( const Double_t *px, const Double_t *)
 {
 // Omega
 //                pt-distribution
 //____________________________________________________________
 
-  return PtScal(*px,10);  //  10==> Omega-antiOmega in the PtScal function
+  return PtScal(*px,9);  //  9==> Omega-antiOmega in the PtScal function
 }
 
- Double_t AliGenSTRANGElib::YOmegaMinus( Double_t *py, Double_t *)
+ Double_t AliGenSTRANGElib::YOmegaMinus( const Double_t *py, const Double_t *)
 {
 // y-distribution
 //____________________________________________________________
 
   const Double_t ka    = 1000.;
-  const Double_t kdy   = 4.;
+  const Double_t kdy   = 4.*4;
 
 
   Double_t y=TMath::Abs(*py);
@@ -294,19 +302,63 @@ ClassImp(AliGenSTRANGElib)
   return ka*TMath::Exp(-ex);
 }
 
- Int_t AliGenSTRANGElib::IpOmegaMinus(TRandom *)
+ Int_t AliGenSTRANGElib::IpOmegaMinus(TRandom * ran)
 {
 //                 particle composition
 //                 generation of fixed type of particle
 //
 
-        return  3334; //   Omega- 
+    Float_t random = ran->Rndm();
+    if (random < 0.5) {       
+      return  3334;   //   Omega- 
+    } else {  
+      return -3334;   //   Omega+
+    }
 }
 // End Omegaminus
 //============================================================================
+//     Lambda(1520)
+Double_t AliGenSTRANGElib::PtLambda1520( const Double_t *px, const Double_t *)
+{
+// Lambda(1520)
+//                  pt-distribution
+//____________________________________________________________
+
+  return PtScal(*px,10);   //   10=> Lambda(1520) in the PtScal function
+}
+
+Double_t AliGenSTRANGElib::YLambda1520( const Double_t *py, const Double_t *)
+{
+// y-distribution
+//____________________________________________________________
 
+  const Double_t ka   = 1000.;
+  const Double_t kdy  = 4.;
 
-typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
+  
+  Double_t y=TMath::Abs(*py);
+  //
+  Double_t ex = y*y/(2*kdy*kdy);
+  return ka*TMath::Exp(-ex);
+}
+
+Int_t AliGenSTRANGElib::IpLambda1520(TRandom * ran)
+{
+//                 particle composition
+//                 generation of fixed type of particle
+//
+
+   Float_t random = ran->Rndm();
+   if (random < 0.5) {       
+     return  3124;   //   Lambda(1520) 
+   } else {  
+     return -3124;   //   antiLambda(1520)
+   }
+}
+// End Lambda(1520)
+//============================================================================
+
+typedef Double_t (*GenFunc) (const Double_t*,  const Double_t*);
  GenFunc AliGenSTRANGElib::GetPt(Int_t param, const char* /*tname*/) const
 {
 // Return pinter to pT parameterisation
@@ -329,6 +381,9 @@ typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
     case kOmegaMinus:
         func=PtOmegaMinus;
         break;
+    case kLambda1520:
+        func=PtLambda1520;
+        break;
     default:
         func=0;
         printf("<AliGenSTRANGElib::GetPt> unknown parametrisationn");
@@ -357,6 +412,9 @@ typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
     case kOmegaMinus:
         func=YOmegaMinus;
         break;
+    case kLambda1520:
+        func=YLambda1520;
+        break;
     default:
         func=0;
         printf("<AliGenSTRANGElib::GetY> unknown parametrisationn");
@@ -385,6 +443,9 @@ typedef Int_t (*GenFuncIp) (TRandom *);
     case kOmegaMinus:
         func=IpOmegaMinus;
         break;
+    case kLambda1520:
+        func=IpLambda1520;
+        break;
     default:
         func=0;
         printf("<AliGenSTRANGElib::GetIp> unknown parametrisationn");