1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-22 18:28:51 -05:00
catima/constants.h

60 lines
2.0 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>
2018-07-30 19:41:44 -04:00
#include "catima/build_config.h"
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
2018-10-31 14:14:29 -04:00
constexpr double logEmax = 7.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-10-31 20:49:48 -04:00
constexpr int max_storage_data = 60; // 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;
2018-07-31 11:40:25 -04:00
#ifdef REACTIONS
2018-07-30 19:41:44 -04:00
constexpr double emin_reaction = 30.0;
constexpr bool reactions = true;
#else
constexpr bool reactions = false;
#endif
2019-10-08 13:50:45 -04:00
constexpr double PI = 3.1415926535897932384626433832795;
2017-07-25 12:19:11 -04:00
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
2018-10-31 10:43:27 -04:00
constexpr double hbar = 6.582119514; // in eV*s * 10^-16
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