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

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

#include <Acts/Material/InterpolatedMaterialMap.hpp>

Public Member 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.
Material getMaterial (const Vector3 &position) const
 Retrieve material at given position.
bool isInside (const Vector3 &position) const
 Check whether given 3D position is inside this cell.

Static Public Attributes

static constexpr unsigned int N = 1 << DIM_POS
 Number of corner points defining the confining hyper-box.

Detailed Description

template<typename G>
struct Acts::MaterialMapLookup< G >::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.

Constructor & Destructor Documentation

◆ MaterialCell()

template<typename G>
Acts::MaterialMapLookup< G >::MaterialCell::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]transformPosMapping of global 3D coordinates onto grid space
[in]lowerLeftGeneralized lower-left corner of hyper box (containing the minima of the hyper box along each Dimension)
[in]upperRightGeneralized upper-right corner of hyper box (containing the maxima of the hyper box along each Dimension)
[in]materialValuesMaterial classification values at the hyper box corners sorted in the canonical order defined in Acts::interpolate

Member Function Documentation

◆ getMaterial()

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

Retrieve material at given position.

Parameters
[in]positionGlobal 3D position
Returns
Material at the given position
Precondition
The given position must lie within the current cell.

◆ isInside()

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

Check whether given 3D position is inside this cell.

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

Member Data Documentation

◆ N

template<typename G>
unsigned int Acts::MaterialMapLookup< G >::MaterialCell::N = 1 << DIM_POS
staticconstexpr

Number of corner points defining the confining hyper-box.