CMS 3D CMS Logo

Classes | Functions
ElectronUtilities.h File Reference
#include <DataFormats/GeometryVector/interface/GlobalPoint.h>
#include <DataFormats/GeometryVector/interface/GlobalVector.h>
#include <DataFormats/Math/interface/Point3D.h>
#include <DataFormats/Math/interface/Vector3D.h>
#include <CLHEP/Units/GlobalPhysicalConstants.h>

Go to the source code of this file.

Classes

class  EleRelPoint
 
class  EleRelPointPair
 
class  ExceptionSafeStlPtrCol< StlColType >
 

Functions

template<typename Type1 , typename Type2 >
void ele_convert (const Type1 &obj1, Type2 &obj2)
 
template<typename RealType >
RealType normalized_phi (RealType phi)
 
template<typename PointType >
double relative_eta (const PointType &p, const PointType &origin)
 
template<typename PointType >
double relative_phi (const PointType &p, const PointType &origin)
 

Function Documentation

template<typename Type1 , typename Type2 >
void ele_convert ( const Type1 &  obj1,
Type2 &  obj2 
)
template<typename RealType >
RealType normalized_phi ( RealType  phi)

Definition at line 35 of file ElectronUtilities.h.

References constexpr, M_PI, phi, pi, and pi2.

Referenced by PixelHitMatcher::compatibleHits(), GsfElectronAlgo::ElectronData::computeCharge(), EleRelPointPair::dPhi(), ForwardMeasurementEstimator::estimate(), BarrelMeasurementEstimator::estimate(), EleRelPoint::phi(), and relative_phi().

36  {
37  constexpr RealType pi(M_PI);
38  constexpr RealType pi2(2*M_PI);
39  if (phi>pi) { phi -= pi2 ; }
40  if (phi<-pi) { phi += pi2; }
41  return phi ;
42  }
const double pi2
Definition: Thrust.cc:4
#define constexpr
const Double_t pi
#define M_PI
template<typename PointType >
double relative_eta ( const PointType &  p,
const PointType &  origin 
)

Definition at line 103 of file ElectronUtilities.h.

104  { return (p-origin).eta() ; }
template<typename PointType >
double relative_phi ( const PointType &  p,
const PointType &  origin 
)

Definition at line 107 of file ElectronUtilities.h.

References normalized_phi(), and phi.

108  { return normalized_phi((p-origin).phi()) ; }
RealType normalized_phi(RealType phi)