File Material.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

Functions

std::ostream &operator<<(std::ostream &os, const Material &material)
class Material
#include <Acts/Material/Material.hpp>

Material description for interactions with matter.

The following parameters are used to specify the material and its interactions with traversing particles:

  • radiation length X0 (native length units)

  • nuclear interaction length L0 (native length units)

  • relative atomic mass Ar (unitless number)

  • nuclear charge number Z (elementary charge e)

  • molar density (native amount-of-substance unit / (native length unit)³)

The parameters can be effective or average parameters e.g. when a mixture of materials is described.

Note

Always use the opaque parameters vector to serialize/deserialize the material information. Since the internal storage might be different from the external accessors, this ensures that always the numerically optimal parameters are stored. Use the ParametersVector type and do not assume any particular size since we might consider to store more parameters in the future.

Public Types

using ParametersVector = Eigen::Matrix<float, 5, 1>

Public Functions

Material() = default

Construct a vacuum representation.

Material(const ParametersVector &parameters)

Construct from an encoded parameters vector.

Material(Material &&mat) = default
Material(const Material &mat) = default
~Material() = default
inline constexpr float Ar() const

Return the relative atomic mass.

inline constexpr float L0() const

Return the nuclear interaction length. Infinity in case of vacuum.

float massDensity() const

Return the mass density.

float meanExcitationEnergy() const

Return the mean electron excitation energy.

inline constexpr float molarDensity() const

Return the molar density.

inline constexpr float molarElectronDensity() const

Return the molar electron density.

inline constexpr operator bool() const

Check if the material is valid, i.e. it is not vacuum.

Material &operator=(Material &&mat) = default
Material &operator=(const Material &mat) = default
ParametersVector parameters() const

Encode the properties into an opaque parameters vector.

inline constexpr float X0() const

Return the radition length. Infinity in case of vacuum.

inline constexpr float Z() const

Return the nuclear charge number.

Public Static Functions

static Material fromMassDensity(float x0, float l0, float ar, float z, float massRho)

Construct from material parameters using the mass density.

Warning

Due to the choice of native mass units, using the mass density can lead to numerical problems. Typical mass densities lead to computations with values differing by 20+ orders of magnitude.

Parameters
  • x0 – is the radiation length

  • l0 – is the nuclear interaction length

  • ar – is the relative atomic mass

  • z – is the nuclear charge number

  • massRho – is the mass density

static Material fromMolarDensity(float x0, float l0, float ar, float z, float molarRho)

Construct from material parameters using the molar density.

Parameters
  • x0 – is the radiation length

  • l0 – is the nuclear interaction length

  • ar – is the relative atomic mass

  • z – is the nuclear charge number

  • molarRho – is the molar density

Private Members

float m_ar = 0.0f
float m_l0 = std::numeric_limits<float>::infinity()
float m_molarRho = 0.0f
float m_x0 = std::numeric_limits<float>::infinity()
float m_z = 0.0f

Friends

inline friend constexpr bool operator!=(const Material &lhs, const Material &rhs)
inline friend constexpr bool operator==(const Material &lhs, const Material &rhs)