From c39c73152f4598148b88089f1d010e81bb3cd1bc Mon Sep 17 00:00:00 2001
From: Felix Riehn <felix@matilda>
Date: Thu, 4 Jun 2020 11:25:23 +0100
Subject: [PATCH] avoid test for nuclei

---
 Processes/OnShellCheck/OnShellCheck.cc     |  2 +-
 Processes/OnShellCheck/testOnShellCheck.cc | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/Processes/OnShellCheck/OnShellCheck.cc b/Processes/OnShellCheck/OnShellCheck.cc
index beee3a70e..a5662e434 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 bfe938305..08e6cc323 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));
+	
     }
   }
 }
-- 
GitLab