| # Gaudi Framework, version v21r8 |

Home |  | Generated: 17 Mar 2010

# SystemOfUnits.h

Go to the documentation of this file.

    00001 // -*- C++ -*-
    00002 // $Id: SystemOfUnits.h,v 1.3 2007/09/24 15:11:47 hmd Exp $
    00003 // ----------------------------------------------------------------------
    00004 // HEP coherent system of Units
    00005 //
    00006 // This file has been provided to CLHEP by Geant4 (simulation toolkit for HEP).
    00007 //
    00008 // The basic units are :
    00009 //              millimeter              (millimeter)
    00010 //              nanosecond              (nanosecond)
    00011 //              Mega electron Volt      (MeV)
    00012 //              positron charge         (eplus)
    00013 //              degree Kelvin           (kelvin)
    00014 //              the amount of substance (mole)
    00015 //              luminous intensity      (candela)
    00016 //              radian                  (radian)
    00017 //              steradian               (steradian)
    00018 //
    00019 // Below is a non exhaustive list of derived and pratical units
    00020 // (i.e. mostly the SI units).
    00021 // You can add your own units.
    00022 //
    00023 // The SI numerical value of the positron charge is defined here,
    00024 // as it is needed for conversion factor : positron charge = e_SI (coulomb)
    00025 //
    00026 // The others physical constants are defined in the header file :
    00027 //                      PhysicalConstants.h
    00028 //
    00029 // Authors: M.Maire, S.Giani
    00030 //
    00031 // History:
    00032 //
    00033 // 06.02.96   Created.
    00034 // 28.03.96   Added miscellaneous constants.
    00035 // 05.12.97   E.Tcherniaev: Redefined pascal (to avoid warnings on WinNT)
    00036 // 20.05.98   names: meter, second, gram, radian, degree
    00037 //            (from Brian.Lasiuk@yale.edu (STAR)). Added luminous units.
    00038 // 05.08.98   angstrom, picobarn, microsecond, picosecond, petaelectronvolt
    00039 // 01.03.01   parsec
    00040 // 28.04.06   import from CLHEP to GaudiKernel -- HD
    00041 // 11.05.06   Rename pascal to Pa to avoid warnings on Windows - MC
    00042
    00043 #ifndef GAUDI_SYSTEM_OF_UNITS_H
    00044 #define GAUDI_SYSTEM_OF_UNITS_H
    00045
    00046
    00047 namespace Gaudi {
    00048   namespace Units {
    00049
    00050     //
    00051     // Length [L]
    00052     //
    00053     static const double millimeter  = 1.;
    00054     static const double millimeter2 = millimeter*millimeter;
    00055     static const double millimeter3 = millimeter*millimeter*millimeter;
    00056
    00057     static const double centimeter  = 10.*millimeter;
    00058     static const double centimeter2 = centimeter*centimeter;
    00059     static const double centimeter3 = centimeter*centimeter*centimeter;
    00060
    00061     static const double meter  = 1000.*millimeter;
    00062     static const double meter2 = meter*meter;
    00063     static const double meter3 = meter*meter*meter;
    00064
    00065     static const double kilometer = 1000.*meter;
    00066     static const double kilometer2 = kilometer*kilometer;
    00067     static const double kilometer3 = kilometer*kilometer*kilometer;
    00068
    00069     static const double parsec = 3.0856775807e+16*meter;
    00070
    00071     static const double micrometer = 1.e-6 *meter;
    00072     static const double  nanometer = 1.e-9 *meter;
    00073     static const double  angstrom  = 1.e-10*meter;
    00074     static const double  fermi     = 1.e-15*meter;
    00075
    00076     static const double      barn = 1.e-28*meter2;
    00077     static const double millibarn = 1.e-3 *barn;
    00078     static const double microbarn = 1.e-6 *barn;
    00079     static const double  nanobarn = 1.e-9 *barn;
    00080     static const double  picobarn = 1.e-12*barn;
    00081
    00082     // symbols
    00083     static const double nm  = nanometer;
    00084     static const double um  = micrometer;
    00085
    00086     static const double mm  = millimeter;
    00087     static const double mm2 = millimeter2;
    00088     static const double mm3 = millimeter3;
    00089
    00090     static const double cm  = centimeter;
    00091     static const double cm2 = centimeter2;
    00092     static const double cm3 = centimeter3;
    00093
    00094     static const double m  = meter;
    00095     static const double m2 = meter2;
    00096     static const double m3 = meter3;
    00097
    00098     static const double km  = kilometer;
    00099     static const double km2 = kilometer2;
    00100     static const double km3 = kilometer3;
    00101
    00102     static const double pc = parsec;
    00103
    00104     //
    00105     // Angle
    00106     //
    00107     static const double radian      = 1.;
    00108     static const double milliradian = 1.e-3*radian;
    00109     static const double degree = (3.14159265358979323846/180.0)*radian;
    00110
    00111     static const double   steradian = 1.;
    00112
    00113     // symbols
    00114     static const double rad  = radian;
    00115     static const double mrad = milliradian;
    00116     static const double sr   = steradian;
    00117     static const double deg  = degree;
    00118
    00119     //
    00120     // Time [T]
    00121     //
    00122     static const double nanosecond  = 1.;
    00123     static const double second      = 1.e+9 *nanosecond;
    00124     static const double millisecond = 1.e-3 *second;
    00125     static const double microsecond = 1.e-6 *second;
    00126     static const double  picosecond = 1.e-12*second;
    00127     static const double femtosecond = 1.e-15*second;
    00128
    00129     static const double hertz = 1./second;
    00130     static const double kilohertz = 1.e+3*hertz;
    00131     static const double megahertz = 1.e+6*hertz;
    00132
    00133     // symbols
    00134     static const double ns = nanosecond;
    00135     static const double  s = second;
    00136     static const double ms = millisecond;
    00137
    00138     //
    00139     // Electric charge [Q]
    00140     //
    00141     static const double eplus = 1. ;            // positron charge
    00142     static const double e_SI  = 1.60217733e-19; // positron charge in coulomb
    00143     static const double coulomb = eplus/e_SI;   // coulomb = 6.24150 e+18 * eplus
    00144
    00145     //
    00146     // Energy [E]
    00147     //
    00148     static const double megaelectronvolt = 1. ;
    00149     static const double     electronvolt = 1.e-6*megaelectronvolt;
    00150     static const double kiloelectronvolt = 1.e-3*megaelectronvolt;
    00151     static const double gigaelectronvolt = 1.e+3*megaelectronvolt;
    00152     static const double teraelectronvolt = 1.e+6*megaelectronvolt;
    00153     static const double petaelectronvolt = 1.e+9*megaelectronvolt;
    00154
    00155     static const double joule = electronvolt/e_SI;      // joule = 6.24150 e+12 * MeV
    00156
    00157     // symbols
    00158     static const double MeV = megaelectronvolt;
    00159     static const double  eV = electronvolt;
    00160     static const double keV = kiloelectronvolt;
    00161     static const double GeV = gigaelectronvolt;
    00162     static const double TeV = teraelectronvolt;
    00163     static const double PeV = petaelectronvolt;
    00164
    00165     //
    00166     // Mass [E][T^2][L^-2]
    00167     //
    00168     static const double  kilogram = joule*second*second/(meter*meter);
    00169     static const double      gram = 1.e-3*kilogram;
    00170     static const double milligram = 1.e-3*gram;
    00171
    00172     // symbols
    00173     static const double  kg = kilogram;
    00174     static const double   g = gram;
    00175     static const double  mg = milligram;
    00176
    00177     //
    00178     // Power [E][T^-1]
    00179     //
    00180     static const double watt = joule/second;    // watt = 6.24150 e+3 * MeV/ns
    00181
    00182 //
    00183 // Force [E][L^-1]
    00184 //
    00185     static const double newton = joule/meter;   // newton = 6.24150 e+9 * MeV/mm
    00186
    00187     //
    00188     // Pressure [E][L^-3]
    00189     //
    00190     static const double Pa         = newton/m2; // pascal = 6.24150 e+3 * MeV/mm3
    00191     static const double bar        = 100000*Pa; // bar    = 6.24150 e+8 * MeV/mm3
    00192     static const double atmosphere = 101325*Pa; // atm    = 6.32420 e+8 * MeV/mm3
    00193
    00194     //
    00195     // Electric current [Q][T^-1]
    00196     //
    00197     static const double      ampere = coulomb/second; // ampere = 6.24150 e+9 * eplus/ns
    00198     static const double milliampere = 1.e-3*ampere;
    00199     static const double microampere = 1.e-6*ampere;
    00200     static const double  nanoampere = 1.e-9*ampere;
    00201
    00202     //
    00203     // Electric potential [E][Q^-1]
    00204     //
    00205     static const double megavolt = megaelectronvolt/eplus;
    00206     static const double kilovolt = 1.e-3*megavolt;
    00207     static const double     volt = 1.e-6*megavolt;
    00208
    00209     //
    00210     // Electric resistance [E][T][Q^-2]
    00211     //
    00212     static const double ohm = volt/ampere;      // ohm = 1.60217e-16*(MeV/eplus)/(eplus/ns)
    00213
    00214     //
    00215     // Electric capacitance [Q^2][E^-1]
    00216     //
    00217     static const double farad = coulomb/volt;   // farad = 6.24150e+24 * eplus/Megavolt
    00218     static const double millifarad = 1.e-3*farad;
    00219     static const double microfarad = 1.e-6*farad;
    00220     static const double  nanofarad = 1.e-9*farad;
    00221     static const double  picofarad = 1.e-12*farad;
    00222
    00223     //
    00224     // Magnetic Flux [T][E][Q^-1]
    00225     //
    00226     static const double weber = volt*second;    // weber = 1000*megavolt*ns
    00227
    00228     //
    00229     // Magnetic Field [T][E][Q^-1][L^-2]
    00230     //
    00231     static const double tesla     = volt*second/meter2; // tesla =0.001*megavolt*ns/mm2
    00232
    00233     static const double gauss     = 1.e-4*tesla;
    00234     static const double kilogauss = 1.e-1*tesla;
    00235
    00236     //
    00237     // Inductance [T^2][E][Q^-2]
    00238     //
    00239     static const double henry = weber/ampere;   // henry = 1.60217e-7*MeV*(ns/eplus)**2
    00240
    00241     //
    00242     // Temperature
    00243     //
    00244     static const double kelvin = 1.;
    00245
    00246     //
    00247     // Amount of substance
    00248     //
    00249     static const double mole = 1.;
    00250
    00251     //
    00252     // Activity [T^-1]
    00253     //
    00254     static const double becquerel = 1./second ;
    00255     static const double curie = 3.7e+10 * becquerel;
    00256
    00257     //
    00258     // Absorbed dose [L^2][T^-2]
    00259     //
    00260     static const double gray = joule/kilogram ;
    00261
    00262     //
    00263     // Luminous intensity [I]
    00264     //
    00265     static const double candela = 1.;
    00266
    00267     //
    00268     // Luminous flux [I]
    00269     //
    00270     static const double lumen = candela*steradian;
    00271
    00272     //
    00273     // Illuminance [I][L^-2]
    00274     //
    00275     static const double lux = lumen/meter2;
    00276
    00277     //
    00278     // Miscellaneous
    00279     //
    00280     static const double perCent     = 0.01 ;
    00281     static const double perThousand = 0.001;
    00282     static const double perMillion  = 0.000001;
    00283
    00284   }  // namespace Units
    00285 } // namespace Gaudi
    00286
    00287
    00288 #endif /* GAUDI_SYSTEM_OF_UNITS_H */