24 #include "StGlobals.hh"
26 #define ST_ADD_OLD_CLHEP_SYSTEM_OF_UNITS
27 #include "SystemOfUnits.h"
29 #ifndef ST_NO_NAMESPACES
30 using namespace units;
35 cout <<
"This program illustrates the use of SystemOfUnits and PhysicalContants" << endl;
36 cout <<
"--------------------------------------------------------------------" << endl;
38 cout <<
"1 millimeter = " << (1*millimeter) << endl;
39 cout <<
"1 meter = " << (1*meter) << endl;
40 cout <<
"1 centimeter = " << (1*centimeter) << endl;
41 cout <<
"1 fermi = " << (1*fermi) << endl;
43 cout <<
"1 barn = " << (1*barn) << endl;
45 cout <<
"1 degree = " << (1*degree) << endl;
47 cout <<
"1 second = " << (1*second) << endl;
48 cout <<
"1 nanosecond = " << (1*nanosecond) << endl;
50 cout <<
"1 kHz = " << (1*kHz) << endl;
52 cout <<
"1 newton = " << (1*newton) << endl;
53 cout <<
"1 joule = " << (1*joule) << endl;
55 cout <<
"1 GeV = " << (1*GeV) << endl;
56 cout <<
"1 Gigaelectronvolt = " << (1*Gigaelectronvolt) << endl;
59 #ifdef ST_ADD_OLD_CLHEP_SYSTEM_OF_UNITS
60 cout <<
"The old CLHEP definitions are also supported:" << endl;
61 cout <<
"---------------------------------------------" << endl;
62 cout <<
"1 mm = " << (1*mm) << endl;
63 cout <<
"1 m = " << (1*m) << endl;
64 cout <<
"1 cm = " << (1*cm) << endl;
66 cout <<
"1 s = " << (1*s) << endl;
67 cout <<
"1 ns = " << (1*ns) << endl;
69 cout <<
"\nTo use the old CLHEP definitions the flag:" << endl;
70 cout <<
" ST_ADD_OLD_CLHEP_SYSTEM_OF_UNITS" << endl;
71 cout <<
"must be defined" << endl;
72 cout <<
"**This is an obselete file and should NOT be used**" << endl;