]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliStack.cxx
Fix coding violations
[u/mrichter/AliRoot.git] / STEER / AliStack.cxx
index 273ef7869499d9ff5328282262a8295fb92c3b53..bcedbac77186e2b802ace93a255330d5615cc5d6 100644 (file)
@@ -513,7 +513,20 @@ Bool_t AliStack::KeepPhysics(const TParticle* part)
        //
        // e+e- from pair production of primary gammas
        //
-       if ((part->GetUniqueID()) == kPPair) keep = kTRUE;
+       if ((part->GetUniqueID()) == kPPair)  keep = kTRUE;
+    }
+    //
+    // Decay(cascade) from primaries
+    // 
+    if ((part->GetUniqueID() == kPDecay) && (parent >= 0)) {
+      // Particles from decay
+      TParticle* father = GetParticleMapEntry(parent);
+      Int_t imo = parent;
+      while((imo > fHgwmk) && (father->GetUniqueID() == kPDecay)) {
+       imo =  father->GetFirstMother();
+       father = GetParticleMapEntry(imo);
+      }
+      if ((imo <= fHgwmk)) keep = kTRUE;
     }
     return keep;
 }
@@ -1030,8 +1043,7 @@ Bool_t AliStack::IsPhysicalPrimary(Int_t index)
 // 
 // Check if it comes from a pi0 decay
 //
-// What about the pi0 Dalitz ??
-//     if ((mpdg == kPi0) && (imo < GetNprimary())) return kTRUE; 
+       if ((mpdg == kPi0) && (imo < GetNprimary()))   return kTRUE; 
 
 // Check if this is a heavy flavor decay product
        Int_t mfl  = Int_t (mpdg / TMath::Power(10, Int_t(TMath::Log10(mpdg))));