ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t > Struct Template Reference

Configure the toy detector. More...

#include <detray/test/common/build_telescope_detector.hpp>

Collaboration diagram for detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >:
[legend]

Public Types

using scalar_t = dscalar<algebra_t>
 Scalar type used by this configuration.

Public Member Functions

template<typename... Args>
requires (std::is_same_v<Args, scalar_t> && ...)
 tel_det_config (Args &&...args)
 Construct from mask parameters (except volume link, which is not needed).
 tel_det_config (const mask< mask_shape_t, algebra_t > &m, const trajectory_t< algebra_t > &t={})
 Construct from existing mask.
 tel_det_config (const std::vector< scalar_t > &params, const trajectory_t< algebra_t > &t={})
 Construct from from mask parameter vector.
constexpr tel_det_config & module_mask (const mask< mask_shape_t, algebra_t > &m)
 Setters.
constexpr tel_det_config & n_surfaces (const unsigned int n)
 Set the n surfaces.
constexpr tel_det_config & length (const scalar_t l)
 Set the length.
constexpr tel_det_config & positions (const std::vector< scalar_t > &dists)
 Set the positions.
constexpr tel_det_config & module_material (const material< scalar_t > &mat)
 Set the module material.
constexpr tel_det_config & volume_material (const material< scalar_t > &mat)
 Set the volume material.
constexpr tel_det_config & mat_thickness (const scalar_t t)
 Set the mat thickness.
constexpr tel_det_config & pilot_track (const trajectory_t< algebra_t > &traj)
 Set the pilot track.
constexpr tel_det_config & envelope (const scalar_t e)
 Set the envelope.
volume_builder_options & builder_options ()
 Return the builder options.
tel_det_config & do_check (const bool check)
 Set the do check.
constexpr const mask< mask_shape_t, algebra_t > & module_mask () const
 Getters.
constexpr unsigned int n_surfaces () const
 Return the n surfaces.
constexpr scalar_t length () const
 Return the length.
const std::vector< scalar_t > & positions () const
 Return the positions.
constexpr const auto & material_config () const
 Return the material config.
constexpr auto & material_config ()
 Return the material configuration.
constexpr const material< scalar_t > & module_material () const
 Return the module material.
constexpr const material< scalar_t > & volume_material () const
 Return the volume material.
constexpr scalar_t mat_thickness () const
 Return the mat thickness.
const trajectory_t< algebra_t > & pilot_track () const
 Return the pilot track.
constexpr scalar_t envelope () const
 Return the envelope.
const volume_builder_options & builder_options () const
 Return the builder options.
bool do_check () const
 Return the do check.

Public Attributes

volume_builder_options m_builder_opts
 Volume builder configuration.
bool m_do_check {true}
 Run detector consistency check after reading.
scalar_t m_envelope {0.1f * unit<scalar_t>::mm}
 Safety envelope between the test surfaces and the portals.
scalar_t m_length {500.f * unit<scalar_t>::mm}
 Length of the telescope.
mask< mask_shape_t, algebra_t > m_mask
 Mask of the test surfaces.
hom_material_config< scalar_t > m_material_config {}
 Configuration for the homogeneous material generator.
unsigned int m_n_surfaces {10u}
 No. of test surfaces in the telescope.
std::vector< scalar_t > m_positions {}
 Concrete positions where to place the surfaces along the pilot track.
trajectory_t< algebra_t > m_trajectory {}
 Pilot track along which to place the surfaces.
material< scalar_t > m_volume_material = vacuum<scalar_t>()
 Material for volume.

Detailed Description

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
struct detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >

Configure the toy detector.

Constructor & Destructor Documentation

◆ tel_det_config() [1/3]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::tel_det_config ( const mask< mask_shape_t, algebra_t > & m,
const trajectory_t< algebra_t > & t = {} )
explicit

Construct from existing mask.

Parameters
mmask to use for the detector surfaces
ttrajectory used to position the surfaces

◆ tel_det_config() [2/3]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::tel_det_config ( const std::vector< scalar_t > & params,
const trajectory_t< algebra_t > & t = {} )
explicit

Construct from from mask parameter vector.

Parameters
paramsparameters defining the surface mask
ttrajectory used to position the surfaces

◆ tel_det_config() [3/3]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
template<typename... Args>
requires (std::is_same_v<Args, scalar_t> && ...)
detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::tel_det_config ( Args &&... args)
explicit

