ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::detail::add_sf_material_map< material_t > Struct Template Reference

A functor to add a material map to a surface. More...

#include <detray/builders/material_map_builder.hpp>

Public Member Functions

template<typename mask_coll_t, typename index_range_t, typename mat_factory_t, typename bin_data_t, std::size_t DIM, typename material_store_t, concepts::scalar scalar_t>
std::pair< typename material_t::id, dindex > operator() (const mask_coll_t &mask_coll, const index_range_t &index, const mat_factory_t &mat_factory, std::vector< bin_data_t > &bin_data, const darray< std::size_t, DIM > &n_bins, const darray< std::vector< scalar_t >, DIM > &axis_spans, material_store_t &mat_store, const bool deduplicate=false) const
 Build a material grid for a surface mask and store its link.

Detailed Description

template<typename material_t>
struct detray::detail::add_sf_material_map< material_t >

A functor to add a material map to a surface.

If deduplicate is set, an identical material map that is already in the material store is reused instead of adding a new one.

Returns
the type id and index of the material map in the store

Member Function Documentation

◆ operator()()

template<typename material_t>
template<typename mask_coll_t, typename index_range_t, typename mat_factory_t, typename bin_data_t, std::size_t DIM, typename material_store_t, concepts::scalar scalar_t>
std::pair< typename material_t::id, dindex > detray::detail::add_sf_material_map< material_t >::operator() ( const mask_coll_t & mask_coll,
const index_range_t & index,
const mat_factory_t & mat_factory,
std::vector< bin_data_t > & bin_data,
const darray< std::size_t, DIM > & n_bins,
const darray< std::vector< scalar_t >, DIM > & axis_spans,
material_store_t & mat_store,
const bool deduplicate = false ) const

Build a material grid for a surface mask and store its link.

Parameters
mask_collMask collection associated with the surface.
indexRange of masks used to construct the surface extent.
mat_factoryFactory that creates an empty material grid.
bin_dataMaterial values indexed by local grid bin.
n_binsNumber of bins on each grid axis.
axis_spansOptional coordinate spans for the map axes.
mat_storeMaterial store receiving the generated map.
deduplicateWhether to reuse an identical map already in the store.
Returns
Material identifier and index assigned to the grid.