CMS 3D CMS Logo

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 
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:22
fixed size matrix
double ellipse(const T1 &t1, const T2 &t2, double rPhi, double rEta)
Definition: Ellipse.h:9