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 convertCm2ToMm2 (NumType centimeters)
 
template<class NumType >
constexpr NumType convertCmToMm (NumType centimeters)
 
template<class NumType >
constexpr NumType convertGeVToMeV (NumType gev)
 
template<class NumType >
constexpr NumType convertMeVToGeV (NumType mev)
 
template<class NumType >
constexpr NumType convertMm3ToM3 (NumType mm3)
 
template<class NumType >
constexpr NumType convertMmToCm (NumType millimeters)
 
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::convertCm2ToMm2 ( NumType  centimeters)
inline

Definition at line 75 of file GeantUnits.h.

76  {
77  return (centimeters * 100.);
78  }
template<class NumType >
constexpr NumType geant_units::operators::convertCmToMm ( NumType  centimeters)
inline

Definition at line 69 of file GeantUnits.h.

70  {
71  return (centimeters * 10.);
72  }
template<class NumType >
constexpr NumType geant_units::operators::convertGeVToMeV ( NumType  gev)
inline

Definition at line 93 of file GeantUnits.h.

Referenced by ETLDeviceSim::getHitsResponse(), and BTLDeviceSim::getHitsResponse().

94  {
95  return (gev * 1000.);
96  }
template<class NumType >
constexpr NumType geant_units::operators::convertMeVToGeV ( NumType  mev)
inline

Definition at line 87 of file GeantUnits.h.

88  {
89  return (mev * 0.001);
90  }
template<class NumType >
constexpr NumType geant_units::operators::convertMm3ToM3 ( NumType  mm3)
inline

Definition at line 81 of file GeantUnits.h.

82  {
83  return (mm3 / 1.e9);
84  }
template<class NumType >
constexpr NumType geant_units::operators::convertMmToCm ( NumType  millimeters)
inline

Definition at line 63 of file GeantUnits.h.

Referenced by algorithm(), MtdTracksValidation::analyze(), EtlSimHitsValidation::analyze(), EtlLocalRecoValidation::analyze(), BtlSimHitsValidation::analyze(), BtlLocalRecoValidation::analyze(), GEMGeometryBuilderFromCondDB::boundPlane(), ME0GeometryBuilder::boundPlane(), GEMGeometryBuilder::boundPlane(), HcalParametersFromDD::build(), ME0GeometryBuilderFromCondDB::build(), CSCGeometryParsFromDD::build(), ME0GeometryBuilder::buildChamber(), GEMGeometryBuilder::buildChamber(), GEMGeometryBuilderFromCondDB::buildEtaPartition(), ME0GeometryBuilder::buildEtaPartition(), GEMGeometryBuilder::buildEtaPartition(), RPCGeometryBuilder::buildGeometry(), ME0GeometryBuilder::buildGeometry(), ME0GeometryBuilder::buildLayer(), DTGeometryBuilderFromDDD::buildLayer(), DTGeometryBuilderFromCondDB::buildLayer(), HcalSimParametersFromDD::buildParameters(), GEMGeometryBuilder::buildSuperChamber(), CSCLayerGeometry::CSCLayerGeometry(), CSCWireTopology::CSCWireTopology(), ETLDeviceSim::getHitsResponse(), BTLDeviceSim::getHitsResponse(), dtGeometryBuilder::getRecPlaneBounds(), DDBHMAngular::initialize(), DTGeometryBuilderFromDDD::plane(), DTGeometryParsFromDD::plane(), GeometricDet::positionBounds(), GeometricTimingDet::positionBounds(), DDI::Sphere::stream(), DDI::Torus::stream(), DDI::Tubs::stream(), DDI::Cons::stream(), DDI::Box::stream(), DDI::TruncTubs::stream(), DDI::Polycone::stream(), DDI::Polyhedra::stream(), DDI::ExtrudedPolygon::stream(), DDI::EllipticalTube::stream(), DDI::Trap::stream(), DDI::CutTubs::stream(), and DDI::PseudoTrap::stream().

64  {
65  return (millimeters / 10.);
66  }
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:39
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:39
constexpr double geant_units::operators::operator""_TeV ( long double  energy)

Definition at line 46 of file GeantUnits.h.

46 { return energy * 1.e6_MeV; }