ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t > Class Template Reference

Templated surface class for detector surfaces and portals. More...

#include <detray/geometry/surface_descriptor.hpp>

Inheritance diagram for detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >:
[legend]

Public Types

using mask_id = typename mask_link::id_type
 Identifier type of the linked mask.
using mask_link = mask_link_t
 might be a single mask, a range of masks or a multiindex in the future
using material_id = typename material_link::id_type
 Identifier type of the linked material.
using material_link = material_link_t
 Link type used to locate the surface material.
using navigation_link = navigation_link_t
 Link type of the mask to a volume.
using transform_link = transform_link_t
 Broadcast the type of links.

Public Member Functions

constexpr surface_descriptor ()=default
 Default constructor.
constexpr surface_descriptor (const transform_link trf, const mask_link mask, const material_link material, const dindex volume, const surface_id sf_id)
 Constructor with full arguments.
constexpr auto has_material () const -> bool
constexpr auto id () const -> surface_id
constexpr auto identifier () const -> geometry::identifier
constexpr auto index () const -> dindex
constexpr auto is_passive () const -> bool
constexpr auto is_portal () const -> bool
constexpr auto is_sensitive () const -> bool
constexpr auto mask () const -> const mask_link &
constexpr auto material () -> material_link &
 Access to the material.
constexpr auto material () const -> const material_link &
constexpr auto operator== (const surface_descriptor &rhs) const -> bool
 Equality operator.
auto set_id (const surface_id new_id) -> void
 Sets a new surface id (portal/passive/sensitive).
auto set_identifier (const geometry::identifier geo_id) -> void
 Sets a new surface identifier.
auto set_index (const dindex new_idx) -> void
 Sets a new surface index (index in surface collection of surface store).
auto set_volume (const dindex new_idx) -> void
 Sets a new volume link (index in volume collection of detector).
constexpr auto transform () const -> dindex
auto update_mask (dindex offset) -> void
 Update the mask link.
auto update_material (dindex offset) -> void
 Update the material link.
auto update_transform (dindex offset) -> void
 Update the transform index.
constexpr auto volume () const -> dindex

Detailed Description

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
class detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >

Templated surface class for detector surfaces and portals.

Note
might be holding multiple surfaces in the future
Template Parameters
mask_regsitry_tthe type collection of masks that can be linked to the surface
material_registry_tthe type collection of material that can be linked to the surface
transform_link_thow to reference the surfaces transforms

Constructor & Destructor Documentation

◆ surface_descriptor()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::surface_descriptor ( const transform_link trf,
const mask_link mask,
const material_link material,
const dindex volume,
const surface_id sf_id )
constexpr

Constructor with full arguments.

Parameters
trfthe transform for positioning and 3D local frame
maskthe type and index of the mask for this surface
materialthe type and index of the material for this surface
volumeIndex of the containing volume.
sf_idremember whether this is a portal or not

Member Function Documentation

◆ has_material()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::has_material ( ) const->bool
constexpr
Returns
true if the surface descriptor has a valid material link

◆ id()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::id ( ) const->surface_id
constexpr
Returns
the surface id (sensitive, passive or portal)

◆ identifier()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::identifier ( ) const->geometry::identifier
constexpr
Returns
the surface identifier

◆ index()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::index ( ) const->dindex
constexpr
Returns
the surface id (sensitive, passive or portal)

◆ is_passive()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::is_passive ( ) const->bool
constexpr
Returns
true if the surface is a passive detector element.

◆ is_portal()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::is_portal ( ) const->bool
constexpr
Returns
true if the surface is a portal.

◆ is_sensitive()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::is_sensitive ( ) const->bool
constexpr
Returns
true if the surface is a sensitive detector module.

◆ mask()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::mask ( ) const->constmask_link &
constexpr
Returns
the mask link

◆ material() [1/2]

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::material ( ) ->material_link &
constexpr

Access to the material.

Returns
Mutable reference to the material link.

◆ material() [2/2]

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::material ( ) const->constmaterial_link &
constexpr
Returns
the material link

◆ operator==()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::operator== ( const surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t > & rhs) const->bool
constexpr

Equality operator.

Parameters
rhsis the right hand side to be compared to
Returns
True when links and identifier match.

◆ set_id()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::set_id ( const surface_id new_id) ->void

Sets a new surface id (portal/passive/sensitive).

Parameters
new_idSurface category to store.

◆ set_identifier()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::set_identifier ( const geometry::identifier geo_id) ->void

Sets a new surface identifier.

Parameters
geo_idIdentifier to store.

◆ set_index()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::set_index ( const dindex new_idx) ->void

Sets a new surface index (index in surface collection of surface store).

Parameters
new_idxIndex to store.

◆ set_volume()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::set_volume ( const dindex new_idx) ->void

Sets a new volume link (index in volume collection of detector).

Parameters
new_idxIndex of the containing volume.

◆ transform()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::transform ( ) const->dindex
constexpr
Returns
the transform index

◆ update_mask()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::update_mask ( dindex offset) ->void

Update the mask link.

Parameters
offsetupdate the position when move into new collection

◆ update_material()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::update_material ( dindex offset) ->void

Update the material link.

Parameters
offsetupdate the position when move into new collection

◆ update_transform()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::update_transform ( dindex offset) ->void

Update the transform index.

Parameters
offsetupdate the position when move into new collection

◆ volume()

template<typename mask_link_t = dtyped_index<dindex, dindex>, typename material_link_t = dtyped_index<dindex, dindex>, typename transform_link_t = dindex, typename navigation_link_t = std::uint_least16_t>
auto detray::surface_descriptor< mask_link_t, material_link_t, transform_link_t, navigation_link_t >::volume ( ) const->dindex
constexpr
Returns
the surface id (sensitive, passive or portal)