ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::direct_navigator< detector_t, surface_sequence_t >::state Class Reference

Mutable state for traversing the external surface sequence. More...

#include <detray/navigation/direct_navigator.hpp>

Inheritance diagram for detray::direct_navigator< detector_t, surface_sequence_t >::state:
[legend]
Collaboration diagram for detray::direct_navigator< detector_t, surface_sequence_t >::state:
[legend]

Public Types

using const_view_type
 Const view type corresponding to the configured sequence type.
using sequence_type = surface_sequence_type
 Range type retained by the navigation state.
using value_type = intersection_type
 Candidate value type stored in the base navigation state.
using view_type
 View used to access the sequence during navigation.
Public Types inherited from detray::navigation::base_state< state, detector_type, 2u, inspector_type, intersection_type >
using detector_type
 Detector type associated with this navigation state.

Public Member Functions

constexpr state (const detector_t &det, const view_type &sequence)
 Constructor using the detector and an externally provided sequence of detector surfaces.
constexpr void advance ()
 Advance the iterator (navigation status needs to be up to date!).
constexpr void clear_cache ()
 Clear the state.
constexpr scalar_t external_tol () const
constexpr bool finished () const
constexpr bool has_next_external () const
constexpr auto n_candidates () const -> dindex
constexpr surface_type next_external ()
 Advance the iterator.
void reset ()
 Reset the navigation state.
constexpr void set_direction (const navigation::direction dir)
 Set direction in which the navigator should search for candidates.
Public Member Functions inherited from detray::navigation::base_state< state, detector_type, 2u, inspector_type, intersection_type >
 base_state ()=delete
 Default constructor (needs a detector).
constexpr base_state (const detector_t &det)
 Constructor using a given detector.
constexpr base_state (const detector_t &det, view_t view)
 Construct from detector.
constexpr void abort (const char *custom_msg="Navigator (unknown reason)")
 Navigation state that cannot be recovered from.
constexpr void abort (const debug_msg_generator_t &debug_msg_generator)
 Navigation state that cannot be recovered from.
constexpr auto begin () const -> candidate_const_itr_t
constexpr bool cache_exhausted () const
constexpr auto candidates () const -> const candidate_cache_t &
constexpr auto cbegin () const -> candidate_const_itr_t
constexpr auto cend () const -> candidate_const_itr_t
constexpr auto current () const -> const candidate_t &
constexpr auto current_surface () const
constexpr auto current_volume () const
constexpr auto detector () const -> const detector_t &
constexpr auto direction () const -> navigation::direction
constexpr auto encountered_sf_material () const -> bool
 Helper method to check the track has encountered material.
constexpr auto end () const -> candidate_const_itr_t
constexpr void exit ()
 Navigation reaches final target or leaves detector world.
constexpr scalar_t external_tol () const
constexpr bool finished () const
constexpr auto geometry_identifier () const -> geometry::identifier
constexpr auto & inspector ()
constexpr const auto & inspector () const
constexpr bool is_alive () const
constexpr bool is_edge_candidate () const
constexpr bool is_good_candidate () const
constexpr auto is_on_passive () const -> bool
 Helper method to check the track has reached a passive surface.
constexpr auto is_on_portal () const -> bool
 Helper method to check the track has reached a portal surface.
constexpr auto is_on_sensitive () const -> bool
 Helper method to check the track has reached a sensitive surface.
constexpr auto is_on_surface () const -> bool
 Helper method to check the track has reached a module surface.
constexpr bool is_probably_candidate () const
constexpr auto last () const -> const candidate_t &
constexpr auto n_candidates () const -> dindex
constexpr auto next_surface () const
constexpr auto next_volume () const
constexpr scalar_t operator() () const
 Scalar representation of the navigation state,.
constexpr void pause ()
 Navigation is being paused by actor: Maintain the navigation state and resume later.
constexpr void set_direction (const navigation::direction dir)
 Set direction in which the navigator should search for candidates.
constexpr void set_external_tol (const scalar_t tol)
 Set externally provided mask tolerance according to noise prediction.
constexpr void set_volume (dindex v)
 Set start/new volume from volume index.
constexpr auto status () const -> navigation::status
constexpr auto target () const -> const candidate_t &
constexpr auto trust_level () const -> navigation::trust_level
constexpr auto volume () const -> nav_link_t
constexpr void set_no_trust ()
 Update navigation trust level to 'no trust'.
constexpr void set_high_trust ()
constexpr void set_fair_trust ()
Public Member Functions inherited from detray::ranges::view_interface< view_impl_t >
template<detray::ranges::bidirectional_range R = view_impl_t>
constexpr decltype(auto) back ()
 Return a writable reference to the last element.
template<detray::ranges::bidirectional_range R = view_impl_t>
constexpr decltype(auto) back () const
 Return a reference to the last element.
constexpr auto data ()
 Return a writable pointer to the first element, or null if empty.
constexpr auto data () const
 Return a pointer to the first element, or null for an empty view.
template<detray::ranges::forward_range R = view_impl_t>
constexpr auto empty () const -> bool
 Check whether the view contains no elements.
template<detray::ranges::forward_range R = view_impl_t>
constexpr decltype(auto) front ()
 Return a writable reference to the first element.
template<detray::ranges::forward_range R = view_impl_t>
constexpr decltype(auto) front () const
 Return a reference to the first element.
constexpr operator bool () const
 Test whether the view contains at least one element.
template<detray::ranges::random_access_range R = view_impl_t>
constexpr decltype(auto) operator[] (const dindex i)
 Subscript operator that takes detray dindex.
template<detray::ranges::random_access_range R = view_impl_t>
constexpr decltype(auto) operator[] (const dindex i) const
 Subscript operator that takes detray dindex.
