test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Ellipse.h
Go to the documentation of this file.
1 #ifndef Ellipse_h
2 #define Ellipse_h
3 
5 
6 namespace reco{
7 
8  template <typename T1, typename T2>
9  inline double ellipse (const T1& t1, const T2& t2, double rPhi, double rEta){
10  double dEta = t1.eta()-t2.eta();
11  double dPhi = deltaPhi(t1.phi(), t2.phi());
12  double distance = (dEta*dEta)/(rEta*rEta) + (dPhi*dPhi)/(rPhi*rPhi);
13  return distance;
14  }
15 
16 }
17 #endif
18 
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
auto const T2 &decltype(t1.eta()) t2
Definition: deltaR.h:16
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:22
double ellipse(const T1 &t1, const T2 &t2, double rPhi, double rEta)
Definition: Ellipse.h:9