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 
6 #include <cmath>
7 
8 namespace Geom {
9  using reco::deltaPhi;
10  using reco::deltaR;
11  using reco::deltaR2;
12 
18  inline bool phiLess(float phi1, float phi2) { return deltaPhi(phi1, phi2) < 0; }
19  inline bool phiLess(double phi1, double phi2) { return deltaPhi(phi1, phi2) < 0; }
20  template <class Vector1, class Vector2>
21  bool phiLess(const Vector1& v1, const Vector2& v2) {
22  return deltaPhi(v1.phi(), v2.phi()) < 0.;
23  }
24 
25 } // namespace Geom
26 
27 #endif
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:18
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16