From e6b7fcf6c5a517ca184857dc71653d90292ebc48 Mon Sep 17 00:00:00 2001
From: morfouace <pierre.morfouace@cea.fr>
Date: Thu, 17 Oct 2024 10:07:08 +0200
Subject: [PATCH] Updating TICPhysics.cxx

---
 NPLib/Detectors/PISTA/TICPhysics.cxx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/NPLib/Detectors/PISTA/TICPhysics.cxx b/NPLib/Detectors/PISTA/TICPhysics.cxx
index f9c8f4074..3063b9212 100644
--- a/NPLib/Detectors/PISTA/TICPhysics.cxx
+++ b/NPLib/Detectors/PISTA/TICPhysics.cxx
@@ -297,6 +297,12 @@ double TICPhysics::ApplyZSpline(){
 
     DEcorr        = DEspline0 * DE / Eval_DEspline;
   }
+  else if(index==m_number_of_splines-1){
+    Eval_DEspline = m_Zspline[index]->Eval(Eres);
+    DEspline0     = FF_DEcorr0[index];
+
+    DEcorr        = DEspline0 * DE / Eval_DEspline;
+  }
 
   return DEcorr;
 }
-- 
GitLab