|
ACTS
Experiment-independent tracking
|
Factory class for homogeneous material. More...
#include <detray/builders/homogeneous_material_factory.hpp>
Public Types | |
| using | scalar_type = dscalar<typename detector_t::algebra_type> |
| Scalar type used by the detector's material definitions. | |
| Public Types inherited from detray::surface_factory_interface< detector_t > | |
| using | navigation_link = typename detector_t::surface_type::navigation_link |
| Navigation link type used by surfaces produced by the factory. | |
Public Member Functions | |
| homogeneous_material_factory (std::unique_ptr< surface_factory_interface< detector_t > > sf_factory=std::make_unique< placeholder_factory_t >()) | |
| Factory with surfaces potentially already filled or empty placeholder that will not be used. | |
| void | add_material (material_id id, material_data< scalar_type > &&mat_data, std::size_t index=detail::invalid_value< std::size_t >()) |
Add all necessary components to the factory for a single material slab or rod (determined by the id). | |
| void | add_material (material_id id, std::vector< material_data< scalar_type > > &&mat_data_vec) |
Add all necessary components to the factory for multiple material slabs or rods (determined by the id). | |
| auto | clear () -> void override |
| Clear old data. | |
| auto | links () const -> const std::vector< material_id > & |
| auto | materials () const -> const std::vector< material< scalar_type > > & |
| auto | n_materials () const -> dindex |
| auto | operator() (typename detector_t::surface_lookup_container &surfaces, typename detector_t::material_container &materials) |
| Add material to the containers of a volume builder. | |
| auto | operator() (typename detector_t::volume_type &volume, typename detector_t::surface_lookup_container &surfaces, typename detector_t::transform_container &transforms, typename detector_t::mask_container &masks, typename detector_t::geometry_context ctx={}) -> dindex_range override |
| auto | thickness () const -> const std::vector< scalar_type > & |
| Public Member Functions inherited from detray::factory_decorator< detector_t > | |
| factory_decorator (std::unique_ptr< surface_factory_interface< detector_t > > factory) | |
| Wrap a concrete surface factory and forward interface calls to it. | |
| const surface_factory_interface< detector_t > * | get_factory () const |
| dindex | size () const override |
| Overwrite interface functions using callbacks to the base factory. | |
| void | push_back (surface_data< detector_t > &&data) override |
| Add data to the factory. | |
| void | push_back (std::vector< surface_data< detector_t > > &&data) override |
| Forward a batch of surface records to the wrapped factory. | |
| void | clear () override |
| Clear all data in the factory. | |
| Public Member Functions inherited from detray::surface_factory_interface< detector_t > | |
Additional Inherited Members | |
| Protected Member Functions inherited from detray::factory_decorator< detector_t > | |
| surface_factory_interface< detector_t > * | get_factory () |
| Protected Member Functions inherited from detray::surface_factory_interface< detector_t > | |
| template<typename container_t, typename... Args> | |
| dindex | insert_in_container (container_t &cont, const typename container_t::value_type value, const dindex idx, Args &&...args) const |
| Insert a value in a container at a specific index. | |
Factory class for homogeneous material.
Uses a surface factory underneath the hood that handles the surface construction. The material ID from the detector determines the type of material that will be produced. The factory is filled from [a vector] of material_data .
| detector_t | type of detector that contains the material |
|
explicit |
Factory with surfaces potentially already filled or empty placeholder that will not be used.
| sf_factory | Underlying surface factory to decorate. |
| void detray::homogeneous_material_factory< detector_t >::add_material | ( | material_id | id, |
| material_data< scalar_type > && | mat_data, | ||
| std::size_t | index = detail::invalid_value<std::size_t>() ) |
Add all necessary components to the factory for a single material slab or rod (determined by the id).
| id | Material collection to receive the value. |
| mat_data | One material and its surface association. |
| index | Optional index in the material collection. |
| void detray::homogeneous_material_factory< detector_t >::add_material | ( | material_id | id, |
| std::vector< material_data< scalar_type > > && | mat_data_vec ) |
Add all necessary components to the factory for multiple material slabs or rods (determined by the id).
| id | Material collection to receive the values. |
| mat_data_vec | Material records to append. |
| auto detray::homogeneous_material_factory< detector_t >::links | ( | ) | const->conststd::vector< material_id > & |
| auto detray::homogeneous_material_factory< detector_t >::materials | ( | ) | const->conststd::vector< material< scalar_type > > & |
| auto detray::homogeneous_material_factory< detector_t >::n_materials | ( | ) | const->dindex |
| auto detray::homogeneous_material_factory< detector_t >::operator() | ( | typename detector_t::surface_lookup_container & | surfaces, |
| typename detector_t::material_container & | materials ) |
Add material to the containers of a volume builder.
This assumes that the surfaces have already been added (e.g. by this factories underlying surface factory). The material from this factory is added to the corresponding number of surfaces at the end of the calling volume builder.
| surfaces | surface container of the volume builder that should get decorated with material. |
| materials | material store of the volume builder that the new materials get added to. |
|
overridevirtual |
| volume | Volume receiving the generated surfaces. |
| surfaces | Detector surface lookup to append to. |
| transforms | Detector transform store to append to. |
| masks | Detector mask store to append to. |
| ctx | Geometry context used when constructing transforms. |
Reimplemented from detray::factory_decorator< detector_t >.
| auto detray::homogeneous_material_factory< detector_t >::thickness | ( | ) | const->conststd::vector< scalar_type > & |