More particles.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Dec 2004 06:01:15 +0000 (06:01 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Dec 2004 06:01:15 +0000 (06:01 +0000)
EVGEN/AliGenRICHlib.cxx
EVGEN/AliGenRICHlib.h

index 56f38f4..3499d08 100644 (file)
@@ -13,6 +13,8 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 // Library class for particle pt and y distributions used for 
 // HMPID simulations.
 // To be used with AliGenParam.
 
 ClassImp(AliGenRICHlib)
 
+  //---------------------------------------
+  //    Pi Plus
+  //---------------------------------------
+Int_t AliGenRICHlib::IpPiPlus(TRandom *)
+{
+//PDG code
+  return 211;     
+}
+
+Double_t AliGenRICHlib::PtPiPlusFlat( Double_t *, Double_t *)
+{
+  //PiPlus FLAT pt-distribution
+  return 1; 
+}
+
+Double_t AliGenRICHlib::PtPiPlusExp( Double_t *x, Double_t *)
+{
+  //PiPlus     EXP  pt-distribution
+  return x[0]*TMath::Exp(-x[0]/0.17);   
+}
+
+Double_t AliGenRICHlib::YPiPlusFlat(Double_t *,Double_t *)
+{
+  //PiPlus            y-distribution 
+ return 1;
+}
+
+
+//---------------------------------------
+//        Pi Minus
+//---------------------------------------
+Int_t AliGenRICHlib::IpPiMinus(TRandom *)
+{
+//PDG code
+  return -211;     
+}
+
+Double_t AliGenRICHlib::PtPiMinusFlat( Double_t *, Double_t *)
+{
+// PiMinus FLAT pt-distribution
+  return 1; 
+}
+
+Double_t AliGenRICHlib::PtPiMinusExp( Double_t *x, Double_t *)
+{
+//PiMinus     EXP  pt-distribution
+  return x[0]*TMath::Exp(-x[0]/0.17);   
+}
+
+Double_t AliGenRICHlib::YPiMinusFlat(Double_t *,Double_t *)
+{
+//PiMinus          y-distribution 
+  return 1;
+}
+
+
+//--------------------------------------------
+//        K Plus
+//--------------------------------------------
+Int_t AliGenRICHlib::IpKPlus(TRandom *)
+{
+//PDG code
+  return 321;
+}
+
+Double_t AliGenRICHlib::PtKPlusFlat( Double_t *, Double_t *)
+{
+// K+ FLAT pt-distribution
+  return 1;
+}
+
+Double_t AliGenRICHlib::PtKPlusExp( Double_t *x, Double_t *)
+{
+// K+   EXP  pt-distribution
+  return x[0]*TMath::Exp(-x[0]/0.17);
+}
+
+Double_t AliGenRICHlib::YKPlusFlat(Double_t *,Double_t *)
+{
+// K+             y-distribution
+  return 1;
+}
+
+
+//-----------------------------------------------
+//         K Minus
+//-----------------------------------------------
+Int_t AliGenRICHlib::IpKMinus(TRandom *)
+{
+//PDG code
+  return -321;
+}
+
+Double_t AliGenRICHlib::PtKMinusFlat( Double_t *, Double_t *)
+{
+// K- FLAT pt-distribution
+  return 1;
+}
+
+Double_t AliGenRICHlib::PtKMinusExp( Double_t *x, Double_t *)
+{
+// K-   EXP  pt-distribution
+  return x[0]*TMath::Exp(-x[0]/0.17);
+}
+
+Double_t AliGenRICHlib::YKMinusFlat(Double_t *,Double_t *)
+{
+// K-             y-distribution
+  return 1;
+}
+
+
+//-----------------------------------------------
+//       K0 short
+//-----------------------------------------------
+Int_t AliGenRICHlib::IpK0s(TRandom *)
+{
+//PDG code
+  return 310;
+}
+
+Double_t AliGenRICHlib::PtK0sFlat( Double_t *, Double_t *)
+{
+// K0s FLAT pt-distribution
+  return 1;
+}
+
+Double_t AliGenRICHlib::PtK0sExp( Double_t *x, Double_t *)
+{
+// K0s   EXP  pt-distribution
+  return x[0]*TMath::Exp(-x[0]/0.17);
+}
+
+Double_t AliGenRICHlib::YK0sFlat(Double_t *,Double_t *)
+{
+// K0s             y-distribution
+  return 1;
+}
+
+
+//---------------------------------------------
+//         Phi(1020)
+//---------------------------------------------
 Int_t AliGenRICHlib::IpPhi(TRandom *)
 {
 //PDG code
@@ -54,94 +199,126 @@ Double_t AliGenRICHlib::YPhiFlat(Double_t *,Double_t *)
   return 1;
 }
 
+
 //-------------------------------------------------------
-//                    LAMBDAS
+//                    PROTON
 //-------------------------------------------------------
-
-Int_t AliGenRICHlib::IpLambda(TRandom *)
+Int_t AliGenRICHlib::IpProton(TRandom *)
 {
 //PDG code
-  return 3122;     
+  return 2122;     
 }
 
-Double_t AliGenRICHlib::PtLambdaFlat( Double_t *, Double_t *)
+Double_t AliGenRICHlib::PtProtonFlat( Double_t *, Double_t *)
 {
-// Lambda FLAT pt-distribution
+// ProtonFLAT pt-distribution
 
   return 1; 
 }
 
-Double_t AliGenRICHlib::PtLambdaExp( Double_t *x, Double_t *)
+Double_t AliGenRICHlib::PtProtonExp( Double_t *x, Double_t *)
 {
-//Lambda     EXP  pt-distribution
+//Proton    EXP  pt-distribution
   return x[0]*TMath::Exp(-x[0]/0.17);   
 }
 
-Double_t AliGenRICHlib::YLambdaFlat(Double_t *,Double_t *)
+Double_t AliGenRICHlib::YProtonFlat(Double_t *,Double_t *)
 {
-  //Lambda             y-distribution 
+  //Proton            y-distribution 
   return 1;
 }
 
 
-Int_t AliGenRICHlib::IpLambdaBar(TRandom *)
+//-------------------------------------------------------
+//                    PROTON-BAR
+//-------------------------------------------------------
+Int_t AliGenRICHlib::IpProtonBar(TRandom *)
 {
 //PDG code
-  return -3122;     
+  return -2122;     
 }
 
-Double_t AliGenRICHlib::PtLambdaBarFlat( Double_t *, Double_t *)
+Double_t AliGenRICHlib::PtProtonBarFlat( Double_t *, Double_t *)
 {
-// LambdaBar FLAT pt-distribution
+// ProtonBar FLAT pt-distribution
 
   return 1; 
 }
 
-Double_t AliGenRICHlib::PtLambdaBarExp( Double_t *x, Double_t *)
+Double_t AliGenRICHlib::PtProtonBarExp( Double_t *x, Double_t *)
 {
-//LambdaBar     EXP  pt-distribution
+//ProtonBar     EXP  pt-distribution
   return x[0]*TMath::Exp(-x[0]/0.17);   
 }
 
-Double_t AliGenRICHlib::YLambdaBarFlat(Double_t *,Double_t *)
+Double_t AliGenRICHlib::YProtonBarFlat(Double_t *,Double_t *)
 {
-  //LambdaBar             y-distribution 
+  //ProtonBar             y-distribution 
   return 1;
 }
 
 
+//-------------------------------------------------------
+//                    LAMBDA
+//-------------------------------------------------------
+Int_t AliGenRICHlib::IpLambda(TRandom *)
+{
+//PDG code
+  return 3122;     
+}
+
+Double_t AliGenRICHlib::PtLambdaFlat( Double_t *, Double_t *)
+{
+// Lambda FLAT pt-distribution
 
-//---------------------------------------------------------
-//       K0 short
-//--------------------------------------------------------
+  return 1; 
+}
 
-Int_t AliGenRICHlib::IpK0s(TRandom *)
+Double_t AliGenRICHlib::PtLambdaExp( Double_t *x, Double_t *)
+{
+//Lambda     EXP  pt-distribution
+  return x[0]*TMath::Exp(-x[0]/0.17);   
+}
+
+Double_t AliGenRICHlib::YLambdaFlat(Double_t *,Double_t *)
+{
+  //Lambda             y-distribution 
+  return 1;
+}
+
+
+//-------------------------------------------------------
+//                    LAMBDA-BAR
+//-------------------------------------------------------
+Int_t AliGenRICHlib::IpLambdaBar(TRandom *)
 {
 //PDG code
-  return 310;     
+  return -3122;     
 }
 
-Double_t AliGenRICHlib::PtK0sFlat( Double_t *, Double_t *)
+Double_t AliGenRICHlib::PtLambdaBarFlat( Double_t *, Double_t *)
 {
-// K0s FLAT pt-distribution
+// LambdaBar FLAT pt-distribution
+
   return 1; 
 }
 
-Double_t AliGenRICHlib::PtK0sExp( Double_t *x, Double_t *)
+Double_t AliGenRICHlib::PtLambdaBarExp( Double_t *x, Double_t *)
 {
-// K0s   EXP  pt-distribution
+//LambdaBar     EXP  pt-distribution
   return x[0]*TMath::Exp(-x[0]/0.17);   
 }
 
-Double_t AliGenRICHlib::YK0sFlat(Double_t *,Double_t *)
+Double_t AliGenRICHlib::YLambdaBarFlat(Double_t *,Double_t *)
 {
-// K0s             y-distribution 
+  //LambdaBar             y-distribution 
   return 1;
 }
 
 
 
 
+
 typedef Double_t (*GenFunc)   (Double_t*,  Double_t*);
 typedef Int_t    (*GenFuncIp) (TRandom *);
 
@@ -152,6 +329,44 @@ GenFunc AliGenRICHlib::GetPt(Int_t iPID, const char * sForm) const
    TString type(sForm);
 
    switch(iPID) {
+
+   case kPiPlus:  
+      if     (type=="FLAT")                                         return PtPiPlusFlat;
+      else if(type=="EXP")                                          return PtPiPlusExp;
+      else {
+        AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
+       }
+
+   case kPiMinus:  
+      if     (type=="FLAT")                                         return PtPiMinusFlat;
+      else if(type=="EXP")                                          return PtPiMinusExp;
+      else {
+        AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
+       }
+
+  case kKPlus:
+      if     (type=="FLAT")                                         return PtKPlusFlat;
+      else if(type=="EXP")                                          return PtKPlusExp;
+      else {
+        AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
+       }
+
+   case kKMinus:
+      if     (type=="FLAT")                                         return PtKMinusFlat;
+      else if(type=="EXP")                                          return PtKMinusExp;
+      else {
+        AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
+       }
+
+
+  case kK0Short:  
+      if     (type=="FLAT")                                         return PtK0sFlat;
+      else if(type=="EXP")                                          return PtK0sExp;
+      else {
+        AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
+       }
+
+
    case kPhi:  
       if     (type=="FLAT")                                         return PtPhiFlat;
       else if(type=="EXP")                                          return PtPhiExp;
@@ -159,6 +374,20 @@ GenFunc AliGenRICHlib::GetPt(Int_t iPID, const char * sForm) const
         AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
        }
 
+   case kProton:  
+      if     (type=="FLAT")                                         return PtProtonFlat;
+      else if(type=="EXP")                                          return PtProtonExp;
+      else {
+        AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
+       }  
+
+   case kProtonBar:  
+      if     (type=="FLAT")                                         return PtProtonBarFlat;
+      else if(type=="EXP")                                          return PtProtonBarExp;
+      else {
+        AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
+       }  
+
    case kLambda0:  
       if     (type=="FLAT")                                         return PtLambdaFlat;
       else if(type=="EXP")                                          return PtLambdaExp;
@@ -173,14 +402,6 @@ GenFunc AliGenRICHlib::GetPt(Int_t iPID, const char * sForm) const
         AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
        }  
 
