ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::cylinder_portal_config< scalar_t > Struct Template Reference

configuration for the cylinder portal generator More...

#include <detray/builders/cylinder_portal_generator.hpp>

Collaboration diagram for detray::cylinder_portal_config< scalar_t >:
[legend]

Public Member Functions

constexpr cylinder_portal_config & build_inner (const bool b)
 SettersSet whether to create an inner cylindrical portal.
constexpr cylinder_portal_config & do_autofit (const bool b)
 Set whether portal bounds are fitted from the contained surfaces.
constexpr cylinder_portal_config & envelope (const scalar_t e)
 Set the gap between fitted portals and the contained surfaces.
constexpr cylinder_portal_config & fixed_inner_radius (const scalar_t r)
 Set the inner radius used when autofitting is disabled.
constexpr cylinder_portal_config & fixed_outer_radius (const scalar_t r)
 Set the outer radius used when autofitting is disabled.
constexpr cylinder_portal_config & fixed_half_length (const scalar_t z)
 Set the half-length used when autofitting is disabled.
constexpr cylinder_portal_config & link_north (const dindex l)
 Set the volume adjacent to the north endcap.
constexpr cylinder_portal_config & link_south (const dindex l)
 Set the volume adjacent to the south endcap.
constexpr cylinder_portal_config & link_east (const dindex l)
 Set the volume adjacent to the outer cylindrical surface.
constexpr cylinder_portal_config & link_west (const dindex l)
 Set the volume adjacent to the inner cylindrical surface.
constexpr bool build_inner () const
 Getters.
constexpr bool do_autofit () const
constexpr scalar_t envelope () const
constexpr scalar_t fixed_inner_radius () const
constexpr scalar_t fixed_outer_radius () const
constexpr scalar_t fixed_half_length () const
constexpr const auto & volume_links () const
constexpr const auto & link_north () const
constexpr const auto & link_south () const
constexpr const auto & link_east () const
constexpr const auto & link_west () const

Public Attributes

bool m_build_inner {true}
 Build inner cylinder portal (will use the same distance to the layer that was found for the outer cylinder portal).
bool m_do_autofit {true}
 Autofit the lower/upper z extend and inner/outer radii.
scalar_t m_envelope {100.f * unit<scalar_t>::um}
 Minimal envelope for the portals (used in autofitting).
scalar_t m_fixed_inner_r {0.f}
 Fixed inner radius during autofit.
scalar_t m_fixed_outer_r {0.f}
 Fixed outer radius during autofit.
scalar_t m_fixed_z {0.f}
 Fixed length of the cylinder.
std::vector< dindex > m_volume_links
 The portal volumes links (north, south, east, west).

Detailed Description

template<concepts::scalar scalar_t>
struct detray::cylinder_portal_config< scalar_t >

configuration for the cylinder portal generator

Member Function Documentation

◆ build_inner() [1/2]

template<concepts::scalar scalar_t>
bool detray::cylinder_portal_config< scalar_t >::build_inner ( ) const
constexpr

Getters.

Returns
Whether an inner portal should be generated.

◆ build_inner() [2/2]

template<concepts::scalar scalar_t>
cylinder_portal_config & detray::cylinder_portal_config< scalar_t >::build_inner ( const bool b)
constexpr

SettersSet whether to create an inner cylindrical portal.

Parameters
bTrue to create the inner portal.
Returns
Reference to this configuration.

◆ do_autofit() [1/2]

template<concepts::scalar scalar_t>
bool detray::cylinder_portal_config< scalar_t >::do_autofit ( ) const
constexpr
Returns
Whether portal bounds are fitted from the contained surfaces.

◆ do_autofit() [2/2]

template<concepts::scalar scalar_t>
cylinder_portal_config & detray::cylinder_portal_config< scalar_t >::do_autofit ( const bool b)
constexpr

Set whether portal bounds are fitted from the contained surfaces.

Parameters
bTrue to fit bounds automatically.
Returns
Reference to this configuration.

◆ envelope() [1/2]

template<concepts::scalar scalar_t>
scalar_t detray::cylinder_portal_config< scalar_t >::envelope ( ) const
constexpr
Returns
Gap between fitted portals and contained surfaces.

◆ envelope() [2/2]

template<concepts::scalar scalar_t>
cylinder_portal_config & detray::cylinder_portal_config< scalar_t >::envelope ( const scalar_t e)
constexpr

Set the gap between fitted portals and the contained surfaces.

Parameters
ePortal envelope distance.
Returns
Reference to this configuration.

