diff --git a/core/include/detray/core/detector.hpp b/core/include/detray/core/detector.hpp index 2c217bf41c..c579b75bda 100644 --- a/core/include/detray/core/detector.hpp +++ b/core/include/detray/core/detector.hpp @@ -97,7 +97,7 @@ class detector { /// Forward mask types that are present in this detector using material_container = - typename metadata::template material_store; + typename metadata::template material_store; using materials = typename material_container::value_types; using material_link = typename material_container::single_link; diff --git a/core/include/detray/core/detector_metadata.hpp b/core/include/detray/core/detector_metadata.hpp index da5140f80a..e209e0e0d4 100644 --- a/core/include/detray/core/detector_metadata.hpp +++ b/core/include/detray/core/detector_metadata.hpp @@ -19,6 +19,7 @@ #include "detray/masks/masks.hpp" #include "detray/masks/unbounded.hpp" #include "detray/masks/unmasked.hpp" +#include "detray/materials/material_map.hpp" #include "detray/materials/material_rod.hpp" #include "detray/materials/material_slab.hpp" #include "detray/surface_finders/accelerator_grid.hpp" @@ -61,9 +62,34 @@ struct default_metadata { using slab = material_slab; using rod = material_rod; - /// @TODO material grids + /// Material grid types (default: closed bounds, regular binning) /// @{ - /// ... + + // Disc material grid + template + using disc_map_t = + material_map::axes<>, detray::scalar, container_t>; + + // Cylindrical material grid + template + using cylinder2_map_t = + material_map::axes<>, detray::scalar, container_t>; + + // Rectangular material grid + template + using rectangular_map_t = + material_map::axes<>, detray::scalar, container_t>; + + // Cuboid volume material grid + template + using cuboid_map_t = + material_map::axes<>, detray::scalar, container_t>; + + // Cylindrical volume material grid + template + using cylinder3_map_t = + material_map, detray::scalar, container_t>; + /// @} /// surface grid types (default boundaries: closed binning) @@ -162,19 +188,36 @@ unbounded_cell, unmasked_plane*/>; /// Give your material types a name (needs to be consecutive and has to /// match the types position in the mask store!) - /// @TODO: Add the material grid types for every surface shape enum class material_ids { - e_slab = 0, - e_rod = 1, - // ... material map types - e_none = 2, + // Material texture (grid) shapes + e_disc2_map = 0u, + e_cylinder2_map = 1u, + e_rectangle2_map = 2u, + e_trapezoid2_map = 2u, + e_annulus2_map = 0u, + e_cell_wire_map = 6u, + e_straw_wire_map = 6u, + // Volume material + e_cuboid3_map = 3u, + e_cylinder3_map = 4u, + // Homogeneous mapetrial + e_slab = 5u, + e_rod = 6u, + e_none = 7u, }; /// How to store materials template