ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::detail::material_checker Struct Reference

A functor that checks the material parametrization for a surface/volume. More...

#include <detray/utils/consistency_checker.hpp>

Public Member Functions

template<typename material_coll_t, typename index_t, typename id_t>
requires concepts::material_map<typename material_coll_t::value_type>
void operator() (const material_coll_t &material_coll, const index_t idx, const id_t id) const
 Test whether a given material map contains invalid material.
template<typename material_coll_t, typename index_t, typename id_t>
requires concepts::homogeneous_material< typename material_coll_t::value_type>
void operator() (const material_coll_t &material_coll, const index_t idx, const id_t) const
 Test whether a given collection of material contains invalid material.
template<typename material_t>
void throw_material_error (const std::string &type, const dindex idx, const material_t &mat) const
 Error message for material consistency check.

Detailed Description

A functor that checks the material parametrization for a surface/volume.

Member Function Documentation

◆ operator()() [1/2]

template<typename material_coll_t, typename index_t, typename id_t>
requires concepts::material_map<typename material_coll_t::value_type>
void detray::detail::material_checker::operator() ( const material_coll_t & material_coll,
const index_t idx,
const id_t id ) const

Test whether a given material map contains invalid material.

Parameters
material_collcollection of material grids
idxthe specific grid to be checked
idtype id of the material grid collection

◆ operator()() [2/2]

template<typename material_coll_t, typename index_t, typename id_t>
requires concepts::homogeneous_material< typename material_coll_t::value_type>
void detray::detail::material_checker::operator() ( const material_coll_t & material_coll,
const index_t idx,
const id_t  ) const

Test whether a given collection of material contains invalid material.

Parameters
material_collcollection of material slabs/rods/raw mat
idxthe specific instance to be checked

◆ throw_material_error()

template<typename material_t>
void detray::detail::material_checker::throw_material_error ( const std::string & type,
const dindex idx,
const material_t & mat ) const

Error message for material consistency check.

Parameters
typeName of the material collection or object type.
idxIndex of the invalid material.
matMaterial value that failed validation.