Skip to content

Commit

Permalink
Fix floating point exception in Linux guntest (alisw#1445)
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 (@pzhristov)
  • Loading branch information
TimoWilken authored Nov 28, 2022
2 parents 8802234 + 1335f7c commit 13153a1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 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
13 changes: 9 additions & 4 deletions test/gun/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ aliroot -b -q sim.C 2>&1 | tee sim.log
mv syswatch.log simwatch.log
aliroot -b -q rec.C 2>&1 | tee rec.log
mv syswatch.log recwatch.log
aliroot -b -q ${ALICE_ROOT}/STEER/macros/CheckESD.C 2>&1 | tee check.log
aliroot -b -q aod.C 2>&1 | tee aod.log
if [ -n "$ALICE_PHYSICS" ]; then
# These macros need AliPhysics to work.
aliroot -b -q "$ALICE_ROOT/STEER/macros/CheckESD.C" 2>&1 | tee check.log
aliroot -b -q aod.C 2>&1 | tee aod.log
fi

cd recraw
ln -s ../raw.root
aliroot -b -q rec.C 2>&1 | tee rec.log
aliroot -b -q 2>&1 aod.C | tee aod.log

if [ -n "$ALICE_PHYSICS" ]; then
# This macro needs AliPhysics to work.
aliroot -b -q 2>&1 aod.C | tee aod.log
fi
10 changes: 8 additions & 2 deletions test/vmctest/gun/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ if [ "$RUNG3" = "1" ]; then
rm -rf *.root *.dat *.log fort* hlt hough raw* recraw/*.root recraw/*.log
aliroot -b -q sim.C\($NEVENTS,\""$G3CONFIG"\"\) 2>&1 | tee sim.log
aliroot -b -q rec.C 2>&1 | tee rec.log
aliroot -b -q ${ALICE_ROOT}/STEER/macros/CheckESD.C 2>&1 | tee check.log
if [ -n "$ALICE_PHYSICS" ]; then
# This macro needs AliPhysics to work.
aliroot -b -q "$ALICE_ROOT/STEER/macros/CheckESD.C" 2>&1 | tee check.log
fi
rm -fr $G3OUTDIR
mkdir $G3OUTDIR
mv *.root *.log GRP $G3OUTDIR
Expand All @@ -33,7 +36,10 @@ if [ "$RUNG4" = "1" ]; then
rm -rf *.root *.dat *.log fort* hlt hough raw* recraw/*.root recraw/*.log
aliroot -b -q simG4.C\($NEVENTS,\""$G4CONFIG"\"\) 2>&1 | tee sim.log
aliroot -b -q rec.C 2>&1 | tee rec.log
aliroot -b -q ${ALICE_ROOT}/STEER/macros/CheckESD.C 2>&1 | tee check.log
if [ -n "$ALICE_PHYSICS" ]; then
# This macro needs AliPhysics to work.
aliroot -b -q "$ALICE_ROOT/STEER/macros/CheckESD.C" 2>&1 | tee check.log
fi
rm -fr $G4OUTDIR
mkdir $G4OUTDIR
mv *.root *.log *.rndm GRP $G4OUTDIR
Expand Down

0 comments on commit 13153a1

Please sign in to comment.