1 #ifndef DataFormats_Math_deltaR_h
2 #define DataFormats_Math_deltaR_h
15 template <
typename T1,
typename T2>
16 constexpr
auto deltaR2(
const T1& t1,
const T2& t2) -> decltype(t1.eta()) {
17 typedef decltype(t1.eta()) Float;
24 dp -= Float(2 *
M_PI);
25 return (e1 - e2) * (e1 - e2) + dp * dp;
29 template <
typename T1,
typename T2>
30 constexpr
auto deltaR(
const T1& t1,
const T2& t2) -> decltype(t1.eta()) {
35 template <
class T1,
class T2,
class T3,
class T4>
37 T1 deta = eta1 -
eta2;
41 return deta * deta + dphi * dphi;
45 template <
class T1,
class T2,
class T3,
class T4>
57 template <
typename T1,
typename T2 = T1>
Abs< T >::type abs(const T &t)
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
constexpr double operator()(const T1 &t1, const T2 &t2) const
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())