ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::AngleHelpers Namespace Reference

Classes

struct  EtaThetaConversionTraits
struct  EtaThetaConversionTraits< double >
struct  EtaThetaConversionTraits< float >

Functions

template<typename Scalar>
Scalar etaFromTheta (Scalar theta)
 Calculate the pseudorapidity from the polar angle theta.
template<typename Scalar>
Scalar thetaFromEta (Scalar eta)
 Calculate the polar angle theta from the pseudorapidity.

Function Documentation

◆ etaFromTheta()

template<typename Scalar>
Scalar Acts::AngleHelpers::etaFromTheta ( Scalar theta)

Calculate the pseudorapidity from the polar angle theta.

This function aims to be FPE safe and returns infinity for theta values outside the floating point precision range.

Parameters
thetais the polar angle in radian towards the z-axis.
Returns
the pseudorapidity towards the z-axis.

◆ thetaFromEta()

template<typename Scalar>
Scalar Acts::AngleHelpers::thetaFromEta ( Scalar eta)

Calculate the polar angle theta from the pseudorapidity.

This function aims to be FPE safe and returns 0/pi for eta values outside the floating point precision range.

Parameters
etais the pseudorapidity towards the z-axis.
Returns
the polar angle in radian towards the z-axis.