![]() |
ROOT 6.08/07 Reference Guide |
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... | |
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)