|
12 | 12 | #include "ReconstructionDataFormats/TrackParametrizationWithError.h" |
13 | 13 | #include "ReconstructionDataFormats/Vertex.h" |
14 | 14 | #include "ReconstructionDataFormats/DCA.h" |
| 15 | +#include "CommonConstants/MathConstants.h" |
15 | 16 | #include <GPUCommonLogger.h> |
16 | 17 |
|
17 | | -#ifndef __OPENCL__ |
18 | | -#include <cfloat> |
19 | | -#else |
20 | | -#include <float.h> |
21 | | -#endif |
22 | | - |
23 | 18 | #ifndef GPUCA_GPUCODE_DEVICE |
24 | 19 | #include <iostream> |
25 | 20 | #endif |
@@ -794,11 +789,11 @@ GPUd() auto TrackParametrizationWithError<value_T>::getPredictedChi2(const Track |
794 | 789 | // get chi2 wrt other track, which must be defined at the same parameters X,alpha |
795 | 790 | // Supplied non-initialized covToSet matrix is filled by inverse combined matrix for further use |
796 | 791 |
|
797 | | - if (gpu::CAMath::Abs(this->getAlpha() - rhs.getAlpha()) > FLT_EPSILON) { |
| 792 | + if (gpu::CAMath::Abs(this->getAlpha() - rhs.getAlpha()) > o2::constants::math::Epsilon) { |
798 | 793 | LOG(error) << "The reference Alpha of the tracks differ: " << this->getAlpha() << " : " << rhs.getAlpha(); |
799 | 794 | return 2.f * HugeF; |
800 | 795 | } |
801 | | - if (gpu::CAMath::Abs(this->getX() - rhs.getX()) > FLT_EPSILON) { |
| 796 | + if (gpu::CAMath::Abs(this->getX() - rhs.getX()) > o2::constants::math::Epsilon) { |
802 | 797 | LOG(error) << "The reference X of the tracks differ: " << this->getX() << " : " << rhs.getX(); |
803 | 798 | return 2.f * HugeF; |
804 | 799 | } |
@@ -827,11 +822,11 @@ GPUd() bool TrackParametrizationWithError<value_T>::update(const TrackParametriz |
827 | 822 | // update track with other track, the inverted combined cov matrix should be supplied |
828 | 823 |
|
829 | 824 | // consider skipping this check, since it is usually already done upstream |
830 | | - if (gpu::CAMath::Abs(this->getAlpha() - rhs.getAlpha()) > FLT_EPSILON) { |
| 825 | + if (gpu::CAMath::Abs(this->getAlpha() - rhs.getAlpha()) > o2::constants::math::Epsilon) { |
831 | 826 | LOG(error) << "The reference Alpha of the tracks differ: " << this->getAlpha() << " : " << rhs.getAlpha(); |
832 | 827 | return false; |
833 | 828 | } |
834 | | - if (gpu::CAMath::Abs(this->getX() - rhs.getX()) > FLT_EPSILON) { |
| 829 | + if (gpu::CAMath::Abs(this->getX() - rhs.getX()) > o2::constants::math::Epsilon) { |
835 | 830 | LOG(error) << "The reference X of the tracks differ: " << this->getX() << " : " << rhs.getX(); |
836 | 831 | return false; |
837 | 832 | } |
|
0 commit comments