From 1cd6a542c5596a0858f233739f5025c964a7c44d Mon Sep 17 00:00:00 2001 From: beomki-yeo Date: Thu, 22 Feb 2024 13:51:05 +0100 Subject: [PATCH] Fix --- Core/include/Acts/Seeding/EstimateTrackParamsFromSeed.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/include/Acts/Seeding/EstimateTrackParamsFromSeed.hpp b/Core/include/Acts/Seeding/EstimateTrackParamsFromSeed.hpp index 6a8ca885f37..b87798ad843 100644 --- a/Core/include/Acts/Seeding/EstimateTrackParamsFromSeed.hpp +++ b/Core/include/Acts/Seeding/EstimateTrackParamsFromSeed.hpp @@ -235,9 +235,10 @@ std::optional estimateTrackParamsFromSeed( // the line passes through P = (0.5 * (x2 + x1), 0.5 * y2) ActsScalar b = 0.5 * (local2(1) + 1. / a * sumX21); circleCenter(1) = -1. / a * circleCenter(0) + b; - // Radius is distance between circleCenter and first sp, which is at (0, 0) in - // the new frame - const ActsScalar R = circleCenter.norm(); + // Radius is a signed distance between circleCenter and first sp, which is at + // (0, 0) in the new frame. Sign depends on the slope a (positive vs negative) + int sign = a > 0 ? -1 : 1; + const ActsScalar R = a * circleCenter.norm(); ActsScalar invTanTheta = local2.z() / (2.f * R * std::asin(std::hypot(local2.x(), local2.y()) / 2.f * R));