Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::MaterialMapper< G > Struct Template Reference

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

#include <acts/blob/sPHENIX/Core/include/Acts/Material/InterpolatedMaterialMap.hpp>

Classes

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

Public Types

using Grid_t = G
 

Public Member Functions

 MaterialMapper (std::function< ActsVector< DIM_POS >(const Vector3 &)> transformPos, Grid_t grid)
 Default constructor.
 
Material material (const Vector3 &position) const
 Retrieve binned material at given position.
 
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< size_t > getNBins () const
 Get the number of bins for all axes of the map.
 
std::vector< doublegetMin () const
 Get the minimum value of all axes of the map.
 
std::vector< doublegetMax () const
 Get the maximum value of all axes of the map.
 
bool isInside (const Vector3 &position) const
 Check whether given 3D position is inside look-up domain.
 
const Grid_tgetGrid () const
 Get a const reference on the underlying grid structure.
 

Static Public Attributes

static constexpr size_t DIM_POS = Grid_t::DIM
 

Private Attributes

std::function< ActsVector
< DIM_POS >const Vector3 &)> 
m_transformPos
 Geometric transformation applied to global 3D positions.
 
Grid_t m_grid
 Grid storing material values.
 

Detailed Description

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

Definition at line 28 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 28 of file InterpolatedMaterialMap.hpp

Member Typedef Documentation

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

Definition at line 30 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 30 of file InterpolatedMaterialMap.hpp

Constructor & Destructor Documentation

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

Default constructor.

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

Definition at line 113 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 113 of file InterpolatedMaterialMap.hpp

Member Function Documentation

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

Get a const reference on the underlying grid structure.

Returns
Grid reference

Definition at line 205 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 205 of file InterpolatedMaterialMap.hpp

References Acts::MaterialMapper< G >::m_grid.

Referenced by ActsExamples::RootMaterialWriter::writeMaterial().

+ Here is the caller graph for this function:

template<typename G>
Material Acts::MaterialMapper< G >::getMaterial ( const Vector3 position) const
inline

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.

Definition at line 137 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 137 of file InterpolatedMaterialMap.hpp

References Acts::MaterialMapper< G >::m_grid, and Acts::MaterialMapper< G >::m_transformPos.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

template<typename G>
MaterialCell Acts::MaterialMapper< G >::getMaterialCell ( const Vector3 position) const
inline

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.

Definition at line 148 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 148 of file InterpolatedMaterialMap.hpp

References Acts::MaterialMapper< G >::DIM_POS, i, index, Acts::MaterialMapper< G >::m_grid, Acts::MaterialMapper< G >::m_transformPos, and testing::internal::move().

+ Here is the call graph for this function:

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

Get the maximum value of all axes of the map.

Returns
Vector returning the maxima of all map axes

Definition at line 188 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 188 of file InterpolatedMaterialMap.hpp

References Acts::MaterialMapper< G >::m_grid.

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

Get the minimum value of all axes of the map.

Returns
Vector returning the minima of all map axes

Definition at line 180 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 180 of file InterpolatedMaterialMap.hpp

References Acts::MaterialMapper< G >::m_grid.

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

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

Returns
Vector returning number of bins for all map axes

Definition at line 172 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 172 of file InterpolatedMaterialMap.hpp

References Acts::MaterialMapper< G >::m_grid.

template<typename G>
bool Acts::MaterialMapper< G >::isInside ( const Vector3 position) const
inline

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

Definition at line 198 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 198 of file InterpolatedMaterialMap.hpp

References Acts::MaterialMapper< G >::m_grid, and Acts::MaterialMapper< G >::m_transformPos.

template<typename G>
Material Acts::MaterialMapper< G >::material ( const Vector3 position) const
inline

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.

Definition at line 125 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 125 of file InterpolatedMaterialMap.hpp

References Acts::MaterialMapper< G >::m_grid, and Acts::MaterialMapper< G >::m_transformPos.

Member Data Documentation

template<typename G>
constexpr size_t Acts::MaterialMapper< G >::DIM_POS = Grid_t::DIM
static

Definition at line 31 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 31 of file InterpolatedMaterialMap.hpp

Referenced by Acts::MaterialMapper< G >::getMaterialCell(), and Acts::MaterialMapper< G >::MaterialCell::isInside().

template<typename G>
std::function<ActsVector<DIM_POS>const Vector3&)> Acts::MaterialMapper< G >::m_transformPos
private

Geometric transformation applied to global 3D positions.

Definition at line 209 of file InterpolatedMaterialMap.hpp.

View newest version in sPHENIX GitHub at line 209 of file InterpolatedMaterialMap.hpp

Referenced by Acts::MaterialMapper< G >::getMaterial(), Acts::MaterialMapper< G >::getMaterialCell(), Acts::MaterialMapper< G >::isInside(), and Acts::MaterialMapper< G >::material().


The documentation for this struct was generated from the following file: