ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::detail::detector< metadata_t, container_t > Class Template Reference

The detector definition. More...

#include <detray/core/detector.hpp>

Inheritance diagram for detray::detail::detector< metadata_t, container_t >:
[legend]

Public Types

using accel = typename accelerator_container::value_types
 Variant of accelerator types supported by this detector.
using accel_link = typename accelerator_container::single_link
 Link type for entries in the accelerator store.
using accelerator_container
 Surface Finders: structures that enable neighborhood searches in the detector geometry during navigation.
using algebra_type = typename metadata::algebra_type
 Algebra types Algebra backend selected by the metadata policy.
using buffer_type
 Detector buffer types Buffer type aggregating device-transfer buffers for detector stores.
using const_view_type
 Detector view types Non-owning const view over all detector component stores.
using geo_obj_ids = typename metadata::geo_objects
 Volume type Identifiers used to classify detector geometry objects.
using geometry_context = typename transform_container::context_type
 Context type accepted by the transform store.
using mask_container = typename metadata::template mask_store<vector_type>
 Forward mask types that are present in this detector Collection of the surface mask types supported by this detector.
using masks = typename mask_container::value_types
 Variant of mask types supported by this detector.
using material = typename material_container::value_types
 Variant of material types supported by this detector.
using material_container
 Forward material types that are present in this detector Collection of the material types supported by this detector.
using material_link = typename material_container::single_link
 Link type for entries in the material store.
using metadata = metadata_t
 Main definition of geometry types Metadata policy defining detector component and link types.
using name_map = detray::name_map
 In case the detector needs to be printed Lookup table mapping detector names to component indices.
using point2_type = dpoint2D<algebra_type>
 Two-dimensional point type for local surface coordinates.
using point3_type = dpoint3D<algebra_type>
 Three-dimensional point type for global positions.
using scalar_type = dscalar<algebra_type>
 Scalar type associated with the algebra backend.
using surface_container = vector_type<surface_type>
 Container storing the detector surfaces.
using surface_lookup_container = surface_lookup<surface_type, vector_type>
 Lookup structure for resolving surface identifiers and source links.
using surface_type = typename metadata::surface_type
 The surface takes a mask (defines the local coordinates and the surface extent), its material, a link to an element in the transform container to define its placement and a source link to the object it represents.
using transform3_type = dtransform3D<algebra_type>
 Three-dimensional transform type for placements.
