CMS 3D CMS Logo

Functions
geant_units::operators Namespace Reference

Functions

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

Function Documentation

◆ convertCm2ToMm2()

template<class NumType >
constexpr NumType geant_units::operators::convertCm2ToMm2 ( NumType  centimeters)
inlineconstexpr

Definition at line 74 of file GeantUnits.h.

75  {
76  return (centimeters * 100.);
77  }

Referenced by algorithm().

◆ convertCmToMm()

template<class NumType >
constexpr NumType geant_units::operators::convertCmToMm ( NumType  centimeters)
inlineconstexpr

◆ convertMm3ToM3()

template<class NumType >
constexpr NumType geant_units::operators::convertMm3ToM3 ( NumType  mm3)
inlineconstexpr

Definition at line 80 of file GeantUnits.h.

81  {
82  return (mm3 / 1.e9);
83  }

◆ convertMmToCm()

template<class NumType >
constexpr NumType geant_units::operators::convertMmToCm ( NumType  millimeters)
inlineconstexpr

◆ convertUnitsTo()

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

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

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

Definition at line 31 of file GeantUnits.h.

31 { return length * 10.; }

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

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

Definition at line 36 of file GeantUnits.h.

36 { return length * 10; }

◆ operator""_cm3()

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

Definition at line 33 of file GeantUnits.h.

33 { return length * 1._cm * 1._cm * 1._cm; }

◆ operator""_eV()

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

Definition at line 44 of file GeantUnits.h.

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

References HCALHighEnergyHPDFilter_cfi::energy.

◆ operator""_g()

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

Definition at line 52 of file GeantUnits.h.

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

References EgHLTOffHistBins_cfi::mass.

◆ operator""_g_per_cm3()

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

Definition at line 58 of file GeantUnits.h.

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

References fastSimProducer_cff::density.

◆ operator""_g_per_mole()

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

Definition at line 59 of file GeantUnits.h.

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

References EgHLTOffHistBins_cfi::mass.

◆ operator""_GeV()

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

Definition at line 46 of file GeantUnits.h.

46 { return energy * 1000._MeV; }

References HCALHighEnergyHPDFilter_cfi::energy.

◆ operator""_kg()

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

Definition at line 49 of file GeantUnits.h.

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

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

◆ operator""_m()

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

Definition at line 32 of file GeantUnits.h.

32 { return length * 1000.; }

◆ operator""_m3()

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

Definition at line 34 of file GeantUnits.h.

34 { return length * 1._m * 1._m * 1._m; }

◆ operator""_MeV()

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

Definition at line 43 of file GeantUnits.h.

43 { return energy * 1.; }

References HCALHighEnergyHPDFilter_cfi::energy.

◆ operator""_mg()

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

Definition at line 53 of file GeantUnits.h.

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

References EgHLTOffHistBins_cfi::mass.

◆ operator""_mg_per_cm3()

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

Definition at line 57 of file GeantUnits.h.

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

References fastSimProducer_cff::density.

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

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

Definition at line 30 of file GeantUnits.h.

30 { return length * 1.; }

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

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

Definition at line 35 of file GeantUnits.h.

35 { return length * 1; }

◆ operator""_mole()

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

Definition at line 54 of file GeantUnits.h.

54 { return mass * 1.; }

References EgHLTOffHistBins_cfi::mass.

◆ operator""_ns()

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

Definition at line 40 of file GeantUnits.h.

40 { return x * nanoseconds; }

References geant_units::nanoseconds().

◆ operator""_s()

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

Definition at line 39 of file GeantUnits.h.

39 { return x * seconds; }

References geant_units::seconds().

◆ operator""_TeV()

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

Definition at line 45 of file GeantUnits.h.

45 { return energy * 1.e6_MeV; }

References HCALHighEnergyHPDFilter_cfi::energy.

hgcalDigitizer_cfi._m
_m
Definition: hgcalDigitizer_cfi.py:209
seconds
double seconds()
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
geant_units::nanoseconds
constexpr long double nanoseconds(1.)
heppy_batch.val
val
Definition: heppy_batch.py:351
genVertex_cff.x
x
Definition: genVertex_cff.py:12
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
fastSimProducer_cff.density
density
Definition: fastSimProducer_cff.py:61