37 if( name.compare(0,3,
"GEV") == 0 )
return GEV;
38 if( name.compare(0,3,
"MEV") == 0 )
return MEV;
40 HEPMC3_ERROR(
"Units::momentum_unit: unrecognised unit name: '" << name <<
"', setting to GEV" )
47 if( name.compare(0,2,
"CM") == 0 )
return CM;
48 if( name.compare(0,2,
"MM") == 0 )
return MM;
50 HEPMC3_ERROR(
"Units::length_unit: unrecognised unit name: '" << name <<
"', setting to CM" )
82 if( from == to )
return;
88 else if( from == MEV ) {
97 if( from == to )
return;
103 else if( from == MM ) {
Implementation of error and HEPMC3_HEPMC3_WARNING macros.
static LengthUnit length_unit(const std::string &name)
Get length unit based on its name.
static void convert(T &m, MomentumUnit from, MomentumUnit to)
Convert FourVector to different momentum unit.
static std::string name(MomentumUnit u)
Get name of momentum unit.
LengthUnit
Position units.
static void convert(T &m, LengthUnit from, LengthUnit to)
Convert FourVector to different length unit.
MomentumUnit
Momentum units.
Stores units-related enums and conversion functions.
Definition of class Setup.
static MomentumUnit momentum_unit(const std::string &name)
Get momentum unit based on its name.
#define HEPMC3_ERROR(MESSAGE)
Macro for printing error messages.
static std::string name(LengthUnit u)
Get name of length unit.
Annotation for function names.
Definition of class FourVector.