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

Configure the toy detector. More...

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

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

Public Member Functions

 toy_det_config ()
 Default toy detector configuration.
constexpr toy_det_config & n_brl_layers (const unsigned int n)
 Setters.
constexpr toy_det_config & n_edc_layers (const unsigned int n)
 Set the n edc layers.
constexpr toy_det_config & envelope (const scalar_t env)
 Set the envelope.
constexpr toy_det_config & use_grids (const bool b)
 Set the use grids.
constexpr toy_det_config & use_homogeneous_material (const bool b)
 Set the use homogeneous material.
constexpr toy_det_config & use_material_maps (const bool b)
 Set the use material maps.
constexpr toy_det_config & cyl_map_bins (const std::size_t n_phi, const std::size_t n_z)
 Set the cyl map bins.
constexpr toy_det_config & disc_map_bins (const std::size_t n_r, const std::size_t n_phi)
 Set the disc map bins.
constexpr toy_det_config & material_map_min_thickness (const scalar_t t)
 Set the material map min thickness.
constexpr toy_det_config & beampipe_mat_thickness (const scalar_t t)
 Set the beampipe mat thickness.
constexpr toy_det_config & module_mat_thickness (const scalar_t t)
 Set the module mat thickness.
constexpr toy_det_config & mapped_material (const material< scalar_t > &mat)
 Set the mapped material.
volume_builder_options builder_options ()
 Return the builder options.
constexpr toy_det_config & do_check (const bool check)
 Set the do check.
constexpr unsigned int n_brl_layers () const
 Getters.
constexpr unsigned int n_edc_layers () const
 Return the n edc layers.
constexpr const auto & outer_radius () const
 Return the outer radius.
constexpr scalar_t envelope () const
 Return the envelope.
constexpr scalar_t beampipe_vol_radius () const
 Return the beampipe vol radius.
constexpr auto & material_config ()
 Return the material config.
constexpr const auto & material_config () const
 Return the material configuration.
constexpr bool use_grids () const
 Return the use grids.
constexpr bool use_homogeneous_material () const
 Return the use homogeneous material.
constexpr bool use_material_maps () const
 Return the use material maps.
constexpr auto & beampipe_material_map ()
 Return the beampipe material map.
constexpr const auto & beampipe_material_map () const
 Return the beampipe material map configuration.
constexpr const auto & cyl_material_map () const
 Return the cyl material map.
constexpr auto & cyl_material_map ()
 Return the mutable cylinder material map configuration.
constexpr const auto & disc_material_map () const
 Return the disc material map.
constexpr auto & disc_material_map ()
 Return the mutable disc material map configuration.
constexpr const darray< std::size_t, 2 > & cyl_map_bins () const
 Return the cyl map bins.
constexpr const darray< std::size_t, 2 > & disc_map_bins () const
 Return the disc map bins.
constexpr scalar_t material_map_min_thickness () const
 Return the material map min thickness.
constexpr scalar_t beampipe_mat_thickness () const
 Return the beampipe mat thickness.
constexpr scalar_t module_mat_thickness () const
 Return the module mat thickness.
auto barrel_mat_generator () const
 Return the barrel mat generator.
auto edc_mat_generator () const
 Return the edc mat generator.
constexpr material< scalar_t > mapped_material () const
 Return the mapped material.
constexpr const auto & barrel_layer_radii () const
 Return the barrel layer radii.
constexpr const auto & endcap_layer_positions () const
 Return the endcap layer positions.
constexpr const auto & barrel_layer_binning () const
 Return the barrel layer binning.
constexpr barrel_generator_config< scalar_t > & barrel_config ()
 Return the barrel config.
constexpr endcap_generator_config< scalar_t > & endcap_config ()
 Return the endcap config.
const volume_builder_options & builder_options () const
 Return the builder options.
constexpr bool do_check () const
 Return the do check.

Public Attributes

std::vector< std::pair< unsigned int, unsigned int > > m_barrel_binning
 Number of modules in phi and z for the barrel.
barrel_generator_config< scalar_t > m_barrel_factory_cfg {}
 Config for the module generation (barrel).
std::vector< scalar_t > m_barrel_layer_radii
 Radii at which to place the barrel module layers (including beampipe).
material_map_config< scalar_t >::map_config m_beampipe_map_cfg {}
 Configuration for the material map generator (beampipe).
