From ea66c5e30f30c4d72f4713c6019f0a92ad9d26bb Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Wed, 16 Jan 2019 14:36:41 +0100
Subject: [PATCH] remove photon-like check

---
 Framework/Geometry/FourVector.h      | 2 ++
 Framework/Geometry/testFourVector.cc | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Framework/Geometry/FourVector.h b/Framework/Geometry/FourVector.h
index 93f29dcf8..d3fe31f18 100644
--- a/Framework/Geometry/FourVector.h
+++ b/Framework/Geometry/FourVector.h
@@ -63,9 +63,11 @@ namespace corsika::geometry {
       return GetTimeSquared() > fSpaceLike.squaredNorm();
     } //! Norm2 > 0
 
+    /* this is not numerically stable
     bool IsPhotonlike() const {
       return GetTimeSquared() == fSpaceLike.squaredNorm();
     } //! Norm2 == 0
+    */
 
     FourVector& operator+=(const FourVector& b) {
       fTimeLike += b.fTimeLike;
diff --git a/Framework/Geometry/testFourVector.cc b/Framework/Geometry/testFourVector.cc
index 994cd6791..301fb97e9 100644
--- a/Framework/Geometry/testFourVector.cc
+++ b/Framework/Geometry/testFourVector.cc
@@ -63,15 +63,15 @@ TEST_CASE("four vectors") {
 
     CHECK(p0.IsSpacelike());
     CHECK(!p0.IsTimelike());
-    CHECK(!p0.IsPhotonlike());
+    //CHECK(!p0.IsPhotonlike());
 
     CHECK(!p1.IsSpacelike());
     CHECK(p1.IsTimelike());
-    CHECK(!p1.IsPhotonlike());
+    //CHECK(!p1.IsPhotonlike());
 
     CHECK(!p2.IsSpacelike());
     CHECK(!p2.IsTimelike());
-    CHECK(p2.IsPhotonlike());
+    //CHECK(p2.IsPhotonlike());
   }
 
   /*
-- 
GitLab