diff --git a/Processes/OnShellCheck/OnShellCheck.cc b/Processes/OnShellCheck/OnShellCheck.cc index beee3a70ef4c55ad6e966c70f6c06d92e4dd0b23..a5662e4349ab1afb2d118320833da3c6a0d74a68 100644 --- a/Processes/OnShellCheck/OnShellCheck.cc +++ b/Processes/OnShellCheck/OnShellCheck.cc @@ -35,7 +35,7 @@ namespace corsika::process { auto const pid = p.GetPID(); // if(pid==particles::Code::Gamma || particles::IsNeutrino(pid) || // particles::IsNucleus(pid)) continue; - if (!particles::IsHadron(pid)) continue; + if (!particles::IsHadron(pid) || particles::IsNucleus(pid)) continue; auto const e_original = p.GetEnergy(); auto const p_original = p.GetMomentum(); auto const Plab = corsika::geometry::FourVector(e_original, p_original); diff --git a/Processes/OnShellCheck/testOnShellCheck.cc b/Processes/OnShellCheck/testOnShellCheck.cc index bfe938305c3bdc1921a981bc9016c436eeeda572..08e6cc323ea485c7ff0db3e5f44f504446070c15 100644 --- a/Processes/OnShellCheck/testOnShellCheck.cc +++ b/Processes/OnShellCheck/testOnShellCheck.cc @@ -39,10 +39,13 @@ TEST_CASE("OnShellCheck", "[processes]") { // two energies const HEPEnergyType E = 10_GeV; // list of arbitrary particles - std::array<particles::Code, 2> particleList = {particles::Code::PiPlus, - particles::Code::PiMinus}; + std::array<particles::Code, 4> particleList = { + particles::Code::PiPlus, + particles::Code::PiMinus, + particles::Code::Helium, + particles::Code::Gamma}; - std::array<double, 2> mass_shifts = {1.1, 1.001}; + std::array<double, 4> mass_shifts = {1.1, 1.001, 1.0, 1.0}; SECTION("check particle masses") { @@ -83,8 +86,9 @@ TEST_CASE("OnShellCheck", "[processes]") { auto const m_kinetic = Plab.GetNorm(); if (i == 0) REQUIRE(m_kinetic / particles::PiPlus::GetMass() == Approx(1)); - else + else if (i == 1) REQUIRE_FALSE(m_kinetic / particles::PiMinus::GetMass() == Approx(1)); + } } }