-
-  case kK0Short:  
-      if     (type=="FLAT")                                         return PtK0sFlat;
-      else if(type=="EXP")                                          return PtK0sExp;
-      else {
-        AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
-       }
-
    default : AliFatal(Form("Unknown particle type: %i",iPID));      return 0;
    }//switch
 }
@@ -190,12 +411,19 @@ GenFunc AliGenRICHlib::GetY(Int_t iPID, const char *sForm) const
   AliDebug(1,Form("PID: %i, form: %s",iPID,sForm));    
 
    switch (iPID) {
-   case kPhi:                                                       return YPhiFlat;
-   case kLambda0:                                                   return YLambdaFlat;
-   case kLambda0Bar:                                                return YLambdaBarFlat;
-   case kK0Short:                                                   return YK0sFlat;
 
-   default  : AliFatal(Form("Unknown particle type: %i",iPID));     return 0;
+   case kPiPlus:                                                   return YPiPlusFlat;
+   case kPiMinus:                                                  return YPiMinusFlat;
+   case kKPlus:                                                    return YKPlusFlat;
+   case kKMinus:                                                   return YKMinusFlat;
+   case kK0Short:                                                  return YK0sFlat;
+   case kPhi:                                                      return YPhiFlat;
+   case kProton:                                                   return YProtonFlat;
+   case kProtonBar:                                                return YProtonBarFlat; 
+   case kLambda0:                                                  return YLambdaFlat;
+   case kLambda0Bar:                                               return YLambdaBarFlat;
+
+  default  : AliFatal(Form("Unknown particle type: %i",iPID));     return 0;
 
    }//switch
 }
