1 //--------------------------------------------------------------------------
3 // Author: A. Buckley, D. Grellscheid
5 // units used by a GenEvent
6 // The default units are set here at compile time.
7 //--------------------------------------------------------------------------
9 #include "HepMC/Units.h"
16 std::string name(MomentumUnit m) {
18 case MEV : return "MEV";
19 case GEV : return "GEV";
20 default : return "badValue";
24 std::string name(LengthUnit l) {
26 case MM : return "MM";
27 case CM : return "CM";
28 default : return "badValue";
32 double conversion_factor(MomentumUnit from, MomentumUnit to)
36 else if ( from == MEV && to == GEV )
42 double conversion_factor(LengthUnit from, LengthUnit to)
46 else if ( from == MM && to == CM )
52 // if this function fails to compile, rerun configure using --with-length_units
53 LengthUnit default_length_unit() {
54 //return @HEPMC_DEFAULT_LEN_UNIT@ ;
58 // if this function fails to compile, rerun configure using --with-momentum_units
59 MomentumUnit default_momentum_unit() {
60 //return @HEPMC_DEFAULT_MOM_UNIT@ ;