File MaterialGridHelper.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

Typedefs

using EAxis = Acts::detail::EquidistantAxis
using Grid2D = Acts::detail::Grid<Acts::AccumulatedVolumeMaterial, EAxis, EAxis>
using Grid3D = Acts::detail::Grid<Acts::AccumulatedVolumeMaterial, EAxis, EAxis, EAxis>
using MaterialGrid2D = Acts::detail::Grid<Acts::Material::ParametersVector, EAxis, EAxis>
using MaterialGrid3D = Acts::detail::Grid<Acts::Material::ParametersVector, EAxis, EAxis, EAxis>

Functions

Grid2D createGrid(std::array<double, 3> gridAxis1, std::array<double, 3> gridAxis2)

Helper method that creates the cache grid for the mapping.

This grid allows the collection of material at a the anchor points.

Note

The data of the axes is given in the std::array as {minimum value, maximum value, number of bins}

Parameters
  • gridAxis1[in] Axis data

  • gridAxis2[in] Axis data

Returns

The grid

Grid3D createGrid(std::array<double, 3> gridAxis1, std::array<double, 3> gridAxis2, std::array<double, 3> gridAxis3)

Helper method that creates the cache grid for the mapping.

This grid allows the collection of material at a the anchor points.

Note

The data of the axes is given in the std::array as {minimum value, maximum value, number of bins}

Parameters
  • gridAxis1[in] Axis data

  • gridAxis2[in] Axis data

  • gridAxis3[in] Axis data

Returns

The grid

Grid2D createGrid2D(const BinUtility &bins, std::function<Acts::Vector2(Acts::Vector3)> &transfoGlobalToLocal)

Create a 2DGrid using a BinUtility.

Also determine the coresponding global to local transform and grid mapping function

Parameters
  • bins[in] BinUtility of the volume to be mapped

  • transfoGlobalToLocal[in] Global to local transform to be updated.

Returns

the 3D grid

Grid3D createGrid3D(const BinUtility &bins, std::function<Acts::Vector3(Acts::Vector3)> &transfoGlobalToLocal)

Create a 3DGrid using a BinUtility.

Also determine the coresponding global to local transform and grid mapping function

Parameters
  • bins[in] BinUtility of the volume to be mapped

  • transfoGlobalToLocal[in] Global to local transform to be updated.

Returns

the 3D grid

std::function<double(Acts::Vector3)> globalToLocalFromBin(Acts::BinningValue &type)

return a function that return the coordinate corresponding to type of bin

Parameters

type[in] Type of bin

Returns

a coordinate transform function

MaterialGrid2D mapMaterialPoints(Grid2D &grid)

Average the material collected in a 2D grid and use it to create a 2D material grid.

Parameters

grid[in] The material collecting grid coordinate

Returns

The average material grid decomposed into classification numbers

MaterialGrid3D mapMaterialPoints(Grid3D &grid)

Average the material collected in a 3D grid and use it to create a 3D material grid.

Parameters

grid[in] The material collecting grid coordinate

Returns

The average material grid decomposed into classification numbers