ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::material< scalar_t, R > Struct Template Reference

Material composition properties and density data used by interactions. More...

#include <detray/material/material.hpp>

Inheritance diagram for detray::material< scalar_t, R >:
[legend]

Public Types

using ratio = R
 Compile-time fraction represented by this material component.
using scalar_type = scalar_t
 Scalar type for material properties.

Public Member Functions

constexpr material (const scalar_type x0, const scalar_type l0, const scalar_type ar, const scalar_type z, const scalar_type mass_rho, const material_state state)
 Construct from material parameters.
constexpr material (const scalar_type x0, const scalar_type l0, const scalar_type ar, const scalar_type z, const scalar_type mass_rho, const material_state state, const scalar_type d_a, const scalar_type d_m, const scalar_type d_X0, const scalar_type d_X1, const scalar_type d_I, const scalar_type d_nC, const scalar_type d_delta0)
 Construct from material parameters with density effect data.
constexpr scalar_type Ar () const
constexpr const detail::density_effect_data< scalar_type > & density_effect_data () const
constexpr scalar_type fraction () const
 Return this component's compile-time mass fraction.
bool has_density_effect_data () const
constexpr scalar_type L0 () const
constexpr scalar_type mass_density () const
scalar_type mean_excitation_energy () const
constexpr scalar_type molar_density () const
 mass_density / A
constexpr scalar_type molar_electron_density () const
 (Z/A) * mass_density
constexpr bool operator!= (const material< scalar_type > &rhs) const
 Equality operator.
constexpr bool operator== (const material< scalar_type > &rhs) const
 Equality operator.
constexpr material_state state () const
std::string to_string () const
constexpr scalar_type X0 () const
constexpr scalar_type Z () const

Protected Member Functions

constexpr scalar_type mass_to_molar_density (double ar, double mass_rho)
 Convert mass density to molar density using relative atomic mass.
constexpr void set_Ar (scalar_type ar)
 Set the relative atomic mass.
constexpr void set_L0 (scalar_type l0)
 Set the nuclear interaction length.
constexpr void set_mass_density (scalar_type mass_rho)
 Set the mass density.
constexpr void set_molar_density (scalar_type molar_rho)
 Set the molar density.
constexpr void set_X0 (scalar_type x0)
 Set the radition length.
constexpr void set_Z (scalar_type z)
 Set the nuclear charge number.

Detailed Description

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
struct detray::material< scalar_t, R >

Material composition properties and density data used by interactions.

Constructor & Destructor Documentation

◆ material() [1/2]

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
detray::material< scalar_t, R >::material ( const scalar_type x0,
const scalar_type l0,
const scalar_type ar,
const scalar_type z,
const scalar_type mass_rho,
const material_state state )
constexpr

Construct from material parameters.

Parameters
x0radiation length
l0nuclear interaction length
arrelative atomic mass
znuclear charge number
mass_rhomass density
statephysical state of the material

◆ material() [2/2]

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
detray::material< scalar_t, R >::material ( const scalar_type x0,
const scalar_type l0,
const scalar_type ar,
const scalar_type z,
const scalar_type mass_rho,
const material_state state,
const scalar_type d_a,
const scalar_type d_m,
const scalar_type d_X0,
const scalar_type d_X1,
const scalar_type d_I,
const scalar_type d_nC,
const scalar_type d_delta0 )
constexpr

Construct from material parameters with density effect data.

Parameters
x0radiation length
l0nuclear interaction length
arrelative atomic mass
znuclear charge number
mass_rhomass density
statephysical state of the material
d_adensity-effect fit parameter a
d_mdensity-effect fit parameter m
d_X0lower density-effect threshold
d_X1upper density-effect threshold
d_Imean excitation energy
d_nCdensity-effect normalization
d_delta0low-energy density-effect correction

Member Function Documentation

◆ Ar()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
scalar_type detray::material< scalar_t, R >::Ar ( ) const
constexpr
Returns
the relative atomic mass.

