ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::InterpolatedMaterialMap< Mapper_t > Class Template Reference

Interpolate material classification values from material values on a given grid. More...

#include <Acts/Material/InterpolatedMaterialMap.hpp>

Inheritance diagram for Acts::InterpolatedMaterialMap< Mapper_t >:
[legend]
Collaboration diagram for Acts::InterpolatedMaterialMap< Mapper_t >:
[legend]

Classes

struct  Cache
 Temporary storage of a certain cell to improve material access. More...

Public Member Functions

 InterpolatedMaterialMap (Mapper_t &&mapper)
 Create interpolated map.
 InterpolatedMaterialMap (Mapper_t &&mapper, BinUtility bu)
 Create interpolated map.
const BinUtilitybinUtility () const
 Return the BinUtility.
const Mapper_t & getMapper () const
 Convenience method to access underlying material mapper.
Material getMaterial (const Vector3 &position) const
 Retrieve the interpolated material.
Material getMaterial (const Vector3 &position, Cache &cache) const
 Retrieve material.
Material getMaterialGradient (const Vector3 &position, ActsMatrix< 5, 5 > &) const
 Retrieve material value & its "gradient".
Material getMaterialGradient (const Vector3 &position, ActsMatrix< 5, 5 > &, Cache &) const
 Retrieve material value & its "gradient".
bool isInside (const Vector3 &position) const
 Check whether given 3D position is inside look-up domain.
const Material material (const Vector3 &position) const override
 Retrieve the binned material.
std::ostream & toStream (std::ostream &sl) const override
 Output Method for std::ostream.
Public Member Functions inherited from Acts::IVolumeMaterial
virtual ~IVolumeMaterial ()=default
 Virtual Destructor.

Detailed Description

template<typename Mapper_t>
class Acts::InterpolatedMaterialMap< Mapper_t >

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
    GType of the grid

Constructor & Destructor Documentation

◆ InterpolatedMaterialMap() [1/2]

template<typename Mapper_t>
Acts::InterpolatedMaterialMap< Mapper_t >::InterpolatedMaterialMap ( Mapper_t && mapper)
explicit

Create interpolated map.

Parameters
[in]mapperMaterial map

◆ InterpolatedMaterialMap() [2/2]

template<typename Mapper_t>
Acts::InterpolatedMaterialMap< Mapper_t >::InterpolatedMaterialMap ( Mapper_t && mapper,
BinUtility bu )

Create interpolated map.

Parameters
[in]mapperMaterial map
[in]buBinUtility for build from

Member Function Documentation

◆ binUtility()

template<typename Mapper_t>
const BinUtility & Acts::InterpolatedMaterialMap< Mapper_t >::binUtility ( ) const

Return the BinUtility.

Returns
Const reference to the bin utility for the material map

◆ getMapper()

template<typename Mapper_t>
const Mapper_t & Acts::InterpolatedMaterialMap< Mapper_t >::getMapper ( ) const

Convenience method to access underlying material mapper.

Returns
The material mapper

◆ getMaterial() [1/2]

template<typename Mapper_t>
Material Acts::InterpolatedMaterialMap< Mapper_t >::getMaterial ( const Vector3 & position) const

Retrieve the interpolated material.

Parameters
[in]positionGlobal 3D position
Returns
material at given position

◆ getMaterial() [2/2]

template<typename Mapper_t>
Material Acts::InterpolatedMaterialMap< Mapper_t >::getMaterial ( const Vector3 & position,
Cache & cache ) const

Retrieve material.

Parameters
[in]positionGlobal 3D position
[in,out]cacheCache object. Contains material cell used for interpolation
Returns
material at given position

◆ getMaterialGradient() [1/2]

template<typename Mapper_t>
Material Acts::InterpolatedMaterialMap< Mapper_t >::getMaterialGradient ( const Vector3 & position,
ActsMatrix< 5, 5 > &  ) const

Retrieve material value & its "gradient".

Parameters
[in]positionGlobal 3D position
Returns
Material
Note
Currently the derivative is not calculated
Todo
return derivative

◆ getMaterialGradient() [2/2]

template<typename Mapper_t>
Material Acts::InterpolatedMaterialMap< Mapper_t >::getMaterialGradient ( const Vector3 & position,
ActsMatrix< 5, 5 > & ,
Cache &  ) const

Retrieve material value & its "gradient".

Parameters
[in]positionGlobal 3D position
Returns
Material
Note
Currently the derivative is not calculated
Cache is not used currently
Todo
return derivative

◆ isInside()

template<typename Mapper_t>
bool Acts::InterpolatedMaterialMap< Mapper_t >::isInside ( const Vector3 & position) const

Check whether given 3D position is inside look-up domain.

Parameters
[in]positionGlobal 3D position
Returns
true if position is inside the defined map, otherwise false

◆ material()

template<typename Mapper_t>
const Material Acts::InterpolatedMaterialMap< Mapper_t >::material ( const Vector3 & position) const
overridevirtual

Retrieve the binned material.

Parameters
[in]positionGlobal 3D position
Returns
Material at given position

Implements Acts::IVolumeMaterial.

◆ toStream()

template<typename Mapper_t>
std::ostream & Acts::InterpolatedMaterialMap< Mapper_t >::toStream ( std::ostream & sl) const
overridevirtual

Output Method for std::ostream.

Parameters
slThe outoput stream
Returns
Reference to the output stream for method chaining

Implements Acts::IVolumeMaterial.