◆ fixed_half_length() [1/2]

template<concepts::scalar scalar_t>
scalar_t detray::cylinder_portal_config< scalar_t >::fixed_half_length ( ) const
constexpr
Returns
Configured half-length when autofitting is disabled.

◆ fixed_half_length() [2/2]

template<concepts::scalar scalar_t>
cylinder_portal_config & detray::cylinder_portal_config< scalar_t >::fixed_half_length ( const scalar_t z)
constexpr

Set the half-length used when autofitting is disabled.

Parameters
zFixed half-length along the cylinder axis.
Returns
Reference to this configuration.

◆ fixed_inner_radius() [1/2]

template<concepts::scalar scalar_t>
scalar_t detray::cylinder_portal_config< scalar_t >::fixed_inner_radius ( ) const
constexpr
Returns
Configured inner radius when autofitting is disabled.

◆ fixed_inner_radius() [2/2]

template<concepts::scalar scalar_t>
cylinder_portal_config & detray::cylinder_portal_config< scalar_t >::fixed_inner_radius ( const scalar_t r)
constexpr

Set the inner radius used when autofitting is disabled.

Parameters
rFixed inner radius.
Returns
Reference to this configuration.

◆ fixed_outer_radius() [1/2]

template<concepts::scalar scalar_t>
scalar_t detray::cylinder_portal_config< scalar_t >::fixed_outer_radius ( ) const
constexpr
Returns
Configured outer radius when autofitting is disabled.

◆ fixed_outer_radius() [2/2]

template<concepts::scalar scalar_t>
cylinder_portal_config & detray::cylinder_portal_config< scalar_t >::fixed_outer_radius ( const scalar_t r)
constexpr

Set the outer radius used when autofitting is disabled.

Parameters
rFixed outer radius.
Returns
Reference to this configuration.

◆ link_east() [1/2]

template<concepts::scalar scalar_t>
const auto & detray::cylinder_portal_config< scalar_t >::link_east ( ) const
constexpr
Returns
Volume index adjacent to the outer cylindrical surface.

◆ link_east() [2/2]

template<concepts::scalar scalar_t>
cylinder_portal_config & detray::cylinder_portal_config< scalar_t >::link_east ( const dindex l)
constexpr

Set the volume adjacent to the outer cylindrical surface.

Parameters
lAdjacent volume index.
Returns
Reference to this configuration.

◆ link_north() [1/2]

template<concepts::scalar scalar_t>
const auto & detray::cylinder_portal_config< scalar_t >::link_north ( ) const
constexpr
Returns
Volume index adjacent to the north endcap.

◆ link_north() [2/2]

template<concepts::scalar scalar_t>
cylinder_portal_config & detray::cylinder_portal_config< scalar_t >::link_north ( const dindex l)
constexpr

Set the volume adjacent to the north endcap.

Parameters
lAdjacent volume index.
Returns
Reference to this configuration.

◆ link_south() [1/2]

template<concepts::scalar scalar_t>
const auto & detray::cylinder_portal_config< scalar_t >::link_south ( ) const
constexpr
Returns
Volume index adjacent to the south endcap.

◆ link_south() [2/2]

template<concepts::scalar scalar_t>
cylinder_portal_config & detray::cylinder_portal_config< scalar_t >::link_south ( const dindex l)
constexpr

Set the volume adjacent to the south endcap.

Parameters
lAdjacent volume index.
Returns
Reference to this configuration.

◆ link_west() [1/2]

template<concepts::scalar scalar_t>
const auto & detray::cylinder_portal_config< scalar_t >::link_west ( ) const
constexpr
Returns
Volume index adjacent to the inner cylindrical surface.

◆ link_west() [2/2]

template<concepts::scalar scalar_t>
cylinder_portal_config & detray::cylinder_portal_config< scalar_t >::link_west ( const dindex l)
constexpr

Set the volume adjacent to the inner cylindrical surface.

Parameters
lAdjacent volume index.
Returns
Reference to this configuration.

◆ volume_links()

template<concepts::scalar scalar_t>
const auto & detray::cylinder_portal_config< scalar_t >::volume_links ( ) const
constexpr
Returns
Volume indices adjacent to the north, south, east, and west portals.

Member Data Documentation

◆ m_volume_links

template<concepts::scalar scalar_t>
std::vector<dindex> detray::cylinder_portal_config< scalar_t >::m_volume_links
Initial value:
constexpr dindex dindex_invalid
Global invalid index definition.
Definition indexing.hpp:21

The portal volumes links (north, south, east, west).