ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::navigation::object_tracer< detector_t, vector_t, navigation_status > Struct Template Reference

A navigation inspector that relays information about the encountered objects whenever the navigator reaches one or more status flags. More...

#include <detray/test/utils/inspectors.hpp>

Public Types

using candidate_record_t = intersection_record<detector_t>
 Record type for an encountered candidate.
using const_view_type = dvector_view<const candidate_record_t>
 Const device view type for candidate records.
using point3_type = typename candidate_record_t::point3_type
 3D point type used by candidate records.
using scalar_type = typename candidate_record_t::scalar_type
 Scalar type used by candidate records.
using vector3_type = typename candidate_record_t::vector3_type
 3D vector type used by candidate records.
using view_type = dvector_view<candidate_record_t>
 Mutable device view type for candidate records.

Public Member Functions

 object_tracer ()=default
 Default constructor.
 object_tracer (dvector_view< candidate_record_t > &view)
 Device-side construction from a vecmem based view type.
constexpr bool is_status (const status &nav_stat, const status &ref_stat)
 Compares a navigation status with the tracers references.
template<typename state_type>
auto operator() (const state_type &, const char *)
 Inspector interface.
template<typename state_type, concepts::point3D point3_t, concepts::vector3D vector3_t, typename... Args>
auto operator() (const state_type &state, const navigation::config &, const point3_t &pos, const vector3_t &dir, const char *, Args &&...)
 Inspector interface.
constexpr const candidate_record_t & operator[] (std::size_t i) const
constexpr const auto & trace () const

Public Attributes

dindex current_vol {dindex_invalid}
 Current volume index.
const scalar_type inv_pos {detray::detail::invalid_value<scalar_type>()}
 Invalid position value used to initialize the trace.
vector3_type last_dir = {0., 0., 0.}
 Last recorded direction.
point3_type last_pos = {inv_pos, inv_pos, inv_pos}
 Last recorded position.
vector_t< candidate_record_t > object_trace
 Record all objects the navigator encounters.

Detailed Description

template<concepts::detector detector_t, template< typename... > class vector_t = dvector, status... navigation_status>
struct detray::navigation::object_tracer< detector_t, vector_t, navigation_status >

A navigation inspector that relays information about the encountered objects whenever the navigator reaches one or more status flags.

Constructor & Destructor Documentation

◆ object_tracer()

template<concepts::detector detector_t, template< typename... > class vector_t = dvector, status... navigation_status>
detray::navigation::object_tracer< detector_t, vector_t, navigation_status >::object_tracer ( dvector_view< candidate_record_t > & view)
explicit

Device-side construction from a vecmem based view type.

Parameters
viewView used for storing candidate records.

Member Function Documentation

◆ is_status()

template<concepts::detector detector_t, template< typename... > class vector_t = dvector, status... navigation_status>
bool detray::navigation::object_tracer< detector_t, vector_t, navigation_status >::is_status ( const status & nav_stat,
const status & ref_stat )
constexpr

Compares a navigation status with the tracers references.

Parameters
nav_statNavigation status to compare.
ref_statReference status.
Returns
Whether the statuses are equal.

◆ operator()() [1/2]

template<concepts::detector detector_t, template< typename... > class vector_t = dvector, status... navigation_status>
template<typename state_type>
auto detray::navigation::object_tracer< detector_t, vector_t, navigation_status >::operator() ( const state_type & ,
const char *  )

Inspector interface.

Returns
No value.

◆ operator()() [2/2]

template<concepts::detector detector_t, template< typename... > class vector_t = dvector, status... navigation_status>
template<typename state_type, concepts::point3D point3_t, concepts::vector3D vector3_t, typename... Args>
auto detray::navigation::object_tracer< detector_t, vector_t, navigation_status >::operator() ( const state_type & state,
const navigation::config & ,
const point3_t & pos,
const vector3_t & dir,
const char * ,
Args && ... )

Inspector interface.

Parameters
stateCurrent navigation state.
posCurrent track position.
dirCurrent track direction.
Returns
No value.

◆ operator[]()

template<concepts::detector detector_t, template< typename... > class vector_t = dvector, status... navigation_status>
const candidate_record_t & detray::navigation::object_tracer< detector_t, vector_t, navigation_status >::operator[] ( std::size_t i) const
constexpr
Returns
a specific candidate from the trace
Parameters
iIndex of the candidate.

◆ trace()

template<concepts::detector detector_t, template< typename... > class vector_t = dvector, status... navigation_status>
const auto & detray::navigation::object_tracer< detector_t, vector_t, navigation_status >::trace ( ) const
constexpr
Returns
the full object trace