@@ -204,12 +432,20 @@ GenFuncIp AliGenRICHlib::GetIp(Int_t iPID, const char *sForm) const
 {
 // Return pointer to particle type parameterisation
   AliDebug(1,Form("PID: %i, form: %s",iPID,sForm));   //////////       
+
   switch (iPID){
+
+    case kPiPlus:                                                return IpPiPlus;
+    case kPiMinus:                                               return IpPiMinus;
+    case kKPlus:                                                 return IpKPlus;
+    case kKMinus:                                                return IpKMinus;
+    case kK0Short:                                               return IpK0s;
     case kPhi:                                                   return IpPhi;
+    case kProton:                                                return IpProton; 
+    case kProtonBar:                                             return IpProtonBar;
     case kLambda0:                                               return IpLambda;
     case kLambda0Bar:                                            return IpLambdaBar; 
-    case kK0Short:                                               return IpK0s;
-    
+
     default  : AliFatal(Form("Unknown particle type: %i",iPID))  return 0;
   }
 }
index f82d04c..a298b01 100644 (file)
@@ -3,9 +3,17 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-#include <TPDGCode.h>
-#include <AliGenLib.h>
 
+/* $Id$ */
+
+// Library class for particle pt and y distributions used for 
+// HMPIDsimulations.
+// To be used with AliGenParam.
+//
+// Author: Annalisa Mastroserio <Annalisa.Mastroserio@ba.infn.it>
+
+#include "AliGenLib.h"
+#include <TPDGCode.h>
 class TRandom;
 
 class AliGenRICHlib :public AliGenLib {
@@ -13,12 +21,55 @@ class AliGenRICHlib :public AliGenLib {
  public:
    enum EPartId {kPhi=333};
 
+
+//Pi+
+  static Int_t IpPiPlus(TRandom *ran);
+  static Double_t PtPiPlusFlat(Double_t *px, Double_t *dummy);
+  static Double_t PtPiPlusExp (Double_t *px, Double_t *dummy);
+  static Double_t YPiPlusFlat (Double_t *py, Double_t *dummy);
+
+//Pi-
+  static Int_t IpPiMinus(TRandom *ran);
+  static Double_t PtPiMinusFlat(Double_t *px, Double_t *dummy);
+  static Double_t PtPiMinusExp (Double_t *px, Double_t *dummy);
+  static Double_t YPiMinusFlat (Double_t *py, Double_t *dummy);
+
+//K+
+  static Int_t IpKPlus(TRandom *ran);
+  static Double_t PtKPlusFlat(Double_t *px, Double_t *dummy);
+  static Double_t PtKPlusExp (Double_t *px, Double_t *dummy);
+  static Double_t YKPlusFlat (Double_t *py, Double_t *dummy);
+
+//K-
+  static Int_t IpKMinus(TRandom *ran);
+  static Double_t PtKMinusFlat(Double_t *px, Double_t *dummy);
+  static Double_t PtKMinusExp (Double_t *px, Double_t *dummy);
+  static Double_t YKMinusFlat (Double_t *py, Double_t *dummy);
+
+// K0_s
+  static Int_t IpK0s(TRandom *ran);
+  static Double_t PtK0sFlat(Double_t *px, Double_t *dummy);
+  static Double_t PtK0sExp (Double_t *px, Double_t *dummy);
+  static Double_t YK0sFlat (Double_t *py, Double_t *dummy);
+
 // Phi(1020)
   static Int_t IpPhi(TRandom *ran);
   static Double_t PtPhiFlat(Double_t *px, Double_t *dummy);
   static Double_t PtPhiExp (Double_t *px, Double_t *dummy);
   static Double_t YPhiFlat (Double_t *py, Double_t *dummy);
 
+//Proton
+  static Int_t IpProton(TRandom *ran);
+  static Double_t PtProtonFlat(Double_t *px, Double_t *dummy);
+  static Double_t PtProtonExp (Double_t *px, Double_t *dummy);
+  static Double_t YProtonFlat (Double_t *py, Double_t *dummy);
+
+//ProtonBar
+  static Int_t IpProtonBar(TRandom *ran);
+  static Double_t PtProtonBarFlat(Double_t *px, Double_t *dummy);
+  static Double_t PtProtonBarExp (Double_t *px, Double_t *dummy);
+  static Double_t YProtonBarFlat (Double_t *py, Double_t *dummy);
+
 // Lambda
   static Int_t IpLambda(TRandom *ran);
   static Double_t PtLambdaFlat(Double_t *px, Double_t *dummy);
@@ -32,13 +83,6 @@ class AliGenRICHlib :public AliGenLib {
   static Double_t YLambdaBarFlat (Double_t *py, Double_t *dummy);
 
 
-// K0_s
-  static Int_t IpK0s(TRandom *ran);
-  static Double_t PtK0sFlat(Double_t *px, Double_t *dummy);
-  static Double_t PtK0sExp (Double_t *px, Double_t *dummy);
-  static Double_t YK0sFlat (Double_t *py, Double_t *dummy);
-
-
   typedef Double_t (*GenFunc)  (Double_t *, Double_t *);
   typedef Int_t    (*GenFuncIp)(TRandom *ran);