ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::GridSurfaceMaterialT< grid_t, material_accessor_t > Class Template Reference

GridSurfaceMaterialT. More...

#include <Acts/Material/GridSurfaceMaterial.hpp>

Inheritance diagram for Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >:
[legend]
Collaboration diagram for Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >:
[legend]

Public Types

using BoundToGridLocalDelegate
 Type alias for bound coordinates to grid local coordinates conversion delegate.
using GlobalToGridLocalDelegate
 Type alias for global coordinates to grid local coordinates conversion delegate.
using grid_type = grid_t
 Broadcast grid type.
using material_accessor_type = material_accessor_t
 Broadcast material accessor type.

Public Member Functions

 GridSurfaceMaterialT (grid_type &&grid, material_accessor_type &&materialAccessor, BoundToGridLocalDelegate boundToGridLocal, GlobalToGridLocalDelegate globalToGridLocal)
 Constructor for indexed surface material.
const GridAccess::IBoundToGridLocalboundToGridLocal () const final
 Accessor to the bound to grid local delegate.
const BoundToGridLocalDelegateboundToGridLocalDelegate () const
 Accessor to the bound to grid local delegate.
const GridAccess::IGlobalToGridLocalglobalToGridLocal () const final
 Accessor to the global to grid local delegate.
const GlobalToGridLocalDelegateglobalToGridLocalDelegate () const
 Accessor to the global to grid local delegate.
const grid_typegrid () const final
 Accessor to the grid.
AnyGridConstView< typename material_accessor_t::grid_value_type > gridConstView () const final
AnyGridView< typename material_accessor_t::grid_value_type > gridView () final
const material_accessor_typematerialAccessor () const final
 Accessor to the material accessor.
const MaterialSlabmaterialSlab (const Vector2 &lp) const final
 Return method for full material description of the Surface.
virtual MaterialSlab materialSlab (const Vector2 &lp, Direction pDir, MaterialUpdateMode mode) const
 Return method for fully scaled material description of the Surface.
const MaterialSlabmaterialSlab (const Vector3 &gp) const final
 Return method for full material description of the Surface.
virtual MaterialSlab materialSlab (const Vector3 &gp, Direction pDir, MaterialUpdateMode mode) const
 Return method for full material description of the Surface.
ISurfaceMaterialscale (double factor) final
 Scale operator.
std::ostream & toStream (std::ostream &sl) const final
 Output Method for std::ostream, to be overloaded by child classes.
Public Member Functions inherited from Acts::ISurfaceMaterial
 ISurfaceMaterial ()=default
 Constructor.
 ISurfaceMaterial (double splitFactor)
 Constructor.
 ISurfaceMaterial (double splitFactor, MappingType mappingType)
 Constructor.
virtual ~ISurfaceMaterial ()=default
 Destructor.
double factor (Direction pDir, MaterialUpdateMode mode) const
 Update pre factor.
MappingType mappingType () const
 Return the type of surface material mapping.
std::string toString () const
 output into a string

Additional Inherited Members

Protected Attributes inherited from Acts::ISurfaceMaterial
MappingType m_mappingType {MappingType::Default}
 Use the default mapping type by default.
double m_splitFactor {1.}
 the split factor in favour of oppositePre

Detailed Description

template<typename grid_t, typename material_accessor_t>
class Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >

GridSurfaceMaterialT.

It extends the ISurfaceMaterial base class and allows to create material maps associated to a grid structure

Template Parameters
grid_typeis the type of the grid used here
material_accessor_typeis the type of the accessor to the material

It is templated on the material type and a slab accessor type in order to allow it to be used in the material recording as well.

Member Typedef Documentation

◆ BoundToGridLocalDelegate

template<typename grid_t, typename material_accessor_t>
using Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::BoundToGridLocalDelegate
Initial value:
OwningDelegate<typename grid_t::point_t(const Vector2&),
Interface class for owning delegate.
Definition GridAccessHelpers.hpp:106
Definition Delegate.hpp:361
ActsVector< 2 > Vector2
2-dimensional vector type for 2D coordinates
Definition Algebra.hpp:70

Type alias for bound coordinates to grid local coordinates conversion delegate.

◆ GlobalToGridLocalDelegate

template<typename grid_t, typename material_accessor_t>
using Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::GlobalToGridLocalDelegate
Initial value:
OwningDelegate<typename grid_t::point_t(const Vector3&),
Interface class for owning delegate.
Definition GridAccessHelpers.hpp:100
ActsVector< 3 > Vector3
3-dimensional vector type for e.g. spatial coordinates and momenta
Definition Algebra.hpp:72

Type alias for global coordinates to grid local coordinates conversion delegate.

◆ grid_type

template<typename grid_t, typename material_accessor_t>
using Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::grid_type = grid_t

Broadcast grid type.

◆ material_accessor_type

template<typename grid_t, typename material_accessor_t>
using Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::material_accessor_type = material_accessor_t

Broadcast material accessor type.

Constructor & Destructor Documentation

◆ GridSurfaceMaterialT()

template<typename grid_t, typename material_accessor_t>
Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::GridSurfaceMaterialT ( grid_type && grid,
material_accessor_type && materialAccessor,
BoundToGridLocalDelegate boundToGridLocal,
GlobalToGridLocalDelegate globalToGridLocal )

Constructor for indexed surface material.

