File indexing completed on 2024-04-06 12:04:16
0001 #ifndef GeometryVector_Geom_Util_h
0002 #define GeometryVector_Geom_Util_h
0003
0004 #include "DataFormats/GeometryVector/interface/Pi.h"
0005 #include "DataFormats/Math/interface/deltaR.h"
0006 #include <cmath>
0007
0008 namespace Geom {
0009 using reco::deltaPhi;
0010 using reco::deltaR;
0011 using reco::deltaR2;
0012
0013
0014
0015
0016
0017
0018 inline bool phiLess(float phi1, float phi2) { return deltaPhi(phi1, phi2) < 0; }
0019 inline bool phiLess(double phi1, double phi2) { return deltaPhi(phi1, phi2) < 0; }
0020 template <class Vector1, class Vector2>
0021 bool phiLess(const Vector1& v1, const Vector2& v2) {
0022 return deltaPhi(v1.phi(), v2.phi()) < 0.;
0023 }
0024
0025 }
0026
0027 #endif