]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliDecayerPythia.cxx
bugfix: correct range of DDL for specified detector
[u/mrichter/AliRoot.git] / PYTHIA6 / AliDecayerPythia.cxx
index 6cf6d84a1ff16b2dfc78401809381fff19614103..bf14fbad80c9bdf4e1762522514c974371fcb2bb 100644 (file)
@@ -59,7 +59,8 @@ AliDecayerPythia::AliDecayerPythia():
     fPythia(AliPythia::Instance()),
     fDecay(kAll),
     fHeavyFlavour(kTRUE),
-    fLongLived(kFALSE)
+    fLongLived(kFALSE),
+    fPatchOmegaDalitz(0)
 {
 // Default Constructor
     for (Int_t i=0; i< 501; i++) fBraPart[i]= 1.;
@@ -71,7 +72,8 @@ AliDecayerPythia::AliDecayerPythia(const AliDecayerPythia &decayer):
     fPythia(0),
     fDecay(kAll),
     fHeavyFlavour(kTRUE),
-    fLongLived(kFALSE)
+    fLongLived(kFALSE),
+    fPatchOmegaDalitz(0)
 {
     // Copy Constructor
     decayer.Copy(*this);
@@ -140,8 +142,15 @@ void AliDecayerPythia::Decay(Int_t idpart, TLorentzVector* p)
     Float_t energy = p->Energy();
     Float_t theta  = p->Theta();
     Float_t phi    = p->Phi();
-    
-    Lu1Ent(0, idpart, energy, theta, 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();
+    }
     fPythia->GetPrimaries();
 }
 
@@ -161,7 +170,6 @@ void AliDecayerPythia::ForceDecay()
 //
     Decay_t decay=fDecay;
     fPythia->SetMSTJ(21,2);
-    if (decay == kNoDecayHeavy) return;
 
 //
 // select mode    
@@ -251,6 +259,9 @@ void AliDecayerPythia::ForceDecay()
        ForceParticleDecay(100553,13,2);// Upsilon'
        ForceParticleDecay(200553,13,2);// Upsilon''
        break;
+    case kJpsiDiMuon:
+       ForceParticleDecay(  443,13,2); // J/Psi
+       break;
     case kBSemiElectronic:
        ForceParticleDecay(  511,11,1); // B0     
        ForceParticleDecay(  521,11,1); // B+/-     
@@ -379,8 +390,10 @@ void AliDecayerPythia::ForceDecay()
        break;
     case kOmega:
        ForceOmega();
+       break;
     case kLambda:
        ForceLambda();
+       break;
     case kAll:
        break;
     case kNoDecay:
@@ -416,6 +429,9 @@ void AliDecayerPythia::ForceDecay()
        ForceParticleDecay(  331,22,1); // etaprime     
        ForceParticleDecay(  333,22,1); // phi     
        break;
+    case kBeautyUpgrade:
+        ForceBeautyUpgrade();
+      break;
     }
 }
 
@@ -431,6 +447,21 @@ void  AliDecayerPythia::SwitchOffHeavyFlavour()
     for (Int_t i = 156; i <= 160; i++) fPythia->SetMDME(i, 1, 0);
 }
 
