ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::external_surface< algebra_t, shape_t, material_t, nav_link_t > Class Template Reference

Surface descriptor used for geometry supplied outside the detector store. More...

#include <detray/navigation/external_surface.hpp>

Inheritance diagram for detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >:
[legend]

Public Types

using mask_type = detray::mask<shape_t, algebra_t, nav_link_t>
 Mask type describing the surface shape and extent.
using material_type = material_t
 Material representation attached to this surface.
using navigation_link = nav_link_t
 Link type of the mask to a volume.
using transform3_type = dtransform3D<algebra_t>
 Transform type describing the surface placement.

Public Member Functions

constexpr external_surface ()=default
 Default constructor.
constexpr external_surface (const transform3_type &trf, const mask_type &mask, const material_type &material, const dindex volume, const surface_id sf_id)
 Constructor with full arguments.
constexpr external_surface (transform3_type &&trf, mask_type &&mask, material_type &&material, const dindex volume, const surface_id sf_id)
 Constructor with full arguments - move semantics.
constexpr auto barcode () const -> geometry::identifier
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_type &
constexpr auto material () -> material_type &
 Access to the material.
constexpr auto material () const -> const material_type &
 operator geometry::identifier () const
 Explicit conversion for APIs that take geometry::identifier.
constexpr auto operator== (const external_surface &rhs) const -> bool
 Equality operator.
auto set_barcode (const geometry::identifier bcd) -> void
 Sets a new surface barcode.
auto set_id (const surface_id new_id) -> void
 Sets a new surface id (portal/passive/sensitive).
auto set_index (const dindex new_idx) -> void
 Sets a new surface index (index in surface collection of surface store).
void set_mask (const mask_type m)
 Update the mask link.
void set_material (const material_type &offset)
 Update the material link.
void set_transform (const transform3_type &trf)
 Update the transform index.
auto set_volume (const dindex new_idx) -> void
 Sets a new volume link (index in volume collection of detector).
constexpr auto transform () const -> const transform3_type &
constexpr auto volume () const -> dindex

Detailed Description

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
class detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >

Surface descriptor used for geometry supplied outside the detector store.

It bundles placement, mask, material, and detector identifiers.

Constructor & Destructor Documentation

◆ external_surface() [1/2]

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::external_surface ( const transform3_type & trf,
const mask_type & mask,
const material_type & material,
const dindex volume,
const surface_id sf_id )
constexpr

Constructor with full arguments.

Parameters
trfthe transform for positioning and 3D local frame
maskthe surface mask
materialthe surface material
volumethe volume this surface belongs to
sf_idremember whether this is a portal or not

◆ external_surface() [2/2]

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::external_surface ( transform3_type && trf,
mask_type && mask,
material_type && material,
const dindex volume,
const surface_id sf_id )
constexpr

Constructor with full arguments - move semantics.

Parameters
trfthe transform for positioning and 3D local frame
maskthe surface mask
materialthe surface material
volumethe volume this surface belongs to
sf_idremember whether this is a portal or not

Member Function Documentation

◆ barcode()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::barcode ( ) const->geometry::identifier
constexpr
Returns
the surface barcode

◆ has_material()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::has_material ( ) const->bool
constexpr
Returns
true if the surface descriptor has a valid material link

◆ id()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::id ( ) const->surface_id
constexpr
Returns
the surface id (sensitive, passive or portal)

◆ identifier()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::identifier ( ) const->geometry::identifier
constexpr
Returns
the surface identifier (identifier-era naming)

◆ index()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::index ( ) const->dindex
constexpr
Returns
the surface id (sensitive, passive or portal)

◆ is_passive()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::is_passive ( ) const->bool
constexpr
Returns
true if the surface is a passive detector element.

◆ is_portal()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::is_portal ( ) const->bool
constexpr
Returns
true if the surface is a portal.

◆ is_sensitive()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::is_sensitive ( ) const->bool
constexpr
Returns
true if the surface is a sensitive detector module.

◆ mask()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::mask ( ) const->constmask_type &
constexpr
Returns
the mask - const

◆ material() [1/2]

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::material ( ) ->material_type &
constexpr

Access to the material.

Returns
Reference to the attached material.

◆ material() [2/2]

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::material ( ) const->constmaterial_type &
constexpr
Returns
the material link

◆ operator==()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::operator== ( const external_surface< algebra_t, shape_t, material_t, nav_link_t > & rhs) const->bool
constexpr

Equality operator.

Parameters
rhsis the right hand side to be compared to
Returns
Whether both descriptors have the same barcode.

◆ set_barcode()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::set_barcode ( const geometry::identifier bcd) ->void

Sets a new surface barcode.

Parameters
bcdIdentifier to assign to this surface.

◆ set_id()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::set_id ( const surface_id new_id) ->void

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

Parameters
new_idClassification to assign to the surface.

◆ set_index()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::set_index ( const dindex new_idx) ->void

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

Parameters
new_idxIndex of the surface in its collection.

◆ set_mask()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
void detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::set_mask ( const mask_type m)

Update the mask link.

Parameters
mNew surface mask.

◆ set_material()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
void detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::set_material ( const material_type & offset)

Update the material link.

Parameters
offsetupdate the position when move into new collection

◆ set_transform()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
void detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::set_transform ( const transform3_type & trf)

Update the transform index.

Parameters
trfNew surface placement transform.

◆ set_volume()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_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 owning or linked volume.

◆ transform()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::transform ( ) const->consttransform3_type &
constexpr
Returns
the transform index

◆ volume()

template<typename algebra_t, typename shape_t, typename material_t, typename nav_link_t>
auto detray::external_surface< algebra_t, shape_t, material_t, nav_link_t >::volume ( ) const->dindex
constexpr
Returns
the surface id (sensitive, passive or portal)