This is an accessor for cases where the material is filled in a global material vector that is accessed from the different material grids.
More...
#include <Acts/Material/GridSurfaceMaterial.hpp>
|
| | GloballyIndexedMaterialAccessor (std::shared_ptr< std::vector< MaterialSlab > > gMaterial, bool shared=false) |
| | Constructor with global material vector.
|
| template<typename grid_type> |
| void | scale (grid_type &grid, double scale) |
| | Scale the material (by scaling the thickness).
|
| template<typename grid_type> |
| const MaterialSlab & | slab (const grid_type &grid, const typename grid_type::point_t &point) const |
| | Direct const access to the material slap sorted in the grid.
|
| virtual | ~IGridMaterialAccessor ()=default |
|
| std::shared_ptr< std::vector< MaterialSlab > > | globalMaterial = nullptr |
| | The internal storage of the material.
|
| bool | sharedEntries = false |
| | Indicate if you have entries bins across different grids, e.g.
|
This is an accessor for cases where the material is filled in a global material vector that is accessed from the different material grids.
◆ grid_value_type
Broadcast the grid_value_type.
◆ GloballyIndexedMaterialAccessor()
| Acts::GloballyIndexedMaterialAccessor::GloballyIndexedMaterialAccessor |
( |
std::shared_ptr< std::vector< MaterialSlab > > | gMaterial, |
|
|
bool | shared = false ) |
|
explicit |
Constructor with global material vector.
- Parameters
-
| gMaterial | Shared pointer to global material vector |
| shared | Whether material entries are shared across grid points |
◆ scale()
template<typename grid_type>
| void Acts::GloballyIndexedMaterialAccessor::scale |
( |
grid_type & | grid, |
|
|
double | scale ) |
Scale the material (by scaling the thickness).
- Parameters
-
| grid | the grid holding the indices into the global material vector |
| scale | the amount of the scaling |
- Note
- this will scale only the bins touched by this grid, however, if there are shared bins, then it will throw an exception as the outcome is unpredictable.
◆ slab()
template<typename grid_type>
| const MaterialSlab & Acts::GloballyIndexedMaterialAccessor::slab |
( |
const grid_type & | grid, |
|
|
const typename grid_type::point_t & | point ) const |
Direct const access to the material slap sorted in the grid.
- Template Parameters
-
| grid_type | the type of the grid, also defines the point type |
- Parameters
-
| grid | the grid holding the indices into the global material vector |
| point | the lookup point (already casted from global, or filled from local) |
- Returns
- the material slab from the grid bin associated to the lookup point
◆ globalMaterial
| std::shared_ptr<std::vector<MaterialSlab> > Acts::GloballyIndexedMaterialAccessor::globalMaterial = nullptr |
The internal storage of the material.
◆ sharedEntries
| bool Acts::GloballyIndexedMaterialAccessor::sharedEntries = false |
Indicate if you have entries bins across different grids, e.g.
by running a compression/clustering algorithm.
It is the responsibility of the user to set this flag correctly.