scalar_t m_beampipe_mat_thickness {0.8f * unit<scalar_t>::mm}
 Thickness of the beampipe material.
scalar_t m_beampipe_volume_radius {25.f * unit<scalar_t>::mm}
 Radius of the innermost volume that contains the beampipe.
volume_builder_options m_builder_opts
 Volume builder configuration.
material_map_config< scalar_t >::map_config m_cyl_map_cfg {}
 Configuration for the material map generator (cylinder).
material_map_config< scalar_t >::map_config m_disc_map_cfg {}
 Configuration for the material map generator (disc).
bool m_do_check {true}
 Run detector consistency check after reading.
endcap_generator_config< scalar_t > m_endcap_factory_cfg {}
 Config for the module generation (endcaps).
std::vector< scalar_t > m_endcap_layer_positions
 Positions at which to place the endcap module layers on either side.
hom_material_config< scalar_t > m_material_config {}
 Configuration for the homogeneous material generator.
scalar_t m_module_mat_thickness {1.5f * unit<scalar_t>::mm}
 Thickness of the material slabs in the homogeneous material description.
unsigned int m_n_brl_layers {4u}
 No. of barrel layers the detector should be built with.
unsigned int m_n_edc_layers {3u}
 No. of endcap layers (on either side) the detector should be built with.
scalar_t m_outer_radius {180.f * unit<scalar_t>::mm}
 Total outer radius of the pixel subdetector.
scalar_t m_portal_envelope {2.f * unit<scalar_t>::mm}
 Envelope around the modules used by the cylinder portal generator.
bool m_use_grids {true}
 Build spatial grid acceleration structures (otherwise brute force search).
bool m_use_homogeneous_material {true}
 Put homogeneneous material on the sensitive surfaces.
bool m_use_material_maps {false}
 Put material maps on portals or use homogeneous material on modules.

Detailed Description

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

Configure the toy detector.

Member Function Documentation

◆ barrel_config()

template<concepts::scalar scalar_t>
barrel_generator_config< scalar_t > & detray::toy_det_config< scalar_t >::barrel_config ( )
constexpr

Return the barrel config.

Returns
configured barrel config

◆ barrel_layer_binning()

template<concepts::scalar scalar_t>
const auto & detray::toy_det_config< scalar_t >::barrel_layer_binning ( ) const
constexpr

Return the barrel layer binning.

Returns
configured barrel layer binning

◆ barrel_layer_radii()

template<concepts::scalar scalar_t>
const auto & detray::toy_det_config< scalar_t >::barrel_layer_radii ( ) const
constexpr

Return the barrel layer radii.

Returns
configured barrel layer radii

◆ barrel_mat_generator()

template<concepts::scalar scalar_t>
auto detray::toy_det_config< scalar_t >::barrel_mat_generator ( ) const

Return the barrel mat generator.

Returns
configured barrel mat generator

◆ beampipe_mat_thickness() [1/2]

template<concepts::scalar scalar_t>
scalar_t detray::toy_det_config< scalar_t >::beampipe_mat_thickness ( ) const
constexpr

Return the beampipe mat thickness.

Returns
configured beampipe mat thickness

◆ beampipe_mat_thickness() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::beampipe_mat_thickness ( const scalar_t t)
constexpr

Set the beampipe mat thickness.

Parameters
tmaterial thickness
Returns
reference to the updated configuration

◆ beampipe_material_map() [1/2]

template<concepts::scalar scalar_t>
auto & detray::toy_det_config< scalar_t >::beampipe_material_map ( )
constexpr

Return the beampipe material map.

Returns
configured beampipe material map

◆ beampipe_material_map() [2/2]

template<concepts::scalar scalar_t>
const auto & detray::toy_det_config< scalar_t >::beampipe_material_map ( ) const
constexpr

Return the beampipe material map configuration.

Returns
const beampipe material map configuration

◆ beampipe_vol_radius()

template<concepts::scalar scalar_t>
scalar_t detray::toy_det_config< scalar_t >::beampipe_vol_radius ( ) const
constexpr

Return the beampipe vol radius.

Returns
configured beampipe vol radius

◆ builder_options() [1/2]

template<concepts::scalar scalar_t>
volume_builder_options detray::toy_det_config< scalar_t >::builder_options ( )

Return the builder options.

Returns
configured builder options

◆ builder_options() [2/2]

template<concepts::scalar scalar_t>
const volume_builder_options & detray::toy_det_config< scalar_t >::builder_options ( ) const