template<detray::ranges::forward_range R = view_impl_t>
constexpr auto size () const
 Return the number of elements in the view.

Additional Inherited Members

Static Public Member Functions inherited from detray::navigation::base_state< state, detector_type, 2u, inspector_type, intersection_type >
static consteval std::size_t capacity ()
Protected Types inherited from detray::navigation::base_state< state, detector_type, 2u, inspector_type, intersection_type >
using algebra_t
 Detector algebra type.
using candidate_cache_t
 Fixed-capacity cache of intersection candidates.
using candidate_const_itr_t
 Const iterator into the candidate cache.
using candidate_itr_t
 Mutable iterator into the candidate cache.
using candidate_t
 Intersection result stored as a navigation candidate.
using dist_t
 Signed type used for candidate cache positions.
using nav_link_t
 Type used to link to a detector volume during navigation.
using point3_t
 Three-dimensional point type associated with the detector algebra.
using scalar_t
 Scalar type associated with the detector algebra.
using vector3_t
 Three-dimensional vector type associated with the detector algebra.
Protected Member Functions inherited from detray::navigation::base_state< state, detector_type, 2u, inspector_type, intersection_type >
constexpr auto advance () -> void
 Set the next surface that we want to reach (update target).
constexpr auto begin () -> candidate_itr_t
constexpr auto candidates () -> candidate_cache_t &
constexpr void clear_cache ()
 Clear the state.
constexpr auto current () -> candidate_t &
constexpr auto end () -> candidate_itr_t
constexpr auto last () -> candidate_t &
constexpr dist_t last_index () const
constexpr void last_index (dist_t pos)
 Set the next surface that we want to reach (update target).
constexpr dist_t next_index () const
constexpr void next_index (dist_t pos)
 Set the next surface that we want to reach (update target).
constexpr void run_inspector (const navigation::config &cfg, const point3_t &track_pos, const vector3_t &track_dir, const char *message)
 Call the navigation inspector.
constexpr void run_inspector (const navigation::config &cfg, const point3_t &track_pos, const vector3_t &track_dir, const char *message, const debug_msg_generator_t &msg_gen)
 Call the navigation inspector.
constexpr void set_last (candidate_const_itr_t new_last)
 Updates the position of the last valid candidate.
constexpr void set_next (candidate_const_itr_t new_next)
 Set the next surface that we want to reach (update target).
constexpr void status (navigation::status s)
 Set the status to.
constexpr auto target () -> candidate_t &
constexpr void trust_level (navigation::trust_level t)
 Reset the trustlevel to.

Detailed Description

template<concepts::detector detector_t, typename surface_sequence_t = void>
class detray::direct_navigator< detector_t, surface_sequence_t >::state

Mutable state for traversing the external surface sequence.

Member Typedef Documentation

◆ const_view_type

template<concepts::detector detector_t, typename surface_sequence_t = void>
using detray::direct_navigator< detector_t, surface_sequence_t >::state::const_view_type
Initial value:
std::conditional_t<std::same_as<surface_sequence_t, void>,
detail::get_view_t<const surface_sequence_type>,
std::conditional_t< std::same_as< surface_sequence_t, void >, vecmem::device_vector< typename detector_t::surface_type >, surface_sequence_t > surface_sequence_type
Range containing the surfaces visited by this navigator.
Definition direct_navigator.hpp:52

Const view type corresponding to the configured sequence type.

◆ view_type

template<concepts::detector detector_t, typename surface_sequence_t = void>
using detray::direct_navigator< detector_t, surface_sequence_t >::state::view_type
Initial value:
std::conditional_t<std::same_as<surface_sequence_t, void>,
detail::get_view_t<surface_sequence_type>,

View used to access the sequence during navigation.

Constructor & Destructor Documentation

◆ state()

template<concepts::detector detector_t, typename surface_sequence_t = void>
detray::direct_navigator< detector_t, surface_sequence_t >::state::state ( const detector_t & det,
const view_type & sequence )
constexpr

Constructor using the detector and an externally provided sequence of detector surfaces.

Parameters
detDetector whose geometry is navigated.
sequenceOrdered surface view for the navigation flow.

Member Function Documentation

◆ external_tol()

template<concepts::detector detector_t, typename surface_sequence_t = void>
scalar_t detray::direct_navigator< detector_t, surface_sequence_t >::state::external_tol ( ) const
constexpr
Returns
the externally provided mask tolerance - const

◆ finished()

template<concepts::detector detector_t, typename surface_sequence_t = void>
bool detray::direct_navigator< detector_t, surface_sequence_t >::state::finished ( ) const
constexpr
Returns
flag that indicates whether navigation was successful

◆ has_next_external()

template<concepts::detector detector_t, typename surface_sequence_t = void>
bool detray::direct_navigator< detector_t, surface_sequence_t >::state::has_next_external ( ) const
constexpr
Returns
true if the the next external is available in the sequence

◆ n_candidates()

template<concepts::detector detector_t, typename surface_sequence_t = void>
auto detray::direct_navigator< detector_t, surface_sequence_t >::state::n_candidates ( ) const->dindex
constexpr
Returns
the direct navigator always has only one candidate

◆ next_external()

template<concepts::detector detector_t, typename surface_sequence_t = void>
surface_type detray::direct_navigator< detector_t, surface_sequence_t >::state::next_external ( )
constexpr

Advance the iterator.

Returns
The surface currently selected as the next target.

◆ set_direction()

template<concepts::detector detector_t, typename surface_sequence_t = void>
void detray::direct_navigator< detector_t, surface_sequence_t >::state::set_direction ( const navigation::direction dir)
constexpr

Set direction in which the navigator should search for candidates.

Parameters
dirDirection in which the sequence is traversed.