1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-12-03 07:28:49 -05:00
catima/constants.h

52 lines
1.7 KiB
C
Raw Normal View History

2017-07-25 12:19:11 -04:00
#ifndef CONSTANTS_H
#define CONSTANTS_H
2018-01-29 07:38:54 -05:00
#include <limits>
2017-07-25 12:19:11 -04:00
namespace catima {
2017-12-14 09:29:23 -05:00
constexpr double Ezero = 1E-3; // lowest E to calculate, below taken as 0
2017-07-25 12:19:11 -04:00
constexpr double logEmin = -3; // log of minimum energy
constexpr double logEmax = 5.0; // log of max energy
2017-07-25 12:19:11 -04:00
constexpr int max_datapoints = 500; // how many datapoints between logEmin and logEmax
2018-02-03 09:35:02 -05:00
constexpr int max_storage_data = 100; // number of datapoints which can be stored in cache
2018-01-29 07:38:54 -05:00
constexpr double numeric_epsilon = std::numeric_limits<double>::epsilon();
2017-07-25 12:19:11 -04:00
/// required integration precision (relative units)
2017-12-14 09:29:23 -05:00
/*
constexpr double int_eps_range = 0.001;
constexpr double int_eps_range_str = 0.001;
2017-07-25 12:19:11 -04:00
constexpr double int_eps_ang_str = 0.01;
constexpr double int_eps_tof = 0.01;
2017-12-14 09:29:23 -05:00
*/
2017-07-25 12:19:11 -04:00
constexpr double thin_target_limit = 1 - 1e-3;
constexpr double Avogadro = 6.022140857; // 10^23
constexpr double electron_mass = 0.510998928; // MeV/c^2
constexpr double atomic_mass_unit = 931.4940954; // MeV/c^2
constexpr double classical_electron_radius = 2.8179403227; //fm
constexpr double fine_structure = 1/137.035999139;
2018-01-15 09:11:51 -05:00
constexpr double fine_structure_inverted = 1/fine_structure;
2017-07-25 12:19:11 -04:00
constexpr double c_light = 299.792458; //Mm/s
2018-01-15 09:11:51 -05:00
constexpr double bohr_velocity = 2.19 / c_light; // in c unit
2017-07-25 12:19:11 -04:00
constexpr double dedx_constant = 0.3070749187; //4*pi*Na*me*c^2*r_e^2 //MeV cm^2
constexpr double domega2dx_constant = dedx_constant*electron_mass; //4*pi*Na*me*c^2*r_e^2 //MeV^2 cm^2
// units //
namespace units{
constexpr double g = 1.0;
constexpr double mg = 1000.0;
constexpr double cm3 = 1.0;
constexpr double cm = 1.0;
constexpr double mm = 10.;
constexpr double keV = 1000.0;
constexpr double ns = 1.0;
}
}
#endif