Return the builder options.

Returns
configured builder options

◆ cyl_map_bins() [1/2]

template<concepts::scalar scalar_t>
const darray< std::size_t, 2 > & detray::toy_det_config< scalar_t >::cyl_map_bins ( ) const
constexpr

Return the cyl map bins.

Returns
configured cyl map bins

◆ cyl_map_bins() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::cyl_map_bins ( const std::size_t n_phi,
const std::size_t n_z )
constexpr

Set the cyl map bins.

Parameters
n_phinumber of bins in phi
n_znumber of bins in z
Returns
reference to the updated configuration

◆ cyl_material_map() [1/2]

template<concepts::scalar scalar_t>
auto & detray::toy_det_config< scalar_t >::cyl_material_map ( )
constexpr

Return the mutable cylinder material map configuration.

Returns
cylinder material map configuration

◆ cyl_material_map() [2/2]

template<concepts::scalar scalar_t>
const auto & detray::toy_det_config< scalar_t >::cyl_material_map ( ) const
constexpr

Return the cyl material map.

Returns
configured cyl material map

◆ disc_map_bins() [1/2]

template<concepts::scalar scalar_t>
const darray< std::size_t, 2 > & detray::toy_det_config< scalar_t >::disc_map_bins ( ) const
constexpr

Return the disc map bins.

Returns
configured disc map bins

◆ disc_map_bins() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::disc_map_bins ( const std::size_t n_r,
const std::size_t n_phi )
constexpr

Set the disc map bins.

Parameters
n_rnumber of bins in radius
n_phinumber of bins in phi
Returns
reference to the updated configuration

◆ disc_material_map() [1/2]

template<concepts::scalar scalar_t>
auto & detray::toy_det_config< scalar_t >::disc_material_map ( )
constexpr

Return the mutable disc material map configuration.

Returns
disc material map configuration

◆ disc_material_map() [2/2]

template<concepts::scalar scalar_t>
const auto & detray::toy_det_config< scalar_t >::disc_material_map ( ) const
constexpr

Return the disc material map.

Returns
configured disc material map

◆ do_check() [1/2]

template<concepts::scalar scalar_t>
bool detray::toy_det_config< scalar_t >::do_check ( ) const
constexpr

Return the do check.

Returns
configured do check

◆ do_check() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::do_check ( const bool check)
constexpr

Set the do check.

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

◆ edc_mat_generator()

template<concepts::scalar scalar_t>
auto detray::toy_det_config< scalar_t >::edc_mat_generator ( ) const

Return the edc mat generator.

Returns
configured edc mat generator

◆ endcap_config()

template<concepts::scalar scalar_t>
endcap_generator_config< scalar_t > & detray::toy_det_config< scalar_t >::endcap_config ( )
constexpr

Return the endcap config.

Returns
configured endcap config

◆ endcap_layer_positions()

template<concepts::scalar scalar_t>
const auto & detray::toy_det_config< scalar_t >::endcap_layer_positions ( ) const
constexpr

Return the endcap layer positions.

Returns
configured endcap layer positions

◆ envelope() [1/2]

template<concepts::scalar scalar_t>
scalar_t detray::toy_det_config< scalar_t >::envelope ( ) const
constexpr

Return the envelope.

Returns
configured envelope

◆ envelope() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::envelope ( const scalar_t env)
constexpr

Set the envelope.

Parameters
envportal envelope
Returns
reference to the updated configuration

◆ mapped_material() [1/2]

template<concepts::scalar scalar_t>
material< scalar_t > detray::toy_det_config< scalar_t >::mapped_material ( ) const
constexpr

Return the mapped material.

Returns
configured mapped material

◆ mapped_material() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::mapped_material ( const material< scalar_t > & mat)
constexpr

Set the mapped material.

Parameters
matmaterial value
Returns
reference to the updated configuration

◆ material_config() [1/2]

template<concepts::scalar scalar_t>
auto & detray::toy_det_config< scalar_t >::material_config ( )
constexpr

Return the material config.

Returns
configured material config

◆ material_config() [2/2]

template<concepts::scalar scalar_t>
const auto & detray::toy_det_config< scalar_t >::material_config ( ) const
constexpr

Return the material configuration.

Returns
const material configuration

◆ material_map_min_thickness() [1/2]

template<concepts::scalar scalar_t>
scalar_t detray::toy_det_config< scalar_t >::material_map_min_thickness ( ) const
constexpr

