I am working on some problems involving foliations and group actions and would be very nice to consider the second derivatives for the distance function of an orbit or a leaf.

So my question is: does anyone know a reference or an easy way to compute the hessian tensor associated to the function:

$d : M \to \mathbb{R}$, where $d(p) := \mathrm{dist}(p,L),$ where $L$ is a Riemannian sub manifold of the Riemannian manifold $M$.

Further, in the case $L$ is an orbit (possibly singular) of a Lie group acting on $M$, does the formula become easier to compute?

I ve done some research and on Petersen's book the only formulae I could find was about distance from a point, not a general sub manifold.

Thank you very much