◆ density_effect_data()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
const detail::density_effect_data< scalar_type > & detray::material< scalar_t, R >::density_effect_data ( ) const
constexpr
Returns
the density effect data

◆ fraction()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
scalar_type detray::material< scalar_t, R >::fraction ( ) const
constexpr

Return this component's compile-time mass fraction.

Returns
ratio numerator divided by denominator, or an invalid value for a zero denominator

◆ has_density_effect_data()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
bool detray::material< scalar_t, R >::has_density_effect_data ( ) const
Returns
true if density effect data is present

◆ L0()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
scalar_type detray::material< scalar_t, R >::L0 ( ) const
constexpr
Returns
the nuclear interaction length. Infinity in case of vacuum.

◆ mass_density()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
scalar_type detray::material< scalar_t, R >::mass_density ( ) const
constexpr
Returns
the mass density.

◆ mass_to_molar_density()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
scalar_type detray::material< scalar_t, R >::mass_to_molar_density ( double ar,
double mass_rho )
constexprprotected

Convert mass density to molar density using relative atomic mass.

Parameters
arrelative atomic mass
mass_rhomass density
Returns
molar density

◆ mean_excitation_energy()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
scalar_type detray::material< scalar_t, R >::mean_excitation_energy ( ) const
Returns
the (Approximated) mean excitation energy

◆ molar_density()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
scalar_type detray::material< scalar_t, R >::molar_density ( ) const
constexpr

mass_density / A

Returns
the molar density.

◆ molar_electron_density()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
scalar_type detray::material< scalar_t, R >::molar_electron_density ( ) const
constexpr

(Z/A) * mass_density

Returns
the molar electron density.

◆ operator!=()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
bool detray::material< scalar_t, R >::operator!= ( const material< scalar_type > & rhs) const
constexpr

Equality operator.

Parameters
rhsis the right hand side to be compared to
Returns
whether radiation length, interaction length, atomic mass, and charge agree

◆ operator==()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
bool detray::material< scalar_t, R >::operator== ( const material< scalar_type > & rhs) const
constexpr

Equality operator.

Parameters
rhsis the right hand side to be compared to
Returns
whether radiation length, interaction length, atomic mass, and charge agree

◆ set_Ar()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
void detray::material< scalar_t, R >::set_Ar ( scalar_type ar)
constexprprotected

Set the relative atomic mass.

Parameters
arnew relative atomic mass

◆ set_L0()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
void detray::material< scalar_t, R >::set_L0 ( scalar_type l0)
constexprprotected

Set the nuclear interaction length.

Parameters
l0new nuclear interaction length

◆ set_mass_density()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
void detray::material< scalar_t, R >::set_mass_density ( scalar_type mass_rho)
constexprprotected

Set the mass density.

Parameters
mass_rhonew mass density

◆ set_molar_density()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
void detray::material< scalar_t, R >::set_molar_density ( scalar_type molar_rho)
constexprprotected

Set the molar density.

Parameters
molar_rhonew molar density

◆ set_X0()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
void detray::material< scalar_t, R >::set_X0 ( scalar_type x0)
constexprprotected

Set the radition length.

Parameters
x0new radiation length

◆ set_Z()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
void detray::material< scalar_t, R >::set_Z ( scalar_type z)
constexprprotected

Set the nuclear charge number.

Parameters
znew nuclear charge number

◆ state()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
material_state detray::material< scalar_t, R >::state ( ) const
constexpr
Returns
the material state.

◆ to_string()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
std::string detray::material< scalar_t, R >::to_string ( ) const
Returns
a string that contains the material details

◆ X0()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
scalar_type detray::material< scalar_t, R >::X0 ( ) const
constexpr
Returns
the radition length. Infinity in case of vacuum.

◆ Z()

template<concepts::scalar scalar_t, typename R = std::ratio<1, 1>>
scalar_type detray::material< scalar_t, R >::Z ( ) const
constexpr
Returns
the nuclear charge number.