CMS 3D CMS Logo

VectorUtil.h
Go to the documentation of this file.
1 #ifndef GeometryVector_Geom_Util_h
2 #define GeometryVector_Geom_Util_h
3 
4 
5 
8 #include <cmath>
9 
10 
11 namespace Geom {
12  using reco::deltaPhi;
13  using reco::deltaR2;
14  using reco::deltaR;
15 
16 
17 
23  inline bool phiLess(float phi1, float phi2) {
24  return deltaPhi(phi1,phi2)<0;
25  }
26  inline bool phiLess(double phi1, double phi2) {
27  return deltaPhi(phi1,phi2)<0;
28  }
29  template <class Vector1, class Vector2>
30  bool phiLess(const Vector1 & v1, const Vector2 & v2) {
31  return deltaPhi(v1.phi(),v2.phi())<0.;
32  }
33 
34 
35 }
36 
37 #endif
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:22
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:23
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16