6 #include "HepMC/Units.h"
14 std::cout <<
"Default units: " << HepMC::Units::name(HepMC::Units::default_momentum_unit())
15 <<
" " << HepMC::Units::name(HepMC::Units::default_length_unit()) << std::endl;
18 cf = conversion_factor( HepMC::Units::GEV, HepMC::Units::GEV );
21 std::cerr <<
"wrong conversion factor " << cf
22 <<
" for GEV to GEV - should be 1 \n";
24 cf = conversion_factor( HepMC::Units::MEV, HepMC::Units::MEV );
27 std::cerr <<
"wrong conversion factor " << cf
28 <<
" for MEV to MEV - should be 1 \n";
30 cf = conversion_factor( HepMC::Units::MEV, HepMC::Units::GEV );
33 std::cerr <<
"wrong conversion factor " << cf
34 <<
" for MEV to GEV - should be 0.001 \n";
36 cf = conversion_factor( HepMC::Units::GEV, HepMC::Units::MEV );
39 std::cerr <<
"wrong conversion factor " << cf
40 <<
" for GEV to MEV - should be 1000 \n";
44 cf = conversion_factor( HepMC::Units::MM, HepMC::Units::MM );
47 std::cerr <<
"wrong conversion factor " << cf
48 <<
" for MM to MM - should be 1 \n";
50 cf = conversion_factor( HepMC::Units::CM, HepMC::Units::CM );
53 std::cerr <<
"wrong conversion factor " << cf
54 <<
" for CM to CM - should be 1 \n";
56 cf = conversion_factor( HepMC::Units::CM, HepMC::Units::MM );
59 std::cerr <<
"wrong conversion factor " << cf
60 <<
" for CM to MM - should be 10 \n";
62 cf = conversion_factor( HepMC::Units::MM, HepMC::Units::CM );
65 std::cerr <<
"wrong conversion factor " << cf
66 <<
" for MM to CM - should be 0.1 \n";