+void  AliDecayerPythia::ForceBeautyUpgrade()
+{
+ //
+ // Force dedicated decay channels of signals ineresting
+ // for the ITS upgrade (Lb, Lc, Xi_c, B)
+ //
+
+   ForceParticleDecay( 5122, 4122, 1);
+   ForceParticleDecay( 4232, 3312, 1);
+   const Int_t prod[2]={421,211};
+   Int_t mult[2]={1,1};
+   ForceParticleDecay(521,prod,mult,2,1);
+   ForceHadronicD(1);
+}
+
 void  AliDecayerPythia::Lu1Ent(Int_t flag, Int_t idpart, 
                      Double_t mom, Double_t theta, Double_t phi)
 {
@@ -478,9 +509,9 @@ void AliDecayerPythia::ForceHadronicD(Int_t optUse4Bodies)
   Int_t productsD[2] = {kProton, kPiPlus}, multD[2] = {1, 1};
   ForceParticleDecay(iDeltaPP, productsD, multD, 2);
   // for Lambda_c -> Lambda(1520) pi+ -> p K- pi+ 
-  Int_t iLambda_1520 = 3124;
+  Int_t iLambda1520 = 3124;
   Int_t productsL[2] = {kProton, kKMinus}, multL[2] = {1, 1};
-  ForceParticleDecay(iLambda_1520, productsL, multL, 2);
+  ForceParticleDecay(iLambda1520, productsL, multL, 2);
   // for Lambda_c -> Lambda pi+
   Int_t iLambda=3122;
   //for Lambda_c -> antiK0 p
@@ -505,7 +536,7 @@ void AliDecayerPythia::ForceHadronicD(Int_t optUse4Bodies)
     };
   Int_t decayP3[kNHadrons][4] = 
     { 
-      {-1        , -1     , -1      , -1},
+      {kPiPlus   , iPhi   , 0       , 0},
       {kKMinus   , kPiPlus, iRho0   , 0 },
       {-1        , -1     , -1      , -1},
       {-1        , -1     , -1      , -1},
@@ -514,11 +545,11 @@ void AliDecayerPythia::ForceHadronicD(Int_t optUse4Bodies)
   // for Lambda_c -> Lambda_1520 pi+ -> p K- pi+, D0-> K*0 pi+ pi- -> K3pi
     Int_t decayP4[kNHadrons][4] =
     {
-      {-1          , -1      , -1      , -1},
+      {iKstarbar0  , kKPlus  , 0       ,  0},
       {iKstarbar0  , kPiPlus , kPiMinus,  0},
       {-1          , -1      , -1      , -1},
       {-1          , -1      , -1      , -1},
-      {iLambda_1520, kPiPlus ,  0      ,  0}
+      {iLambda1520 , kPiPlus ,  0      ,  0}
     };
   // for Lambda_c -> Lambda pi+ 
     Int_t decayP5[kNHadrons][4] =
@@ -646,7 +677,7 @@ void AliDecayerPythia::ForceParticleDecay(Int_t particle, Int_t product, Int_t m
     if (norm > 0.) fBraPart[kc] /= norm;
 }
 
-void AliDecayerPythia::ForceParticleDecay(Int_t particle, Int_t* products, Int_t* mult, Int_t npart, Bool_t flag)
+void AliDecayerPythia::ForceParticleDecay(Int_t particle, const Int_t* products, Int_t* mult, Int_t npart, Bool_t flag)
 {
 //
 //  Force decay of particle into products with multiplicity mult
@@ -783,7 +814,9 @@ void  AliDecayerPythia::ForceLambda()
 }
 
 
-void AliDecayerPythia::SwitchOffBDecay(){
+void AliDecayerPythia::SwitchOffBDecay()
+{
+// Switch off B-decays
   Int_t heavyB[]={511,521,531,5122,5132,5232,5332};
   for(int i=0;i<4;i++)
     {
@@ -823,27 +856,6 @@ void AliDecayerPythia::ReadDecayTable()
     
 }
 
-#ifdef never
-void AliDecayerPythia::Streamer(TBuffer &R__b)
-{
-   // Stream an object of class AliDecayerPythia.
-
-   if (R__b.IsReading()) {
-      Version_t R__v = R__b.ReadVersion(); if (R__v) { }
-      AliDecayer::Streamer(R__b);
-      (AliPythia::Instance())->Streamer(R__b);
-      R__b >> (Int_t&)fDecay;
-      R__b.ReadStaticArray(fBraPart);
-   } else {
-      R__b.WriteVersion(AliDecayerPythia::IsA());
-      AliDecayer::Streamer(R__b);
-      R__b << fPythia;
-      R__b << (Int_t)fDecay;
-      R__b.WriteArray(fBraPart, 501);
-   }
-}
-#endif
-
 void AliDecayerPythia::Copy(TObject &) const
 {
   //