]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New class AliGenRICHlib added. (Annalisa Mastroserio <Annalisa.Mastroserio@ba.infn...
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Dec 2004 05:38:52 +0000 (05:38 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Dec 2004 05:38:52 +0000 (05:38 +0000)
EVGEN/AliGenRICHlib.cxx [new file with mode: 0644]
EVGEN/AliGenRICHlib.h [new file with mode: 0644]
EVGEN/EVGENLinkDef.h
EVGEN/libEVGEN.pkg

diff --git a/EVGEN/AliGenRICHlib.cxx b/EVGEN/AliGenRICHlib.cxx
new file mode 100644 (file)
index 0000000..56f38f4
--- /dev/null
@@ -0,0 +1,216 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+// Library class for particle pt and y distributions used for 
+// HMPID simulations.
+// To be used with AliGenParam.
+// The following particle typed can be simulated:
+// phi, lambda, k
+//
+// Author: Annalisa Mastroserio <Annalisa.Mastroserio@ba.infn.it>
+//
+//
+
+#include <TRandom.h>
+#include <TString.h>
+#include <AliLog.h>
+#include "AliGenRICHlib.h"
+
+ClassImp(AliGenRICHlib)
+
+Int_t AliGenRICHlib::IpPhi(TRandom *)
+{
+//PDG code
+  return 333;     
+}
+
+Double_t AliGenRICHlib::PtPhiFlat( Double_t *, Double_t *)
+{
+// Phi FLAT pt-distribution
+  return 1; 
+}
+
+Double_t AliGenRICHlib::PtPhiExp( Double_t *x, Double_t *)
+{
+//phi     EXP  pt-distribution
+  return x[0]*TMath::Exp(-x[0]/0.17);   
+}
+
+Double_t AliGenRICHlib::YPhiFlat(Double_t *,Double_t *)
+{
+//phi             y-distribution 
+  return 1;
+}
+
+//-------------------------------------------------------
+//                    LAMBDAS
+//-------------------------------------------------------
+
+Int_t AliGenRICHlib::IpLambda(TRandom *)
+{
+//PDG code
+  return 3122;     
+}
+
+Double_t AliGenRICHlib::PtLambdaFlat( Double_t *, Double_t *)
+{
+// Lambda FLAT pt-distribution
+
+  return 1; 
+}
+
+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;
+}
+
+
+Int_t AliGenRICHlib::IpLambdaBar(TRandom *)
+{
+//PDG code
+  return -3122;     
+}
+
+Double_t AliGenRICHlib::PtLambdaBarFlat( Double_t *, Double_t *)
+{
+// LambdaBar FLAT pt-distribution
+
+  return 1; 
+}
+
+Double_t AliGenRICHlib::PtLambdaBarExp( Double_t *x, Double_t *)
+{
+//LambdaBar     EXP  pt-distribution
+  return x[0]*TMath::Exp(-x[0]/0.17);   
+}
+
+Double_t AliGenRICHlib::YLambdaBarFlat(Double_t *,Double_t *)
+{
+  //LambdaBar             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;
+}
+
+
+
+
+typedef Double_t (*GenFunc)   (Double_t*,  Double_t*);
+typedef Int_t    (*GenFuncIp) (TRandom *);
+
+GenFunc AliGenRICHlib::GetPt(Int_t iPID, const char * sForm) const
+{
+// Return pointer to Pt parameterisation
+  AliDebug(1,Form("PID: %i, form: %s",iPID,sForm));    
+   TString type(sForm);
+
+   switch(iPID) {
+   case kPhi:  
+      if     (type=="FLAT")                                         return PtPhiFlat;
+      else if(type=="EXP")                                          return PtPhiExp;
+      else {
+        AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
+       }
+
+   case kLambda0:  
+      if     (type=="FLAT")                                         return PtLambdaFlat;
+      else if(type=="EXP")                                          return PtLambdaExp;
+      else {
+        AliFatal(Form("Unknown Pt distribution form: %s",sForm));   return 0;
+       }  
+
+   case kLambda0Bar:  
+      if     (type=="FLAT")                                         return PtLambdaBarFlat;
+      else if(type=="EXP")                                          return PtLambdaBarExp;
+      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;
+       }
+
+   default : AliFatal(Form("Unknown particle type: %i",iPID));      return 0;
+   }//switch
+}
+
+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;
+
+   }//switch
+}
+
+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 kPhi:                                                   return IpPhi;
+    case kLambda0:                                               return IpLambda;
+    case kLambda0Bar:                                            return IpLambdaBar; 
+    case kK0Short:                                               return IpK0s;
+    
+    default  : AliFatal(Form("Unknown particle type: %i",iPID))  return 0;
+  }
+}
+
diff --git a/EVGEN/AliGenRICHlib.h b/EVGEN/AliGenRICHlib.h
new file mode 100644 (file)
index 0000000..f82d04c
--- /dev/null
@@ -0,0 +1,61 @@
+#ifndef ALIGENRICHLIB_H
+#define ALIGENRICHLIB_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+#include <TPDGCode.h>
+#include <AliGenLib.h>
+
+class TRandom;
+
+class AliGenRICHlib :public AliGenLib {
+
+ public:
+   enum EPartId {kPhi=333};
+
+// 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);
+
+// Lambda
+  static Int_t IpLambda(TRandom *ran);
+  static Double_t PtLambdaFlat(Double_t *px, Double_t *dummy);
+  static Double_t PtLambdaExp (Double_t *px, Double_t *dummy);
+  static Double_t YLambdaFlat (Double_t *py, Double_t *dummy);
+
+// LambdaBar
+  static Int_t IpLambdaBar(TRandom *ran);
+  static Double_t PtLambdaBarFlat(Double_t *px, Double_t *dummy);
+  static Double_t PtLambdaBarExp (Double_t *px, Double_t *dummy);
+  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);
+
+  //Getters
+    
+  GenFunc   GetPt(Int_t iPID, const char * sForm=0) const;
+  GenFunc   GetY (Int_t iPID, const char * sForm=0) const;
+  GenFuncIp GetIp(Int_t iPID, const char * sForm=0) const;    
+
+  ClassDef(AliGenRICHlib,0)
+};
+
+#endif
+
+
+
+
+
+
+
index 3ecd839acb55186c862ce8176c5cc45dd8a75c72..a10f662636394931688d8b1ea17669ce3fc7844b 100644 (file)
@@ -28,6 +28,7 @@
 #pragma link C++ class  AliGenDoubleScan+;
 #pragma link C++ class  AliGenLib+;
 #pragma link C++ class  AliGenMUONlib+;
+#pragma link C++ class  AliGenRICHlib+;
 #pragma link C++ class  AliGenFLUKAsource+;
 #pragma link C++ class  AliGenHalo+;
 #pragma link C++ class  AliGenHaloProtvino+;
index 08c8325b05b405fd46a7ea41837d3aac305ac029..797bd3a3613644f8679c8d3574def23a96c6c1eb 100644 (file)
@@ -1,7 +1,7 @@
 SRCS          = AliGenHIJINGpara.cxx AliGenBox.cxx AliGenFixed.cxx \
                 AliGenCocktail.cxx AliGenCocktailAfterBurner.cxx AliGenFLUKAsource.cxx \
                 AliGenLib.cxx \
-                AliGenMUONlib.cxx AliGenParam.cxx\
+                AliGenMUONlib.cxx AliGenRICHlib.cxx AliGenParam.cxx\
                 AliDimuCombinator.cxx AliGenHalo.cxx \
                 AliGenHaloProtvino.cxx \
                 AliGenExtFile.cxx AliGenScan.cxx AliGenPHOSlib.cxx \