ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::unit_vectors< vector3_t > Struct Template Reference

Build the curvilinear unit basis perpendicular to a three-dimensional direction. More...

#include <detray/utils/unit_vectors.hpp>

Inheritance diagram for detray::unit_vectors< vector3_t >:
[legend]

Public Member Functions

vector3_t make_curvilinear_unit_u (const vector3_t &dir)
 Construct the first curvilinear unit vector U for the given direction.
darray< vector3_t, 2 > make_curvilinear_unit_vectors (const vector3_t &dir)
 Construct the curvilinear unit vectors U and V for the given direction.

Detailed Description

template<concepts::vector3D vector3_t>
struct detray::unit_vectors< vector3_t >

Build the curvilinear unit basis perpendicular to a three-dimensional direction.

Template Parameters
vector3_tthree-dimensional vector representation

Member Function Documentation

◆ make_curvilinear_unit_u()

template<concepts::vector3D vector3_t>
vector3_t detray::unit_vectors< vector3_t >::make_curvilinear_unit_u ( const vector3_t & dir)

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

Parameters
diris the input direction vector
Returns
a normalized vector in the x-y plane orthogonal to the 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.

◆ make_curvilinear_unit_vectors()

template<concepts::vector3D vector3_t>
darray< vector3_t, 2 > detray::unit_vectors< vector3_t >::make_curvilinear_unit_vectors ( const vector3_t & dir)

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

Parameters
diris the input direction vector
Returns
normalized unit vectors U and V orthogonal to the 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.