CMS 3D CMS Logo

Functions
angle_units::operators Namespace Reference

Functions

template<class NumType >
std::enable_if<!std::numeric_limits< NumType >::is_integer, bool >::type almostEqual (NumType x, NumType y, int ulp)
 
template<class NumType >
constexpr double convertDegToRad (NumType degrees)
 
template<class NumType >
constexpr NumType convertRadToDeg (NumType radians)
 
constexpr double operator""_deg (long double deg)
 
constexpr double operator""_deg (unsigned long long int deg)
 
constexpr double operator""_pi (long double x)
 
constexpr double operator""_pi (unsigned long long int x)
 
constexpr double operator""_rad (long double rad)
 

Function Documentation

◆ almostEqual()

template<class NumType >
std::enable_if<!std::numeric_limits<NumType>::is_integer, bool>::type angle_units::operators::almostEqual ( NumType  x,
NumType  y,
int  ulp 
)

Definition at line 33 of file angle_units.h.

35  {
36  return std::fabs(x - y) <= std::numeric_limits<NumType>::epsilon() * std::fabs(x + y) * ulp ||
37  std::fabs(x - y) < std::numeric_limits<NumType>::min();
38  }

References geometryDiff::epsilon, and min().

Referenced by GeometricDet::GeometricDet().

◆ convertDegToRad()

template<class NumType >
constexpr double angle_units::operators::convertDegToRad ( NumType  degrees)
inlineconstexpr

◆ convertRadToDeg()

template<class NumType >
constexpr NumType angle_units::operators::convertRadToDeg ( NumType  radians)
inlineconstexpr

Definition at line 21 of file angle_units.h.

22  {
23  return (radians * degPerRad);
24  }

References angle_units::degPerRad.

