From 66a77b0b749db24f97dfe208a8405aa05963c20e Mon Sep 17 00:00:00 2001 From: Felix Riehn <felix@matilda> Date: Sat, 9 Jan 2021 21:38:33 +0000 Subject: [PATCH] also use OnShellCheck for non-hadronic particles except nuclei --- corsika/detail/modules/OnShellCheck.inl | 2 +- tests/modules/testOnShellCheck.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/corsika/detail/modules/OnShellCheck.inl b/corsika/detail/modules/OnShellCheck.inl index 3a98a609f..438c5ad61 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 f7577569c..eccf73f28 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") { -- GitLab