ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::IndexedMaterialAccessor Struct Reference

This is an accessor for cases where the material is filled in a vector and then indexed by the grid. More...

#include <Acts/Material/GridSurfaceMaterial.hpp>

Inheritance diagram for Acts::IndexedMaterialAccessor:
[legend]
Collaboration diagram for Acts::IndexedMaterialAccessor:
[legend]

Public Types

using grid_value_type = std::size_t
 Broadcast the grid_value_type.

Public Member Functions

 IndexedMaterialAccessor (std::vector< MaterialSlab > &&mmaterial)
 The internal storage of the material.
template<typename grid_type>
void scale (grid_type &, double scale)
 Scale the material (by scaling the thickness).
template<typename grid_type>
const MaterialSlabslab (const grid_type &grid, const typename grid_type::point_t &point) const
 Direct const access to the material slap sorted in the grid.
Public Member Functions inherited from Acts::IGridMaterialAccessor
virtual ~IGridMaterialAccessor ()=default

Public Attributes

std::vector< MaterialSlabmaterial
 The internal storage of the material.

Detailed Description

This is an accessor for cases where the material is filled in a vector and then indexed by the grid.

Member Typedef Documentation

◆ grid_value_type

Broadcast the grid_value_type.

Constructor & Destructor Documentation

◆ IndexedMaterialAccessor()

Acts::IndexedMaterialAccessor::IndexedMaterialAccessor ( std::vector< MaterialSlab > && mmaterial)
explicit

The internal storage of the material.

Parameters
mmaterialVector of material slabs to store and access by index

Member Function Documentation

◆ scale()

template<typename grid_type>
void Acts::IndexedMaterialAccessor::scale ( grid_type & ,
double scale )

Scale the material (by scaling the thickness).

Parameters
scalethe amount of the scaling

◆ slab()

template<typename grid_type>
const MaterialSlab & Acts::IndexedMaterialAccessor::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_typethe type of the grid, also defines the point type
Parameters
gridthe grid
pointthe lookup point (already casted from global, or filled from local)
Returns
the material slab from the grid bin associated to the lookup point

Member Data Documentation

◆ material

std::vector<MaterialSlab> Acts::IndexedMaterialAccessor::material

The internal storage of the material.