Class Acts::InterpolatedMaterialMap¶
-
template<typename Mapper_t>
class InterpolatedMaterialMap : public Acts::IVolumeMaterial¶ Interpolate material classification values from material values on a given grid.
This class implements a material service which is initialized by a material map defined by:
a list of material values on a regular grid in some n-Dimensional space,
a transformation of global 3D coordinates onto this n-Dimensional space.
a transformation of local n-Dimensional material coordinates into global (cartesian) 3D coordinates
The material value for a given global position is then determined by:
mapping the position onto the grid,
looking up the material classification values on the closest grid points,
doing a linear interpolation of these values.
Warning
Each classification number of the material is interpolated independently and thus does not consider any correlations that exists between these values. This might work out since the used material is already a mean of the materials in a certain bin and can therewith be treated as a collection of numbers.
- Template Parameters
G – Type of the grid
Public Functions
-
inline InterpolatedMaterialMap(Mapper_t &&mapper)¶
Create interpolated map.
- Parameters
mapper – [in] Material map
-
inline InterpolatedMaterialMap(Mapper_t &&mapper, BinUtility bu)¶
Create interpolated map.
- Parameters
mapper – [in] Material map
bu – [in]
BinUtility
for build from
-
inline const BinUtility &binUtility() const¶
Return the BinUtility.
-
inline const Mapper_t &getMapper() const¶
Convenience method to access underlying material mapper.
- Returns
The material mapper
-
inline Material getMaterial(const Vector3 &position) const¶
Retrieve the interpolated material.
- Parameters
position – [in] Global 3D position
- Returns
material at given position
-
inline Material getMaterial(const Vector3 &position, Cache &cache) const¶
Retrieve material.
- Parameters
position – [in] Global 3D position
cache – [inout] Cache object. Contains material cell used for interpolation
- Returns
material at given position
-
inline Material getMaterialGradient(const Vector3 &position, ActsMatrix<5, 5> &derivative) const¶
Retrieve material value & its “gradient”.
Note
Currently the derivative is not calculated
- Parameters
position – [in] Global 3D position
derivative – [out] “Gradient” of material as (5x5) matrix
- Returns
Material
-
inline Material getMaterialGradient(const Vector3 &position, ActsMatrix<5, 5> &derivative, Cache &cache) const¶
Retrieve material value & its “gradient”.
Note
Currently the derivative is not calculated
Note
Cache is not used currently
- Parameters
position – [in] Global 3D position
derivative – [out] “Gradient” of material as (5x5) matrix
cache – [inout] Cache object. Contains cell used for
- Returns
Material
-
inline bool isInside(const Vector3 &position) const¶
Check whether given 3D position is inside look-up domain.
- Parameters
position – [in] Global 3D position
- Returns
true
if position is inside the defined map, otherwisefalse
-
inline virtual const Material material(const Vector3 &position) const override¶
Retrieve the binned material.
- Parameters
position – [in] Global 3D position
- Returns
Material at given position
-
inline virtual std::ostream &toStream(std::ostream &sl) const override¶
Output Method for std::ostream.
- Parameters
sl – The outoput stream
-
struct Cache¶
Temporary storage of a certain cell to improve material access.