diff --git a/corsika/detail/modules/ParticleCut.inl b/corsika/detail/modules/ParticleCut.inl index da19bce2727550a09a3ccede6b08a8ead7ca51ec..01d99891b7db735612da97cd8b434d4ac84e02a7 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 7abc7d6be02517cf78c8bc19749387cbf7055a23..098efc005e11dc9af833bcca00f027fe6768ed18 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_;