ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::intersection2D< surface_t, algebra_t, has_pos > Class Template Reference

This class holds the intersection information. More...

#include <detray/navigation/intersection/intersection.hpp>

Inheritance diagram for detray::intersection2D< surface_t, algebra_t, has_pos >:
[legend]

Public Types

using algebra_type = algebra_t
 Algebra and memory-layout policy used by this intersection.
using nav_link_type = typename surface_type::navigation_link
 Link type used to identify the next volume.
using status_type
 Storage type for status values (numeric lanes for SoA layouts).
using surface_type = surface_t
 Surface descriptor associated with the intersection.

Public Member Functions

constexpr intersection2D ()=default
 Default constructor.
template<bool B = has_pos>
requires (!B)
constexpr intersection2D (const surface_type &sf, const scalar_type path, const nav_link_type nl, const dsimd< algebra_t, status_type > status, const bool_type dir)
 Fully parametrized constructor - contains no local position.
template<bool B = has_pos>
requires B
constexpr intersection2D (const surface_type &sf, const scalar_type path, const point3_type &local, const nav_link_type nl, const dsimd< algebra_t, status_type > status, const bool_type dir)
 Fully parametrized constructor - contains local position.
constexpr bool_type is_along () const
constexpr bool is_edge () const
constexpr bool is_inside () const
constexpr bool is_outside () const
constexpr bool is_probably_inside () const
template<bool B = has_pos>
requires B
constexpr point3_type local () const
constexpr scalar_type path () const
constexpr void set_direction (const bool_type dir)
 Set the direction to.
template<bool B = has_pos>
requires B
constexpr void set_local (const point3_type p)
 Set the intersection position to.
constexpr void set_path (scalar_type p)
 Set the path to.
constexpr void set_status (intersection::status s)
 Set the intersection status according to enum value s.
constexpr void set_status_if (intersection::status s, dbool< algebra_t > result_mask)
 Set the intersection status according to enum value s.
constexpr void set_surface (const surface_type sf)
 Set the surface for this intersection to.
constexpr void set_volume_link (const nav_link_type nl)
 Set the volume link to.
constexpr dsimd< algebra_t, status_type > status () const
constexpr surface_type & surface ()
constexpr surface_type surface () const
constexpr nav_link_type volume_link () const

Static Public Member Functions

static consteval bool contains_pos ()

Detailed Description

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
class detray::intersection2D< surface_t, algebra_t, has_pos >

This class holds the intersection information.

Template Parameters
surface_tis the type of surface descriptor
algebra_tlinear algebra and memory layout
has_poswhether the local position is saved or not

Member Typedef Documentation

◆ status_type

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
using detray::intersection2D< surface_t, algebra_t, has_pos >::status_type
Initial value:
std::conditional_t<concepts::soa<algebra_t>, T, intersection::status>

Storage type for status values (numeric lanes for SoA layouts).

Constructor & Destructor Documentation

◆ intersection2D() [1/2]

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
template<bool B = has_pos>
requires B
detray::intersection2D< surface_t, algebra_t, has_pos >::intersection2D ( const surface_type & sf,
const scalar_type path,
const point3_type & local,
const nav_link_type nl,
const dsimd< algebra_t, status_type > status,
const bool_type dir )
constexpr

Fully parametrized constructor - contains local position.

Parameters
sfIntersected surface descriptor.
pathSigned path length to the intersection.
localLocal position on the surface.
nlLink to the volume reached through the surface.
statusMask-containment status of the result.
dirWhether the intersection lies along the track direction.

◆ intersection2D() [2/2]

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
template<bool B = has_pos>
requires (!B)
detray::intersection2D< surface_t, algebra_t, has_pos >::intersection2D ( const surface_type & sf,
const scalar_type path,
const nav_link_type nl,
const dsimd< algebra_t, status_type > status,
const bool_type dir )
constexpr

Fully parametrized constructor - contains no local position.

