From c56ebc4ab59d3751374ff32147ec176f07c4a049 Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Wed, 19 Dec 2018 16:52:00 +0100
Subject: [PATCH] removed unused "else" part

---
 Framework/Cascade/Cascade.h | 62 ++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 32 deletions(-)

diff --git a/Framework/Cascade/Cascade.h b/Framework/Cascade/Cascade.h
index 225b58d64..275f9702e 100644
--- a/Framework/Cascade/Cascade.h
+++ b/Framework/Cascade/Cascade.h
@@ -123,38 +123,36 @@ namespace corsika::cascade {
                   << particle.GetEnergy() / 1_GeV << "GeV" << std::endl;
         particle.Delete();
         return;
-      } else {
-
-        std::cout << "sth. happening before geometric limit ?"
-                  << ((min_distance < distance_max) ? "yes" : "no") << std::endl;
-
-        if (min_distance < distance_max) { // interaction to happen within geometric limit
-          // check weather decay or interaction limits this step
-
-          if (min_distance == distance_interact) {
-            std::cout << "collide" << std::endl;
-
-            InverseGrammageType const actual_inv_length =
-                fProcessSequence.GetTotalInverseInteractionLength(particle, step);
-
-            corsika::random::UniformRealDistribution<InverseGrammageType> uniDist(
-                actual_inv_length);
-            const auto sample_process = uniDist(fRNG);
-            InverseGrammageType inv_lambda_count = 0. * meter * meter / gram;
-            fProcessSequence.SelectInteraction(particle, fStack, sample_process,
-                                               inv_lambda_count);
-          } else {
-            std::cout << "decay" << std::endl;
-            InverseTimeType const actual_decay_time =
-                fProcessSequence.GetTotalInverseLifetime(particle);
-
-            corsika::random::UniformRealDistribution<InverseTimeType> uniDist(
-                actual_decay_time);
-            const auto sample_process = uniDist(fRNG);
-            InverseTimeType inv_decay_count = 0 / second;
-            fProcessSequence.SelectDecay(particle, fStack, sample_process,
-                                         inv_decay_count);
-          }
+      }
+
+      std::cout << "sth. happening before geometric limit ?"
+                << ((min_distance < distance_max) ? "yes" : "no") << std::endl;
+
+      if (min_distance < distance_max) { // interaction to happen within geometric limit
+        // check weather decay or interaction limits this step
+
+        if (min_distance == distance_interact) {
+          std::cout << "collide" << std::endl;
+
+          InverseGrammageType const actual_inv_length =
+              fProcessSequence.GetTotalInverseInteractionLength(particle, step);
+
+          corsika::random::UniformRealDistribution<InverseGrammageType> uniDist(
+              actual_inv_length);
+          const auto sample_process = uniDist(fRNG);
+          InverseGrammageType inv_lambda_count = 0. * meter * meter / gram;
+          fProcessSequence.SelectInteraction(particle, fStack, sample_process,
+                                             inv_lambda_count);
+        } else {
+          std::cout << "decay" << std::endl;
+          InverseTimeType const actual_decay_time =
+              fProcessSequence.GetTotalInverseLifetime(particle);
+
+          corsika::random::UniformRealDistribution<InverseTimeType> uniDist(
+              actual_decay_time);
+          const auto sample_process = uniDist(fRNG);
+          InverseTimeType inv_decay_count = 0 / second;
+          fProcessSequence.SelectDecay(particle, fStack, sample_process, inv_decay_count);
         }
       }
     }
-- 
GitLab