Skip to content

Commit

Permalink
Fix floating point exception in Linux guntest
Browse files Browse the repository at this point in the history
Since moving to `o2` defaults, the Linux CI check has been failing in
AliRoot-guntest with a floating point exception. Peter tracked this down to a
value `> 1.0` being passed to `asin` and provided this fix.

Written-by: Peter Hristov
  • Loading branch information
TimoWilken committed Nov 7, 2022
1 parent 5a967a5 commit 9cdb724
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ITS/ITSbase/AliITStrackerMI.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,10 @@ Int_t AliITStrackerMI::PropagateBack(AliESDEvent *event) {
dst2 = dxs*dxs + dys*dys;
double dxy = TMath::Sqrt(dst2), arg = crvh*dxy;
if (arg > kWatchStep) { // correct circular part for arc/segment factor
if (arg > 1.0) {
// Clamp "arg" to be <=1.0, to avoid errors from TMath::Asin below.
arg = 1.0;
}
double dst = 1./crvh*TMath::ASin(arg);
dst2 *= dst*dst;
}
Expand Down

0 comments on commit 9cdb724

Please sign in to comment.