ROOT   6.08/07 Reference Guide
ROOT::Math::Impl Namespace Reference

Functions

template<typename Scalar >
Scalar Eta_FromRhoZ (Scalar rho, Scalar z)
Calculate eta given rho and zeta. More...

template<typename Scalar >
Scalar Eta_FromTheta (Scalar theta, Scalar r)
Implementation of eta from -log(tan(theta/2)). More...

◆ Eta_FromRhoZ()

template<typename Scalar >
 Scalar ROOT::Math::Impl::Eta_FromRhoZ ( Scalar rho, Scalar z )
inline

Calculate eta given rho and zeta.

This formula is faster than the standard calculation (below) from log(tan(theta/2) but one has to be careful when rho is much smaller than z (large eta values) Formula is eta = log( zs + sqrt(zs^2 + 1) ) where zs = z/rho

For large value of z_scaled (tan(theta) ) one can appoximate the sqrt via a Taylor expansion We do the approximation of the sqrt if the numerical error is of the same order of second term of the sqrt.expansion: eps > 1/zs^4 => zs > 1/(eps^0.25)

When rho == 0 we use etaMax (see definition in etaMax.h)

Definition at line 50 of file eta.h.

◆ Eta_FromTheta()

template<typename Scalar >
 Scalar ROOT::Math::Impl::Eta_FromTheta ( Scalar theta, Scalar r )
inline

Implementation of eta from -log(tan(theta/2)).

This is convenient when theta is already known (for example in a polar coorindate system)

Definition at line 84 of file eta.h.