From 2a6f8be0e6dd1bdfaf008043c141aaa266b881c3 Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Tue, 4 May 2021 13:52:56 +0200
Subject: [PATCH] vector stack

---
 corsika/detail/modules/proposal/ContinuousProcess.inl | 10 +++++-----
 corsika/stack/VectorStack.hpp                         |  4 ----
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/corsika/detail/modules/proposal/ContinuousProcess.inl b/corsika/detail/modules/proposal/ContinuousProcess.inl
index c22226ac5..430d779c6 100644
--- a/corsika/detail/modules/proposal/ContinuousProcess.inl
+++ b/corsika/detail/modules/proposal/ContinuousProcess.inl
@@ -128,11 +128,11 @@ namespace corsika::proposal {
     auto const energy = vP.getEnergy();
     auto const energy_lim = std::max(
         energy * 0.9, // either 10% relative loss max., or
-        get_energy_threshold(
-            code) // energy thresholds globally defined for individual particles
-            *
-            0.99 // need to go 1% below global e-cut to assure removal in ParticleCut. The
-                 // 1% does not matter since at cut-time the entire energy is removed.
+        get_kinetic_energy_threshold(code) +
+            get_mass(code) // energy thresholds globally defined for individual particles
+                * 0.99     // need to go 1% below global e-cut to assure removal in
+                       // ParticleCut. The 1% does not matter since at cut-time the entire
+                       // energy is removed.
     );
 
     // solving the track integral for giving energy lim
diff --git a/corsika/stack/VectorStack.hpp b/corsika/stack/VectorStack.hpp
index 8296c928d..e6bc6a3a4 100644
--- a/corsika/stack/VectorStack.hpp
+++ b/corsika/stack/VectorStack.hpp
@@ -127,10 +127,6 @@ namespace corsika {
      *
      * @{
      */
-    DirectionVector getDirection() const {
-      return this->getMomentum() / this->getEnergy();
-    }
-
     VelocityVector getVelocity() const {
       return this->getMomentum() / this->getEnergy() * constants::c;
     }
-- 
GitLab