File indexing completed on 2025-02-22 11:02:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063 #ifndef HEP_SYSTEM_OF_UNITS_H
0064 #define HEP_SYSTEM_OF_UNITS_H
0065
0066 #include <math.h>
0067
0068 namespace units {
0069
0070
0071
0072
0073
0074 static const double millimeter = 0.1;
0075 static const double millimeter2 = millimeter*millimeter;
0076 static const double millimeter3 = millimeter*millimeter*millimeter;
0077
0078 static const double centimeter = 10*millimeter;
0079 static const double centimeter2 = centimeter*centimeter;
0080 static const double centimeter3 = centimeter*centimeter*centimeter;
0081
0082 static const double meter = 100.*centimeter;
0083 static const double meter2 = meter*meter;
0084 static const double meter3 = meter*meter*meter;
0085
0086 static const double kilometer = 1000.*meter;
0087 static const double kilometer2 = kilometer*kilometer;
0088 static const double kilometer3 = kilometer*kilometer*kilometer;
0089
0090 static const double micrometer = 1.e-6*meter;
0091 static const double nanometer = 1.e-9*meter;
0092 static const double femtometer = 1.e-15*meter;
0093 static const double fermi = 1*femtometer;
0094
0095 static const double barn = 1.e-28*meter2;
0096 static const double millibarn = 1.e-3*barn;
0097 static const double microbarn = 1.e-6*barn;
0098 static const double nanobarn = 1.e-9*barn;
0099 static const double inch = 2.54*centimeter;
0100
0101
0102
0103
0104 static const double radian = 1.;
0105 static const double milliradian = 1.e-3*radian;
0106 #ifndef __CINT__
0107 static const double degree = (M_PI/180.0)*radian;
0108 #endif
0109 static const double steradian = 1.;
0110
0111
0112
0113
0114 static const double second = 1;
0115 static const double millisecond = 1.e-3*second;
0116 static const double microsecond = 1.e-3*millisecond;
0117 static const double nanosecond = 1.e-3*microsecond;
0118
0119 static const double hertz = 1./second;
0120 static const double kilohertz = 1.e+3*hertz;
0121 static const double Megahertz = 1.e+6*hertz;
0122
0123
0124 static const double Hz = 1*hertz;
0125 static const double kHz = 1*kilohertz;
0126 static const double MHz = 1*Megahertz;
0127
0128
0129
0130
0131 static const double eplus = 1. ;
0132 static const double e_SI = 1.60217733e-19;
0133 static const double coulomb = eplus/e_SI;
0134
0135
0136
0137
0138 static const double Gigaelectronvolt = 1.;
0139 static const double Megaelectronvolt = 1.e-3*Gigaelectronvolt;
0140 static const double electronvolt = 1.e-6*Megaelectronvolt;
0141 static const double kiloelectronvolt = 1.e+3*electronvolt;
0142 static const double Teraelectronvolt = 1.e+3*Gigaelectronvolt;
0143
0144
0145 static const double MeV = Megaelectronvolt;
0146 static const double eV = electronvolt;
0147 static const double keV = kiloelectronvolt;
0148 static const double GeV = Gigaelectronvolt;
0149 static const double TeV = Teraelectronvolt;
0150 static const double amu = 931.49406121 * MeV;
0151 static const double joule = electronvolt/e_SI;
0152
0153
0154
0155
0156 static const double kilogram = joule*second*second/(meter*meter);
0157 static const double gram = 1.e-3*kilogram;
0158 static const double milligram = 1.e-3*gram;
0159
0160
0161
0162
0163 static const double watt = joule/second;
0164
0165
0166
0167
0168 static const double newton = joule/meter;
0169
0170
0171
0172
0173 #ifndef __CINT__
0174 #define pascal hep_pascal
0175 static const double hep_pascal = newton/meter2;
0176 #else
0177 static const double pascal = newton/meter2;
0178 #endif
0179 static const double bar = 100000*pascal;
0180 static const double atmosphere = 101325*pascal;
0181
0182
0183
0184
0185 static const double ampere = coulomb/second;
0186
0187
0188
0189
0190 static const double Megavolt = MeV/eplus;
0191 static const double kilovolt = 1.e-3*Megavolt;
0192 static const double volt = 1.e-6*Megavolt;
0193 static const double millivolt = 1.e-3*volt;
0194
0195
0196
0197
0198 static const double ohm = volt/ampere;
0199
0200
0201
0202
0203 static const double farad = coulomb/volt;
0204 static const double millifarad = 1.e-3*farad;
0205 static const double microfarad = 1.e-6*farad;
0206 static const double nanofarad = 1.e-9*farad;
0207 static const double picofarad = 1.e-12*farad;
0208
0209
0210
0211
0212 static const double weber = volt*second;
0213
0214
0215
0216
0217 static const double tesla = volt*second/meter2;
0218
0219 static const double gauss = 1.e-4*tesla;
0220 static const double kilogauss = 1.e-1*tesla;
0221
0222
0223
0224
0225 static const double henry = weber/ampere;
0226
0227
0228
0229
0230 static const double kelvin = 1.;
0231
0232
0233
0234
0235 static const double mole = 1.;
0236
0237
0238
0239
0240 static const double becquerel = 1./second;
0241 static const double curie = 3.7e+10 * becquerel;
0242
0243
0244
0245
0246 static const double gray = joule/kilogram ;
0247
0248
0249
0250
0251 static const double perCent = 0.01 ;
0252 static const double perThousand = 0.001;
0253 static const double perMillion = 0.000001;
0254
0255 #ifdef ST_ADD_OLD_CLHEP_SYSTEM_OF_UNITS
0256
0257 static const double mm = 0.1;
0258 static const double mm2 = mm*mm;
0259 static const double mm3 = mm*mm*mm;
0260
0261 static const double cm = 10.*mm;
0262 static const double cm2 = cm*cm;
0263 static const double cm3 = cm*cm*cm;
0264
0265 static const double m = 1000.*mm;
0266 static const double m2 = m*m;
0267 static const double m3 = m*m*m;
0268
0269 static const double km = 1000.*m;
0270 static const double km2 = km*km;
0271 static const double km3 = km*km*km;
0272
0273 static const double microm = 1.e-6*m;
0274 static const double nanom = 1.e-9*m;
0275
0276
0277
0278
0279
0280 static const double rad = 1.;
0281 static const double mrad = 1.e-3*rad;
0282 static const double deg = (M_PI/180.0)*rad;
0283
0284 static const double st = 1.;
0285
0286
0287
0288
0289 static const double s = 1;
0290 static const double ns = 1.e-9*s;
0291 static const double ms = 1.e-3*s;
0292
0293
0294
0295 static const double kg = joule*second*second/(meter*meter);
0296 static const double g = 1.e-3*kg;
0297 static const double mg = 1.e-3*g;
0298
0299 #endif
0300
0301 }
0302 using namespace units;
0303 #endif