[4] | 1 | // -*- C++ -*-
|
---|
| 2 | // $Id: SystemOfUnits.h,v 1.1 2008-06-04 14:14:54 demin Exp $
|
---|
| 3 | // ----------------------------------------------------------------------
|
---|
| 4 | // HEP coherent system of Units
|
---|
| 5 | //
|
---|
| 6 | // This file has been provided to CLHEP by Geant4 (simulation toolkit for HEP).
|
---|
| 7 | //
|
---|
| 8 | // The basic units are :
|
---|
| 9 | // millimeter (millimeter)
|
---|
| 10 | // nanosecond (nanosecond)
|
---|
| 11 | // Mega electron Volt (MeV)
|
---|
| 12 | // positron charge (eplus)
|
---|
| 13 | // degree Kelvin (kelvin)
|
---|
| 14 | // the amount of substance (mole)
|
---|
| 15 | // luminous intensity (candela)
|
---|
| 16 | // radian (radian)
|
---|
| 17 | // steradian (steradian)
|
---|
| 18 | //
|
---|
| 19 | // Below is a non exhaustive list of derived and pratical units
|
---|
| 20 | // (i.e. mostly the SI units).
|
---|
| 21 | // You can add your own units.
|
---|
| 22 | //
|
---|
| 23 | // The SI numerical value of the positron charge is defined here,
|
---|
| 24 | // as it is needed for conversion factor : positron charge = e_SI (coulomb)
|
---|
| 25 | //
|
---|
| 26 | // The others physical constants are defined in the header file :
|
---|
| 27 | //PhysicalConstants.h
|
---|
| 28 | //
|
---|
| 29 | // Authors: M.Maire, S.Giani
|
---|
| 30 | //
|
---|
| 31 | // History:
|
---|
| 32 | //
|
---|
| 33 | // 06.02.96 Created.
|
---|
| 34 | // 28.03.96 Added miscellaneous constants.
|
---|
| 35 | // 05.12.97 E.Tcherniaev: Redefined pascal (to avoid warnings on WinNT)
|
---|
| 36 | // 20.05.98 names: meter, second, gram, radian, degree
|
---|
| 37 | // (from Brian.Lasiuk@yale.edu (STAR)). Added luminous units.
|
---|
| 38 | // 05.08.98 angstrom, picobarn, microsecond, picosecond, petaelectronvolt
|
---|
| 39 | // 01.03.01 parsec
|
---|
| 40 | // 31.01.06 kilogray, milligray, microgray
|
---|
| 41 |
|
---|
| 42 | #ifndef HEP_SYSTEM_OF_UNITS_H
|
---|
| 43 | #define HEP_SYSTEM_OF_UNITS_H
|
---|
| 44 |
|
---|
| 45 | #include "CLHEP/Units/defs.h"
|
---|
| 46 |
|
---|
| 47 | namespace CLHEP {
|
---|
| 48 |
|
---|
| 49 | //
|
---|
| 50 | // Length [L]
|
---|
| 51 | //
|
---|
| 52 | static const double millimeter = 1.;
|
---|
| 53 | static const double millimeter2 = millimeter*millimeter;
|
---|
| 54 | static const double millimeter3 = millimeter*millimeter*millimeter;
|
---|
| 55 |
|
---|
| 56 | static const double centimeter = 10.*millimeter;
|
---|
| 57 | static const double centimeter2 = centimeter*centimeter;
|
---|
| 58 | static const double centimeter3 = centimeter*centimeter*centimeter;
|
---|
| 59 |
|
---|
| 60 | static const double meter = 1000.*millimeter;
|
---|
| 61 | static const double meter2 = meter*meter;
|
---|
| 62 | static const double meter3 = meter*meter*meter;
|
---|
| 63 |
|
---|
| 64 | static const double kilometer = 1000.*meter;
|
---|
| 65 | static const double kilometer2 = kilometer*kilometer;
|
---|
| 66 | static const double kilometer3 = kilometer*kilometer*kilometer;
|
---|
| 67 |
|
---|
| 68 | static const double parsec = 3.0856775807e+16*meter;
|
---|
| 69 |
|
---|
| 70 | static const double micrometer = 1.e-6 *meter;
|
---|
| 71 | static const double nanometer = 1.e-9 *meter;
|
---|
| 72 | static const double angstrom = 1.e-10*meter;
|
---|
| 73 | static const double fermi = 1.e-15*meter;
|
---|
| 74 |
|
---|
| 75 | static const double barn = 1.e-28*meter2;
|
---|
| 76 | static const double millibarn = 1.e-3 *barn;
|
---|
| 77 | static const double microbarn = 1.e-6 *barn;
|
---|
| 78 | static const double nanobarn = 1.e-9 *barn;
|
---|
| 79 | static const double picobarn = 1.e-12*barn;
|
---|
| 80 |
|
---|
| 81 | // symbols
|
---|
| 82 | static const double nm = nanometer;
|
---|
| 83 | static const double um = micrometer;
|
---|
| 84 |
|
---|
| 85 | static const double mm = millimeter;
|
---|
| 86 | static const double mm2 = millimeter2;
|
---|
| 87 | static const double mm3 = millimeter3;
|
---|
| 88 |
|
---|
| 89 | static const double cm = centimeter;
|
---|
| 90 | static const double cm2 = centimeter2;
|
---|
| 91 | static const double cm3 = centimeter3;
|
---|
| 92 |
|
---|
| 93 | static const double m = meter;
|
---|
| 94 | static const double m2 = meter2;
|
---|
| 95 | static const double m3 = meter3;
|
---|
| 96 |
|
---|
| 97 | static const double km = kilometer;
|
---|
| 98 | static const double km2 = kilometer2;
|
---|
| 99 | static const double km3 = kilometer3;
|
---|
| 100 |
|
---|
| 101 | static const double pc = parsec;
|
---|
| 102 |
|
---|
| 103 | //
|
---|
| 104 | // Angle
|
---|
| 105 | //
|
---|
| 106 | static const double radian = 1.;
|
---|
| 107 | static const double milliradian = 1.e-3*radian;
|
---|
| 108 | static const double degree = (3.14159265358979323846/180.0)*radian;
|
---|
| 109 |
|
---|
| 110 | static const double steradian = 1.;
|
---|
| 111 |
|
---|
| 112 | // symbols
|
---|
| 113 | static const double rad = radian;
|
---|
| 114 | static const double mrad = milliradian;
|
---|
| 115 | static const double sr = steradian;
|
---|
| 116 | static const double deg = degree;
|
---|
| 117 |
|
---|
| 118 | //
|
---|
| 119 | // Time [T]
|
---|
| 120 | //
|
---|
| 121 | static const double nanosecond = 1.;
|
---|
| 122 | static const double second = 1.e+9 *nanosecond;
|
---|
| 123 | static const double millisecond = 1.e-3 *second;
|
---|
| 124 | static const double microsecond = 1.e-6 *second;
|
---|
| 125 | static const double picosecond = 1.e-12*second;
|
---|
| 126 |
|
---|
| 127 | static const double hertz = 1./second;
|
---|
| 128 | static const double kilohertz = 1.e+3*hertz;
|
---|
| 129 | static const double megahertz = 1.e+6*hertz;
|
---|
| 130 |
|
---|
| 131 | // symbols
|
---|
| 132 | static const double ns = nanosecond;
|
---|
| 133 | static const double s = second;
|
---|
| 134 | static const double ms = millisecond;
|
---|
| 135 |
|
---|
| 136 | //
|
---|
| 137 | // Electric charge [Q]
|
---|
| 138 | //
|
---|
| 139 | static const double eplus = 1. ;// positron charge
|
---|
| 140 | static const double e_SI = 1.60217733e-19;// positron charge in coulomb
|
---|
| 141 | static const double coulomb = eplus/e_SI;// coulomb = 6.24150 e+18 * eplus
|
---|
| 142 |
|
---|
| 143 | //
|
---|
| 144 | // Energy [E]
|
---|
| 145 | //
|
---|
| 146 | static const double megaelectronvolt = 1. ;
|
---|
| 147 | static const double electronvolt = 1.e-6*megaelectronvolt;
|
---|
| 148 | static const double kiloelectronvolt = 1.e-3*megaelectronvolt;
|
---|
| 149 | static const double gigaelectronvolt = 1.e+3*megaelectronvolt;
|
---|
| 150 | static const double teraelectronvolt = 1.e+6*megaelectronvolt;
|
---|
| 151 | static const double petaelectronvolt = 1.e+9*megaelectronvolt;
|
---|
| 152 |
|
---|
| 153 | static const double joule = electronvolt/e_SI;// joule = 6.24150 e+12 * MeV
|
---|
| 154 |
|
---|
| 155 | // symbols
|
---|
| 156 | static const double MeV = megaelectronvolt;
|
---|
| 157 | static const double eV = electronvolt;
|
---|
| 158 | static const double keV = kiloelectronvolt;
|
---|
| 159 | static const double GeV = gigaelectronvolt;
|
---|
| 160 | static const double TeV = teraelectronvolt;
|
---|
| 161 | static const double PeV = petaelectronvolt;
|
---|
| 162 |
|
---|
| 163 | //
|
---|
| 164 | // Mass [E][T^2][L^-2]
|
---|
| 165 | //
|
---|
| 166 | static const double kilogram = joule*second*second/(meter*meter);
|
---|
| 167 | static const double gram = 1.e-3*kilogram;
|
---|
| 168 | static const double milligram = 1.e-3*gram;
|
---|
| 169 |
|
---|
| 170 | // symbols
|
---|
| 171 | static const double kg = kilogram;
|
---|
| 172 | static const double g = gram;
|
---|
| 173 | static const double mg = milligram;
|
---|
| 174 |
|
---|
| 175 | //
|
---|
| 176 | // Power [E][T^-1]
|
---|
| 177 | //
|
---|
| 178 | static const double watt = joule/second;// watt = 6.24150 e+3 * MeV/ns
|
---|
| 179 |
|
---|
| 180 | //
|
---|
| 181 | // Force [E][L^-1]
|
---|
| 182 | //
|
---|
| 183 | static const double newton = joule/meter;// newton = 6.24150 e+9 * MeV/mm
|
---|
| 184 |
|
---|
| 185 | //
|
---|
| 186 | // Pressure [E][L^-3]
|
---|
| 187 | //
|
---|
| 188 | #define pascal hep_pascal // a trick to avoid warnings
|
---|
| 189 | static const double hep_pascal = newton/m2; // pascal = 6.24150 e+3 * MeV/mm3
|
---|
| 190 | static const double bar = 100000*pascal; // bar = 6.24150 e+8 * MeV/mm3
|
---|
| 191 | static const double atmosphere = 101325*pascal; // atm = 6.32420 e+8 * MeV/mm3
|
---|
| 192 |
|
---|
| 193 | //
|
---|
| 194 | // Electric current [Q][T^-1]
|
---|
| 195 | //
|
---|
| 196 | static const double ampere = coulomb/second; // ampere = 6.24150 e+9 * eplus/ns
|
---|
| 197 | static const double milliampere = 1.e-3*ampere;
|
---|
| 198 | static const double microampere = 1.e-6*ampere;
|
---|
| 199 | static const double nanoampere = 1.e-9*ampere;
|
---|
| 200 |
|
---|
| 201 | //
|
---|
| 202 | // Electric potential [E][Q^-1]
|
---|
| 203 | //
|
---|
| 204 | static const double megavolt = megaelectronvolt/eplus;
|
---|
| 205 | static const double kilovolt = 1.e-3*megavolt;
|
---|
| 206 | static const double volt = 1.e-6*megavolt;
|
---|
| 207 |
|
---|
| 208 | //
|
---|
| 209 | // Electric resistance [E][T][Q^-2]
|
---|
| 210 | //
|
---|
| 211 | static const double ohm = volt/ampere;// ohm = 1.60217e-16*(MeV/eplus)/(eplus/ns)
|
---|
| 212 |
|
---|
| 213 | //
|
---|
| 214 | // Electric capacitance [Q^2][E^-1]
|
---|
| 215 | //
|
---|
| 216 | static const double farad = coulomb/volt;// farad = 6.24150e+24 * eplus/Megavolt
|
---|
| 217 | static const double millifarad = 1.e-3*farad;
|
---|
| 218 | static const double microfarad = 1.e-6*farad;
|
---|
| 219 | static const double nanofarad = 1.e-9*farad;
|
---|
| 220 | static const double picofarad = 1.e-12*farad;
|
---|
| 221 |
|
---|
| 222 | //
|
---|
| 223 | // Magnetic Flux [T][E][Q^-1]
|
---|
| 224 | //
|
---|
| 225 | static const double weber = volt*second;// weber = 1000*megavolt*ns
|
---|
| 226 |
|
---|
| 227 | //
|
---|
| 228 | // Magnetic Field [T][E][Q^-1][L^-2]
|
---|
| 229 | //
|
---|
| 230 | static const double tesla = volt*second/meter2;// tesla =0.001*megavolt*ns/mm2
|
---|
| 231 |
|
---|
| 232 | static const double gauss = 1.e-4*tesla;
|
---|
| 233 | static const double kilogauss = 1.e-1*tesla;
|
---|
| 234 |
|
---|
| 235 | //
|
---|
| 236 | // Inductance [T^2][E][Q^-2]
|
---|
| 237 | //
|
---|
| 238 | static const double henry = weber/ampere;// henry = 1.60217e-7*MeV*(ns/eplus)**2
|
---|
| 239 |
|
---|
| 240 | //
|
---|
| 241 | // Temperature
|
---|
| 242 | //
|
---|
| 243 | static const double kelvin = 1.;
|
---|
| 244 |
|
---|
| 245 | //
|
---|
| 246 | // Amount of substance
|
---|
| 247 | //
|
---|
| 248 | static const double mole = 1.;
|
---|
| 249 |
|
---|
| 250 | //
|
---|
| 251 | // Activity [T^-1]
|
---|
| 252 | //
|
---|
| 253 | static const double becquerel = 1./second ;
|
---|
| 254 | static const double curie = 3.7e+10 * becquerel;
|
---|
| 255 |
|
---|
| 256 | //
|
---|
| 257 | // Absorbed dose [L^2][T^-2]
|
---|
| 258 | //
|
---|
| 259 | static const double gray = joule/kilogram ;
|
---|
| 260 | static const double kilogray = 1.e+3*gray;
|
---|
| 261 | static const double milligray = 1.e-3*gray;
|
---|
| 262 | static const double microgray = 1.e-6*gray;
|
---|
| 263 |
|
---|
| 264 | //
|
---|
| 265 | // Luminous intensity [I]
|
---|
| 266 | //
|
---|
| 267 | static const double candela = 1.;
|
---|
| 268 |
|
---|
| 269 | //
|
---|
| 270 | // Luminous flux [I]
|
---|
| 271 | //
|
---|
| 272 | static const double lumen = candela*steradian;
|
---|
| 273 |
|
---|
| 274 | //
|
---|
| 275 | // Illuminance [I][L^-2]
|
---|
| 276 | //
|
---|
| 277 | static const double lux = lumen/meter2;
|
---|
| 278 |
|
---|
| 279 | //
|
---|
| 280 | // Miscellaneous
|
---|
| 281 | //
|
---|
| 282 | static const double perCent = 0.01 ;
|
---|
| 283 | static const double perThousand = 0.001;
|
---|
| 284 | static const double perMillion = 0.000001;
|
---|
| 285 |
|
---|
| 286 | } // namespace CLHEP
|
---|
| 287 |
|
---|
| 288 | #ifdef ENABLE_BACKWARDS_COMPATIBILITY
|
---|
| 289 | // backwards compatibility will be enabled ONLY in CLHEP 1.9
|
---|
| 290 | using namespace CLHEP;
|
---|
| 291 | #endif
|
---|
| 292 |
|
---|
| 293 | #endif /* HEP_SYSTEM_OF_UNITS_H */
|
---|