Use numerically stable computation of invariant mass
I discovered a numerically stable way to compute the invariant mass. The solution is documented here.
@mkenzie helped me to check whether ROOT or DecayTreeTuple (aka FunTuple) use a numerically stable calculation, but according to our understanding of the code they do not. We usually get around the issue somewhat by calculating the invariant mass in double precision, but even then it is possible to get wrong results for large momenta and small masses. The numerically stable calculation works in single precision and retains full accuracy. It would be great to integrate this into DecayTreeTuple or FunTuple.