ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::Ray< value_t, DIM > Class Template Reference

Class which models a ray. More...

#include <Acts/Utilities/Ray.hpp>

Inheritance diagram for Acts::Ray< value_t, DIM >:
[legend]

Public Types

using transform_type = Eigen::Transform<value_t, DIM, Eigen::Affine>
 Associated transform type.
using value_type = value_t
 Re expose the value type.
using vertex_array_type = Eigen::Array<value_t, DIM, 1>
 Vertex array type corresponding to the vertex type.
using VertexType = Eigen::Matrix<value_t, DIM, 1>
 Vertex type based on the value type and dimension.

Public Member Functions

 Ray (const VertexType &origin, const VertexType &dir)
 Constructor from an origin point and a direction.
const VertexTypedir () const
 Getter for the direction.
void draw (IVisualization3D &helper, value_type far_distance=10) const
 Helper to draw this ray using a given visualization helper.
const vertex_array_typeidir () const
 Getter for the element wise inverse of the direction.
const VertexTypeorigin () const
 Getter for the origin.
std::ostream & toStream (std::ostream &os) const
 Write information on this instance to an outstream.
Ray< value_t, DIM > transformed (const transform_type &trf) const
 Transforms this ray using a given transform and returns a new instance.

Detailed Description

template<typename value_t, std::size_t DIM>
class Acts::Ray< value_t, DIM >

Class which models a ray.

It is defined by a starting point and a direction.

Template Parameters
value_tThe floating point type to use
DIMThe number of dimensions in which this ray is defined (2 or 3)

Member Typedef Documentation

◆ transform_type

template<typename value_t, std::size_t DIM>
using Acts::Ray< value_t, DIM >::transform_type = Eigen::Transform<value_t, DIM, Eigen::Affine>

Associated transform type.

◆ value_type

template<typename value_t, std::size_t DIM>
using Acts::Ray< value_t, DIM >::value_type = value_t

Re expose the value type.

◆ vertex_array_type

template<typename value_t, std::size_t DIM>
using Acts::Ray< value_t, DIM >::vertex_array_type = Eigen::Array<value_t, DIM, 1>

Vertex array type corresponding to the vertex type.

◆ VertexType

template<typename value_t, std::size_t DIM>
using Acts::Ray< value_t, DIM >::VertexType = Eigen::Matrix<value_t, DIM, 1>

Vertex type based on the value type and dimension.

Constructor & Destructor Documentation

◆ Ray()

template<typename value_t, std::size_t DIM>
Acts::Ray< value_t, DIM >::Ray ( const VertexType & origin,
const VertexType & dir )

Constructor from an origin point and a direction.

Parameters
originThe origin of the ray
dirThe direction of the ray

Member Function Documentation

◆ dir()

template<typename value_t, std::size_t DIM>
const VertexType & Acts::Ray< value_t, DIM >::dir ( ) const

Getter for the direction.

Returns
The direction

◆ draw()

template<typename value_t, std::size_t DIM>
void Acts::Ray< value_t, DIM >::draw ( IVisualization3D & helper,
value_type far_distance = 10 ) const

Helper to draw this ray using a given visualization helper.

Parameters
helperThe visualization helper
far_distanceThe "length" of the drawn line representing the ray

◆ idir()

template<typename value_t, std::size_t DIM>
const vertex_array_type & Acts::Ray< value_t, DIM >::idir ( ) const

Getter for the element wise inverse of the direction.

Returns
The element wise inverse.

◆ origin()

template<typename value_t, std::size_t DIM>
const VertexType & Acts::Ray< value_t, DIM >::origin ( ) const

Getter for the origin.

Returns
The origin

◆ toStream()

template<typename value_t, std::size_t DIM>
std::ostream & Acts::Ray< value_t, DIM >::toStream ( std::ostream & os) const

Write information on this instance to an outstream.

Parameters
osThe out stream
Returns
The out stream given as an argument

◆ transformed()

template<typename value_t, std::size_t DIM>
Ray< value_t, DIM > Acts::Ray< value_t, DIM >::transformed ( const transform_type & trf) const

Transforms this ray using a given transform and returns a new instance.

Parameters
trfThe transform to apply
Returns
Copy of this ray with the transform applied