CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/RecoTauTag/TauTagTools/interface/Ellipse.h

Go to the documentation of this file.
00001 #ifndef Ellipse_h
00002 #define Ellipse_h
00003 
00004 #include "DataFormats/Math/interface/deltaPhi.h"
00005 
00006 namespace reco{
00007   
00008   template <typename T1, typename T2>
00009   inline double ellipse (const T1& t1, const T2& t2, double rPhi, double rEta){
00010     double dEta = t1.eta()-t2.eta();
00011     double dPhi = deltaPhi(t1.phi(), t2.phi());
00012     double distance = (dEta*dEta)/(rEta*rEta) + (dPhi*dPhi)/(rPhi*rPhi);
00013     return distance;
00014   }
00015 
00016 }
00017 #endif 
00018