Template Struct MaterialMapper¶
Defined in File InterpolatedMaterialMap.hpp
Struct Documentation¶
-
template<typename
G
>
structActs
::
MaterialMapper
¶ Struct for mapping global 3D positions to material values.
Global 3D positions are transformed into a
DIM_POS
Dimensional vector which is used to look up the material classification value in the underlying material map.Public Functions
-
MaterialMapper
(std::function<ActsVector<DIM_POS>(const Vector3&)> transformPos, Grid_t grid, )¶ Default constructor.
- Parameters
[in] transformPos
: Mapping of global 3D coordinates (cartesian) onto grid space[in] grid
: Grid storing material classification values
-
const Grid_t &
getGrid
() const¶ Get a const reference on the underlying grid structure.
- Return
Grid reference
-
Material
getMaterial
(const Vector3 &position) const¶ Retrieve interpolated material at given position.
- Return
Material at the given position
- Pre
The given
position
must lie within the range of the underlying map.- Parameters
[in] position
: Global 3D position
-
MaterialCell
getMaterialCell
(const Vector3 &position) const¶ Retrieve material cell for given position.
- Return
material cell containing the given global position
- Pre
The given
position
must lie within the range of the underlying map.- Parameters
[in] position
: Global 3D position
-
std::vector<double>
getMax
() const¶ Get the maximum value of all axes of the map.
- Return
Vector returning the maxima of all map axes
-
std::vector<double>
getMin
() const¶ Get the minimum value of all axes of the map.
- Return
Vector returning the minima of all map axes
-
std::vector<size_t>
getNBins
() const¶ Get the number of bins for all axes of the map.
- Return
Vector returning number of bins for all map axes
-
struct
MaterialCell
¶ Struct representing smallest grid unit in material grid.
This type encapsulate all required information to perform linear interpolation of material classification values within a 3D volume.
Public Functions
-
MaterialCell
(std::function<ActsVector<DIM_POS>(const Vector3&)> transformPos, std::array<double, DIM_POS> lowerLeft, std::array<double, DIM_POS> upperRight, std::array<Material::ParametersVector, N> materialValues, )¶ Default constructor.
- Parameters
[in] transformPos
: Mapping of global 3D coordinates onto grid space[in] lowerLeft
: Generalized lower-left corner of hyper box (containing the minima of the hyper box along each Dimension)[in] upperRight
: Generalized upper-right corner of hyper box (containing the maxima of the hyper box along each Dimension)[in] materialValues
: Material classification values at the hyper box corners sorted in the canonical order defined in Acts::interpolate
-
-