Return the material map min thickness.

Returns
configured material map min thickness

◆ material_map_min_thickness() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::material_map_min_thickness ( const scalar_t t)
constexpr

Set the material map min thickness.

Parameters
tmaterial thickness
Returns
reference to the updated configuration

◆ module_mat_thickness() [1/2]

template<concepts::scalar scalar_t>
scalar_t detray::toy_det_config< scalar_t >::module_mat_thickness ( ) const
constexpr

Return the module mat thickness.

Returns
configured module mat thickness

◆ module_mat_thickness() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::module_mat_thickness ( const scalar_t t)
constexpr

Set the module mat thickness.

Parameters
tmaterial thickness
Returns
reference to the updated configuration

◆ n_brl_layers() [1/2]

template<concepts::scalar scalar_t>
unsigned int detray::toy_det_config< scalar_t >::n_brl_layers ( ) const
constexpr

Getters.

Return the number of barrel layers.

Returns
configured number of barrel layers

◆ n_brl_layers() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::n_brl_layers ( const unsigned int n)
constexpr

Setters.

Set the number of barrel layers.

Parameters
nnumber of layers
Returns
reference to the updated configuration

◆ n_edc_layers() [1/2]

template<concepts::scalar scalar_t>
unsigned int detray::toy_det_config< scalar_t >::n_edc_layers ( ) const
constexpr

Return the n edc layers.

Returns
configured n edc layers

◆ n_edc_layers() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::n_edc_layers ( const unsigned int n)
constexpr

Set the n edc layers.

Parameters
nnumber of layers
Returns
reference to the updated configuration

◆ outer_radius()

template<concepts::scalar scalar_t>
const auto & detray::toy_det_config< scalar_t >::outer_radius ( ) const
constexpr

Return the outer radius.

Returns
configured outer radius

◆ use_grids() [1/2]

template<concepts::scalar scalar_t>
bool detray::toy_det_config< scalar_t >::use_grids ( ) const
constexpr

Return the use grids.

Returns
configured use grids

◆ use_grids() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::use_grids ( const bool b)
constexpr

Set the use grids.

Parameters
bwhether to enable the option
Returns
reference to the updated configuration

◆ use_homogeneous_material() [1/2]

template<concepts::scalar scalar_t>
bool detray::toy_det_config< scalar_t >::use_homogeneous_material ( ) const
constexpr

Return the use homogeneous material.

Returns
configured use homogeneous material

◆ use_homogeneous_material() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::use_homogeneous_material ( const bool b)
constexpr

Set the use homogeneous material.

Parameters
bwhether to enable the option
Returns
reference to the updated configuration

◆ use_material_maps() [1/2]

template<concepts::scalar scalar_t>
bool detray::toy_det_config< scalar_t >::use_material_maps ( ) const
constexpr

Return the use material maps.

Returns
configured use material maps

◆ use_material_maps() [2/2]

template<concepts::scalar scalar_t>
toy_det_config & detray::toy_det_config< scalar_t >::use_material_maps ( const bool b)
constexpr

Set the use material maps.

Parameters
bwhether to enable the option
Returns
reference to the updated configuration

Member Data Documentation

◆ m_barrel_binning

template<concepts::scalar scalar_t>
std::vector<std::pair<unsigned int, unsigned int> > detray::toy_det_config< scalar_t >::m_barrel_binning
Initial value:
= {
{0u, 0u}, {16u, 14u}, {32u, 14u}, {52u, 14u}, {78u, 14u}}

Number of modules in phi and z for the barrel.

◆ m_barrel_layer_radii

template<concepts::scalar scalar_t>
std::vector<scalar_t> detray::toy_det_config< scalar_t >::m_barrel_layer_radii
Initial value:
= {
static constexpr scalar_t mm
Native length unit, the millimetre.
Definition units.hpp:27

Radii at which to place the barrel module layers (including beampipe).

◆ m_builder_opts

template<concepts::scalar scalar_t>
volume_builder_options detray::toy_det_config< scalar_t >::m_builder_opts
Initial value:
{.m_deduplicate = false,
.m_sort = false}

Volume builder configuration.

◆ m_endcap_layer_positions

template<concepts::scalar scalar_t>
std::vector<scalar_t> detray::toy_det_config< scalar_t >::m_endcap_layer_positions
Initial value:

Positions at which to place the endcap module layers on either side.