|
| | material_map_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, data_type &&mat_data, std::vector< std::size_t > &&n_bins, std::vector< std::vector< scalar_type > > &&axis_spans, std::vector< index_type > &&indices) |
| | Add all necessary components to the factory for a material map.
|
|
auto | clear () -> void override |
| | Clear old data.
|
| auto | links () const -> const std::map< std::size_t, std::pair< material_id, std::vector< index_type > > > & |
| auto | materials () const -> const std::map< std::size_t, std::vector< material< scalar_type > > > & |
| auto | n_materials () const -> dindex |
| template<typename bin_data_t, std::size_t N> |
| auto | operator() (typename detector_t::surface_lookup_container &surfaces, std::map< dindex, std::vector< bin_data_t > > &material_map, std::map< dindex, darray< std::size_t, N > > &n_bins, std::map< dindex, darray< std::vector< scalar_type >, N > > &axis_spans) |
| | Add data for material maps 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::map< std::size_t, std::vector< scalar_type > > & |
| | 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.
|
template<concepts::detector detector_t, typename index_t = dindex>
class detray::material_map_factory< detector_t, index_t >
Factory class for material maps.
Uses a surface factory underneath the hood that handles the surface construction. The material ID from the detector determines the type of material map that will be produced. The factory is filled from [a vector] of material_data .
- Template Parameters
-
| detector_t | type of detector that contains the material |
| index_t | local bin index type |
template<concepts::detector detector_t, typename index_t = dindex>
template<typename bin_data_t, std::size_t N>
Add data for material maps to the containers of a volume builder.
This assumes that the surfaces have already been added (e.g. by this factories underlying surface factory).
- Note
- This does not override the pure virtual function from the surface factory interface, but presents an overload for the case when material should be added.
- Parameters
-
| surfaces | surface container of the volume builder that should get decorated with material maps. |
| material_map | map the local bin indices and their content to a volume local surface index. |
| n_bins | Number of bins on each axis for every mapped surface. |
| axis_spans | Coordinate spans for each material-map axis. |
- Returns
- No value; material data is added to the output containers.