CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MasslessInvariantMass.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_MasslessInvariantMass_h
2 #define CommonTools_Utils_MasslessInvariantMass_h
5 
7  template <typename T1, typename T2>
8  double operator()(const T1& t1, const T2& t2) const {
9  const math::XYZVector &p1 = t1.momentum(), &p2 = t2.momentum();
10  math::XYZTLorentzVector v1(p1.x(), p1.y(), p1.z(), p1.r()), v2(p2.x(), p2.y(), p2.z(), p2.r());
11  return (v1 + v2).mass();
12  }
13 };
14 
15 #endif
const TString p2
Definition: fwPaths.cc:13
double operator()(const T1 &t1, const T2 &t2) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const TString p1
Definition: fwPaths.cc:12
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31