From d90e280407b6c1e5d0626654b12a25b23b06ca65 Mon Sep 17 00:00:00 2001
From: Felix Riehn <felix@matilda>
Date: Wed, 13 Jan 2021 11:52:57 +0000
Subject: [PATCH] removed obsolete functions

---
 corsika/detail/modules/ParticleCut.inl | 29 ++------------------------
 corsika/modules/ParticleCut.hpp        |  2 --
 2 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/corsika/detail/modules/ParticleCut.inl b/corsika/detail/modules/ParticleCut.inl
index da19bce27..01d99891b 100644
--- a/corsika/detail/modules/ParticleCut.inl
+++ b/corsika/detail/modules/ParticleCut.inl
@@ -35,31 +35,6 @@ namespace corsika {
     }
   }
 
-  bool ParticleCut::isEmParticle(Code vCode) const {
-    // FOR NOW: switch
-    switch (vCode) {
-      case Code::Gamma:
-      case Code::Electron:
-      case Code::Positron:
-        return true;
-      default:
-        return false;
-    }
-  }
-
-  bool ParticleCut::isInvisible(Code vCode) const {
-    switch (vCode) {
-      case Code::NuE:
-      case Code::NuEBar:
-      case Code::NuMu:
-      case Code::NuMuBar:
-        return true;
-
-      default:
-        return false;
-    }
-  }
-
   template <typename TParticle>
   bool ParticleCut::checkCutParticle(const TParticle& particle) {
 
@@ -68,12 +43,12 @@ namespace corsika {
     CORSIKA_LOG_DEBUG(fmt::format("ParticleCut: checking {}, E= {} GeV, EcutTot={} GeV",
                                   pid, energy / 1_GeV,
                                   (em_energy_ + inv_energy_ + energy_) / 1_GeV));
-    if (doCutEm_ && isEmParticle(pid)) {
+    if (doCutEm_ && is_em(pid)) {
       CORSIKA_LOG_DEBUG("removing em. particle...");
       em_energy_ += energy;
       em_count_ += 1;
       return true;
-    } else if (doCutInv_ && isInvisible(pid)) {
+    } else if (doCutInv_ && is_neutrino(pid)) {
       CORSIKA_LOG_DEBUG("removing inv. particle...");
       inv_energy_ += energy;
       inv_count_ += 1;
diff --git a/corsika/modules/ParticleCut.hpp b/corsika/modules/ParticleCut.hpp
index 7abc7d6be..098efc005 100644
--- a/corsika/modules/ParticleCut.hpp
+++ b/corsika/modules/ParticleCut.hpp
@@ -48,8 +48,6 @@ namespace corsika {
 
     template <typename TParticle>
     bool isBelowEnergyCut(TParticle const&) const;
-    bool isEmParticle(Code) const;
-    bool isInvisible(Code) const;
 
   private:
     HEPEnergyType energy_cut_;
-- 
GitLab