From 89deba43249133e76608d634350baed8610f9edc Mon Sep 17 00:00:00 2001
From: Felix Riehn <felix@matilda>
Date: Thu, 21 Jan 2021 12:51:48 +0000
Subject: [PATCH] removed fmt and reintroduce isInvisible

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

diff --git a/corsika/detail/modules/ParticleCut.inl b/corsika/detail/modules/ParticleCut.inl
index 38746d359..a73d0c1c1 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 eb56d3e0b..61f832898 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_;
-- 
GitLab