]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliDecayerPythia.cxx
Changed inheritance order (RenderElement base comes first).
[u/mrichter/AliRoot.git] / PYTHIA6 / AliDecayerPythia.cxx
index 2372c6661ae6fa01afa31c9477697a92b8c897cd..467a5c7abd95a9c9d26fa1091c4ced19ab5edcbe 100644 (file)
@@ -33,10 +33,12 @@ ClassImp(AliDecayerPythia)
 #ifndef WIN32
 # define py1ent py1ent_
 # define opendecaytable opendecaytable_
+# define closedecaytable closedecaytable_
 # define type_of_call
 #else
 # define lu1ent PY1ENT
 # define opendecaytable OPENDECAYTABLE
+# define closedecaytable CLOSEDECAYTABLE
 # define type_of_call _stdcall
 #endif
 
@@ -46,6 +48,9 @@ extern "C" void type_of_call
 extern "C" void type_of_call 
           opendecaytable(Int_t&);
 
+extern "C" void type_of_call 
+          closedecaytable(Int_t&);
+
 Bool_t AliDecayerPythia::fgInit = kFALSE;
 
 
@@ -121,9 +126,36 @@ void AliDecayerPythia::ForceDecay()
 // select mode    
     Int_t products[2];
     Int_t mult[2];
