# File UnitVectors.hpp¶

namespace Acts

Note

This file is foreseen for the `Geometry` module to replace `Extent`

Functions

template<typename InputVector>
inline auto makeCurvilinearUnitU(const Eigen::MatrixBase<InputVector> &direction)

Construct the first curvilinear unit vector `U` for the given direction.

The special case of the direction vector pointing along the z-axis is handled by forcing the unit vector to along the x-axis.

Parameters

direction – is the input direction vector

Returns

a normalized vector in the x-y plane orthogonal to the direction.

template<typename InputVector>
inline auto makeCurvilinearUnitVectors(const Eigen::MatrixBase<InputVector> &direction)

Construct the curvilinear unit vectors `U` and `V` for the given direction.

With `T` the normalized input direction, the three vectors `U`, `V`, and `T` form an orthonormal basis set, i.e. they satisfy

```U x V = T
V x T = U
T x U = V
```

with the additional condition that `U` is located in the global x-y plane.

Parameters

direction – is the input direction vector

Returns

normalized unit vectors `U` and `V` orthogonal to the direction.

template<typename T>
inline Eigen::Matrix<T, 3, 1> makeDirectionUnitFromPhiEta(T phi, T eta)

Construct a normalized direction vector from phi angle and pseudorapidity.

Note

The input arguments intentionally use the same template type so that a compile error occurs if inconsistent input types are used. Avoids unexpected implicit type conversions and forces the user to explicitely cast mismatched input types.

Parameters
• phi – is the direction angle in the x-y plane.

• eta – is the pseudorapidity towards the z-axis.

template<typename T>
inline Eigen::Matrix<T, 3, 1> makeDirectionUnitFromPhiTheta(T phi, T theta)

Construct a normalized direction vector from phi and theta angle.

Note

The input arguments intentionally use the same template type so that a compile error occurs if inconsistent input types are used. Avoids unexpected implicit type conversions and forces the user to explicitely cast mismatched input types.

Parameters
• phi – is the direction angle in radian in the x-y plane.

• theta – is the polar angle in radian towards the z-axis.