]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliDecayerPythia.cxx
Added cross-talk from the wires beyond the first and the last rows
[u/mrichter/AliRoot.git] / EVGEN / AliDecayerPythia.cxx
index 6ecf0722814cc45f693a078d58d436dbd06fc7ee..c91f0493e3e77eed3e323fa53ef2f4d2ad8f320b 100644 (file)
 
 /*
 $Log$
+Revision 1.11  2002/04/26 10:32:59  morsch
+Option kNoDecayHeavy added.
+
+Revision 1.10  2002/02/22 17:28:05  morsch
+ReadDecayTable() and WriteDecayTable() methods added.
+
+Revision 1.9  2001/12/20 10:37:13  morsch
+- Add omega forced decay.
+- Semileptonic decays for some more B and D baryons.
+
+Revision 1.8  2001/07/04 10:28:20  morsch
+Introduce GetLifetime(Int_T kf) method until functionality provided by
+TParticlePDG.
+
 Revision 1.7  2001/04/12 07:23:28  morsch
 Reactivate forcing option for dimuon and dielectron decay channels of phi (333).
 
@@ -56,15 +70,20 @@ ClassImp(AliDecayerPythia)
 
 #ifndef WIN32
 # define py1ent py1ent_
+# define opendecaytable opendecaytable_
 # define type_of_call
 #else
 # define lu1ent PY1ENT
+# define opendecaytable OPENDECAYTABLE
 # define type_of_call _stdcall
 #endif
 
 extern "C" void type_of_call 
           py1ent(Int_t&, Int_t&, Double_t&, Double_t&, Double_t&);
 
+extern "C" void type_of_call 
+          opendecaytable(Int_t&);
+
 Bool_t AliDecayerPythia::fgInit = kFALSE;
 
 
@@ -87,15 +106,19 @@ void AliDecayerPythia::Init()
 // Switch on heavy flavor decays
     
     Int_t kc, i, j;
-    Int_t heavy[8] = {411, 421, 431, 4122, 511, 521, 531, 5122};
+    Int_t heavy[14] = {411, 421, 431, 4122, 4132, 4232, 4332, 511, 521, 531, 5122, 5132, 5232, 5332};
     fPythia->ResetDecayTable();
-    for (j=0; j < 8; j++) {
+    for (j=0; j < 14; j++) {
        kc=fPythia->Pycomp(heavy[j]);
-       fPythia->SetMDCY(kc,1,1);
-       for (i=fPythia->GetMDCY(kc,2); 
-            i<fPythia->GetMDCY(kc,2)+fPythia->GetMDCY(kc,3); 
-            i++) {
+       if (fDecay == kNoDecayHeavy) {
+         fPythia->SetMDCY(kc,1,0);
+       } else {
+         fPythia->SetMDCY(kc,1,1);
+         for (i=fPythia->GetMDCY(kc,2); 
+              i<fPythia->GetMDCY(kc,2)+fPythia->GetMDCY(kc,3); 
+              i++) {
            fPythia->SetMDME(i,1,1);
+         }
        }
     }
 
@@ -112,6 +135,8 @@ void AliDecayerPythia::Decay(Int_t idpart, TLorentzVector* p)
     
     Lu1Ent(0, idpart, energy, theta, phi);
     fPythia->GetPrimaries();
+//    fPythia->Pylist(1);
+    
 }
 
 Int_t AliDecayerPythia::ImportParticles(TClonesArray *particles)
@@ -126,7 +151,9 @@ void AliDecayerPythia::ForceDecay()
 {
 // Force a particle decay mode
     Decay_t decay=fDecay;
-    
+    fPythia->SetMSTJ(21,2);
+    if (decay == kNoDecayHeavy) return;
+
 //
 // select mode    
 
@@ -136,13 +163,21 @@ void AliDecayerPythia::ForceDecay()
        ForceParticleDecay(  411,13,1); // D+/-     
        ForceParticleDecay(  421,13,1); // D0     
        ForceParticleDecay(  431,13,1); // D_s     
-       ForceParticleDecay( 4122,13,1); // Lambda_c     
+       ForceParticleDecay( 4122,13,1); // Lambda_c    
+       ForceParticleDecay( 4132,13,1); // Xsi_c     
+       ForceParticleDecay( 4232,13,1); // Sigma_c 
+       ForceParticleDecay( 4332,13,1); // Omega_c     
        ForceParticleDecay(  511,13,1); // B0     
        ForceParticleDecay(  521,13,1); // B+/-     
        ForceParticleDecay(  531,13,1); // B_s     
        ForceParticleDecay( 5122,13,1); // Lambda_b    
-    break;
+       ForceParticleDecay( 5132,13,1); // Xsi_b    
+       ForceParticleDecay( 5232,13,1); // Sigma_b    
+       ForceParticleDecay( 5332,13,1); // Omega_b    
+       break;
     case kDiMuon:
+       ForceParticleDecay(  221,13,2); // eta
+       ForceParticleDecay(  223,13,2); // omega
        ForceParticleDecay(  333,13,2); // phi
        ForceParticleDecay(  443,13,2); // J/Psi
        ForceParticleDecay(20443,13,2); // Psi'
@@ -151,20 +186,25 @@ void AliDecayerPythia::ForceDecay()
        ForceParticleDecay(30553,13,2); // Upsilon''
        break;
     case kSemiElectronic:
-       
        ForceParticleDecay(  411,11,1); // D+/-     
        ForceParticleDecay(  421,11,1); // D0     
        ForceParticleDecay(  431,11,1); // D_s     
        ForceParticleDecay( 4122,11,1); // Lambda_c     
-       
+       ForceParticleDecay( 4132,11,1); // Xsi_c     
+       ForceParticleDecay( 4232,11,1); // Sigma_c 
+       ForceParticleDecay( 4332,11,1); // Omega_c     
        ForceParticleDecay(  511,11,1); // B0     
        ForceParticleDecay(  521,11,1); // B+/-     
        ForceParticleDecay(  531,11,1); // B_s     
        ForceParticleDecay( 5122,11,1); // Lambda_b     
+       ForceParticleDecay( 5132,11,1); // Xsi_b    
+       ForceParticleDecay( 5232,11,1); // Sigma_b    
+       ForceParticleDecay( 5332,11,1); // Omega_b    
        break;
     case kDiElectron:
-
        ForceParticleDecay(  333,11,2); // phi
+       ForceParticleDecay(  221,11,2); // eta
+       ForceParticleDecay(  223,11,2); // omega
        ForceParticleDecay(  443,11,2); // J/Psi
        ForceParticleDecay(30443,11,2); // Psi'
        ForceParticleDecay(  553,11,2); // Upsilon
@@ -206,9 +246,18 @@ void AliDecayerPythia::ForceDecay()
        break;
     case kHadronicD:
        ForceHadronicD();
+       break;
+    case kPhiKK:
+       ForceParticleDecay(333,321,2); // Phi->K+K-
+       break;
+    case kOmega:
+       ForceOmega();
     case kAll:
        break;
     case kNoDecay:
+       fPythia->SetMSTJ(21,0);
+       break;
+    case kNoDecayHeavy:
        break;
     }
 }
@@ -373,6 +422,19 @@ void AliDecayerPythia::DefineParticles()
 //    gMC->Gspart(113,"Phi",3,mass,0,tlife);
 }
 
+void  AliDecayerPythia::ForceOmega()
+{
+    // Force Omega -> Lambda K- Decay
+    Int_t kc=fPythia->Pycomp(3334);
+    fPythia->SetMDCY(kc,1,1);
+    fPythia->SetMDME(1202,1,1);
+    fPythia->SetMDME(1203,1,0);
+    fPythia->SetMDME(1204,1,0);
+    fPythia->SetMDME(1205,1,0);
+}
+
+
+
 Float_t  AliDecayerPythia::GetPartialBranchingRatio(Int_t kf)
 {
 // Get branching ratio
@@ -387,6 +449,22 @@ Float_t  AliDecayerPythia::GetLifetime(Int_t kf)
     return fPythia->GetPMAS(kc,4)*3.3333e-12;
 }
 
+void AliDecayerPythia::WriteDecayTable()
+{
+//
+// Write the decay table
+    fPythia->Pyupda(1,15);
+}
+
+void AliDecayerPythia::ReadDecayTable()
+{
+//
+// Read the decay table
+    Int_t lun = 15;
+    opendecaytable(lun);
+    fPythia->Pyupda(2,lun);
+}
+
 #ifdef never
 void AliDecayerPythia::Streamer(TBuffer &R__b)
 {