ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::MaterialMapLookup< G > Struct Template Reference

Struct for mapping global 3D positions to material values. More...

#include <Acts/Material/InterpolatedMaterialMap.hpp>

Classes

struct  MaterialCell
 Struct representing smallest grid unit in material grid. More...

Public Types

using Grid_t = G
 Type alias for material grid.

Public Member Functions

 MaterialMapLookup (std::function< ActsVector< DIM_POS >(const Vector3 &)> transformPos, Grid_t grid)
 Default constructor.
const Grid_tgetGrid () const
 Get a const reference on the underlying grid structure.
Material getMaterial (const Vector3 &position) const
 Retrieve interpolated material at given position.
MaterialCell getMaterialCell (const Vector3 &position) const
 Retrieve material cell for given position.
std::vector< double > getMax () const
 Get the maximum value of all axes of the map.
std::vector< double > getMin () const
 Get the minimum value of all axes of the map.
std::vector< std::size_t > getNBins () const
 Get the number of bins for all axes of the map.
bool isInside (const Vector3 &position) const
 Check whether given 3D position is inside look-up domain.
Material material (const Vector3 &position) const
 Retrieve binned material at given position.

Static Public Attributes

static constexpr std::size_t DIM_POS = Grid_t::DIM
 Dimensionality of the position space for material interpolation.

Detailed Description

template<typename G>
struct Acts::MaterialMapLookup< G >

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.

Member Typedef Documentation

◆ Grid_t

template<typename G>
using Acts::MaterialMapLookup< G >::Grid_t = G

Type alias for material grid.

Constructor & Destructor Documentation

◆ MaterialMapLookup()

template<typename G>
Acts::MaterialMapLookup< G >::MaterialMapLookup ( std::function< ActsVector< DIM_POS >(const Vector3 &)> transformPos,
Grid_t grid )

Default constructor.

Parameters
[in]transformPosMapping of global 3D coordinates (cartesian) onto grid space
[in]gridGrid storing material classification values

Member Function Documentation

◆ getGrid()

template<typename G>
const Grid_t & Acts::MaterialMapLookup< G >::getGrid ( ) const

Get a const reference on the underlying grid structure.

Returns
Grid reference

◆ getMaterial()

template<typename G>
Material Acts::MaterialMapLookup< G >::getMaterial ( const Vector3 & position) const

Retrieve interpolated material at given position.

Parameters
[in]positionGlobal 3D position
Returns
Material at the given position
Precondition
The given position must lie within the range of the underlying map.

◆ getMaterialCell()

template<typename G>
MaterialCell Acts::MaterialMapLookup< G >::getMaterialCell ( const Vector3 & position) const

Retrieve material cell for given position.

Parameters
[in]positionGlobal 3D position
Returns
material cell containing the given global position
Precondition
The given position must lie within the range of the underlying map.

◆ getMax()

template<typename G>
std::vector< double > Acts::MaterialMapLookup< G >::getMax ( ) const

Get the maximum value of all axes of the map.

Returns
Vector returning the maxima of all map axes

◆ getMin()

template<typename G>
std::vector< double > Acts::MaterialMapLookup< G >::getMin ( ) const

Get the minimum value of all axes of the map.

Returns
Vector returning the minima of all map axes

◆ getNBins()

template<typename G>
std::vector< std::size_t > Acts::MaterialMapLookup< G >::getNBins ( ) const

Get the number of bins for all axes of the map.

Returns
Vector returning number of bins for all map axes

◆ isInside()

template<typename G>
bool Acts::MaterialMapLookup< G >::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 look-up grid, otherwise false

◆ material()

template<typename G>
Material Acts::MaterialMapLookup< G >::material ( const Vector3 & position) const

Retrieve binned material at given position.

Parameters
[in]positionGlobal 3D position
Returns
Material at the given position
Precondition
The given position must lie within the range of the underlying map.

Member Data Documentation

◆ DIM_POS

template<typename G>
std::size_t Acts::MaterialMapLookup< G >::DIM_POS = Grid_t::DIM
staticconstexpr

Dimensionality of the position space for material interpolation.