Detect possible particle decay by the process-id of its last daughter.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jul 2008 17:38:49 +0000 (17:38 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jul 2008 17:38:49 +0000 (17:38 +0000)
EVE/EveBase/AliEveKineTools.cxx

index 30d74f6122298574e0d5e876e6a967007cac58de..86b957c82cc4ee094e0da5ea3eef3b0fb8d1cb93 100644 (file)
@@ -71,6 +71,17 @@ void AliEveKineTools::SetDaughterPathMarks(TEveElement* cont, AliStack* stack, B
         // printf("Daughter path-mark for %d, %d, t=%e, r=%f,%f,%f\n",
         //        track->GetLabel(), d, dp->T(), dp->Vx(), dp->Vy(), dp->Vz());
       }
+
+      // Check last process, set decay if needed.
+      Int_t lp = stack->Particle(d1)->GetUniqueID();
+      if (lp != kPBrem && lp != kPDeltaRay && lp < kPCerenkov)
+      {
+        TParticle* dp = stack->Particle(d1);
+        track->AddPathMark(TEvePathMark(TEvePathMark::kDecay,
+                                        TEveVector(dp->Vx(), dp->Vy(), dp->Vz()),
+                                        TEveVector(0, 0,0),  dp->T()));
+      }
+
       if (recurse)
        SetDaughterPathMarks(track, stack, recurse);
     }