]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliPythia.cxx
Added analysis task for checking basic properties in ITS, TPC, and TRD in order to...
[u/mrichter/AliRoot.git] / PYTHIA6 / AliPythia.cxx
index 35cd398f9f24a3020aef2af74f65d2feb9189e97..e7e8d01af71b76c51f169cf90ca2a8a218f0abff 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
 //
@@ -97,7 +99,8 @@ AliPythia::AliPythia(const AliPythia& pythia):
     fZmax(0.97),
     fGlauber(0),
     fQuenchingWeights(0),
-    fItune(-1)
+    fItune(-1),
+    fOmegaDalitz()
 {
     // Copy Constructor
     pythia.Copy(*this);
@@ -119,7 +122,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 +417,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 +611,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)
@@ -1369,10 +1372,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 +1459,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];
+      }
+    }
+  }
+}