|
ACTS
Experiment-independent tracking
|
Surface factory decorator that adds material maps to surfaces. More...
#include <detray/builders/material_map_generator.hpp>
Public Member Functions | |
| material_map_generator (std::unique_ptr< surface_factory_interface< detector_t > > factory, const material_map_config< scalar_t > &cfg) | |
Construct from configuration cfg. | |
| template<typename bin_data_t, std::size_t N> | |
| auto | operator() (typename detector_t::surface_lookup_container &surfaces, const typename detector_t::mask_container &masks, std::map< dindex, std::vector< bin_data_t > > &material_map, std::map< dindex, darray< std::size_t, N > > &n_bins) |
| Create material maps for all surfaces that the underlying surface factory builds. | |
| 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 |
| Call the underlying surface factory and record the surface range that was produced. | |
| 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 | |
| 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. | |
| 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. | |
Surface factory decorator that adds material maps to surfaces.
| detector_t | the type of detector the volume belongs to. |
| detray::material_map_generator< detector_t >::material_map_generator | ( | std::unique_ptr< surface_factory_interface< detector_t > > | factory, |
| const material_map_config< scalar_t > & | cfg ) |
Construct from configuration cfg.
| factory | Surface factory whose surfaces receive material maps. |
| cfg | Binning and material variation settings. |
| auto detray::material_map_generator< detector_t >::operator() | ( | typename detector_t::surface_lookup_container & | surfaces, |
| const typename detector_t::mask_container & | masks, | ||
| std::map< dindex, std::vector< bin_data_t > > & | material_map, | ||
| std::map< dindex, darray< std::size_t, N > > & | n_bins ) |
Create material maps for all surfaces that the underlying surface factory builds.
| surfaces | surface container of the volume builder that should get decorated with material maps. |
| masks | mask store of the volume builder that contains the shapes and extents of the surfaces. |
| material_map | map the local bin indices and their content to a volume local surface index. |
| n_bins | the number of bins per axis per surface. |
|
overridevirtual |
Call the underlying surface factory and record the surface range that was produced.
| volume | the volume the portals need to be added to. |
| surfaces | the surface collection to wrap and to add the portals to |
| transforms | the transforms of the surfaces. |
| masks | the masks of the surfaces. |
| ctx | the geometry context (not needed for portals). |
Reimplemented from detray::factory_decorator< detector_t >.