diff --git a/corsika/detail/modules/OnShellCheck.inl b/corsika/detail/modules/OnShellCheck.inl index 3a98a609fe1ae8126a5d2c9b6b2a6780d9b1bc1e..438c5ad61c092ddd25a308673670bf3e4dc9d5a0 100644 --- a/corsika/detail/modules/OnShellCheck.inl +++ b/corsika/detail/modules/OnShellCheck.inl @@ -38,7 +38,7 @@ namespace corsika { void OnShellCheck::doSecondaries(TView& vS) { for (auto& p : vS) { auto const pid = p.getPID(); - if (!is_hadron(pid) || is_nucleus(pid)) continue; + if (is_nucleus(pid)) continue; auto const e_original = p.getEnergy(); auto const p_original = p.getMomentum(); auto const Plab = FourVector(e_original, p_original); diff --git a/tests/modules/testOnShellCheck.cpp b/tests/modules/testOnShellCheck.cpp index f7577569c8188afd5d79fd90490d703911ba4943..eccf73f287e9b07642ba5ed65e807d15d524f935 100644 --- a/tests/modules/testOnShellCheck.cpp +++ b/tests/modules/testOnShellCheck.cpp @@ -24,7 +24,7 @@ using namespace corsika; TEST_CASE("OnShellCheck", "[processes]") { - logging::set_level(logging::level::info); + logging::set_level(logging::level::debug); corsika_logger->set_pattern("[%n:%^%-8l%$] custom pattern: %v"); feenableexcept(FE_INVALID); @@ -38,9 +38,10 @@ TEST_CASE("OnShellCheck", "[processes]") { // two energies const HEPEnergyType E = 10_GeV; // list of arbitrary particles - std::array const particleList{Code::PiPlus, Code::PiMinus, Code::Helium, Code::Gamma}; + std::array const particleList{Code::PiPlus, Code::PiMinus, Code::Helium, + Code::Gamma, Code::Electron, Code::MuPlus}; - std::array const mass_shifts{1.1, 1.001, 1.0, 1.0}; + std::array const mass_shifts{1.1, 1.001, 1.0, 1.0, 1.01, 1.0}; SECTION("check particle masses") {