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

Physical and mathematical constants. More...

#include <detray/definitions/units.hpp>

Collaboration diagram for detray::constant< scalar_t >:
[legend]

Static Public Attributes

static constexpr scalar_t avogadro
 Avogadro constant.
static constexpr scalar_t e {static_cast<scalar_t>(std::numbers::e)}
 Euler's number.
static constexpr scalar_t hbar
 Reduced Planck constant h/2*pi.
static constexpr scalar_t inv_2_pi
 2/π
static constexpr scalar_t inv_pi
 1/π
static constexpr scalar_t inv_sqrt2
 1/(√2)
static constexpr scalar_t ln10 {static_cast<scalar_t>(std::numbers::ln10)}
 Natural logarithm of 10.
static constexpr scalar_t ln2 {static_cast<scalar_t>(std::numbers::ln2)}
 Natural logarithm of 2.
static constexpr scalar_t log10e {static_cast<scalar_t>(std::numbers::log10e)}
 Base 10 logarithm of e.
static constexpr scalar_t log2e {static_cast<scalar_t>(std::numbers::log2e)}
 Base 2 logarithm of e.
static constexpr scalar_t m_e
 Electron rest energy expressed in the internal energy unit.
static constexpr scalar_t pi {static_cast<scalar_t>(std::numbers::pi)}
 π
static constexpr scalar_t pi_2 {static_cast<scalar_t>(std::numbers::pi / 2.)}
 π/2
static constexpr scalar_t pi_4 {static_cast<scalar_t>(std::numbers::pi / 4.)}
 π/4
static constexpr scalar_t sqrt2 {static_cast<scalar_t>(std::numbers::sqrt2)}
 √2

Detailed Description

template<concepts::scalar scalar_t>
struct detray::constant< scalar_t >

Physical and mathematical constants.

Member Data Documentation

◆ avogadro

template<concepts::scalar scalar_t>
scalar_t detray::constant< scalar_t >::avogadro
staticconstexpr
Initial value:
{
static_cast<scalar_t>(6.02214076e23 / unit<scalar_t>::mol)}
static constexpr scalar_t mol
Amount of substance, native unit mol.
Definition units.hpp:102

Avogadro constant.

◆ hbar

template<concepts::scalar scalar_t>
scalar_t detray::constant< scalar_t >::hbar
staticconstexpr
Initial value:
{static_cast<scalar_t>(
6.582119569509066e-25 * unit<scalar_t>::GeV * unit<scalar_t>::s)}
static constexpr scalar_t s
Time, native unit mm{[speed-of-light * time]{mm/s * s}}.
Definition units.hpp:56
static constexpr scalar_t GeV
Native energy unit, the gigaelectronvolt.
Definition units.hpp:81

Reduced Planck constant h/2*pi.

Computed from CODATA 2018 constants to double precision.

◆ inv_2_pi

template<concepts::scalar scalar_t>
scalar_t detray::constant< scalar_t >::inv_2_pi
staticconstexpr
Initial value:
{
static_cast<scalar_t>(2. / std::numbers::pi)}

2/π

◆ inv_pi

template<concepts::scalar scalar_t>
scalar_t detray::constant< scalar_t >::inv_pi
staticconstexpr
Initial value:
{
static_cast<scalar_t>(1. / std::numbers::pi)}

1/π

◆ inv_sqrt2

template<concepts::scalar scalar_t>
scalar_t detray::constant< scalar_t >::inv_sqrt2
staticconstexpr
Initial value:
{
static_cast<scalar_t>(1. / std::numbers::sqrt2)}

1/(√2)

◆ m_e

template<concepts::scalar scalar_t>
scalar_t detray::constant< scalar_t >::m_e
staticconstexpr
Initial value:
{
static_cast<scalar_t>(0.51099895069 * unit<scalar_t>::MeV)}
static constexpr scalar_t MeV
Megaelectronvolt expressed in GeV.
Definition units.hpp:79

Electron rest energy expressed in the internal energy unit.