CMS 3D CMS Logo

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

◆ convertUnitsTo()

template<class NumType >
constexpr NumType geant_units::operators::convertUnitsTo ( double  desiredUnits,
NumType  val 
)
inline

◆ operator"" _cm() [1/2]

constexpr double geant_units::operators::operator"" _cm ( long double  length)

Definition at line 32 of file GeantUnits.h.

32 { return length * 10.; }

◆ operator"" _cm() [2/2]

constexpr double geant_units::operators::operator"" _cm ( unsigned long long int  length)

Definition at line 37 of file GeantUnits.h.

37 { return length * 10; }

◆ operator"" _cm3()

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; }

◆ operator"" _eV()

constexpr double geant_units::operators::operator"" _eV ( long double  energy)

Definition at line 45 of file GeantUnits.h.

References HCALHighEnergyHPDFilter_cfi::energy.

45 { return energy * 1.e-6_MeV; }

◆ operator"" _g()

constexpr double geant_units::operators::operator"" _g ( long double  mass)

Definition at line 53 of file GeantUnits.h.

References EgHLTOffHistBins_cfi::mass.

53 { return mass * 1.e-3_kg; }

◆ operator"" _g_per_cm3()

constexpr double geant_units::operators::operator"" _g_per_cm3 ( long double  density)

Definition at line 59 of file GeantUnits.h.

References fastSimProducer_cff::density.

59 { return density * 1._g / 1._cm3; }

◆ operator"" _g_per_mole()

constexpr double geant_units::operators::operator"" _g_per_mole ( long double  mass)

Definition at line 60 of file GeantUnits.h.

References EgHLTOffHistBins_cfi::mass.

60 { return mass * 1._g / 1._mole; }

◆ operator"" _GeV()

constexpr double geant_units::operators::operator"" _GeV ( long double  energy)

Definition at line 47 of file GeantUnits.h.

References HCALHighEnergyHPDFilter_cfi::energy.

47 { return energy * 1000._MeV; }

◆ operator"" _kg()

constexpr double geant_units::operators::operator"" _kg ( long double  mass)

Definition at line 50 of file GeantUnits.h.

References hgcalDigitizer_cfi::_m, and EgHLTOffHistBins_cfi::mass.

50  {
51  return mass * (1._eV / 1.602176487e-19) * 1._s * 1._s / (1._m * 1._m);
52  }

◆ operator"" _m()

constexpr double geant_units::operators::operator"" _m ( long double  length)

Definition at line 33 of file GeantUnits.h.

33 { return length * 1000.; }

◆ operator"" _m3()

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; }

◆ operator"" _MeV()

constexpr double geant_units::operators::operator"" _MeV ( long double  energy)

Definition at line 44 of file GeantUnits.h.

References HCALHighEnergyHPDFilter_cfi::energy.

◆ operator"" _mg()

constexpr double geant_units::operators::operator"" _mg ( long double  mass)

Definition at line 54 of file GeantUnits.h.

References EgHLTOffHistBins_cfi::mass.

54 { return mass * 1.e-3_g; }

◆ operator"" _mg_per_cm3()

constexpr double geant_units::operators::operator"" _mg_per_cm3 ( long double  density)

Definition at line 58 of file GeantUnits.h.

References fastSimProducer_cff::density.

58 { return density * 1._mg / 1._cm3; }

◆ operator"" _mm() [1/2]

constexpr double geant_units::operators::operator"" _mm ( long double  length)

Definition at line 31 of file GeantUnits.h.

31 { return length * 1.; }

◆ operator"" _mm() [2/2]

constexpr double geant_units::operators::operator"" _mm ( unsigned long long int  length)

Definition at line 36 of file GeantUnits.h.

36 { return length * 1; }

◆ operator"" _mole()

constexpr double geant_units::operators::operator"" _mole ( long double  mass)

Definition at line 55 of file GeantUnits.h.

References EgHLTOffHistBins_cfi::mass.

55 { return mass * 1.; }

◆ operator"" _ns()

constexpr double geant_units::operators::operator"" _ns ( long double  x)

Definition at line 41 of file GeantUnits.h.

References geant_units::nanoseconds(), and x.

41 { return x * nanoseconds; }
float x
constexpr double nanoseconds(1.)

◆ operator"" _s()

constexpr double geant_units::operators::operator"" _s ( long double  x)

Definition at line 40 of file GeantUnits.h.

References geant_units::seconds(), and x.

40 { return x * seconds; }
double seconds()
float x

◆ operator"" _TeV()

constexpr double geant_units::operators::operator"" _TeV ( long double  energy)

Definition at line 46 of file GeantUnits.h.

References HCALHighEnergyHPDFilter_cfi::energy.