Construct from mask parameters (except volume link, which is not needed).

Parameters
argsmask boundary parameters

Member Function Documentation

◆ builder_options() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
volume_builder_options & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::builder_options ( )

Return the builder options.

Returns
configured builder options

◆ builder_options() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
const volume_builder_options & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::builder_options ( ) const

Return the builder options.

Returns
configured builder options

◆ do_check() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
bool detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::do_check ( ) const

Return the do check.

Returns
configured do check

◆ do_check() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
tel_det_config & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::do_check ( const bool check)

Set the do check.

Parameters
checkwhether to run the consistency check
Returns
reference to the updated configuration

◆ envelope() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
scalar_t detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::envelope ( ) const
constexpr

Return the envelope.

Returns
configured envelope

◆ envelope() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
tel_det_config & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::envelope ( const scalar_t e)
constexpr

Set the envelope.

Parameters
eportal envelope
Returns
reference to the updated configuration

◆ length() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
scalar_t detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::length ( ) const
constexpr

Return the length.

Returns
configured length

◆ length() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
tel_det_config & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::length ( const scalar_t l)
constexpr

Set the length.

Parameters
ldetector length
Returns
reference to the updated configuration

◆ mat_thickness() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
scalar_t detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::mat_thickness ( ) const
constexpr

Return the mat thickness.

Returns
configured mat thickness

◆ mat_thickness() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
tel_det_config & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::mat_thickness ( const scalar_t t)
constexpr

Set the mat thickness.

Parameters
tthickness of the material slabs
Returns
reference to the updated configuration

◆ material_config() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
auto & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::material_config ( )
constexpr

Return the material configuration.

Returns
mutable material configuration

◆ material_config() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
const auto & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::material_config ( ) const
constexpr

Return the material config.

Returns
configured material config

◆ module_mask() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
const mask< mask_shape_t, algebra_t > & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::module_mask ( ) const
constexpr

Getters.

Return the module mask.

Returns
configured module mask

◆ module_mask() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
tel_det_config & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::module_mask ( const mask< mask_shape_t, algebra_t > & m)
constexpr

Setters.

Set the module mask.

Parameters
mmask for the detector surfaces
Returns
reference to the updated configuration

◆ module_material() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
const material< scalar_t > & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::module_material ( ) const
constexpr

Return the module material.

Returns
configured module material

◆ module_material() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
tel_det_config & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::module_material ( const material< scalar_t > & mat)
constexpr

Set the module material.

Parameters
matmaterial value
Returns
reference to the updated configuration

◆ n_surfaces() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
unsigned int detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::n_surfaces ( ) const
constexpr

Return the n surfaces.

Returns
configured n surfaces

◆ n_surfaces() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
tel_det_config & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::n_surfaces ( const unsigned int n)
constexpr

Set the n surfaces.

Parameters
nnumber of layers
Returns
reference to the updated configuration

◆ pilot_track() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
const trajectory_t< algebra_t > & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::pilot_track ( ) const

Return the pilot track.

Returns
configured pilot track

◆ pilot_track() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
tel_det_config & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::pilot_track ( const trajectory_t< algebra_t > & traj)
constexpr

Set the pilot track.

Parameters
trajpilot trajectory
Returns
reference to the updated configuration

◆ positions() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
const std::vector< scalar_t > & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::positions ( ) const

Return the positions.

Returns
configured positions

◆ positions() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
tel_det_config & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::positions ( const std::vector< scalar_t > & dists)
constexpr

Set the positions.

Parameters
distsdistances of the surfaces
Returns
reference to the updated configuration

◆ volume_material() [1/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
const material< scalar_t > & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::volume_material ( ) const
constexpr

Return the volume material.

Returns
configured volume material

◆ volume_material() [2/2]

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
tel_det_config & detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::volume_material ( const material< scalar_t > & mat)
constexpr

Set the volume material.

Parameters
matmaterial value
Returns
reference to the updated configuration

Member Data Documentation

◆ m_builder_opts

template<concepts::algebra algebra_t, typename mask_shape_t = rectangle2D, template< typename > class trajectory_t = detail::ray>
volume_builder_options detray::tel_det_config< algebra_t, mask_shape_t, trajectory_t >::m_builder_opts
Initial value:
{.m_deduplicate = false,
.m_sort = false}

Volume builder configuration.