Skip to content

Commit

Permalink
Cherrypick (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianKlimpel committed Feb 3, 2021
1 parent 6ab9d48 commit fa69ac0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Core/include/Acts/Propagator/EigenStepper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class EigenStepper {
///
/// @param state [in] The stepping state (thread-local cache)
double momentum(const State& state) const {
return std::abs(state.q / state.pars[eFreeQOverP]);
return std::abs((state.q == 0. ? 1. : state.q) / state.pars[eFreeQOverP]);
}

/// Charge access
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Propagator/StraightLineStepper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class StraightLineStepper {
///
/// @param state [in] The stepping state (thread-local cache)
double momentum(const State& state) const {
return std::abs(state.q / state.pars[eFreeQOverP]);
return std::abs((state.q == 0. ? 1. : state.q) / state.pars[eFreeQOverP]);
}

/// Charge access
Expand Down

0 comments on commit fa69ac0

Please sign in to comment.