]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliPythia.cxx
Double_t 4-momentum
[u/mrichter/AliRoot.git] / PYTHIA6 / AliPythia.cxx
index 35cd398f9f24a3020aef2af74f65d2feb9189e97..94b67a26dfb404cd2a2b005f7ed9c1053ee8f3d4 100644 (file)
@@ -1,4 +1,3 @@
-
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -20,7 +19,9 @@
 #include "AliPythiaRndm.h"
 #include "AliFastGlauber.h"
 #include "AliQuenchingWeights.h"
+#include "AliOmegaDalitz.h"
 #include "TVector3.h"
+#include "TLorentzVector.h"
 #include "PyquenCommon.h"
 
 ClassImp(AliPythia)
@@ -74,7 +75,8 @@ AliPythia::AliPythia():
     fZmax(0.97),
     fGlauber(0),
     fQuenchingWeights(0),
-    fItune(-1)
+    fItune(-1),
+    fOmegaDalitz()
 {
 // Default Constructor
 //
@@ -83,6 +85,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):
@@ -97,9 +103,14 @@ AliPythia::AliPythia(const AliPythia& pythia):
     fZmax(0.97),
     fGlauber(0),
     fQuenchingWeights(0),
-    fItune(-1)
+    fItune(-1),
+    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);
 }
 
@@ -119,7 +130,6 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
     SetMDCY(Pycomp(310) ,1,0); // K0S
     SetMDCY(Pycomp(3122),1,0); // kLambda
     SetMDCY(Pycomp(3112),1,0); // sigma -
-    SetMDCY(Pycomp(3212),1,0); // sigma 0 
     SetMDCY(Pycomp(3222),1,0); // sigma +
     SetMDCY(Pycomp(3312),1,0); // xi - 
     SetMDCY(Pycomp(3322),1,0); // xi 0
@@ -415,6 +425,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.
@@ -608,7 +619,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);
-    
+    fOmegaDalitz.Init();
 }
 
 Int_t AliPythia::CheckedLuComp(Int_t kf)
@@ -813,7 +824,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;
@@ -1369,10 +1380,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);
@@ -1453,3 +1467,30 @@ AliPythia& AliPythia::operator=(const  AliPythia& rhs)
     Fatal("Copy","Not implemented!\n");
 }
 
+void AliPythia::DalitzDecays()
+{
+
+  //
+  // Replace all omega dalitz decays with the correct matrix element decays
+  //
+  Int_t nt = fPyjets->N;
+  for (Int_t i = 0; i < nt; i++) {
+    if (fPyjets->K[1][i] != 223)                       continue;       
+    Int_t fd = fPyjets->K[3][i] - 1;
+    Int_t ld = fPyjets->K[4][i] - 1;
+    if (fd < 0)                                        continue;
+    if ((ld - fd) != 2)                                continue;
+    if ((fPyjets->K[1][fd] != 111) ||
+       ((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]);
+    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];
+       fPyjets->P[k][fd+j] = vec[k];
+      }
+    }
+  }
+}