Belle II Software light-2406-ragdoll
|
#include <Unit.h>
Static Public Member Functions | |
static double | convertValue (double value, const std::string &unitString) |
Converts a floating point value to the standard framework unit. | |
static double | convertValueToUnit (double value, const std::string &unitString) |
Converts a floating point value from the standard framework unit to the given unit. | |
Static Public Attributes | |
static const double | cm |
Standard units with the value = 1. | |
static const double | ns |
Standard of [time]. | |
static const double | GHz |
Standard of [frequency]. | |
static const double | rad |
Standard of [angle]. | |
static const double | GeV |
Standard of [energy, momentum, mass]. | |
static const double | K |
Standard of [temperature]. | |
static const double | e |
Standard of [electric charge]. | |
static const double | g_cm3 |
Practical units with the value set at 1. | |
static const double | km |
Derived units. | |
static const double | m |
[meters] | |
static const double | mm |
[millimeters] | |
static const double | um |
[micrometers] | |
static const double | nm |
[nanometers] | |
static const double | pm |
[picometers] | |
static const double | fm |
[femtometers] | |
static const double | m2 |
[square meters] | |
static const double | cm2 |
[square centimeters] | |
static const double | mm2 |
[square millimeters] | |
static const double | b |
[barn] | |
static const double | mb |
[millibarn] | |
static const double | ub |
[microbarn] | |
static const double | nb |
[nanobarn] | |
static const double | pb |
[picobarn] | |
static const double | fb |
[femtobarn] | |
static const double | ab |
[attobarn] | |
static const double | m3 |
[cubic meters] | |
static const double | cm3 |
[cubic centimeters] | |
static const double | mm3 |
[cubic millimeters] | |
static const double | s |
[second] | |
static const double | ms |
[millisecond] | |
static const double | us |
[microsecond] | |
static const double | ps |
[picosecond] | |
static const double | fs |
[femtosecond] | |
static const double | Hz |
[Hertz] | |
static const double | kHz |
[Kilohertz] | |
static const double | MHz |
[Megahertz] | |
static const double | mHz |
[Millihertz] | |
static const double | mrad |
[millirad] | |
static const double | deg |
degree to radians | |
static const double | eV |
[electronvolt] | |
static const double | keV |
[kiloelectronvolt] | |
static const double | MeV |
[megaelectronvolt] | |
static const double | TeV |
[teraelectronvolt] | |
static const double | J |
[joule] | |
static const double | V |
[voltage] | |
static const double | T |
[tesla] | |
static const double | mT |
[millitesla] | |
static const double | Gauss |
[gauss] | |
static const double | kGauss |
[kilogauss] | |
static const double | C |
[coulomb] | |
static const double | fC |
[femtocoulomb] | |
static const double | mg_cm3 |
[mg/cm^3] | |
static const double | kg_cm3 |
[kg/cm^3] | |
static const double | g_mm3 |
[g/mm^3] | |
static const double | mg_mm3 |
[mg/mm^3] | |
static const double | kg_mm3 |
[kg/mm^3] | |
Static Protected Member Functions | |
static double | registerConversion (const std::string &name, double value) |
registers the name and value of a conversion in s_conversionFactors. | |
Static Protected Attributes | |
static std::map< std::string, double > | s_conversionFactors |
Map to be able to convert between units using string representations of the unit name. | |
Private Member Functions | |
Unit ()=delete | |
no Unit instances allowed. | |
Unit (const Unit &)=delete | |
Unit & | operator= (const Unit &)=delete |
The Unit class.
This class provides a set of units for the framework. Use these to specify the unit of your value. In addition the class offers methods to convert floating point numbers from a specified unit to the standard unit of the framework.
This class cannot be instantiated, use the static members directly. The implementation can be found in UnitConst.cc
|
static |
|
static |