Skip to content

ATLASRECTS-6353, ATLASRECTS-6355 : FPE due to TMath::Acos changes in ROOT 6.24

ATLASRECTS-6353, ATLASRECTS-6355 : TMath::Acos changed in ROOT 6.24 so does not offer protection when x is outside [-1,1].

i.e

https://root.cern.ch/doc/v624/TMath_8h_source.html

////////////////////////////////////////////////////////////////////////////////
 inline Double_t TMath::ACos(Double_t x)
    { 
      return acos(x);
    }

vis a vis https://root.cern.ch/doc/v622/TMath_8h_source.html

////////////////////////////////////////////////////////////////////////////////
 inline Double_t TMath::ACos(Double_t x)
    { if (x < -1.) return TMath::Pi();
      if (x >  1.) return 0;
      return acos(x);
    }

Trk2dDistanceSeeded depended on this , so create an internal function doing the same as TMath::Acos in ROOT 6.22.

At large tidy up the anonymous namespace having the speacial functions for this code and avoid depending on TMath as far as we can given this later change and issues caused

Edited by Christos Anastopoulos

Merge request reports