-
+    Int_t products1[3];
+    Int_t mult1[3];
+    
     switch (decay) 
     {
+    case kHardMuons:
+       products1[0] =     13;
+       products1[1] =    443;
+       products1[2] = 100443;
+       mult1[0] = 1;
+       mult1[1] = 1;
+       mult1[2] = 1;
+       ForceParticleDecay(  511, products1, mult1, 3); 
+       ForceParticleDecay(  521, products1, mult1, 3); 
+       ForceParticleDecay(  531, products1, mult1, 3); 
+       ForceParticleDecay( 5122, products1, mult1, 3); 
+       ForceParticleDecay( 5132, products1, mult1, 3); 
+       ForceParticleDecay( 5232, products1, mult1, 3); 
+       ForceParticleDecay( 5332, products1, mult1, 3); 
+       ForceParticleDecay( 100443, 443, 1);  // Psi'  -> J/Psi X    
+       ForceParticleDecay(    443,  13, 2);  // J/Psi -> mu+ mu-   
+
+       ForceParticleDecay(  411,13,1); // D+/-     
+       ForceParticleDecay(  421,13,1); // D0     
+       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     
@@ -141,6 +173,7 @@ void AliDecayerPythia::ForceDecay()
        ForceParticleDecay( 5332,13,1); // Omega_b    
        break;
     case kDiMuon:
+       ForceParticleDecay(  113,13,2); // rho
        ForceParticleDecay(  221,13,2); // eta
        ForceParticleDecay(  223,13,2); // omega
        ForceParticleDecay(  333,13,2); // phi
@@ -167,6 +200,7 @@ void AliDecayerPythia::ForceDecay()
        ForceParticleDecay( 5332,11,1); // Omega_b    
        break;
     case kDiElectron:
+       ForceParticleDecay(  113,11,2); // rho
        ForceParticleDecay(  333,11,2); // phi
        ForceParticleDecay(  221,11,2); // eta
        ForceParticleDecay(  223,11,2); // omega
@@ -191,10 +225,10 @@ void AliDecayerPythia::ForceDecay()
        ForceParticleDecay(    443,13,2);             // J/Psi -> mu+ mu-   
        break;
     case kBPsiPrimeDiMuon:
-       ForceParticleDecay(  511,30443,1); // B0     
-       ForceParticleDecay(  521,30443,1); // B+/-     
-       ForceParticleDecay(  531,30443,1); // B_s     
-       ForceParticleDecay( 5122,30443,1); // Lambda_b 
+       ForceParticleDecay(  511,100443,1); // B0     
+       ForceParticleDecay(  521,100443,1); // B+/-     
+       ForceParticleDecay(  531,100443,1); // B_s     
+       ForceParticleDecay( 5122,100443,1); // Lambda_b 
        ForceParticleDecay(100443,13,2);    // Psi'   
        break;
     case kBJpsiDiElectron:
@@ -204,12 +238,18 @@ void AliDecayerPythia::ForceDecay()
        ForceParticleDecay( 5122,443,1); // Lambda_b
        ForceParticleDecay(  443,11,2);  // J/Psi    
        break;
+    case kBJpsi:
+       ForceParticleDecay(  511,443,1); // B0     
+       ForceParticleDecay(  521,443,1); // B+/-     
+       ForceParticleDecay(  531,443,1); // B_s     
+       ForceParticleDecay( 5122,443,1); // Lambda_b
+       break;
     case kBPsiPrimeDiElectron:
-       ForceParticleDecay(  511,30443,1); // B0     
-       ForceParticleDecay(  521,30443,1); // B+/-     
-       ForceParticleDecay(  531,30443,1); // B_s     
-       ForceParticleDecay( 5122,30443,1); // Lambda_b 
-       ForceParticleDecay(100443,11,2);    // Psi'   
+       ForceParticleDecay(  511,100443,1); // B0     
+       ForceParticleDecay(  521,100443,1); // B+/-     
+       ForceParticleDecay(  531,100443,1); // B_s     
+       ForceParticleDecay( 5122,100443,1); // Lambda_b 
+       ForceParticleDecay(100443,11,2);   // Psi'   
        break;
     case kPiToMu:
        ForceParticleDecay(211,13,1); // pi->mu     
@@ -217,6 +257,25 @@ void AliDecayerPythia::ForceDecay()
     case kKaToMu:
        ForceParticleDecay(321,13,1); // K->mu     
        break;
+    case kWToMuon:
+        ForceParticleDecay(  24, 13,1); // W -> mu
+       break;
+    case kWToCharm:
+        ForceParticleDecay(   24, 4,1); // W -> c
+       break;
+    case kWToCharmToMuon:
+        ForceParticleDecay(   24, 4,1); // W -> c
+       ForceParticleDecay(  411,13,1); // D+/- -> mu
+       ForceParticleDecay(  421,13,1); // D0  -> mu
+       ForceParticleDecay(  431,13,1); // D_s  -> mu
+       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 kZDiMuon:
+        ForceParticleDecay(  23, 13,2); // Z -> mu+ mu-
+       break;
     case kHadronicD:
        ForceHadronicD();
        break;
@@ -265,12 +324,28 @@ void AliDecayerPythia::ForceHadronicD()
     const Int_t kNHadrons = 4;
     Int_t channel;
     Int_t hadron[kNHadrons] = {411,  421, 431, 4112};
-    Int_t decayP[kNHadrons][3] = 
+    // for D+ -> K0* (-> K- pi+) pi+
+    Int_t iKstar0    =  313;
+    Int_t iKstarbar0 = -313;
+    Int_t products[2] = {kKPlus, kPiMinus}, mult[2] = {1, 1};
+    ForceParticleDecay(iKstar0, products, mult, 2);
+    // for Ds -> Phi pi+
+    Int_t iPhi=333;
+    ForceParticleDecay(iPhi,kKPlus,2); // Phi->K+K-
+    Int_t decayP1[kNHadrons][3] = 
+
        { 
-           {kKMinus, kPiPlus, kPiPlus},
-           {kKMinus, kPiPlus, 0      },
-           {-1     , -1     , -1     },
-           {-1     , -1     , -1     }
+           {kKMinus, kPiPlus,    kPiPlus},
+           {kKMinus, kPiPlus,    0      },
+           {kKPlus , iKstarbar0, 0     },
+           {-1     , -1        , -1        }
+       };
+    Int_t decayP2[kNHadrons][3] = 
+       { 
+           {iKstarbar0, kPiPlus, 0   },
+           {-1        , -1     , -1  },
+           {iPhi      , kPiPlus, 0  },
+           {-1        , -1     , -1  }
        };
     
 
@@ -282,12 +357,18 @@ void AliDecayerPythia::ForceHadronicD()
        Int_t ilast  = ifirst + fPythia->GetMDCY(kc,3)-1;
 
        for (channel = ifirst; channel <= ilast; channel++) {
-           if (
-               fPythia->GetKFDP(channel,1) == decayP[ihadron][0] &&
-               fPythia->GetKFDP(channel,2) == decayP[ihadron][1] &&
-               fPythia->GetKFDP(channel,3) == decayP[ihadron][2] &&
+           if ((
+               fPythia->GetKFDP(channel,1) == decayP1[ihadron][0] &&
+               fPythia->GetKFDP(channel,2) == decayP1[ihadron][1] &&
+               fPythia->GetKFDP(channel,3) == decayP1[ihadron][2] &&
+               fPythia->GetKFDP(channel,4) == 0
+               ) || (
+               fPythia->GetKFDP(channel,1) == decayP2[ihadron][0] &&
+               fPythia->GetKFDP(channel,2) == decayP2[ihadron][1] &&
+               fPythia->GetKFDP(channel,3) == decayP2[ihadron][2] &&
                fPythia->GetKFDP(channel,4) == 0
-               )
+               ))
+
            {
                fPythia->SetMDME(channel,1,1);
            } else {
@@ -298,6 +379,7 @@ void AliDecayerPythia::ForceHadronicD()
     } // hadrons
 }
 
+
 void AliDecayerPythia::ForceParticleDecay(Int_t particle, Int_t product, Int_t mult)
 {
 //
@@ -457,6 +539,8 @@ void AliDecayerPythia::ReadDecayTable()
     Int_t lun = 15;
     opendecaytable(lun);
     fPythia->Pyupda(3,lun);
+    closedecaytable(lun);
+    
 }
 
 #ifdef never
@@ -480,7 +564,7 @@ void AliDecayerPythia::Streamer(TBuffer &R__b)
 }
 #endif
 
-void AliDecayerPythia::Copy(AliDecayerPythia &) const
+void AliDecayerPythia::Copy(TObject &) const
 {
   //
   // Copy *this onto AliDecayerPythia -- not implemented
@@ -1460,6 +1544,7 @@ void AliDecayerPythia::Copy(AliDecayerPythia &) const
            797    0   42    0.001000    e+              nu_e            pi0                                             
            798    0   42    0.001000    e+              nu_e            eta                                             
            799    0   42    0.001000    e+              nu_e            eta'                                            
+
            800    0   42    0.001000    e+              nu_e            rho0                                            
            801    0   42    0.001000    e+              nu_e            omega                                           
            802    1   42    0.070000    mu+             nu_mu           Kbar0                                           
@@ -3640,3 +3725,4 @@ void AliDecayerPythia::Copy(AliDecayerPythia &) const
           2553    1    0    0.610139    W+              e-                                                              
 
 */
+