Mantid
Loading...
Searching...
No Matches
PhysicalConstants.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include <cmath>
10
11// NAN is not defined in Visual C++ < 2013
12#if (defined(_MSC_VER) && (_MSC_VER <= 1800))
13#define INFINITY (DBL_MAX + DBL_MAX)
14#define NAN (INFINITY - INFINITY)
15#endif
16
17namespace Mantid {
18
22namespace PhysicalConstants {
25static constexpr double N_A = 6.02214179e23;
26
29static constexpr double h = 6.62606896e-34;
30
32static constexpr double h_bar = h / (2 * M_PI);
33
35static constexpr double g = 9.80665;
36
39static constexpr double NeutronMass = 1.674927211e-27;
40
43static constexpr double NeutronMassAMU = 1.008664916;
44
47static constexpr double AtomicMassUnit = 1.660538921e-27;
48
51static constexpr double meV = 1.602176487e-22;
52
55static constexpr double meVtoWavenumber = 8.06554465;
56
59static constexpr double meVtoFrequency = 0.2417989262;
60
63static constexpr double meVtoKelvin = 11.604519;
64
67static constexpr double E_mev_toNeutronWavenumberSq =
68 1.0e20 * h_bar * h_bar / (2 * NeutronMass * meV); //[meV*Angstrom^2]
69
72static constexpr double MuonLifetime = 2.1969811e-6;
73
78static constexpr double StandardAtmosphere = 101.325;
79
83static constexpr double BoltzmannConstant = 8.6173324e-02;
84
88static constexpr double MuonGyromagneticRatio = 0.01355342;
89
90} // namespace PhysicalConstants
91} // namespace Mantid
A namespace containing physical constants that are required by algorithms and unit routines.
Definition: Atom.h:14
static constexpr double MuonGyromagneticRatio
Muon gyromagnetic ratio in MHz/G Taken from CalMuonDetectorPhases and DynamicKuboToyabe on 02/02/2016...
static constexpr double BoltzmannConstant
Boltzmann Constant in meV/K Taken from http://physics.nist.gov/cuu/Constants on 10/07/2012.
static constexpr double meVtoFrequency
1 meV in frequency (GHz).
static constexpr double StandardAtmosphere
Standard atmospheric pressure in kPa.
static constexpr double E_mev_toNeutronWavenumberSq
Transformation coefficient to transform neutron energy into neutron wavevector: K-neutron[m^-10] = sq...
static constexpr double NeutronMassAMU
Mass of the neutron in AMU.
static constexpr double NeutronMass
Mass of the neutron in kg.
static constexpr double h
Planck constant in J*s.
static constexpr double meVtoKelvin
1 meV in Kelvin.
static constexpr double meVtoWavenumber
1 meV in wavenumber (cm-1).
static constexpr double N_A
Avagodro constant in mol-1.
static constexpr double MuonLifetime
Muon lifetime.
static constexpr double AtomicMassUnit
AMU in kg.
static constexpr double meV
1 meV in Joules.
static constexpr double h_bar
Planck constant in J*s, divided by 2 PI.
static constexpr double g
Standard acceleration due to gravity.
Helper class which provides the Collimation Length for SANS instruments.