Parameters
sfIntersected surface descriptor.
pathSigned path length to the intersection.
nlLink to the volume reached through the surface.
statusMask-containment status of the result.
dirWhether the intersection lies along the track direction.

Member Function Documentation

◆ contains_pos()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
consteval bool detray::intersection2D< surface_t, algebra_t, has_pos >::contains_pos ( )
staticconsteval
Returns
true if debug information needs to be filled

◆ is_along()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
bool_type detray::intersection2D< surface_t, algebra_t, has_pos >::is_along ( ) const
constexpr
Returns
the direction of the intersection (before or behind the track)

◆ is_edge()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
bool detray::intersection2D< surface_t, algebra_t, has_pos >::is_edge ( ) const
constexpr
Returns
true if any of the intersection results is 'edge'

◆ is_inside()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
bool detray::intersection2D< surface_t, algebra_t, has_pos >::is_inside ( ) const
constexpr
Returns
true if any of the intersection results is 'inside'

◆ is_outside()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
bool detray::intersection2D< surface_t, algebra_t, has_pos >::is_outside ( ) const
constexpr
Returns
true if all of the intersection results are 'outside'

◆ is_probably_inside()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
bool detray::intersection2D< surface_t, algebra_t, has_pos >::is_probably_inside ( ) const
constexpr
Returns
true if any of the intersection results is 'inside' or 'edge'

◆ local()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
template<bool B = has_pos>
requires B
point3_type detray::intersection2D< surface_t, algebra_t, has_pos >::local ( ) const
constexpr
Returns
the local 3D intersection point (only debug)

◆ path()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
scalar_type detray::intersection2D< surface_t, algebra_t, has_pos >::path ( ) const
constexpr
Returns
the distance of to the intersection point along the test traj.

◆ set_direction()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
void detray::intersection2D< surface_t, algebra_t, has_pos >::set_direction ( const bool_type dir)
constexpr

Set the direction to.

Parameters
dir

◆ set_local()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
template<bool B = has_pos>
requires B
void detray::intersection2D< surface_t, algebra_t, has_pos >::set_local ( const point3_type p)
constexpr

Set the intersection position to.

Parameters
p

◆ set_path()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
void detray::intersection2D< surface_t, algebra_t, has_pos >::set_path ( scalar_type p)
constexpr

Set the path to.

Parameters
p

◆ set_status()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
void detray::intersection2D< surface_t, algebra_t, has_pos >::set_status ( intersection::status s)
constexpr

Set the intersection status according to enum value s.

Parameters
sNew status to assign.

◆ set_status_if()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
void detray::intersection2D< surface_t, algebra_t, has_pos >::set_status_if ( intersection::status s,
dbool< algebra_t > result_mask )
constexpr

Set the intersection status according to enum value s.

Parameters
sNew status to assign.
result_maskLanes whose status should be updated.

◆ set_surface()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
void detray::intersection2D< surface_t, algebra_t, has_pos >::set_surface ( const surface_type sf)
constexpr

Set the surface for this intersection to.

Parameters
sf

◆ set_volume_link()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
void detray::intersection2D< surface_t, algebra_t, has_pos >::set_volume_link ( const nav_link_type nl)
constexpr

Set the volume link to.

Parameters
nl

◆ status()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
dsimd< algebra_t, status_type > detray::intersection2D< surface_t, algebra_t, has_pos >::status ( ) const
constexpr
Returns
the intersection status

◆ surface() [1/2]

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
surface_type & detray::intersection2D< surface_t, algebra_t, has_pos >::surface ( )
constexpr
Returns
the intersected surface - non-const

◆ surface() [2/2]

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
surface_type detray::intersection2D< surface_t, algebra_t, has_pos >::surface ( ) const
constexpr
Returns
the intersected surface

◆ volume_link()

template<typename surface_t, concepts::algebra algebra_t, bool has_pos = intersection::contains_pos>
nav_link_type detray::intersection2D< surface_t, algebra_t, has_pos >::volume_link ( ) const
constexpr
Returns
the link to the target volume to the navigator