Referenced by algorithm(), HcalParametersFromDD::build(), HGCalParametersFromDD::build(), DDHCalBarrelAlgo::constructGeneralVolume(), DDHCalEndcapAlgo::constructGeneralVolume(), HCalEndcapAlgo::constructGeneralVolume(), DDHCalEndcapModuleAlgo::constructInsideModule(), DDHCalEndcapAlgo::constructInsideModule(), HCalEndcapModuleAlgo::constructInsideModule(), HCalEndcapAlgo::constructInsideModule(), DDHCalEndcapModuleAlgo::constructInsideModule0(), DDHCalEndcapAlgo::constructInsideModule0(), HCalEndcapModuleAlgo::constructInsideModule0(), HCalEndcapAlgo::constructInsideModule0(), DDHCalBarrelAlgo::constructInsideSector(), DDHCalEndcapAlgo::constructInsideSector(), HCalEndcapAlgo::constructInsideSector(), DDHGCalModule::constructLayers(), DDHGCalModuleAlgo::constructLayers(), DDHGCalEEAlgo::constructLayers(), DDHGCalHEAlgo::constructLayers(), DDHGCalHEFileAlgo::constructLayers(), DDHGCalEEFileAlgo::constructLayers(), DDHGCalMixLayer::constructLayers(), DDHGCalSiliconModule::constructLayers(), HGCalEEAlgo::ConstructLayers(), DDHCalBarrelAlgo::constructMidLayer(), HcalBarrelAlgo::constructMidLayer(), DDHCalEndcapModuleAlgo::constructScintLayer(), DDHCalEndcapAlgo::constructScintLayer(), HCalEndcapModuleAlgo::constructScintLayer(), HCalEndcapAlgo::constructScintLayer(), DDHCalBarrelAlgo::constructSideLayer(), HcalBarrelAlgo::constructSideLayer(), DDcreateRotationMatrix(), Geom::Phi< float >::degrees(), DDHtmlRoDetails::details(), PrintGeomInfoAction::dumpTouch(), DDAngular::execute(), DDTotemAngular::execute(), DDHCalTestBeamAlgo::execute(), DDHCalXtalAlgo::execute(), DDHCalAngular::execute(), DDHCalTBZposAlgo::execute(), DDGEMAngular::execute(), DDMuonAngular::execute(), DDHCalTBCableAlgo::execute(), DDHCalFibreBundle::execute(), SimG4HcalValidation::fill(), MaterialBudgetHcalHistos::fillPerStep(), MaterialBudgetHcalHistos::fillStartTrack(), formatAsDegrees(), formatAsDegreesInInteger(), FastTimeDDDConstants::getEtaPhi(), HcalDDDRecConstants::getOneEtaBin(), HcalDDDSimConstants::getPhis(), HcalDDDRecConstants::getPhis(), HcalDDDRecConstants::getThickActive(), FastTimeDDDConstants::getZPhi(), HcalBarrelAlgo::HcalBarrelAlgo(), HCalEndcapAlgo::HCalEndcapAlgo(), HGCalEEAlgo::HGCalEEAlgo(), HGCalEEFileAlgo::HGCalEEFileAlgo(), HGCalHEAlgo::HGCalHEAlgo(), HGCalHEFileAlgo::HGCalHEFileAlgo(), HGCalMixLayer::HGCalMixLayer(), HGCalMouseBite::HGCalMouseBite(), HGCalSiliconModule::HGCalSiliconModule(), DDLinear::initialize(), DDTotemAngular::initialize(), DDAngular::initialize(), DDMTDLinear::initialize(), DDHCalTestBeamAlgo::initialize(), DDHCalXtalAlgo::initialize(), DDHCalAngular::initialize(), DDHCalTBZposAlgo::initialize(), DDGEMAngular::initialize(), DDMuonAngular::initialize(), DDBHMAngular::initialize(), DDHCalFibreBundle::initialize(), FastTimeDDDConstants::initialize(), DDHGCalEEAlgo::initialize(), DDHGCalHEAlgo::initialize(), DDHGCalHEFileAlgo::initialize(), DDHGCalEEFileAlgo::initialize(), DDHGCalMixLayer::initialize(), DDHGCalSiliconModule::initialize(), DDHCalEndcapAlgo::initialize(), HcalDDDRecConstants::initialize(), DDLRotationAndReflection::isLeftHanded(), HGCalDDDConstants::locateCell(), operator<<(), output(), DDHCalEndcapModuleAlgo::parameterLayer(), DDHCalEndcapAlgo::parameterLayer(), HCalEndcapModuleAlgo::parameterLayer(), HCalEndcapAlgo::parameterLayer(), DDHCalEndcapModuleAlgo::parameterLayer0(), DDHCalEndcapAlgo::parameterLayer0(), HCalEndcapModuleAlgo::parameterLayer0(), HCalEndcapAlgo::parameterLayer0(), DDHGCalMixLayer::positionMix(), HGCalMixLayer::positionMix(), printRot(), HcalDDDSimConstants::printTileHB(), HcalDDDSimConstants::printTileHE(), DDCoreToDDXMLOutput::rotation(), DDCoreToDDXMLOutput::solid(), DDI::Sphere::stream(), DDI::Tubs::stream(), DDI::Torus::stream(), DDI::Cons::stream(), DDI::TruncTubs::stream(), DDI::Polycone::stream(), DDI::Polyhedra::stream(), DDI::Trap::stream(), DDI::CutTubs::stream(), and PrintGeomInfoAction::update().

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

constexpr double angle_units::operators::operator""_deg ( long double  deg)
constexpr

Definition at line 16 of file angle_units.h.

16 { return deg / degPerRad; }

References angle_units::degPerRad.

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

constexpr double angle_units::operators::operator""_deg ( unsigned long long int  deg)
constexpr

Definition at line 17 of file angle_units.h.

17 { return deg / degPerRad; }

References angle_units::degPerRad.

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

constexpr double angle_units::operators::operator""_pi ( long double  x)
constexpr

Definition at line 14 of file angle_units.h.

14 { return double(x) * M_PI; }

References M_PI.

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

constexpr double angle_units::operators::operator""_pi ( unsigned long long int  x)
constexpr

Definition at line 15 of file angle_units.h.

15 { return double(x) * M_PI; }

References M_PI.

◆ operator""_rad()

constexpr double angle_units::operators::operator""_rad ( long double  rad)
constexpr

Definition at line 18 of file angle_units.h.

18 { return rad * 1.; }
degrees
double degrees(double radiants)
def degrees
Definition: EcalEleCalibLooper.cc:359
min
T min(T a, T b)
Definition: MathUtil.h:58
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
genVertex_cff.x
x
Definition: genVertex_cff.py:13
detailsBasic3DVector::y
float float y
Definition: extBasic3DVector.h:14
angle_units::degPerRad
constexpr double degPerRad
Definition: angle_units.h:9