From 04216e32486dcd540d026726f18e5bf02ba01fac Mon Sep 17 00:00:00 2001
From: adrien matta <matta@lpccaen.in2p3.fr>
Date: Mon, 3 Dec 2018 15:29:48 +0100
Subject: [PATCH] * Fixing issue with the decay of nuclei         - The energy
 from the previous step was never set

---
 NPSimulation/Process/Decay.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/NPSimulation/Process/Decay.cc b/NPSimulation/Process/Decay.cc
index bfd7ee212..0cf06236c 100644
--- a/NPSimulation/Process/Decay.cc
+++ b/NPSimulation/Process/Decay.cc
@@ -85,8 +85,9 @@ G4bool Decay::IsApplicable( const G4ParticleDefinition& particleType) {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-G4bool Decay::ModelTrigger(const G4FastTrack& ) {
+G4bool Decay::ModelTrigger(const G4FastTrack& fastTrack) {
   //FIXME: Solve the issue of long lived decay
+  m_PreviousEnergy=fastTrack.GetPrimaryTrack()->GetKineticEnergy();
   // Check that a decay is possible:
   return m_Decay.AnyAboveThreshold(NPL::ChangeNameFromG4Standard(m_CurrentName),m_ExcitationEnergy);
 }
-- 
GitLab