]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliPythia.cxx
Split femto code into two libraries
[u/mrichter/AliRoot.git] / PYTHIA6 / AliPythia.cxx
index d3a7c439870509346fbd6514b67e1f19accfc2aa..6520a1350466c364ae90561aac3f688493b89978 100644 (file)
@@ -1,3 +1,4 @@
+
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -51,7 +52,14 @@ extern "C" void type_of_call pyevnw(){;}
 
 AliPythia* AliPythia::fgAliPythia=NULL;
 
-AliPythia::AliPythia()
+AliPythia::AliPythia():
+    fProcess(kPyMb),
+    fEcms(0.),
+    fStrucFunc(kCTEQ5L),
+    fXJet(0.),
+    fYJet(0.),
+    fGlauber(0),
+    fQuenchingWeights(0)
 {
 // Default Constructor
 //
@@ -62,6 +70,21 @@ AliPythia::AliPythia()
     fQuenchingWeights = 0;
 }
 
+AliPythia::AliPythia(const AliPythia& pythia):
+    TPythia6(pythia), 
+    AliRndm(pythia),
+    fProcess(kPyMb),
+    fEcms(0.),
+    fStrucFunc(kCTEQ5L),
+    fXJet(0.),
+    fYJet(0.),
+    fGlauber(0),
+    fQuenchingWeights(0)
+{
+    // Copy Constructor
+    pythia.Copy(*this);
+}
+
 void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc)
 {
 // Initialise the process to generate 
@@ -81,9 +104,13 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
     SetMDCY(Pycomp(3312),1,0);
     SetMDCY(Pycomp(3322),1,0);
     SetMDCY(Pycomp(3334),1,0);
-    //  select structure function 
+    // Select structure function 
     SetMSTP(52,2);
     SetMSTP(51,strucfunc);
+    // Particles produced in string fragmentation point directly to either of the two endpoints
+    // of the string (depending in the side they were generated from).
+    SetMSTU(16,2);
+
 //
 // Pythia initialisation for selected processes//
 //
@@ -153,7 +180,6 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
 //  heavy quark masses
 
        SetPMAS(4,1,1.2);
-       SetMSTU(16,2);
 //
 //    primordial pT
        SetMSTP(91,1);
@@ -164,7 +190,6 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
     case kPyBeauty:
        SetMSEL(5);
        SetPMAS(5,1,4.75);
-       SetMSTU(16,2);
        break;
     case kPyJpsi:
        SetMSEL(0);
@@ -212,6 +237,43 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
        SetMSUB(95,1);             // low pt production
 
        AtlasTuning();
+       break;
+    case kPyMbDefault:
+// Minimum Bias pp-Collisions
+//
+//   
+//      select Pythia min. bias model
+       SetMSEL(0);
+       SetMSUB(92,1);             // single diffraction AB-->XB
+       SetMSUB(93,1);             // single diffraction AB-->AX
+       SetMSUB(94,1);             // double diffraction
+       SetMSUB(95,1);             // low pt production
+
+       break;
+    case kPyLhwgMb:
+// Les Houches Working Group 05 Minimum Bias pp-Collisions: hep-ph/0604120
+//  -> Pythia 6.3 or above is needed
+//   
+       SetMSEL(0);
+       SetMSUB(92,1);             // single diffraction AB-->XB
+       SetMSUB(93,1);             // single diffraction AB-->AX
+       SetMSUB(94,1);             // double diffraction
+       SetMSUB(95,1);             // low pt production
+
+        SetMSTP(51,kCTEQ6ll);      // CTEQ6ll pdf
+       SetMSTP(52,2);
+       SetMSTP(68,1);
+       SetMSTP(70,2);
+       SetMSTP(81,1);             // Multiple Interactions ON
+       SetMSTP(82,4);             // Double Gaussian Model
+       SetMSTP(88,1);
+
+       SetPARP(82,2.3);           // [GeV]    PT_min at Ref. energy
+       SetPARP(83,0.5);           // Core density in proton matter distribution (def.value)
+       SetPARP(84,0.5);           // Core radius
+       SetPARP(85,0.9);           // Regulates gluon prod. mechanism
+       SetPARP(90,0.2);           // 2*epsilon (exponent in power law)
+
        break;
     case kPyMbNonDiffr:
 // Minimum Bias pp-Collisions
@@ -601,8 +663,7 @@ void AliPythia::InitQuenching(Float_t cMin, Float_t cMax, Float_t k, Int_t iECMe
 // (1) The quenching model using quenching weights according to C. Salgado and U. Wiedemann
 // (2) The nuclear geometry using the Glauber Model
 //     
-
-
+    
     fGlauber = new AliFastGlauber();
     fGlauber->Init(2);
     fGlauber->SetCentralityClass(cMin, cMax); 
@@ -728,7 +789,7 @@ void  AliPythia::Quench()
            //
            // Avoid complete loss
            //
-           if (fZQuench[j] == 1.) fZQuench[j] = 0.95;
+           if (fZQuench[j] == 1.) fZQuench[j] = 0.97;
            //
            // Some debug printing
 
@@ -757,7 +818,7 @@ void  AliPythia::Quench()
        if (!quenched[isys]) continue;
        
        nGluon[isys]   = 1 + Int_t(fZQuench[isys] / (1. - fZQuench[isys]));
-       if (nGluon[isys] > 6) nGluon[isys] = 6;
+       if (nGluon[isys] > 30) nGluon[isys] = 30;
        zquench[isys] = 1. - TMath::Power(1. - fZQuench[isys], 1./Double_t(nGluon[isys]));
        wjtKick[isys]  = wjtKick[isys] / TMath::Sqrt(Double_t(nGluon[isys]));
 
@@ -1171,6 +1232,8 @@ void AliPythia::ConfigHeavyFlavor()
     
     // No multiple interactions
     SetMSTP(81,0);
+    SetPARP(81, 0.);
+    SetPARP(82, 0.);    
     // Initial/final parton shower on (Pythia default)
     SetMSTP(61,1);
     SetMSTP(71,1);
@@ -1190,6 +1253,7 @@ void AliPythia::AtlasTuning()
         SetMSTP(51, kCTEQ5L);      // CTEQ5L pdf
        SetMSTP(81,1);             // Multiple Interactions ON
        SetMSTP(82,4);             // Double Gaussian Model
+       SetPARP(81,1.9);           // Min. pt for multiple interactions (default in 6.2-14) 
        SetPARP(82,1.8);           // [GeV]    PT_min at Ref. energy
        SetPARP(89,1000.);         // [GeV]   Ref. energy
        SetPARP(90,0.16);          // 2*epsilon (exponent in power law)
@@ -1199,3 +1263,18 @@ void AliPythia::AtlasTuning()
        SetPARP(86,0.66);          // Regulates gluon prod. mechanism
        SetPARP(67,1);             // Regulates Initial State Radiation
 }
+
+AliPythia& AliPythia::operator=(const  AliPythia& rhs)
+{
+// Assignment operator
+    rhs.Copy(*this);
+    return *this;
+}
+
+ void AliPythia::Copy(TObject&) const
+{
+    //
+    // Copy 
+    //
+    Fatal("Copy","Not implemented!\n");
+}