acts-project / acts-project/acts

bug: navigation suggests `pathCorrection=inf` on cylinderSurface

未关闭
#3,267 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Bug Component - Core Stale
主要语言
C++
星标
131
派生
276
平均合并
3 天 13 小时
30 天内合并 PR
112

描述

## Issue
We might encounter a FPEDIV in the path correction of the cylinder surface. This could happen when we end up parallel to the cylinder.

https://github.com/acts-project/acts/blob/dc1a1d35f97d60d90a51ef3255501cf41b115bcd/Core/src/Surfaces/CylinderSurface.cpp#L164

## Stacktrace
```
15:26:16 Sequencer INFO -----------------------------------
15:26:16 Sequencer INFO FPE summary for Algorithm: TrackFittingAlgorithm
15:26:16 Sequencer INFO -----------------------------------
15:26:16 Sequencer INFO - FLTDIV: (3 times)
0# Acts::CylinderSurface::pathCorrection(Acts::ContextType const&, Eigen::Matrix const&, Eigen::Matrix const&) const at /builds/acts/ci-bridge/src/Core/src/Surfaces/CylinderSurface.cpp:174
1# Acts::Layer::compatibleSurfaces(Acts::ContextType const&, Eigen::Matrix const&, Eigen::Matrix const&, Acts::NavigationOptions const&) const at /builds/acts/ci-bridge/src/Core/src/Geometry/Layer.cpp:151
2# bool Acts::Navigator::resolveSurfaces, Acts::detail::VoidAuctioneer>, Acts::Navigator>::State, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Actor > >, Acts::AbortList, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Aborter >, Acts::PathLimitReached> >, Acts::Experimental::Gx2FitterResult >, Acts::EigenStepper, Acts::detail::VoidAuctioneer> >(Acts::Propagator, Acts::detail::VoidAuctioneer>, Acts::Navigator>::State, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Actor > >, Acts::AbortList, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Aborter >, Acts::PathLimitReached> >, Acts::Experimental::Gx2FitterResult >&, Acts::EigenStepper, Acts::detail::VoidAuctioneer> const&) const [clone .isra.0] at /builds/acts/ci-bridge/src/Core/include/Acts/Propagator/Navigator.hpp:1055
3# void Acts::Navigator::preStep, Acts::detail::VoidAuctioneer>, Acts::Navigator>::State, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Actor > >, Acts::AbortList, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Aborter >, Acts::PathLimitReached> >, Acts::Experimental::Gx2FitterResult >, Acts::EigenStepper, Acts::detail::VoidAuctioneer> >(Acts::Propagator, Acts::detail::VoidAuctioneer>, Acts::Navigator>::State, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Actor > >, Acts::AbortList, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Aborter >, Acts::PathLimitReached> >, Acts::Experimental::Gx2FitterResult >&, Acts::EigenStepper, Acts::detail::VoidAuctioneer> const&) const at /builds/acts/ci-bridge/src/Core/include/Acts/Propagator/Navigator.hpp:356
4# Acts::Result Acts::Propagator, Acts::detail::VoidAuctioneer>, Acts::Navigator>::propagate, Acts::detail::VoidAuctioneer>, Acts::Navigator>::State, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Actor > >, Acts::AbortList, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Aborter >, Acts::PathLimitReached> >, Acts::Experimental::Gx2FitterResult > >(Acts::Propagator, Acts::detail::VoidAuctioneer>, Acts::Navigator>::State, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Actor > >, Acts::AbortList, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::Aborter >, Acts::PathLimitReached> >, Acts::Experimental::Gx2FitterResult >&) const at /builds/acts/ci-bridge/src/Core/include/Acts/Propagator/Propagator.ipp:48
5# std::enable_if::TrackProxy, std::error_code> >::type Acts::Experimental::Gx2Fitter, Acts::detail::VoidAuctioneer>, Acts::Navigator>, Acts::VectorMultiTrajectory>::fit<__gnu_cxx::__normal_iterator > >, Acts::GenericBoundTrackParameters, Acts::GenericBoundTrackParameters, Acts::VectorTrackContainer, std::shared_ptr, false>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, Acts::GenericBoundTrackParameters const&, Acts::Experimental::Gx2FitterOptions const&, Acts::TrackContainer&) const at /builds/acts/ci-bridge/src/Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp:789
6# (anonymous namespace)::GlobalChiSquareFitterFunctionImpl::operator()(std::vector > const&, Acts::GenericBoundTrackParameters const&, ActsExamples::TrackFitterFunction::GeneralFitterOptions const&, ActsExamples::MeasurementCalibratorAdapter const&, Acts::TrackContainer&) const at /builds/acts/ci-bridge/src/Examples/Algorithms/TrackFitting/src/GlobalChiSquareFitterFunction.cpp:110
7# ActsExamples::TrackFittingAlgorithm::execute(ActsExamples::AlgorithmContext const&) const at /builds/acts/ci-bridge/src/Examples/Algorithms/TrackFitting/src/TrackFittingAlgorithm.cpp:148
```

