Skip to content

Commit

Permalink
fix: Track parameter estimation might give inf time (#2353)
Browse files Browse the repository at this point in the history
This popped up as a persistent test failure on macOS, but apparently not anywhere else. I think if we have estimated parameters here without a z component, the time calculated is inf. There's already a fallback caldulation in case the path length along z is 0, which I think we can reuse.
  • Loading branch information
paulgessinger authored Aug 8, 2023
1 parent f651d07 commit 10b40b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/include/Acts/Seeding/EstimateTrackParamsFromSeed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ std::optional<BoundVector> estimateTrackParamsFromSeed(
ActsScalar pathz = spGlobalPositions[0].dot(bField) / bField.norm();
// The estimated time (use path length along magnetic field only if it's not
// zero)
if (pathz != 0) {
if (pathz != 0 && vz != 0) {
params[eBoundTime] = pathz / vz;
} else {
params[eBoundTime] = spGlobalPositions[0].norm() / v;
Expand Down

0 comments on commit 10b40b7

Please sign in to comment.