ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::spatial_grid_impl< grid_t > Class Template Reference

An N-dimensional spatial grid for geometry object searches. More...

#include <detray/navigation/accelerators/spatial_grid.hpp>

Inheritance diagram for detray::spatial_grid_impl< grid_t >:
[legend]
Collaboration diagram for detray::spatial_grid_impl< grid_t >:
[legend]

Public Types

using mask_type
 Mask type used for the grid's virtual reference surface.
using query_type = typename base_grid::point_type
 Coordinate type used to query bins.
template<bool is_owning>
using type = spatial_grid_impl<typename grid_t::template type<is_owning>>
 Find the corresponding (non-)owning grid type.
using value_type = typename base_grid::value_type
 Value type stored in the grid bins.

Public Member Functions

template<concepts::scalar... Args>
constexpr spatial_grid_impl (base_grid &&gr, Args &&...mask_values)
 Construct from existing grid - move.
constexpr spatial_grid_impl (base_grid &&gr, const mask_type &mask)
 Construct from existing base grid and mask - copy.
template<concepts::scalar... Args>
constexpr spatial_grid_impl (base_grid &gr, Args &&...mask_values)
 Construct from existing base grid - copy.
query_type local_point_of_intersection (const detray::detail::ray< algebra_t > &tangential, const dtransform3D< algebra_t > &trf) const
 Straight line intersection with the grid.
constexpr const mask_type & mask () const
constexpr void mask (const mask_type &m)
 Replace the mask of the virtual reference surface.
template<concepts::detector detector_t, typename track_t, concepts::arithmetic window_size_t>
auto search (const detector_t &det, const typename detector_t::volume_type &volume, const track_t &track, const search_window< window_size_t, 2 > &win_size, const typename detector_t::geometry_context &ctx) const
 Interface for the navigator.
decltype(auto) search (const query_type &p)
 Find the value of a single bin.
decltype(auto) search (const query_type &p) const
 Find the value of a single bin - const.
template<concepts::arithmetic window_size_t>
auto search (const query_type &p, const search_window< window_size_t, 2 > &win_size) const
 Return a neighborhood of values from the grid.

Detailed Description

template<concepts::grid grid_t>
class detray::spatial_grid_impl< grid_t >

An N-dimensional spatial grid for geometry object searches.

Member Typedef Documentation

◆ mask_type

template<concepts::grid grid_t>
using detray::spatial_grid_impl< grid_t >::mask_type
Initial value:
Mask a region on a surface and link it to a volume.
Definition mask.hpp:46

Mask type used for the grid's virtual reference surface.

Constructor & Destructor Documentation

◆ spatial_grid_impl() [1/3]

template<concepts::grid grid_t>
template<concepts::scalar... Args>
detray::spatial_grid_impl< grid_t >::spatial_grid_impl ( base_grid && gr,
Args &&... mask_values )
explicitconstexpr

Construct from existing grid - move.

Parameters
mask_valuesadditional mask boundary values that cannot be inferred from the axis spans, e.g. the concentric cylinder radius
grGrid whose axes and bins are moved into this accelerator.

◆ spatial_grid_impl() [2/3]

template<concepts::grid grid_t>
template<concepts::scalar... Args>
detray::spatial_grid_impl< grid_t >::spatial_grid_impl ( base_grid & gr,
Args &&... mask_values )
explicitconstexpr

Construct from existing base grid - copy.

Parameters
grGrid whose axes and bins are copied into this accelerator.
mask_valuesAdditional boundary values needed to form the reference mask.

◆ spatial_grid_impl() [3/3]

template<concepts::grid grid_t>
detray::spatial_grid_impl< grid_t >::spatial_grid_impl ( base_grid && gr,
const mask_type & mask )
constexpr

Construct from existing base grid and mask - copy.

Parameters
grGrid whose axes and bins are moved into this accelerator.
maskReference-surface mask to retain with the grid.

Member Function Documentation

◆ local_point_of_intersection()

template<concepts::grid grid_t>
query_type detray::spatial_grid_impl< grid_t >::local_point_of_intersection ( const detray::detail::ray< algebra_t > & tangential,
const dtransform3D< algebra_t > & trf ) const

Straight line intersection with the grid.

Parameters
tangentialRay tangent to the propagated track.
trfTransform placing the grid in global coordinates.
Returns
the point of intersection in grid local coordinates

◆ mask() [1/2]

template<concepts::grid grid_t>
const mask_type & detray::spatial_grid_impl< grid_t >::mask ( ) const
constexpr
Returns
the mask of the (virtual) reference surface

◆ mask() [2/2]

template<concepts::grid grid_t>
void detray::spatial_grid_impl< grid_t >::mask ( const mask_type & m)
constexpr

Replace the mask of the virtual reference surface.

Parameters
mNew reference-surface mask.
Note
The supplied mask is not checked against the grid axes.

◆ search() [1/4]

template<concepts::grid grid_t>
template<concepts::detector detector_t, typename track_t, concepts::arithmetic window_size_t>
auto detray::spatial_grid_impl< grid_t >::search ( const detector_t & det,
const typename detector_t::volume_type & volume,
const track_t & track,
const search_window< window_size_t, 2 > & win_size,
const typename detector_t::geometry_context & ctx ) const

Interface for the navigator.

Parameters
detDetector providing the volume placement.
volumeVolume whose grid is queried.
trackTrack used to determine the query position.
win_sizeSearch extent around the projected track position.
ctxGeometry context used to resolve the volume transform.
Returns
Values in the selected neighborhood of bins.

◆ search() [2/4]

template<concepts::grid grid_t>
decltype(auto) detray::spatial_grid_impl< grid_t >::search ( const query_type & p)

Find the value of a single bin.

Parameters
pis point in the local (bound) frame
Returns
the iterable view of the bin content

◆ search() [3/4]

template<concepts::grid grid_t>
decltype(auto) detray::spatial_grid_impl< grid_t >::search ( const query_type & p) const

Find the value of a single bin - const.

Parameters
pis point in the local (bound) frame
Returns
the iterable view of the bin content

◆ search() [4/4]

template<concepts::grid grid_t>
template<concepts::arithmetic window_size_t>
auto detray::spatial_grid_impl< grid_t >::search ( const query_type & p,
const search_window< window_size_t, 2 > & win_size ) const

Return a neighborhood of values from the grid.

The lookup is done with a search window around the bin

Return the values in bins intersecting the search window.

Parameters
pis point in the local frame
win_sizesize of the binned/scalar search window
Returns
the sequence of values