CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
DTGeometryValidate.cc File Reference
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "Geometry/DTGeometry/interface/DTGeometry.h"
#include "Geometry/DTGeometry/interface/DTLayer.h"
#include "Geometry/Records/interface/MuonGeometryRecord.h"
#include "Fireworks/Core/interface/FWGeometry.h"
#include "DataFormats/GeometrySurface/interface/RectangularPlaneBounds.h"
#include "DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h"
#include <TFile.h>
#include <TH1.h>
#include <cmath>
#include <limits>
#include <string>
#include <type_traits>
#include <algorithm>

Go to the source code of this file.

Classes

class  DTGeometryValidate
 

Functions

template<class T >
enable_if<!numeric_limits< T >
::is_integer, bool >::type 
almost_equal (T x, T y, int ulp)
 
static const
edm::ParameterSetDescriptionFillerPluginFactory::PMaker
< edm::ParameterSetDescriptionFiller
< DTGeometryValidate > > 
s_filler__LINE__ ("DTGeometryValidate")
 
static const
edm::MakerPluginFactory::PMaker
< edm::WorkerMaker
< DTGeometryValidate > > 
s_maker__LINE__ ("DTGeometryValidate")
 

Function Documentation

template<class T >
enable_if<!numeric_limits<T>::is_integer, bool>::type almost_equal ( T  x,
T  y,
int  ulp 
)

Definition at line 29 of file DTGeometryValidate.cc.

References funct::abs(), geometryDiff::epsilon, and min().

29  {
30  // the machine epsilon has to be scaled to the magnitude of the values used
31  // and multiplied by the desired precision in ULPs (units in the last place)
32  return abs(x - y) <= numeric_limits<T>::epsilon() * abs(x + y) * ulp
33  // unless the result is subnormal
34  || abs(x - y) < numeric_limits<T>::min();
35 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
uint16_t const *__restrict__ x
Definition: gpuClustering.h:39
T min(T a, T b)
Definition: MathUtil.h:58
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< DTGeometryValidate > > s_filler__LINE__ ( "DTGeometryValidate"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< DTGeometryValidate > > s_maker__LINE__ ( "DTGeometryValidate"  )
static