From 00cd210dabfd8675287c108cf070ad1934afc812 Mon Sep 17 00:00:00 2001 From: Felix Riehn <felix@matilda> Date: Fri, 14 May 2021 10:40:39 +0100 Subject: [PATCH] fixed neutrinos --- src/modules/epos/epos_codes.dat | 12 ++++++------ tests/modules/testEpos.cpp | 28 ++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/modules/epos/epos_codes.dat b/src/modules/epos/epos_codes.dat index ab6b2ce4d..9eb999ab1 100644 --- a/src/modules/epos/epos_codes.dat +++ b/src/modules/epos/epos_codes.dat @@ -7,11 +7,13 @@ Unknown 0 0 CannotInteract # Here is the list of particles known to EPOS +Gamma 10 0 CannotInteract Electron 12 0 CannotInteract Positron -12 0 CannotInteract -Gamma 10 0 CannotInteract -MuPlus -14 0 CannotInteract MuMinus 14 0 CannotInteract +MuPlus -14 0 CannotInteract +TauMinus 16 0 CannotInteract +TauPlus -16 0 CannotInteract Pi0 110 1 Pion PiPlus 120 1 Pion PiMinus -120 1 Pion @@ -64,9 +66,7 @@ KStar0Bar -231 0 CannotInteract NuE 11 0 CannotInteract NuEBar -11 0 CannotInteract -NuMu 14 0 CannotInteract -NuMuBar -14 0 CannotInteract +NuMu 13 0 CannotInteract +NuMuBar -13 0 CannotInteract NuTau 15 0 CannotInteract NuTauBar -15 0 CannotInteract -TauMinus 16 0 CannotInteract -TauPlus -16 0 CannotInteract diff --git a/tests/modules/testEpos.cpp b/tests/modules/testEpos.cpp index 4f8ee0762..04e667fa7 100644 --- a/tests/modules/testEpos.cpp +++ b/tests/modules/testEpos.cpp @@ -65,9 +65,33 @@ TEST_CASE("Epos", "[processes]") { } SECTION("epos mass") { - CHECK_FALSE(corsika::epos::getEposMass(Code::Electron) == 0_GeV); } + + /* + + This part does belong to validation rather than the interface tests + + */ + SECTION("validation - pdg id") { + for (auto p : get_all_particles()) { + if (!is_nucleus(p)) { + int eid = corsika::epos::convertToEposRaw(p); + if (eid == 0 && p != Code::Unknown) + CHECK_FALSE(p == convert_from_PDG(static_cast<PDGCode>( + ::epos::idtrafo_("nxs", "pdg", eid)))); + else + CHECK(p == convert_from_PDG( + static_cast<PDGCode>(::epos::idtrafo_("nxs", "pdg", eid)))); + } + } + } + + // SECTION("validation - mass") { + // for (auto p : get_all_particles()) + // if (!is_nucleus(p)) + // CHECK(get_mass(p) / corsika::epos::getEposMass(p) == Approx(1).margin(0.5)); + // } } #include <corsika/framework/geometry/Point.hpp> @@ -98,7 +122,7 @@ TEST_CASE("EposInterface", "[processes]") { corsika_logger->set_pattern("[%n:%^%-8l%$] custom pattern: %v"); logging::set_level(logging::level::trace); - auto [env, csPtr, nodePtr] = setup::testing::setup_environment(Code::Oxygen); + auto [env, csPtr, nodePtr] = setup::testing::setup_environment(Code::Proton); auto const& cs = *csPtr; [[maybe_unused]] auto const& env_dummy = env; -- GitLab