using transform_container
 Forward the alignable transform container (surface placements) and the geo context (e.g.
using vector3_type = dvector3D<algebra_type>
 Three-dimensional vector type for directions.
using view_type = const_view_type
 View type exposed by the detector.
using volume_container = vector_type<volume_type>
 Container storing tracking-volume descriptors.
using volume_type = volume_descriptor<geo_obj_ids, accel_link, material_link>
 Descriptor type for a tracking volume.

Public Member Functions

 detector (const detector &)=delete
auto accelerator_store () const -> const accelerator_container &
auto get_data () -> const_view_type
auto get_data () const -> const_view_type
auto mask_store () const -> const mask_container &
auto material_store () const -> const material_container &
std::string name (const name_map &names) const
 Return the detector name from the supplied name map.
detector & operator= (const detector &)=delete
const auto & portals () const
template<typename query_t>
constexpr decltype(auto) surface (query_t &&q) const
 Find a surface using an index, identifier, or source-link query.
auto surfaces () const -> const surface_lookup_container &
auto transform_store (const geometry_context &={}) const -> const transform_container &
const auto & volume (const point3_type &p) const
 Find the volume containing a global point.
const auto & volume (const std::string_view volume_name, const name_map &names) const
 Return a volume by its registered name.
const auto & volume (dindex volume_index) const
 Return a volume by its stored index.
auto volumes () const -> const vector_type< volume_type > &
 detector (detector &&) noexcept=default
 Allowed constructorsMove constructor.
detector & operator= (detector &&other) noexcept=default
 Move-assign ownership of the detector stores.
 detector (vecmem::memory_resource &resource)
 Default construction.
template<concepts::device_view detector_view_t>
 detector (detector_view_t &det_data)
 Constructor from detector data view.

Detailed Description

template<concepts::metadata metadata_t, typename container_t>
class detray::detail::detector< metadata_t, container_t >

The detector definition.

This class is a heavily templated container aggregation, that owns all data. Its view type is used to move the data between host and device. It is constructed by the detector_builder and is afterwards immutable.

Template Parameters
metadatahelper that defines collection and link types centrally
container_ttype collection of the underlying containers

Member Typedef Documentation

◆ accelerator_container

template<concepts::metadata metadata_t, typename container_t>
using detray::detail::detector< metadata_t, container_t >::accelerator_container
Initial value:
typename metadata::template accelerator_store<container_t>
auto accelerator_store() const -> const accelerator_container &
Definition detector.hpp:318

Surface Finders: structures that enable neighborhood searches in the detector geometry during navigation.

Can be different in each volume Collection of navigation accelerators supported by this detector.

◆ buffer_type

template<concepts::metadata metadata_t, typename container_t>
using detray::detail::detector< metadata_t, container_t >::buffer_type
Initial value:
dmulti_buffer<dvector_buffer<volume_type>,
typename surface_lookup_container::buffer_type,
typename transform_container::buffer_type,
typename mask_container::buffer_type,
typename material_container::buffer_type,
typename accelerator_container::buffer_type>

Detector buffer types Buffer type aggregating device-transfer buffers for detector stores.

◆ const_view_type

template<concepts::metadata metadata_t, typename container_t>
using detray::detail::detector< metadata_t, container_t >::const_view_type
Initial value:
dmulti_view<dvector_view<const volume_type>,
typename surface_lookup_container::const_view_type,
typename transform_container::const_view_type,
typename mask_container::const_view_type,
typename material_container::const_view_type,
typename accelerator_container::const_view_type>

Detector view types Non-owning const view over all detector component stores.

◆ material_container

template<concepts::metadata metadata_t, typename container_t>
using detray::detail::detector< metadata_t, container_t >::material_container
Initial value:
typename metadata::template material_store<container_t>
auto material_store() const -> const material_container &
Definition detector.hpp:312

Forward material types that are present in this detector Collection of the material types supported by this detector.

◆ surface_type

template<concepts::metadata metadata_t, typename container_t>
using detray::detail::detector< metadata_t, container_t >::surface_type = typename metadata::surface_type

The surface takes a mask (defines the local coordinates and the surface extent), its material, a link to an element in the transform container to define its placement and a source link to the object it represents.

Surface descriptor type used by this detector.

◆ transform_container

template<concepts::metadata metadata_t, typename container_t>
using detray::detail::detector< metadata_t, container_t >::transform_container
Initial value:
typename metadata::template transform_store<vector_type>
auto transform_store(const geometry_context &={}) const -> const transform_container &
Definition detector.hpp:301

Forward the alignable transform container (surface placements) and the geo context (e.g.

for alignment) Transform store used for surface placements and geometry contexts.

Constructor & Destructor Documentation

◆ detector() [1/2]

template<concepts::metadata metadata_t, typename container_t>
detray::detail::detector< metadata_t, container_t >::detector ( vecmem::memory_resource & resource)
explicit

Default construction.

Parameters
resourcememory resource for the allocation of members

◆ detector() [2/2]

template<concepts::metadata metadata_t, typename container_t>
template<concepts::device_view detector_view_t>
detray::detail::detector< metadata_t, container_t >::detector ( detector_view_t & det_data)
explicit

Constructor from detector data view.

Template Parameters
detector_view_tdevice-compatible detector view type
Parameters
det_dataview containing the detector component stores

Member Function Documentation

◆ accelerator_store()

template<concepts::metadata metadata_t, typename container_t>
auto detray::detail::detector< metadata_t, container_t >::accelerator_store ( ) const->constaccelerator_container &
Returns
access to the surface finder container

◆ get_data() [1/2]

template<concepts::metadata metadata_t, typename container_t>
auto detray::detail::detector< metadata_t, container_t >::get_data ( ) ->const_view_type
Returns
view of a detector - vecmem auto-conversion to const view types

◆ get_data() [2/2]

template<concepts::metadata metadata_t, typename container_t>
auto detray::detail::detector< metadata_t, container_t >::get_data ( ) const->const_view_type
Returns
const view of a detector

◆ mask_store()

template<concepts::metadata metadata_t, typename container_t>
auto detray::detail::detector< metadata_t, container_t >::mask_store ( ) const->constmask_container &
Returns
all surface/portal masks in the geometry - const access

◆ material_store()

template<concepts::metadata metadata_t, typename container_t>
auto detray::detail::detector< metadata_t, container_t >::material_store ( ) const->constmaterial_container &
Returns
all materials in the geometry - const access

◆ name()

template<concepts::metadata metadata_t, typename container_t>
std::string detray::detail::detector< metadata_t, container_t >::name ( const name_map & names) const

Return the detector name from the supplied name map.

Parameters
namesmap containing the detector name
Returns
a string that contains the detector name

◆ operator=()

template<concepts::metadata metadata_t, typename container_t>
detector & detray::detail::detector< metadata_t, container_t >::operator= ( detector< metadata_t, container_t > && other)
defaultnoexcept

Move-assign ownership of the detector stores.

Parameters
otherdetector whose stores are transferred
Returns
reference to this detector

◆ portals()

template<concepts::metadata metadata_t, typename container_t>
const auto & detray::detail::detector< metadata_t, container_t >::portals ( ) const
Returns
all portals - const
Note
Depending on the detector type, this can also contain other surfaces
Todo
add range filter to skip non-portal surfaces

◆ surface()

template<concepts::metadata metadata_t, typename container_t>
template<typename query_t>
decltype(auto) detray::detail::detector< metadata_t, container_t >::surface ( query_t && q) const
constexpr

Find a surface using an index, identifier, or source-link query.

Parameters
qquery forwarded to the surface lookup
Returns
a surface using a query object q. This can be an index, a identifier or a source link searcher (see surface_lookup class)

◆ surfaces()

template<concepts::metadata metadata_t, typename container_t>
auto detray::detail::detector< metadata_t, container_t >::surfaces ( ) const->constsurface_lookup_container &
Returns
the sub-volumes of the detector - const access

◆ transform_store()

template<concepts::metadata metadata_t, typename container_t>
auto detray::detail::detector< metadata_t, container_t >::transform_store ( const geometry_context & = {}) const->consttransform_container &
Returns
detector transform store

◆ volume() [1/3]

template<concepts::metadata metadata_t, typename container_t>
const auto & detray::detail::detector< metadata_t, container_t >::volume ( const point3_type & p) const

Find the volume containing a global point.

Parameters
pglobal Cartesian position to locate
Returns
the volume by global cartesian p - const access

◆ volume() [2/3]

template<concepts::metadata metadata_t, typename container_t>
const auto & detray::detail::detector< metadata_t, container_t >::volume ( const std::string_view volume_name,
const name_map & names ) const

Return a volume by its registered name.

Parameters
volume_nameregistered volume name
namesmap used to resolve volume names
Returns
the volume by volume_name - const access

◆ volume() [3/3]

template<concepts::metadata metadata_t, typename container_t>
const auto & detray::detail::detector< metadata_t, container_t >::volume ( dindex volume_index) const

Return a volume by its stored index.

Parameters
volume_indexindex in the volume container
Returns
the volume by volume_index - const access

◆ volumes()

template<concepts::metadata metadata_t, typename container_t>
auto detray::detail::detector< metadata_t, container_t >::volumes ( ) const->constvector_type< volume_type > &
Returns
the sub-volumes of the detector - const access