Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make track param estimation more accurate #684

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions core/include/traccc/seeding/track_params_estimation_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,16 @@ inline TRACCC_HOST_DEVICE bound_vector seed_to_bound_vector(
scalar A = (uv2[1] - uv1[1]) / (uv2[0] - uv1[0]);
scalar B = uv2[1] - A * uv2[0];

// Curvature (with a sign) estimate
scalar rho = -2.0f * B / getter::perp(vector2{1., A});
// The projection of the top space point on the transverse plane of
// the new frame
scalar rn = local2[0] * local2[0] + local2[1] * local2[1];
// Radius (with a sign)
scalar R = -getter::perp(vector2{1.f, A}) / (2.f * B);
// The (1/tanTheta) of momentum in the new frame
static constexpr scalar G = static_cast<scalar>(1.f / 24.f);
scalar invTanTheta =
local2[2] * std::sqrt(1.f / rn) / (1.f + G * rho * rho * rn);
local2[2] / (2.f * R * math::asin(getter::perp(local2) / (2.f * R)));

// The momentum direction in the new frame (the center of the circle
// has the coordinate (-1.*A/(2*B), 1./(2*B)))
vector3 transDirection =
vector3({1., A, scalar(getter::perp(vector2{1., A})) * invTanTheta});
vector3({1.f, A, scalar(getter::perp(vector2{1.f, A})) * invTanTheta});
// Transform it back to the original frame
vector3 direction =
transform3::rotate(trans._data, vector::normalize(transDirection));
Expand All @@ -111,7 +107,7 @@ inline TRACCC_HOST_DEVICE bound_vector seed_to_bound_vector(

// The estimated q/pt in [GeV/c]^-1 (note that the pt is the
// projection of momentum on the transverse plane of the new frame)
scalar qOverPt = rho / getter::norm(bfield);
scalar qOverPt = 1.f / (R * getter::norm(bfield));
// The estimated q/p in [GeV/c]^-1
getter::element(params, e_bound_qoverp, 0) =
qOverPt / getter::perp(vector2{1., invTanTheta});
Expand Down
Loading