## Reproduce
Running `truth_tracking_gx2f.py` with `2.5 < |eta| < 3.0` can result in the above behaviour. When it happens, the gx2f pushed the updated parameters so far, that the first encountered surface is `Pixels::Barrel` instead of `BeamPipe::Barrel`:
```
oldChi2sum = 153.944
chi2sum = 1184.32
13:26:57 Gx2fFitter DEBUG chi2 not converging monotonically
13:26:57 Gx2fFitter VERBOSE nUpdate = 4/17
13:26:57 Gx2fFitter VERBOSE updated params:
loc0: -31.48 +- 1 1.000
loc1: 10.62 +- 1 0.000 1.000
phi: -2.856 +- 0.01745 0.000 0.000 1.000
theta: 0.1068 +- 0.01745 0.000 0.000 0.000 1.000
q/p: 0.1268 +- 0.1 0.000 0.000 0.000 0.000 1.000
time: -239.7 +- 299.8 0.000 0.000 0.000 0.000 0.000 1.000
on surface undefined of type Acts::PerigeeSurface
13:26:57 Gx2fNavigato VERBOSE No Volume | Initialization.
13:26:57 Gx2fNavigato VERBOSE No Volume | Current surface set to start surface undefined
13:26:57 Gx2fNavigato VERBOSE No Volume | Slow start initialization through search.
13:26:57 Gx2fNavigato VERBOSE No Volume | Starting from position (-8.8604, 30.2046, 10.6162) and direction (-0.1023, -0.0300, 0.9943)
13:26:57 Gx2fNavigato VERBOSE No Volume | Start volume resolved.
13:26:57 Gx2fPropagat VERBOSE Path aborter limit set to 41316.4 (full helix = 82632.8, previous limit = 1.79769e+308)
13:26:57 Gx2fPropagat VERBOSE Entering propagation.
13:26:57 Gx2fFitterAc VERBOSE Surface undefined detected.
13:26:57 Gx2fFitterAc INFO Actor: This case is not implemented yet
13:26:57 Gx2fFitterAc DEBUG result.processedMeasurements: 0
inputMeasurements.size()13
13:26:57 Gx2fPropagat VERBOSE PathLimit aborter | Target stepSize (path limit) updated to ( +∞, +∞, 41316.4, +∞)
13:26:57 Gx2fPropagat VERBOSE Starting stepping loop.
13:26:57 Gx2fNavigato VERBOSE Pixels::Barrel | Entering navigator::preStep.
13:26:57 Gx2fNavigato VERBOSE Pixels::Barrel | Start layer to be resolved.
cosAlpha: 0
```
However, we can also find sometimes values, that are just close to zero:
```
oldChi2sum = 1184.32
chi2sum = 4.08138
13:26:57 Gx2fFitter VERBOSE nUpdate = 5/17
13:26:57 Gx2fFitter VERBOSE updated params:
loc0: -31.08 +- 1 1.000
loc1: 9.863 +- 1 0.000 1.000
phi: -2.859 +- 0.01745 0.000 0.000 1.000
theta: 0.1068 +- 0.01745 0.000 0.000 0.000 1.000
q/p: 0.1254 +- 0.1 0.000 0.000 0.000 0.000 1.000
time: -239.7 +- 299.8 0.000 0.000 0.000 0.000 0.000 1.000
on surface undefined of type Acts::PerigeeSurface
13:26:57 Gx2fNavigato VERBOSE No Volume | Initialization.
13:26:57 Gx2fNavigato VERBOSE No Volume | Current surface set to start surface undefined
13:26:57 Gx2fNavigato VERBOSE No Volume | Slow start initialization through search.
13:26:57 Gx2fNavigato VERBOSE No Volume | Starting from position (-8.6749, 29.8417, 9.8631) and direction (-0.1024, -0.0298, 0.9943)
13:26:57 Gx2fNavigato VERBOSE No Volume | Start volume resolved.
13:26:57 Gx2fPropagat VERBOSE Path aborter limit set to 41791.9 (full helix = 83583.9, previous limit = 1.79769e+308)
13:26:57 Gx2fPropagat VERBOSE Entering propagation.
13:26:57 Gx2fFitterAc VERBOSE Surface undefined detected.
13:26:57 Gx2fFitterAc INFO Actor: This case is not implemented yet
13:26:57 Gx2fFitterAc DEBUG result.processedMeasurements: 0
inputMeasurements.size()13
13:26:57 Gx2fPropagat VERBOSE PathLimit aborter | Target stepSize (path limit) updated to ( +∞, +∞, 41791.9, +∞)
13:26:57 Gx2fPropagat VERBOSE Starting stepping loop.
13:26:57 Gx2fNavigato VERBOSE Pixels::Barrel | Entering navigator::preStep.
13:26:57 Gx2fNavigato VERBOSE Pixels::Barrel | Start layer to be resolved.
cosAlpha: 3.46945e-18
```

## Solution
There have been a few attempts to solve this issue:
- https://github.com/acts-project/acts/pull/3254
- https://github.com/acts-project/acts/pull/3255

In the end, we decided not to treat the symptoms, but rather find the underlying issue.

Since it only occurred for the GX2F, this issue might solve itself during further development. However, I don't see it as the GX2F's responsible to check if the navigation will work with newly suggested parameters.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。