69 const long double cm = 1.0l;
70 const long double fm = 1.e-13l;
71 const long double um = 1.e-4l;
72 const long double mm = 1.e-1l;
73 const long double m = 1.e+2l;
75 const long double g = 1.0l;
76 const long double kg = 1.e+3l;
77 const long double mg = 1.e-3l;
78 const long double ug = 1.e-6l;
79 const long double MeVpc2 = 1.782662e-27l;
81 const long double torr = 1.0l;
82 const long double atm = 760.l;
83 const long double Pa =
atm / 101325.l;
86 const long double cc = 1.0l;
87 const long double litre = 1.e+3l;
88 const long double cl = 10.l *
cc;
91 const long double MeV = 1.0l;
92 const long double GeV = 1.e+3l;
93 const long double keV = 1.e-3l;
94 const long double eV = 1.e-6l;
95 const long double Joule = 6.241509e+12l;
97 const long double fmpc = 1.0l;
98 const long double s = 2.997925e+23l;
101 const long double gpcm3 = 6.022141e-16;
104 const long double GK = 8.617331e-02;
114 #define add_unit(name,base)\
115 struct name##_ : base\
117 name##_() : base{#name,units::name} {}\
119 const name##_ name = name##_()
121 namespace energy_units
129 namespace length_units
138 namespace dimensioned_types
140 template<
class Type,
class BaseUnit,
class DefaultUnit>
157 template<
class NewUnit>
158 Type in(
const NewUnit& u)
const {
return val/u.multiplier; }
159 template<
class NewUnit>
161 template<
class NewUnit>
171 kaliveda::energy_units::energy_unit,
172 kaliveda::energy_units::MeV_>
186 Energy operator""_keV(
long double);
187 Energy operator""_GeV(
long double);
188 Energy operator""_eV(
long double);
189 Energy operator""_MeV(
long double);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
add_unit(eV, energy_unit)
add_unit(cm, length_unit)
const long double MeVpkb
temperatures
const long double torr
pressures
const long double cc
volumes
const long double g
masses
const long double nucpfm3
densities
const long double MeV
energies
const long double fmpc
times
friend Energy operator-(const Energy &a, const Energy &b)
friend Energy operator+(const Energy &a, const Energy &b)
Type as(const NewUnit &u) const
dimensioned_type & operator=(const dimensioned_type &)=default
Type in(const NewUnit &u) const
dimensioned_type()=default
DefaultUnit default_units
dimensioned_type(const Type &t)
dimensioned_type(dimensioned_type &&)=default
dimensioned_type(const Type &t, const BaseUnit &U)
dimensioned_type(const dimensioned_type &)=default
friend std::ostream & operator<<(std::ostream &os, const dimensioned_type &ar)
Type convert(const NewUnit &u) const
dimensioned_type & operator=(dimensioned_type &&)=default