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

Container for up to two intersections in a given dimension. More...

#include <Acts/Utilities/Intersection.hpp>

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

Public Types

using Container
 Container type for storing intersections.
using IndexedIntersection = std::pair<IntersectionType, IntersectionIndex>
 Pair of intersection and its index.
using IntersectionType = Intersection<DIM>
 Intersection type for this dimension.
using size_type = IntersectionIndex
 Size type for indexing.

Public Member Functions

constexpr MultiIntersection (const IntersectionType &intersection) noexcept
 Construct from single intersection.
constexpr MultiIntersection (const IntersectionType &intersection1, const IntersectionType &intersection2) noexcept
 Construct from two intersections.
constexpr MultiIntersection (const MultiIntersection &) noexcept=default
 Copy constructor.
constexpr MultiIntersection (MultiIntersection &&) noexcept=default
 Move constructor.
constexpr const IntersectionTypeat (IntersectionIndex index) const
 Access intersection at index with bounds checking.
constexpr auto begin () const noexcept
 Get begin iterator.
constexpr IntersectionType closest () const noexcept
 Get closest intersection.
constexpr IntersectionType closestForward () const noexcept
 Get closest forward intersection.
constexpr IndexedIntersection closestForwardWithIndex () const noexcept
 Get closest forward intersection with its index.
constexpr IndexedIntersection closestWithIndex () const noexcept
 Get closest intersection with its index.
constexpr auto end () const noexcept
 Get end iterator.
constexpr MultiIntersectionoperator= (const MultiIntersection &) noexcept=default
 Copy assignment operator.
constexpr MultiIntersectionoperator= (MultiIntersection &&) noexcept=default
 Move assignment operator.
constexpr const IntersectionTypeoperator[] (IntersectionIndex index) const
 Access intersection by index.
constexpr IntersectionIndex size () const noexcept
 Get the number of intersections.

Detailed Description

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

Container for up to two intersections in a given dimension.

Member Typedef Documentation

◆ Container

template<unsigned int DIM>
using Acts::MultiIntersection< DIM >::Container
Initial value:
std::array<IntersectionType, s_maximumNumberOfIntersections>

Container type for storing intersections.

Constructor & Destructor Documentation

◆ MultiIntersection() [1/2]

template<unsigned int DIM>
Acts::MultiIntersection< DIM >::MultiIntersection ( const IntersectionType & intersection)
explicitconstexprnoexcept

Construct from single intersection.

Parameters
intersectionThe intersection

◆ MultiIntersection() [2/2]

template<unsigned int DIM>
Acts::MultiIntersection< DIM >::MultiIntersection ( const IntersectionType & intersection1,
const IntersectionType & intersection2 )
constexprnoexcept

Construct from two intersections.

Parameters
intersection1The first intersection
intersection2The second intersection

Member Function Documentation

◆ at()

template<unsigned int DIM>
const IntersectionType & Acts::MultiIntersection< DIM >::at ( IntersectionIndex index) const
constexpr

Access intersection at index with bounds checking.

Parameters
indexThe index of the intersection
Returns
Reference to the intersection

◆ begin()

template<unsigned int DIM>
auto Acts::MultiIntersection< DIM >::begin ( ) const
constexprnoexcept

Get begin iterator.

Returns
Iterator to the beginning

◆ closest()

template<unsigned int DIM>
IntersectionType Acts::MultiIntersection< DIM >::closest ( ) const
constexprnoexcept

Get closest intersection.

Returns
The closest intersection

◆ closestForward()

template<unsigned int DIM>
IntersectionType Acts::MultiIntersection< DIM >::closestForward ( ) const
constexprnoexcept

Get closest forward intersection.

Returns
The closest forward intersection

◆ closestForwardWithIndex()

template<unsigned int DIM>
IndexedIntersection Acts::MultiIntersection< DIM >::closestForwardWithIndex ( ) const
constexprnoexcept

Get closest forward intersection with its index.

Returns
Pair of intersection and its index

◆ closestWithIndex()

template<unsigned int DIM>
IndexedIntersection Acts::MultiIntersection< DIM >::closestWithIndex ( ) const
constexprnoexcept

Get closest intersection with its index.

Returns
Pair of intersection and its index

◆ end()

template<unsigned int DIM>
auto Acts::MultiIntersection< DIM >::end ( ) const
constexprnoexcept

Get end iterator.

Returns
Iterator to the end

◆ operator=() [1/2]

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

Copy assignment operator.

Returns
Reference to this object

◆ operator=() [2/2]

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

Move assignment operator.

Returns
Reference to this object

◆ operator[]()

template<unsigned int DIM>
const IntersectionType & Acts::MultiIntersection< DIM >::operator[] ( IntersectionIndex index) const
constexpr

Access intersection by index.

Parameters
indexThe index of the intersection
Returns
Reference to the intersection

◆ size()

template<unsigned int DIM>
IntersectionIndex Acts::MultiIntersection< DIM >::size ( ) const
constexprnoexcept

Get the number of intersections.

Returns
The number of intersections