|
ACTS
Experiment-independent tracking
|
An N-dimensional grid for object storage. More...
#include <detray/utils/grid/grid.hpp>
Public Types | |
| using | algebra_type = typename axes_type::algebra_type |
| Algebra backend used by the axes. | |
| using | axes_type = axes_t |
| The type of the multi-axis is tied to the type of the grid: a non- owning grid holds a non-owning multi-axis member. | |
| using | bin_container_type = typename bin_storage::bin_container_type |
| Container holding the bins. | |
| using | bin_storage |
| Backend storage type for the grid. | |
| using | bin_type = bin_t |
| Single value in a bin entry. | |
| using | buffer_type |
| Vecmem based buffer type. | |
| using | const_view_type |
| Vecmem based grid view type - const. | |
| using | glob_bin_index = dindex |
| Index of a bin in the flattened grid storage. | |
| using | loc_bin_index = typename axes_type::loc_bin_index |
| Per-axis indices identifying one bin. | |
| using | local_frame_type = typename axes_type::local_frame_type |
| Coordinate frame spanned by the grid axes. | |
| using | point_type = typename axes_type::point_type |
| Point type used for coordinates in the grid frame. | |
| using | scalar_type = dscalar<algebra_type> |
| Scalar type used by the grid axes. | |
| template<std::size_t DIM> | |
| using | serializer_type = serializer_t<DIM> |
| Serializer type used for a grid with DIM axes. | |
| template<bool owning> | |
| using | type |
| Find the corresponding (non-)owning grid type. | |
| using | value_type = typename bin_type::entry_type |
| Type stored in each bin. | |
| using | view_type |
| Vecmem based grid view type. | |
Public Member Functions | |
| grid_impl ()=default | |
| Make grid default constructible: Empty grid with empty axis. | |
| grid_impl (bin_container_type &&bin_data, axes_type &&axes) | |
Create grid with well defined axes and bin_data - move. | |
| grid_impl (bin_container_type *bin_data_ptr, axes_type &&axes, const dindex offset=0u) | |
| Create grid from container pointers - non-owning (both grid and axes). | |
| grid_impl (bin_container_type *bin_data_ptr, axes_type &axes, const dindex offset=0u) | |
| Create grid from container pointers - non-owning (both grid and axes). | |
| grid_impl (const bin_container_type *bin_data_ptr, axes_type &&axes, const dindex offset=0) | |
| Create grid from container pointers - non-owning (both grid and axes). | |
| grid_impl (const bin_container_type *bin_data_ptr, const axes_type &axes, const dindex offset=0) | |
| Create grid from container pointers - non-owning (both grid and axes). | |
| template<concepts::device_view grid_view_t> | |
| grid_impl (grid_view_t &view) | |
| Device-side construction from a vecmem based view type. | |
| grid_impl (vecmem::memory_resource &resource) | |
| Create empty grid with empty axes from specific vecmem memory resource. | |
| auto | all () |
| auto | all () const |
| auto | axes () const -> const axes_type & |
| auto | bins () -> bin_storage & |
| auto | bins () const -> const bin_storage & |
| constexpr auto | deserialize (const glob_bin_index gid) const -> loc_bin_index |
| Convert a flattened bin index to per-axis bin indices. | |
| template<typename axis_t> | |
| constexpr axis_t | get_axis () const |
| template<axis::label L> | |
| constexpr auto | get_axis () const |
| template<std::size_t index> | |
| constexpr auto | get_axis () const |
| template<bool owning = is_owning> requires owning | |
| auto | get_data () -> view_type |
| template<bool owning = is_owning> requires owning | |
| auto | get_data () const -> const_view_type |
| constexpr auto | nbins () const -> dindex |
| constexpr auto | operator== (const grid_impl &rhs) const -> bool |
| Equality comparison. | |
| template<concepts::transform3D transform3_t, concepts::point3D point3_t, concepts::vector3D vector3_t> | |
| point_type | project (const transform3_t &trf, const point3_t &p, const vector3_t &d) const |
| Transform a point in global cartesian coordinates to bound coordinates. | |
| constexpr auto | serialize (const loc_bin_index &mbin) const -> glob_bin_index |
| Convert per-axis bin indices to a flattened bin index. | |
| constexpr auto | size () const -> dindex |
| decltype(auto) | bin (const glob_bin_index gbin) const |
| decltype(auto) | bin (const glob_bin_index gbin) |
| decltype(auto) | bin (const loc_bin_index &mbin) const |
| decltype(auto) | bin (const loc_bin_index &mbin) |
| decltype(auto) | bin (const point_type &p) const |
| Find the value of a single bin - const. | |
| decltype(auto) | bin (const point_type &p) |
| Find the value of a single bin. | |
| template<concepts::index... I> requires (sizeof...(I) == dim) | |
| decltype(auto) | bin (I... indices) const |
| Access a bin using one index per axis. | |
| decltype(auto) | at (const glob_bin_index gbin, const dindex idx) |
| Access a single entry in a bin from the global bin index, as well as the index of the entry in the bin. | |
| decltype(auto) | at (const glob_bin_index gbin, const dindex idx) const |
| decltype(auto) | at (const loc_bin_index &mbin, const dindex idx) |
| decltype(auto) | at (const loc_bin_index &mbin, const dindex idx) const |
| template<typename populator_t, typename V = value_type> | |
| void | populate (const loc_bin_index &mbin, V &&v) |
Poupulate a bin with a single one of its corresponding values v. | |
| template<typename populator_t, typename V = value_type> | |
| void | populate (const glob_bin_index gbin, V &&v) |
| template<typename populator_t, typename V = value_type> | |
| void | populate (const point_type &p, V &&v) |
Static Public Member Functions | |
| static constexpr auto | get_local_frame () -> local_frame_type |
| static constexpr auto | serializer () -> serializer_t< dim > |
Static Public Attributes | |
| static constexpr unsigned int | dim = axes_t::dim |
| Grid dimension. | |
| static constexpr bool | is_owning {axes_type::is_owning} |
| Whether this grid owns its axis and bin storage. | |
An N-dimensional grid for object storage.
| axes_t | the types of grid axes |
| bin_t | type of bin in the (global) bin storage. |
| serializer_t | how to serialize axis-local bin indices into global bin indices in the grid backend storage and vice versa. |
| using detray::grid_impl< axes_t, bin_t, serializer_t >::bin_storage |
Backend storage type for the grid.
| using detray::grid_impl< axes_t, bin_t, serializer_t >::buffer_type |
Vecmem based buffer type.
| using detray::grid_impl< axes_t, bin_t, serializer_t >::const_view_type |
Vecmem based grid view type - const.
| using detray::grid_impl< axes_t, bin_t, serializer_t >::type |
Find the corresponding (non-)owning grid type.
| using detray::grid_impl< axes_t, bin_t, serializer_t >::view_type |
Vecmem based grid view type.
|
explicit |
Create empty grid with empty axes from specific vecmem memory resource.
| resource | Resource used for bin and axis allocations. |
| detray::grid_impl< axes_t, bin_t, serializer_t >::grid_impl | ( | bin_container_type && | bin_data, |
| axes_type && | axes ) |
Create grid with well defined axes and bin_data - move.
| bin_data | Bin storage for the grid. |
| axes | Axis definitions for the grid. |
| detray::grid_impl< axes_t, bin_t, serializer_t >::grid_impl | ( | const bin_container_type * | bin_data_ptr, |
| const axes_type & | axes, | ||
| const dindex | offset = 0 ) |
Create grid from container pointers - non-owning (both grid and axes).
| bin_data_ptr | Bin storage to view. |
| axes | Axis definitions to view. |
| offset | Offset of this grid's bins in the container. |
| detray::grid_impl< axes_t, bin_t, serializer_t >::grid_impl | ( | bin_container_type * | bin_data_ptr, |
| axes_type & | axes, | ||
| const dindex | offset = 0u ) |
Create grid from container pointers - non-owning (both grid and axes).
| bin_data_ptr | Bin storage to view. |
| axes | Axis definitions to view. |
| offset | Offset of this grid's bins in the container. |
| detray::grid_impl< axes_t, bin_t, serializer_t >::grid_impl | ( | const bin_container_type * | bin_data_ptr, |
| axes_type && | axes, | ||
| const dindex | offset = 0 ) |
Create grid from container pointers - non-owning (both grid and axes).
| bin_data_ptr | Bin storage to view. |
| axes | Axis definitions moved into the grid view. |
| offset | Offset of this grid's bins in the container. |
| detray::grid_impl< axes_t, bin_t, serializer_t >::grid_impl | ( | bin_container_type * | bin_data_ptr, |
| axes_type && | axes, | ||
| const dindex | offset = 0u ) |
Create grid from container pointers - non-owning (both grid and axes).
| bin_data_ptr | Bin storage to view. |
| axes | Axis definitions moved into the grid view. |
| offset | Offset of this grid's bins in the container. |
|
explicit |
Device-side construction from a vecmem based view type.
| view | View containing the bin and axis data. |
| auto detray::grid_impl< axes_t, bin_t, serializer_t >::all | ( | ) |
| auto detray::grid_impl< axes_t, bin_t, serializer_t >::all | ( | ) | const |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::at | ( | const glob_bin_index | gbin, |
| const dindex | idx ) |
Access a single entry in a bin from the global bin index, as well as the index of the entry in the bin.
| gbin | Flattened index of the bin. |
| idx | Index of the entry within that bin. |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::at | ( | const glob_bin_index | gbin, |
| const dindex | idx ) const |
| gbin | Flattened index of the bin. |
| idx | Index of the entry within that bin. |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::at | ( | const loc_bin_index & | mbin, |
| const dindex | idx ) |
| mbin | Per-axis indices of the bin. |
| idx | Index of the entry within that bin. |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::at | ( | const loc_bin_index & | mbin, |
| const dindex | idx ) const |
| mbin | Per-axis indices of the bin. |
| idx | Index of the entry within that bin. |
| auto detray::grid_impl< axes_t, bin_t, serializer_t >::axes | ( | ) | const->constaxes_type & |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::bin | ( | const glob_bin_index | gbin | ) |
| gbin | the global bin index |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::bin | ( | const glob_bin_index | gbin | ) | const |
| gbin | the global bin index - const |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::bin | ( | const loc_bin_index & | mbin | ) |
| mbin | the multi-index of bins over all axes |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::bin | ( | const loc_bin_index & | mbin | ) | const |
| mbin | the multi-index of bins over all axes - const |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::bin | ( | const point_type & | p | ) |
Find the value of a single bin.
| p | is point in the local (bound) frame |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::bin | ( | const point_type & | p | ) | const |
Find the value of a single bin - const.
| p | is point in the local (bound) frame |
| decltype(auto) detray::grid_impl< axes_t, bin_t, serializer_t >::bin | ( | I... | indices | ) | const |
Access a bin using one index per axis.
| indices | the single indices corresponding to a multi_bin |
| auto detray::grid_impl< axes_t, bin_t, serializer_t >::bins | ( | ) | ->bin_storage & |
| auto detray::grid_impl< axes_t, bin_t, serializer_t >::bins | ( | ) | const->constbin_storage & |
|
constexpr |
Convert a flattened bin index to per-axis bin indices.
| gid | Flattened index of the bin. |
gid
|
constexpr |
|
constexpr |
|
constexpr |
| auto detray::grid_impl< axes_t, bin_t, serializer_t >::get_data | ( | ) | ->view_type |
| auto detray::grid_impl< axes_t, bin_t, serializer_t >::get_data | ( | ) | const->const_view_type |
|
staticconstexpr |
|
constexpr |
|
constexpr |
Equality comparison.
| rhs | the right-hand side of the comparison |
| void detray::grid_impl< axes_t, bin_t, serializer_t >::populate | ( | const glob_bin_index | gbin, |
| V && | v ) |
| gbin | the global bin index to be populated |
| v | Value to insert into the bin. |
| void detray::grid_impl< axes_t, bin_t, serializer_t >::populate | ( | const loc_bin_index & | mbin, |
| V && | v ) |
Poupulate a bin with a single one of its corresponding values v.
| mbin | the multi bin index to be populated |
| v | Value to insert into the bin. |
| void detray::grid_impl< axes_t, bin_t, serializer_t >::populate | ( | const point_type & | p, |
| V && | v ) |
| p | the point in local coordinates that defines the bin to be populated |
| v | Value to insert into the bin. |
| point_type detray::grid_impl< axes_t, bin_t, serializer_t >::project | ( | const transform3_t & | trf, |
| const point3_t & | p, | ||
| const vector3_t & | d ) const |
Transform a point in global cartesian coordinates to bound coordinates.
| trf | the placement transform of the grid (e.g. from a volume or a surface). |
| p | the point in global coordinates |
| d | direction of a track at position p |
|
constexpr |
Convert per-axis bin indices to a flattened bin index.
| mbin | Per-axis indices of the bin. |
mbin
|
staticconstexpr |
|
constexpr |