From 74374f4aa526ec1b8633178d845791e110665de2 Mon Sep 17 00:00:00 2001 From: morsch Date: Tue, 25 Jan 2011 20:16:49 +0000 Subject: [PATCH] Keep products of decay(cascades) of primary particles on the stack. --- STEER/AliStack.cxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/STEER/AliStack.cxx b/STEER/AliStack.cxx index 273ef786949..897f1d70c8e 100644 --- a/STEER/AliStack.cxx +++ b/STEER/AliStack.cxx @@ -314,6 +314,7 @@ Bool_t AliStack::PurifyKine() if((part=GetParticleMapEntry(i))) { // // Check of this track should be kept for physics reasons + printf("KeepPhysics %5d %5d \n", i, part->GetPdgCode()); if (KeepPhysics(part)) KeepTrack(i); // part->ResetBit(kDaughtersBit); @@ -513,7 +514,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)) { + father = GetParticleMapEntry(imo); + imo = father->GetFirstMother(); + } + if (imo <= fHgwmk) keep = kTRUE; } return keep; } -- 2.39.3