1
1
/* * TRACCC library, part of the ACTS project (R&D line)
2
2
*
3
- * (c) 2022 CERN for the benefit of the ACTS project
3
+ * (c) 2022-2024 CERN for the benefit of the ACTS project
4
4
*
5
5
* Mozilla Public License Version 2.0
6
6
*/
7
7
8
8
#pragma once
9
9
10
10
// Project include(s).
11
+ #include " traccc/definitions/math.hpp"
11
12
#include " traccc/definitions/primitives.hpp"
12
13
#include " traccc/definitions/qualifiers.hpp"
13
14
#include " traccc/definitions/track_parametrization.hpp"
@@ -62,7 +63,7 @@ TRACCC_HOST_DEVICE inline bool operator<(const measurement& lhs,
62
63
63
64
if (lhs.surface_link != rhs.surface_link ) {
64
65
return lhs.surface_link < rhs.surface_link ;
65
- } else if (std::abs (lhs.local [0 ] - rhs.local [0 ]) > float_epsilon) {
66
+ } else if (math::fabs (lhs.local [0 ] - rhs.local [0 ]) > float_epsilon) {
66
67
return (lhs.local [0 ] < rhs.local [0 ]);
67
68
} else {
68
69
return (lhs.local [1 ] < rhs.local [1 ]);
@@ -74,10 +75,10 @@ TRACCC_HOST_DEVICE
74
75
inline bool operator ==(const measurement& lhs, const measurement& rhs) {
75
76
76
77
return ((lhs.surface_link == rhs.surface_link ) &&
77
- (std::abs (lhs.local [0 ] - rhs.local [0 ]) < float_epsilon) &&
78
- (std::abs (lhs.local [1 ] - rhs.local [1 ]) < float_epsilon) &&
79
- (std::abs (lhs.variance [0 ] - rhs.variance [0 ]) < float_epsilon) &&
80
- (std::abs (lhs.variance [1 ] - rhs.variance [1 ]) < float_epsilon));
78
+ (math::fabs (lhs.local [0 ] - rhs.local [0 ]) < float_epsilon) &&
79
+ (math::fabs (lhs.local [1 ] - rhs.local [1 ]) < float_epsilon) &&
80
+ (math::fabs (lhs.variance [0 ] - rhs.variance [0 ]) < float_epsilon) &&
81
+ (math::fabs (lhs.variance [1 ] - rhs.variance [1 ]) < float_epsilon));
81
82
}
82
83
83
84
// / Comparator based on detray barcode value
0 commit comments