CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Angle.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_Angle_h
2 #define CommonTools_Utils_Angle_h
3 
4 /* \class Angle
5  *
6  * returns three-dimensional Angle between two objects;
7  * defined via scalar product:
8  * angle = acos((v1 * v2)/(|v1| * |v2|))
9  *
10  * \author Christian Veelken, UC Davis
11  */
12 
15 
16 template<typename T1, typename T2 = T1>
17 struct Angle {
18  double operator()( const T1 & t1, const T2 & t2 ) const {
19  return angle( t1, t2 );
20  }
21 };
22 
23 #endif
double operator()(const T1 &t1, const T2 &t2) const
Definition: Angle.h:18
Definition: Angle.h:17
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11