]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliDecayerPythia.cxx
Change W50511 common block in pythia-6.4.25
[u/mrichter/AliRoot.git] / PYTHIA6 / AliDecayerPythia.cxx
index 6b9a0237866471e51c61e084f63da6a77b3da399..06ff91ce7a15db6cb496b4ed8737233ff587fe2b 100644 (file)
@@ -62,6 +62,7 @@ AliDecayerPythia::AliDecayerPythia():
     fHeavyFlavour(kTRUE),
     fLongLived(kFALSE),
     fPatchOmegaDalitz(0),
+    fDecayerExodus(0),
     fPi0(1)
 {
 // Default Constructor
@@ -76,6 +77,7 @@ AliDecayerPythia::AliDecayerPythia(const AliDecayerPythia &decayer):
     fHeavyFlavour(kTRUE),
     fLongLived(kFALSE),
     fPatchOmegaDalitz(0),
+    fDecayerExodus(0),
     fPi0(1)
 {
     // Copy Constructor
@@ -138,23 +140,68 @@ void AliDecayerPythia::Init()
     ForceDecay();
 }
 
+void AliDecayerPythia::SwitchOffParticle(Int_t kf)
+{
+//switch off decay for particle "kf"
+fPythia->SetMDCY(fPythia->Pycomp(kf),1,0);
+}
+
 void AliDecayerPythia::Decay(Int_t idpart, TLorentzVector* p)
 {
 //  Decay a particle
 // 
-    Float_t energy = p->Energy();
-    Float_t theta  = p->Theta();
-    Float_t phi    = p->Phi();
-    if (!fPatchOmegaDalitz) {
-       Lu1Ent(0, idpart, energy, theta, phi);
-    } else {
-       fPythia->SetMDCY(fPythia->Pycomp(111) ,1, 0);
-       Lu1Ent(0, idpart, energy, theta, phi);
-       fPythia->DalitzDecays();
-       fPythia->SetMDCY(fPythia->Pycomp(111) ,1, 1);
-       fPythia->Pyexec();
+  Float_t energy = p->Energy();
+  Float_t theta  = p->Theta();
+  Float_t phi    = p->Phi();
+
+  if(!fDecayerExodus) {
+    Lu1Ent(0, idpart, energy, theta, phi);
+  } else {
+
+  // EXODUS decayer
+    if(idpart == 111){
+      fPythia->SetMDCY(fPythia->Pycomp(22) ,1, 0);
+      Lu1Ent(0, idpart, energy, theta, phi);
+      fPythia->PizeroDalitz();
+      fPythia->SetMDCY(fPythia->Pycomp(22) ,1, 1);
+    }
+    else if(idpart == 221){
+      fPythia->SetMDCY(fPythia->Pycomp(22) ,1, 0);
+      Lu1Ent(0, idpart, energy, theta, phi);
+      fPythia->EtaDalitz();
+      fPythia->SetMDCY(fPythia->Pycomp(22) ,1, 1);
+    }
+    else if(idpart == 113){
+      Lu1Ent(0, idpart, energy, theta, phi);
+      fPythia->RhoDirect();
     }
-    fPythia->GetPrimaries();
+    else if(idpart == 223){
+      fPythia->SetMDCY(fPythia->Pycomp(111) ,1, 0);
+      Lu1Ent(0, idpart, energy, theta, phi);
+      fPythia->OmegaDirect();
+      fPythia->OmegaDalitz();
+      fPythia->SetMDCY(fPythia->Pycomp(111) ,1, 1);
+    }
+    else if(idpart == 331){
+      fPythia->SetMDCY(fPythia->Pycomp(22) ,1, 0);
+      Lu1Ent(0, idpart, energy, theta, phi);
+      fPythia->EtaprimeDalitz();
+      fPythia->SetMDCY(fPythia->Pycomp(22) ,1, 1);
+    }
+    else if(idpart == 333){
+      fPythia->SetMDCY(fPythia->Pycomp(221) ,1, 0);
+      Lu1Ent(0, idpart, energy, theta, phi);
+      fPythia->PhiDirect();
+      fPythia->PhiDalitz();
+      fPythia->SetMDCY(fPythia->Pycomp(221) ,1, 1);
+    }
+    else if(idpart == 443){
+      Lu1Ent(0, idpart, energy, theta, phi);
+      fPythia->JPsiDirect();
+    }  
+  }
+
+  fPythia->GetPrimaries();
 }
 
 Int_t AliDecayerPythia::ImportParticles(TClonesArray *particles)
@@ -244,6 +291,15 @@ void AliDecayerPythia::ForceDecay()
        ForceParticleDecay( 5232,13,1); // Sigma_b    
        ForceParticleDecay( 5332,13,1); // Omega_b    
        break;
+    case kDSemiMuonic:
+       ForceParticleDecay(  411,13,1); // D0     
+       ForceParticleDecay(  421,13,1); // D+/-     
+       ForceParticleDecay(  431,13,1); // D_s     
+       ForceParticleDecay( 4122,13,1); // Lambda_c    
+       ForceParticleDecay( 4132,13,1); // Xsi_c    
+       ForceParticleDecay( 4232,13,1); // Sigma_c    
+       ForceParticleDecay( 4332,13,1); // Omega_c    
+       break;
     case kSemiMuonic:
        ForceParticleDecay(  411,13,1); // D+/-     
        ForceParticleDecay(  421,13,1); // D0     
@@ -443,13 +499,23 @@ void AliDecayerPythia::ForceDecay()
        ForceParticleDecay(  443,11,2); // jpsi     
        break;
     case kGammaEM:
-       ForceParticleDecay(  111,22,1); // pi^0     
-       ForceParticleDecay(  221,22,1); // eta     
-       ForceParticleDecay(  113,22,1); // rho     
-       ForceParticleDecay(  223,22,1); // omega     
-       ForceParticleDecay(  331,22,1); // etaprime     
-       ForceParticleDecay(  333,22,1); // phi     
-       ForceParticleDecay(  443,22,1); // jpsi     
+       ForceParticleDecay(  111,       22,     1); // pi^0     
+       ForceParticleDecay(  221,       22,     1); // eta     
+       ForceParticleDecay(  113,       22,     1); // rho     
+       ForceParticleDecay(  223,       22,     1); // omega     
+       ForceParticleDecay(  331,       22,     1); // etaprime     
+       ForceParticleDecay(  333,       22,     1); // phi     
+       ForceParticleDecay(  443,       22,     1); // jpsi     
+       ForceParticleDecay(  3212,      22,     1);     // Sigma 0
+       ForceParticleDecay(  310,       22,     1);     // K0s
+       ForceParticleDecay(  2224,      22,     1);     // Delta++
+       ForceParticleDecay(  2214,      22,     1);     // Delta+
+       ForceParticleDecay(  1114,      22,     1);     // Delta-
+       ForceParticleDecay(  2114,      22,     1);     // Delta0
+       ForceParticleDecay(  213,       22,     1);     // rho+ 
+       ForceParticleDecay(  -213,      22,     1);     // rho- 
+       ForceParticleDecay(  313,       22,     1);     // K0star 
+       
        break;
     case kBeautyUpgrade:
         ForceBeautyUpgrade();