ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::intersector< shape_t, algebra_t, resolve_pos > Struct Template Reference

Intersection interface for detector surfaces. More...

#include <detray/navigation/intersector.hpp>

Public Types

using algebra_type = algebra_t
 Algebra policy used by the intersection calculations.
using helix_intersector_type = helix_intersector<shape_t, algebra_t>
 How to intersect surfaces with helices.
using ray_intersector_type = ray_intersector<shape_t, algebra_t, resolve_pos>
 How to intersect surfaces with rays.
using result_type = typename helix_intersector_type::result_type
 Common result representation, which accommodates helix error estimates.
using scalar_type = dscalar<algebra_t>
 Scalar type associated with the algebra policy.
using transform3_type = dtransform3D<algebra_t>
 Transform type used to place surfaces in 3D.

Public Member Functions

template<typename surface_descr_t, typename mask_t>
decltype(auto) operator() (const detail::helix< algebra_t > &h, const surface_descr_t &sf, const mask_t &mask, const transform3_type &trf, const intersection::config &cfg={}, const scalar_type=0.f) const
 Resolve a helix intersection against the surface mask.
template<typename surface_descr_t, typename mask_t>
decltype(auto) operator() (const detail::ray< algebra_t > &ray, const surface_descr_t &sf, const mask_t &mask, const transform3_type &trf, const intersection::config &cfg={}, const scalar_type external_mask_tol=0.f) const
 Resolve a ray intersection against the surface mask.
template<typename S = shape_t>
requires (!concepts::cylindrical_shape<S, algebra_type>)
constexpr result_type point_of_intersection (const detail::ray< algebra_t > &ray, const transform3_type &trf, const scalar_type overstep_tol=0.f) const
 Operator function to find intersections between ray and planar mask.
template<typename mask_t, typename S = shape_t>
requires concepts::cylindrical_shape<S, algebra_type>
constexpr result_type point_of_intersection (const detail::ray< algebra_t > &ray, const transform3_type &trf, const mask_t &mask, const scalar_type overstep_tol=0.f) const
 Intersect a ray with a cylindrical surface using its radius mask.
template<typename S = shape_t>
requires (!concepts::cylindrical_shape<S, algebra_type>)
constexpr result_type point_of_intersection (const detail::helix< algebra_t > &h, const transform3_type &trf, const scalar_type=0.f) const
 Intersect a helix with a planar or line surface.
template<typename mask_t, typename S = shape_t>
requires concepts::cylindrical_shape<S, algebra_type>
constexpr result_type point_of_intersection (const detail::helix< algebra_t > &h, const transform3_type &trf, const mask_t &mask, const scalar_type=0.f) const
 Intersect a helix with a cylindrical surface using its radius mask.

Static Public Attributes

static constexpr std::uint8_t n_solutions
 Largest number of solutions produced by either trajectory intersector.

Detailed Description

template<typename shape_t, concepts::algebra algebra_t, bool resolve_pos = false>
struct detray::intersector< shape_t, algebra_t, resolve_pos >

Intersection interface for detector surfaces.

Composes the different intersector options into a unifyed interface

Member Function Documentation

◆ operator()() [1/2]

template<typename shape_t, concepts::algebra algebra_t, bool resolve_pos = false>
template<typename surface_descr_t, typename mask_t>
decltype(auto) detray::intersector< shape_t, algebra_t, resolve_pos >::operator() ( const detail::helix< algebra_t > & h,
const surface_descr_t & sf,
const mask_t & mask,
const transform3_type & trf,
const intersection::config & cfg = {},
const scalar_type = 0.f ) const

Resolve a helix intersection against the surface mask.

Parameters
hHelical trajectory to test.
sfSurface descriptor associated with the mask.
maskMask defining the surface extent.
trfTransform placing the surface in global coordinates.
cfgTolerances and path cutoff for resolving the result.
Returns
the intersection(s) between a surface and the helix h

