Skip to content

File Constants.h

File List > Intern > rayx-core > src > Shader > Constants.h

Go to the documentation of this file

// The shader-internal constants are mostly defined in this file.

#pragma once

#include "Core.h"
#include "EventType.h"
#include "ImageType.h"

namespace rayx {

constexpr double INV_NM_TO_EVOLT = 1239.841984332002622;

constexpr double PI = 3.14159265358979323846264338327950;
// 141592653589793238462643383279502884197169399

// DipoleSource Constants

constexpr double ELECTRON_VOLT = 1.602176634e-19;

constexpr double SPEED_OF_LIGHT = 299792458;  // Checked 2019-7-25, PB, NIST (exact): speed of light in vacuo [m/s]

constexpr double ELEMENTARY_CHARGE = 1.602176634e-19;  // Checked 2019-7-25, PB, NIST (exact): minus charge of electron [As] or [C]

constexpr double PLANCK = 6.62607015e-34;  // Checked 2019-7-25, PB, NIST (exact): Planck constant [Js]

constexpr double PLANCK_BAR = PLANCK / (2 * PI);

constexpr double ELECTRON_MASS = 9.1093837015e-31;  // Checked 2019-7-25, PB, NIST: mass of electron [kg];

constexpr double FACTOR_ELECTRON_ENERGY_SC = 1957;

constexpr double FINE_STRUCTURE_CONSTANT = 7.2973525693e-3;  // Checked 2020-2-18, PB, NIST: fine-structure constant, no units

constexpr double ELECTRIC_PERMITTIVITY = 8.8541878128e-12;  // Checked 2019-7-25, PB, NIST: dielectricity of vacuum, or vacuum electric permittivity
                                                            // [As/Vm] or [F/m]; Standard uncertainty: 0.0000000013e-12

constexpr double FACTOR_SCHWINGER_RAY = 1.2556937e15;

constexpr double ELECTRIC_PERMITIVITY_MULTIPLIES_SPEED_OF_LIGHT = 2.6544187279929558624e-3;

constexpr double ELECTRON_RADIUS = 2.8179403205e-6;  // Classical electron radius (nm)
// constexpr double ELECTRON_RADIUS = (ELEMENTARY_CHARGE / (SPEED_OF_LIGHT * SPEED_OF_LIGHT)) * 1.e9;  // Classical electron radius in nm

}  // namespace rayx