CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
geant_units::operators Namespace Reference

Functions

template<class NumType >
constexpr NumType convertUnitsTo (double desiredUnits, NumType val)
 
constexpr double operator""_cm (long double length)
 
constexpr double operator""_cm (unsigned long long int length)
 
constexpr double operator""_cm3 (long double length)
 
constexpr double operator""_eV (long double energy)
 
constexpr double operator""_g (long double mass)
 
constexpr double operator""_g_per_cm3 (long double density)
 
constexpr double operator""_g_per_mole (long double mass)
 
constexpr double operator""_GeV (long double energy)
 
constexpr double operator""_kg (long double mass)
 
constexpr double operator""_m (long double length)
 
constexpr double operator""_m3 (long double length)
 
constexpr double operator""_MeV (long double energy)
 
constexpr double operator""_mg (long double mass)
 
constexpr double operator""_mg_per_cm3 (long double density)
 
constexpr double operator""_mm (long double length)
 
constexpr double operator""_mm (unsigned long long int length)
 
constexpr double operator""_mole (long double mass)
 
constexpr double operator""_ns (long double x)
 
constexpr double operator""_s (long double x)
 
constexpr double operator""_TeV (long double energy)
 

Function Documentation

template<class NumType >
constexpr NumType geant_units::operators::convertUnitsTo ( double  desiredUnits,
NumType  val 
)
inline
constexpr double geant_units::operators::operator""_cm ( long double  length)

Definition at line 32 of file GeantUnits.h.

32 { return length * 10.; }
constexpr double geant_units::operators::operator""_cm ( unsigned long long int  length)

Definition at line 37 of file GeantUnits.h.

37 { return length * 10; }
constexpr double geant_units::operators::operator""_cm3 ( long double  length)

Definition at line 34 of file GeantUnits.h.

34 { return length * 1._cm * 1._cm * 1._cm; }
constexpr double geant_units::operators::operator""_eV ( long double  energy)

Definition at line 45 of file GeantUnits.h.

45 { return energy * 1.e-6_MeV; }
constexpr double geant_units::operators::operator""_g ( long double  mass)

Definition at line 53 of file GeantUnits.h.

53 { return mass * 1.e-3_kg; }
constexpr double geant_units::operators::operator""_g_per_cm3 ( long double  density)

Definition at line 59 of file GeantUnits.h.

59 { return density * 1._g / 1._cm3; }
constexpr double geant_units::operators::operator""_g_per_mole ( long double  mass)

Definition at line 60 of file GeantUnits.h.

60 { return mass * 1._g / 1._mole; }
constexpr double geant_units::operators::operator""_GeV ( long double  energy)

Definition at line 47 of file GeantUnits.h.

47 { return energy * 1000._MeV; }
constexpr double geant_units::operators::operator""_kg ( long double  mass)

Definition at line 50 of file GeantUnits.h.

50  {
51  return mass * (1._eV / 1.602176487e-19) * 1._s * 1._s / (1._m * 1._m);
52  }
constexpr double geant_units::operators::operator""_m ( long double  length)

Definition at line 33 of file GeantUnits.h.

33 { return length * 1000.; }
constexpr double geant_units::operators::operator""_m3 ( long double  length)

Definition at line 35 of file GeantUnits.h.

35 { return length * 1._m * 1._m * 1._m; }
constexpr double geant_units::operators::operator""_MeV ( long double  energy)

Definition at line 44 of file GeantUnits.h.

44 { return energy * 1.; }
constexpr double geant_units::operators::operator""_mg ( long double  mass)

Definition at line 54 of file GeantUnits.h.

54 { return mass * 1.e-3_g; }
constexpr double geant_units::operators::operator""_mg_per_cm3 ( long double  density)

Definition at line 58 of file GeantUnits.h.

58 { return density * 1._mg / 1._cm3; }
constexpr double geant_units::operators::operator""_mm ( long double  length)

Definition at line 31 of file GeantUnits.h.

31 { return length * 1.; }
constexpr double geant_units::operators::operator""_mm ( unsigned long long int  length)

Definition at line 36 of file GeantUnits.h.

36 { return length * 1; }
constexpr double geant_units::operators::operator""_mole ( long double  mass)

Definition at line 55 of file GeantUnits.h.

55 { return mass * 1.; }
constexpr double geant_units::operators::operator""_ns ( long double  x)

Definition at line 41 of file GeantUnits.h.

References geant_units::nanoseconds().

41 { return x * nanoseconds; }
boost::date_time::subsecond_duration< boost::posix_time::time_duration, 1000000000 > nanoseconds
uint16_t const *__restrict__ x
Definition: gpuClustering.h:43
constexpr double geant_units::operators::operator""_s ( long double  x)

Definition at line 40 of file GeantUnits.h.

References geant_units::seconds().

40 { return x * seconds; }
double seconds()
uint16_t const *__restrict__ x
Definition: gpuClustering.h:43
constexpr double geant_units::operators::operator""_TeV ( long double  energy)

Definition at line 46 of file GeantUnits.h.

46 { return energy * 1.e6_MeV; }