]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliPythia.cxx
fix on the total number of multiplicity bins
[u/mrichter/AliRoot.git] / PYTHIA6 / AliPythia.cxx
index fe60a53d116c827d9744e1aefe9346f5bf8ee440..f8db4a6c3167af1c5a1b8a0f0ec6a494a5414994 100644 (file)
@@ -56,7 +56,7 @@ extern "C" void type_of_call pycell(Int_t & );
 extern "C" void type_of_call pyshow(Int_t &, Int_t &, Double_t &);
 extern "C" void type_of_call pyrobo(Int_t &, Int_t &, Double_t &, Double_t &, Double_t &, Double_t &, Double_t &);
 extern "C" void type_of_call pyquen(Double_t &, Int_t &, Double_t &);
-extern "C" void type_of_call pyevnw(){;}
+extern "C" void type_of_call pyevnw();
 extern "C" void type_of_call pyshowq(Int_t &, Int_t &, Double_t &);
 extern "C" void type_of_call pytune(Int_t &);
 extern "C" void type_of_call py2ent(Int_t &, Int_t&, Int_t&, Double_t&);
@@ -69,6 +69,8 @@ AliPythia::AliPythia():
     fProcess(kPyMb),
     fEcms(0.),
     fStrucFunc(kCTEQ5L),
+    fProjectile("p"),
+    fTarget("p"),
     fXJet(0.),
     fYJet(0.),
     fNGmax(30),
@@ -85,6 +87,10 @@ AliPythia::AliPythia():
       AliPythiaRndm::SetPythiaRandom(GetRandom());
     fGlauber          = 0;
     fQuenchingWeights = 0;
+    Int_t i = 0;
+    for (i = 0; i <  501; i++) fDefMDCY[i] = 0;
+    for (i = 0; i < 2001; i++) fDefMDME[i] = 0;
+    for (i = 0; i <    4; i++) fZQuench[i] = 0;
 }
 
 AliPythia::AliPythia(const AliPythia& pythia):
@@ -93,6 +99,8 @@ AliPythia::AliPythia(const AliPythia& pythia):
     fProcess(kPyMb),
     fEcms(0.),
     fStrucFunc(kCTEQ5L),
+    fProjectile("p"),
+    fTarget("p"),
     fXJet(0.),
     fYJet(0.),
     fNGmax(30),
@@ -103,6 +111,10 @@ AliPythia::AliPythia(const AliPythia& pythia):
     fOmegaDalitz()
 {
     // Copy Constructor
+    Int_t i;
+    for (i = 0; i <  501; i++) fDefMDCY[i] = 0;
+    for (i = 0; i < 2001; i++) fDefMDME[i] = 0;
+    for (i = 0; i <    4; i++) fZQuench[i] = 0;
     pythia.Copy(*this);
 }
 
@@ -272,7 +284,7 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
        SetMSUB(94,1);             // double diffraction
        SetMSUB(95,1);             // low pt production
 
-       AtlasTuning_MC09();
+       AtlasTuningMC09();
        break;
 
     case kPyMbWithDirectPhoton:
@@ -417,6 +429,7 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
     case kPyD0ppMNR:
     case kPyDPlusppMNR:
     case kPyDPlusStrangeppMNR:
+    case kPyLambdacppMNR:
       // Tuning of Pythia parameters aimed to get a resonable agreement
       // between with the NLO calculation by Mangano, Nason, Ridolfi for the
       // c-cbar single inclusive and double differential distributions.
@@ -599,7 +612,10 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
       SetMSTP(71,1); //Final QCD & QED showers on
       
       break;  
-
+      case kPyMBRSingleDiffraction:
+      case kPyMBRDoubleDiffraction:
+      case kPyMBRCentralDiffraction:
+      break;
     }
 //
 //  Initialize PYTHIA
@@ -609,7 +625,7 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
     
 //  
     SetMSTP(41,1);   // all resonance decays switched on
-    Initialize("CMS","p","p",fEcms);
+    Initialize("CMS",fProjectile,fTarget,fEcms);
     fOmegaDalitz.Init();
 }
 
@@ -632,7 +648,7 @@ void AliPythia::SetNuclei(Int_t a1, Int_t a2, Int_t pdf)
 //    If the following mass number both not equal zero, nuclear corrections of the stf are used.
 //    MSTP(192) : Mass number of nucleus side 1
 //    MSTP(193) : Mass number of nucleus side 2
-//    MSTP(194) : Nuclear structure function: 0: EKS98 1:EPS08
+//    MSTP(194) : Nuclear structure function: 0: EKS98 8:EPS08 9:EPS09LO 19:EPS09NLO
     SetMSTP(52,2);
     SetMSTP(192, a1);
     SetMSTP(193, a2); 
@@ -815,7 +831,7 @@ void  AliPythia::Quench()
     Double_t px = 0., py = 0., pz = 0., e = 0., m = 0., p = 0., pt = 0., theta = 0., phi = 0.;
     Double_t pxq[4], pyq[4], pzq[4], eq[4], yq[4], mq[4], pq[4], phiq[4], thetaq[4], ptq[4];
     Bool_t  quenched[4];
-    Double_t wjtKick[4];
+    Double_t wjtKick[4] = {0., 0., 0., 0.};
     Int_t nGluon[4];
     Int_t qPdg[4];
     Int_t   imo, kst, pdg;
@@ -1371,10 +1387,13 @@ void AliPythia::ConfigHeavyFlavor()
     //
     SetMSEL(1);
     
-    // No multiple interactions
-    SetMSTP(81,0);
-    SetPARP(81, 0.);
-    SetPARP(82, 0.);    
+
+    if (fItune < 0) {
+      // 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);
@@ -1408,7 +1427,7 @@ void AliPythia::AtlasTuning()
     SetPARP(67,1);             // Regulates Initial State Radiation
 }
 
-void AliPythia::AtlasTuning_MC09()
+void AliPythia::AtlasTuningMC09()
 {
     //
     // Configuration for the ATLAS tuning
@@ -1469,9 +1488,11 @@ void AliPythia::DalitzDecays()
     if (fd < 0)                                        continue;
     if ((ld - fd) != 2)                                continue;
     if ((fPyjets->K[1][fd] != 111) ||
-       (TMath::Abs(fPyjets->K[1][fd+1]) != 11))       continue;
+       ((TMath::Abs(fPyjets->K[1][fd+1]) != 11) && (TMath::Abs(fPyjets->K[1][fd+1]) != 13)))
+       continue;
     TLorentzVector omega(fPyjets->P[0][i], fPyjets->P[1][i], fPyjets->P[2][i], fPyjets->P[3][i]);
-    fOmegaDalitz.Decay(223, &omega);
+    Int_t pdg = TMath::Abs(fPyjets->K[1][fd+1]);
+    fOmegaDalitz.Decay(pdg, &omega);
     for (Int_t j = 0; j < 3; j++) {
       for (Int_t k = 0; k < 4; k++) {
        TLorentzVector vec = (fOmegaDalitz.Products())[2-j];