◆ operator()() [2/2]

template<typename shape_t, concepts::algebra algebra_t, bool resolve_pos = false>
template<typename surface_descr_t, typename mask_t>
decltype(auto) detray::intersector< shape_t, algebra_t, resolve_pos >::operator() ( const detail::ray< algebra_t > & ray,
const surface_descr_t & sf,
const mask_t & mask,
const transform3_type & trf,
const intersection::config & cfg = {},
const scalar_type external_mask_tol = 0.f ) const

Resolve a ray intersection against the surface mask.

Parameters
rayStraight trajectory to test.
sfSurface descriptor associated with the mask.
maskMask defining the surface extent.
trfTransform placing the surface in global coordinates.
cfgTolerances and path cutoff for resolving the result.
external_mask_tolAdditional tolerance applied at the mask boundary.
Returns
the intersection(s) between a surface and the ray ray

◆ point_of_intersection() [1/4]

template<typename shape_t, concepts::algebra algebra_t, bool resolve_pos = false>
template<typename mask_t, typename S = shape_t>
requires concepts::cylindrical_shape<S, algebra_type>
result_type detray::intersector< shape_t, algebra_t, resolve_pos >::point_of_intersection ( const detail::helix< algebra_t > & h,
const transform3_type & trf,
const mask_t & mask,
const scalar_type = 0.f ) const
constexpr

Intersect a helix with a cylindrical surface using its radius mask.

Parameters
hHelical trajectory to test.
trfTransform placing the surface in global coordinates.
maskMask providing the cylinder radius.
Returns
The geometric intersection result.

◆ point_of_intersection() [2/4]

template<typename shape_t, concepts::algebra algebra_t, bool resolve_pos = false>
template<typename S = shape_t>
requires (!concepts::cylindrical_shape<S, algebra_type>)
result_type detray::intersector< shape_t, algebra_t, resolve_pos >::point_of_intersection ( const detail::helix< algebra_t > & h,
const transform3_type & trf,
const scalar_type = 0.f ) const
constexpr

Intersect a helix with a planar or line surface.

Parameters
hHelical trajectory to test.
trfTransform placing the surface in global coordinates.
Returns
The geometric intersection result.

◆ point_of_intersection() [3/4]

template<typename shape_t, concepts::algebra algebra_t, bool resolve_pos = false>
template<typename mask_t, typename S = shape_t>
requires concepts::cylindrical_shape<S, algebra_type>
result_type detray::intersector< shape_t, algebra_t, resolve_pos >::point_of_intersection ( const detail::ray< algebra_t > & ray,
const transform3_type & trf,
const mask_t & mask,
const scalar_type overstep_tol = 0.f ) const
constexpr

Intersect a ray with a cylindrical surface using its radius mask.

Parameters
rayStraight trajectory to test.
trfTransform placing the surface in global coordinates.
maskMask providing the cylinder radius.
overstep_tolMinimum accepted signed path length.
Returns
The geometric intersection result.

◆ point_of_intersection() [4/4]

template<typename shape_t, concepts::algebra algebra_t, bool resolve_pos = false>
template<typename S = shape_t>
requires (!concepts::cylindrical_shape<S, algebra_type>)
result_type detray::intersector< shape_t, algebra_t, resolve_pos >::point_of_intersection ( const detail::ray< algebra_t > & ray,
const transform3_type & trf,
const scalar_type overstep_tol = 0.f ) const
constexpr

Operator function to find intersections between ray and planar mask.

Parameters
rayis the input ray trajectory
trfis the surface placement transform
overstep_tolnegative cutoff for the path
Returns
the intersection result

Member Data Documentation

◆ n_solutions

template<typename shape_t, concepts::algebra algebra_t, bool resolve_pos = false>
std::uint8_t detray::intersector< shape_t, algebra_t, resolve_pos >::n_solutions
staticconstexpr
Initial value:

Largest number of solutions produced by either trajectory intersector.