]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliPythia.cxx
Check whether USEFFLOAT variable is set, because if not
[u/mrichter/AliRoot.git] / EVGEN / AliPythia.cxx
index 6703891435a27127d672a3bda6c5be022068a5a8..b6745b6cf93ae2147c538423d18162b42b354337 100644 (file)
 
 /*
 $Log$
+Revision 1.27  2002/11/15 00:39:37  morsch
+- Correct initialisation of sRandom.
+- QCD Jets with initial and final state gluon radiation is default
+- pt kick for jets default
+- Interface to Pyclus added.
+
+Revision 1.26  2002/11/14 00:37:32  morsch
+Warning message for kPyJets added.
+
+Revision 1.25  2002/10/14 14:55:35  hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
+Revision 1.20.6.1  2002/06/10 14:57:41  hristov
+Merged with v3-08-02
+
+Revision 1.24  2002/05/22 13:22:53  morsch
+Process kPyMbNonDiffr added.
+
+Revision 1.23  2002/05/06 07:17:29  morsch
+Pyr gives random number r in interval 0 < r < 1.
+
+Revision 1.22  2002/04/26 10:28:48  morsch
+Option kPyBeautyPbMNR added (N. Carrer).
+
+Revision 1.21  2002/03/25 14:46:16  morsch
+Case  kPyD0PbMNR added (N. Carrer).
+
 Revision 1.20  2002/03/03 13:48:50  morsch
 Option  kPyCharmPbMNR added. Produce charm pairs in agreement with MNR
 NLO calculations (Nicola Carrer).
@@ -76,6 +103,19 @@ Introduction of the Copyright and cvs Log
 
 ClassImp(AliPythia)
 
+#ifndef WIN32
+# define pyclus pyclus_
+# define pycell pycell_
+# define type_of_call
+#else
+# define pyclus PYCLUS
+# define pycell PYCELL
+# define type_of_call _stdcall
+#endif
+
+extern "C" void type_of_call pyclus(Int_t & );
+extern "C" void type_of_call pycell(Int_t & );
+
 //_____________________________________________________________________________
 
 AliPythia* AliPythia::fgAliPythia=NULL;
@@ -92,6 +132,8 @@ AliPythia::AliPythia()
 void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc)
 {
 // Initialise the process to generate 
+    if (!sRandom) sRandom = gRandom;
+    
     fProcess = process;
     fEcms = energy;
     fStrucFunc = strucfunc;
@@ -179,20 +221,27 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
        SetPARP(82,3.47);   // set value pT_0  for turn-off of the cross section of                  
                             // multiple interaction at a reference energy = 14000 GeV
        SetPARP(89,14000.); // reference energy for the above parameter
-       SetPARP(90,0.174);  // set exponent for energy dependence of pT_0 
+       SetPARP(90,0.174);  // set exponent for energy dependence of pT_0
+    case kPyMbNonDiffr:
+// Minimum Bias pp-Collisions
+//
+//   
+//      select Pythia min. bias model
+       SetMSEL(0);
+       SetMSUB(95,1);      // low pt production
+       SetMSTP(81,1);      // multiple interactions switched on
+       SetMSTP(82,3);      // model with varying impact param. & a single Gaussian
+       SetPARP(82,3.47);   // set value pT_0  for turn-off of the cross section of                  
+                            // multiple interaction at a reference energy = 14000 GeV
+       SetPARP(89,14000.); // reference energy for the above parameter
+       SetPARP(90,0.174);  // set exponent for energy dependence of pT_0
        break;
     case kPyJets:
+//
+//  QCD Jets
+//
        SetMSEL(1);
-// no initial state radiation   
-       SetMSTP(61,0);
-// no final state radiation
-       SetMSTP(71,0);
-// no primordial pT
-       SetMSTP(91,0);
-//     SetMSTP(111,0); 
-       SetMSTU(16,1);  
-       SetMSTJ(1,1);
-       
        break;
     case kPyDirectGamma:
        SetMSEL(10);
@@ -234,6 +283,45 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
       // Set c-quark mass
       SetPMAS(4,1,1.2);
 
+      break;
+    case kPyBeautyPbMNR:
+      // Tuning of Pythia parameters aimed to get a resonable agreement
+      // between with the NLO calculation by Mangano, Nason, Ridolfi for the
+      // b-bbar single inclusive and double differential distributions.
+      // This parameter settings are meant to work with Pb-Pb collisions
+      // (AliGenPythia::SetNuclei) and with kCTEQ4L PDFs.
+      // To get a good agreement the minimum ptHard (AliGenPythia::SetPtHard)
+      // has to be set to 2.75GeV. Example in ConfigBeautyPPR.C.
+
+      // All QCD processes
+      SetMSEL(1);
+
+      // No multiple interactions
+      SetMSTP(81,0);
+      SetPARP(81,0.0);
+      SetPARP(82,0.0);
+
+      // Initial/final parton shower on (Pythia default)
+      SetMSTP(61,1);
+      SetMSTP(71,1);
+
+      // 2nd order alpha_s
+      SetMSTP(2,2);
+
+      // QCD scales
+      SetMSTP(32,2);
+      SetPARP(34,1.0);
+      SetPARP(67,1.0);
+      SetPARP(71,1.0);
+
+      // Intrinsic <kT^2>
+      SetMSTP(91,1);
+      SetPARP(91,2.035);
+      SetPARP(93,10.17);
+
+      // Set b-quark mass
+      SetPMAS(5,1,4.75);
+
       break;
     }
 //
@@ -324,19 +412,43 @@ void  AliPythia::SetDecayTable()
     for (i = 1; i < 2001; i++) fDefMDME[i] = GetMDME(i,1);
 }
 
+void  AliPythia::Pyclus(Int_t& njet)
+{
+//  Call Pythia clustering algorithm
+//
+    pyclus(njet);
+}
+
+void  AliPythia::Pycell(Int_t& njet)
+{
+//  Call Pythia jet reconstruction algorithm
+//
+    pycell(njet);
+}
+
+
 
 #ifndef WIN32
 #define pyr    pyr_
 #define pyrset pyrset_
 #define pyrget pyrget_
+#define pyclus pyclus_
+#define pycell pycell_
 #else
 #define pyr    PYR
 #define pyrset PYRSET
 #define pyrget PYRGET
+#define pyclus PYCLUS
+#define pycell PYCELL
 #endif
 
 extern "C" {
-  Double_t pyr(Int_t*) {return sRandom->Rndm();}
+  Double_t pyr(Int_t*) 
+{
+      Float_t r;
+      do r=sRandom->Rndm(); while(0 >= r || r >= 1);
+      return r;
+}
   void pyrset(Int_t*,Int_t*) {}
   void pyrget(Int_t*,Int_t*) {}
 }
@@ -344,3 +456,4 @@ extern "C" {
 
 
 
+