diff --git a/corsika/detail/modules/ParticleCut.inl b/corsika/detail/modules/ParticleCut.inl index 38746d35918080c4a0e5a6b0735c968a9ba15f02..a73d0c1c10c585e775ede3f36114ddfd88047908 100644 --- a/corsika/detail/modules/ParticleCut.inl +++ b/corsika/detail/modules/ParticleCut.inl @@ -104,14 +104,18 @@ namespace corsika { } } + bool ParticleCut::isInvisible(Code const &vCode) const { + return is_neutrino(vCode); + } + template <typename TParticle> bool ParticleCut::checkCutParticle(const TParticle& particle) { const Code pid = particle.getPID(); HEPEnergyType energy = particle.getEnergy(); - CORSIKA_LOG_DEBUG(fmt::format("ParticleCut: checking {}, E= {} GeV, EcutTot={} GeV", + CORSIKA_LOG_DEBUG("ParticleCut: checking {}, E= {} GeV, EcutTot={} GeV", pid, energy / 1_GeV, - (em_energy_ + inv_energy_ + energy_) / 1_GeV)); + (em_energy_ + inv_energy_ + energy_) / 1_GeV); if (doCutEm_ && is_em(pid)) { CORSIKA_LOG_DEBUG("removing em. particle..."); em_energy_ += energy; diff --git a/corsika/modules/ParticleCut.hpp b/corsika/modules/ParticleCut.hpp index eb56d3e0bfb4dc50487ebdd39685e7bb9b75de01..61f832898616e4bb8fa98dd8d972b3827d20d1bf 100644 --- a/corsika/modules/ParticleCut.hpp +++ b/corsika/modules/ParticleCut.hpp @@ -78,6 +78,9 @@ namespace corsika { template <typename TParticle> bool isBelowEnergyCut(TParticle const&) const; + //! defines which particles are invisible, by default only neutrinos + bool isInvisible(Code const &) const; + private: bool doCutEm_; bool doCutInv_;