Parameters
gridthe index grid steering the access to the material vector
materialAccessorthe material accessor: from grid, from indexed vector
boundToGridLocalthe delegation from bound to grid local frame
globalToGridLocalthe delegation from global into grid local frame

Member Function Documentation

◆ boundToGridLocal()

template<typename grid_t, typename material_accessor_t>
const GridAccess::IBoundToGridLocal & Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::boundToGridLocal ( ) const
finalvirtual

Accessor to the bound to grid local delegate.

Returns
Reference to the bound to grid local coordinate transformation delegate

Implements Acts::IGridSurfaceMaterial< material_accessor_t::grid_value_type >.

◆ boundToGridLocalDelegate()

template<typename grid_t, typename material_accessor_t>
const BoundToGridLocalDelegate & Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::boundToGridLocalDelegate ( ) const

Accessor to the bound to grid local delegate.

Returns
Reference to the bound to grid local delegate

◆ globalToGridLocal()

template<typename grid_t, typename material_accessor_t>
const GridAccess::IGlobalToGridLocal & Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::globalToGridLocal ( ) const
finalvirtual

Accessor to the global to grid local delegate.

Returns
Reference to the global to grid local coordinate transformation delegate

Implements Acts::IGridSurfaceMaterial< material_accessor_t::grid_value_type >.

◆ globalToGridLocalDelegate()

template<typename grid_t, typename material_accessor_t>
const GlobalToGridLocalDelegate & Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::globalToGridLocalDelegate ( ) const

Accessor to the global to grid local delegate.

Returns
Reference to the global to grid local delegate

◆ grid()

template<typename grid_t, typename material_accessor_t>
const grid_type & Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::grid ( ) const
finalvirtual

Accessor to the grid.

Returns
Reference to the underlying grid

Implements Acts::IGridSurfaceMaterial< material_accessor_t::grid_value_type >.

◆ gridConstView()

template<typename grid_t, typename material_accessor_t>
AnyGridConstView< typename material_accessor_t::grid_value_type > Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::gridConstView ( ) const
finalvirtual
Returns
Type-erased const grid view for read-only access to grid contents

Implements Acts::IGridSurfaceMaterial< material_accessor_t::grid_value_type >.

◆ gridView()

template<typename grid_t, typename material_accessor_t>
AnyGridView< typename material_accessor_t::grid_value_type > Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::gridView ( )
finalvirtual
Returns
Type-erased grid view for accessing grid contents

Implements Acts::IGridSurfaceMaterial< material_accessor_t::grid_value_type >.

◆ materialAccessor()

template<typename grid_t, typename material_accessor_t>
const material_accessor_type & Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::materialAccessor ( ) const
finalvirtual

Accessor to the material accessor.

Returns
Reference to the material accessor

Implements Acts::IGridSurfaceMaterial< material_accessor_t::grid_value_type >.

◆ materialSlab() [1/4]

template<typename grid_t, typename material_accessor_t>
const MaterialSlab & Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::materialSlab ( const Vector2 & lp) const
finalvirtual

Return method for full material description of the Surface.

  • from local coordinate on the surface
Parameters
lpis the local position used for the (eventual) lookup
Returns
const MaterialSlab

Implements Acts::ISurfaceMaterial.

◆ materialSlab() [2/4]

template<typename grid_t, typename material_accessor_t>
virtual MaterialSlab Acts::ISurfaceMaterial::materialSlab ( const Vector2 & lp,
Direction pDir,
MaterialUpdateMode mode ) const
virtual

Return method for fully scaled material description of the Surface.

  • from local coordinate on the surface
Parameters
lpis the local position used for the (eventual) lookup
pDiris the positive direction through the surface
modeis the material update directive
Returns
MaterialSlab

Reimplemented from Acts::ISurfaceMaterial.

◆ materialSlab() [3/4]

template<typename grid_t, typename material_accessor_t>
const MaterialSlab & Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::materialSlab ( const Vector3 & gp) const
finalvirtual

Return method for full material description of the Surface.

  • from the global coordinates
Parameters
gpis the global position used for the (eventual) lookup
Returns
const MaterialSlab

Implements Acts::ISurfaceMaterial.

◆ materialSlab() [4/4]

template<typename grid_t, typename material_accessor_t>
virtual MaterialSlab Acts::ISurfaceMaterial::materialSlab ( const Vector3 & gp,
Direction pDir,
MaterialUpdateMode mode ) const
virtual

Return method for full material description of the Surface.

  • from the global coordinates
Parameters
gpis the global position used for the (eventual) lookup
pDiris the positive direction through the surface
modeis the material update directive
Returns
MaterialSlab

Reimplemented from Acts::ISurfaceMaterial.

◆ scale()

template<typename grid_t, typename material_accessor_t>
ISurfaceMaterial & Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::scale ( double factor)
finalvirtual

Scale operator.

Parameters
factoris the scale factor applied
Returns
Reference to this surface material for method chaining

Implements Acts::ISurfaceMaterial.

◆ toStream()

template<typename grid_t, typename material_accessor_t>
std::ostream & Acts::GridSurfaceMaterialT< grid_t, material_accessor_t >::toStream ( std::ostream & sl) const
finalvirtual

Output Method for std::ostream, to be overloaded by child classes.

Parameters
slOutput stream to write to
Returns
Reference to the output stream

Implements Acts::ISurfaceMaterial.