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

Intersection struct containing the position, path length and status of an intersection. More...

#include <Acts/Utilities/Intersection.hpp>

Inheritance diagram for Acts::Intersection< DIM >:
[legend]

Public Types

using Position = Eigen::Map<const ActsVector<DIM>>
 Position type.

Public Member Functions

constexpr Intersection (const ActsVector< DIM > &position, double pathLength, IntersectionStatus status) noexcept
 Constructor with arguments.
constexpr Intersection (const Intersection &) noexcept=default
 Copy constructor.
constexpr Intersection (const Position &position, double pathLength, IntersectionStatus status) noexcept
 Constructor from position vector, path length, and status.
constexpr Intersection (Intersection &&) noexcept=default
 Move constructor.
constexpr Intersection (std::span< const double, DIM > position, double pathLength, IntersectionStatus status) noexcept
 Constructor from position span, path length, and status.
constexpr bool isValid () const noexcept
 Returns whether the intersection was successful or not.
constexpr Intersectionoperator= (const Intersection &) noexcept=default
 Copy assignment operator.
constexpr Intersectionoperator= (Intersection &&) noexcept=default
 Move assignment operator.
constexpr double pathLength () const noexcept
 Returns the path length to the intersection.
Position position () const noexcept
 Returns the position of the interseciton.
constexpr IntersectionStatus status () const noexcept
 Returns the intersection status enum.

Static Public Member Functions

static constexpr bool closestForwardOrder (const Intersection &aIntersection, const Intersection &bIntersection) noexcept
 Comparison function for closest forward order i.e.
static constexpr bool closestOrder (const Intersection &aIntersection, const Intersection &bIntersection) noexcept
 Comparison function for closest order i.e.
static constexpr Intersection Invalid () noexcept
 Static factory to create an invalid intersection.
static constexpr bool pathLengthOrder (const Intersection &aIntersection, const Intersection &bIntersection) noexcept
 Comparison function for path length order i.e.

Detailed Description

template<unsigned int DIM>
class Acts::Intersection< DIM >

Intersection struct containing the position, path length and status of an intersection.

Member Typedef Documentation

◆ Position

template<unsigned int DIM>
using Acts::Intersection< DIM >::Position = Eigen::Map<const ActsVector<DIM>>

Position type.

Constructor & Destructor Documentation

◆ Intersection() [1/5]

template<unsigned int DIM>
Acts::Intersection< DIM >::Intersection ( const ActsVector< DIM > & position,
double pathLength,
IntersectionStatus status )
constexprnoexcept

Constructor with arguments.

Parameters
positionis the position of the intersection
pathLengthis the path length to the intersection
statusis an enum indicating the status of the intersection

◆ Intersection() [2/5]

template<unsigned int DIM>
Acts::Intersection< DIM >::Intersection ( const Position & position,
double pathLength,
IntersectionStatus status )
constexprnoexcept

Constructor from position vector, path length, and status.

Parameters
positionThe intersection position
pathLengthThe path length to the intersection
statusThe intersection status

◆ Intersection() [3/5]

template<unsigned int DIM>
Acts::Intersection< DIM >::Intersection ( std::span< const double, DIM > position,
double pathLength,
IntersectionStatus status )
constexprnoexcept

Constructor from position span, path length, and status.

Parameters
positionSpan of position coordinates
pathLengthThe path length to the intersection
statusThe intersection status

◆ Intersection() [4/5]

template<unsigned int DIM>
Acts::Intersection< DIM >::Intersection ( const Intersection< DIM > & )
constexprdefaultnoexcept

Copy constructor.

◆ Intersection() [5/5]

template<unsigned int DIM>
Acts::Intersection< DIM >::Intersection ( Intersection< DIM > && )
constexprdefaultnoexcept

Move constructor.

Member Function Documentation

◆ closestForwardOrder()

template<unsigned int DIM>
constexpr bool Acts::Intersection< DIM >::closestForwardOrder ( const Intersection< DIM > & aIntersection,
const Intersection< DIM > & bIntersection )
staticconstexprnoexcept

Comparison function for closest forward order i.e.

intersection closest to 0 with positive path length will be first.

Parameters
aIntersectionFirst intersection to compare
bIntersectionSecond intersection to compare
Returns
True if first intersection is closer to zero with preference for forward direction

◆ closestOrder()

template<unsigned int DIM>
constexpr bool Acts::Intersection< DIM >::closestOrder ( const Intersection< DIM > & aIntersection,
const Intersection< DIM > & bIntersection )
staticconstexprnoexcept

Comparison function for closest order i.e.

intersection closest to 0 will be first.

Parameters
aIntersectionFirst intersection to compare
bIntersectionSecond intersection to compare
Returns
True if first intersection is closer to zero path length than second

◆ Invalid()

template<unsigned int DIM>
constexpr Intersection Acts::Intersection< DIM >::Invalid ( )
staticconstexprnoexcept

Static factory to create an invalid intersection.

Returns
Invalid intersection with unreachable status

◆ isValid()

template<unsigned int DIM>
bool Acts::Intersection< DIM >::isValid ( ) const
constexprnoexcept

Returns whether the intersection was successful or not.

Returns
True if intersection is reachable or on surface, false if unreachable

◆ operator=() [1/2]

template<unsigned int DIM>
Intersection & Acts::Intersection< DIM >::operator= ( const Intersection< DIM > & )
constexprdefaultnoexcept

Copy assignment operator.

Returns
Reference to this intersection for chaining

◆ operator=() [2/2]

template<unsigned int DIM>
Intersection & Acts::Intersection< DIM >::operator= ( Intersection< DIM > && )
constexprdefaultnoexcept

Move assignment operator.

Returns
Reference to this intersection for chaining

◆ pathLength()

template<unsigned int DIM>
double Acts::Intersection< DIM >::pathLength ( ) const
constexprnoexcept

Returns the path length to the intersection.

Returns
Signed path length from origin to intersection point

◆ pathLengthOrder()

template<unsigned int DIM>
constexpr bool Acts::Intersection< DIM >::pathLengthOrder ( const Intersection< DIM > & aIntersection,
const Intersection< DIM > & bIntersection )
staticconstexprnoexcept

Comparison function for path length order i.e.

intersection closest to -inf will be first.

Parameters
aIntersectionFirst intersection to compare
bIntersectionSecond intersection to compare
Returns
True if first intersection has smaller path length than second

◆ position()

template<unsigned int DIM>
Position Acts::Intersection< DIM >::position ( ) const
noexcept

Returns the position of the interseciton.

Returns
Position vector of the intersection point

◆ status()

template<unsigned int DIM>
IntersectionStatus Acts::Intersection< DIM >::status ( ) const
constexprnoexcept

Returns the intersection status enum.

Returns
Status indicating if intersection is unreachable, reachable, or on surface