From c4b8af2e1f09fe306e7047434e94e6a37be75235 Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Fri, 19 Feb 2021 11:39:53 +0100
Subject: [PATCH] fixed wrong logic in BetheBlochPDG

---
 corsika/detail/modules/energy_loss/BetheBlochPDG.inl | 4 +++-
 examples/vertical_EAS.cpp                            | 6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/corsika/detail/modules/energy_loss/BetheBlochPDG.inl b/corsika/detail/modules/energy_loss/BetheBlochPDG.inl
index b58f0b5e4..73fbf3517 100644
--- a/corsika/detail/modules/energy_loss/BetheBlochPDG.inl
+++ b/corsika/detail/modules/energy_loss/BetheBlochPDG.inl
@@ -141,14 +141,16 @@ namespace corsika {
 
   inline ProcessReturn BetheBlochPDG::doContinuous(setup::Stack::particle_type& p,
                                                    setup::Trajectory const& t,
-                                                   bool const limitStep) {
+                                                   bool const) {
 
     // if this step was limiting the CORSIKA stepping, the particle is lost
+    /* see Issue https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/-/issues/389
     if (limitStep) {
       fillProfile(t, p.getEnergy());
       p.setEnergy(p.getMass());
       return ProcessReturn::ParticleAbsorbed;
     }
+    */
 
     if (p.getChargeNumber() == 0) return ProcessReturn::Ok;
 
diff --git a/examples/vertical_EAS.cpp b/examples/vertical_EAS.cpp
index 56bf78c3d..59893527a 100644
--- a/examples/vertical_EAS.cpp
+++ b/examples/vertical_EAS.cpp
@@ -101,8 +101,10 @@ int main(int argc, char** argv) {
   CORSIKA_LOG_INFO("vertical_EAS");
 
   if (argc < 4) {
-    std::cerr << "usage: vertical_EAS <A> <Z> <energy/GeV> [seed]" << std::endl;
-    std::cerr << "       if no seed is given, a random seed is chosen" << std::endl;
+    std::cerr << "usage: vertical_EAS <A> <Z> <energy/GeV> [seed] \n"
+                 "       if A=0, Z is interpreted as PDG code \n"
+                 "       if no seed is given, a random seed is chosen \n"
+              << std::endl;
     return 1;
   }
   feenableexcept(FE_INVALID);
-- 
GitLab