CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/CommonTools/Utils/interface/Angle.h

Go to the documentation of this file.
00001 #ifndef CommonTools_Utils_Angle_h
00002 #define CommonTools_Utils_Angle_h
00003 
00004 /* \class Angle
00005  *
00006  * returns three-dimensional Angle between two objects;
00007  * defined via scalar product: 
00008  *   angle = acos((v1 * v2)/(|v1| * |v2|))
00009  *
00010  * \author Christian Veelken, UC Davis
00011  */
00012 
00013 #include "DataFormats/Math/interface/LorentzVector.h"
00014 #include "DataFormats/Math/interface/angle.h"
00015 
00016 template<typename T1, typename T2 = T1>
00017 struct Angle {
00018   double operator()( const T1 & t1, const T2 & t2 ) const {
00019     return angle( t1, t2 );
00020   }
00021 };
00022 
00023 #endif