Skip to content

Commit a6ba9f7

Browse files
committed
Fix CA cell hardCurvCut, to apply absolute value
1 parent 4b2c721 commit a6ba9f7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

RecoTracker/PixelSeeding/plugins/GPUCACell.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class GPUCACellT {
208208

209209
CircleEq<float> eq(x1, y1, x2, y2, x3, y3);
210210

211-
if (eq.curvature() > maxCurv)
211+
if (std::abs(eq.curvature()) > maxCurv)
212212
return false;
213213

214214
return std::abs(eq.dca0()) < region_origin_radius_plus_tolerance * std::abs(eq.curvature());
@@ -224,7 +224,7 @@ class GPUCACellT {
224224
const float maxCurv) {
225225
CircleEq<float> eq(x1, y1, x2, y2, x3, y3);
226226

227-
if (eq.curvature() > maxCurv)
227+
if (std::abs(eq.curvature()) > maxCurv)
228228
return false;
229229

230230
return std::abs(eq.dca0()) < region_origin_radius_plus_tolerance * std::abs(eq.curvature());

RecoTracker/PixelSeeding/plugins/alpaka/CACell.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
213213

214214
CircleEq<float> eq(x1, y1, x2, y2, x3, y3);
215215

216-
if (eq.curvature() > maxCurv)
216+
if (std::abs(eq.curvature()) > maxCurv)
217217
return false;
218218

219219
return std::abs(eq.dca0()) < region_origin_radius_plus_tolerance * std::abs(eq.curvature());
@@ -230,7 +230,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
230230
const float maxCurv) {
231231
CircleEq<float> eq(x1, y1, x2, y2, x3, y3);
232232

233-
if (eq.curvature() > maxCurv)
233+
if (std::abs(eq.curvature()) > maxCurv)
234234
return false;
235235

236236
return std::abs(eq.dca0()) < region_origin_radius_plus_tolerance * std::abs(eq.curvature());

0 commit comments

Comments
 (0)