CMS 3D CMS Logo

MasslessInvariantMass.h

Go to the documentation of this file.
00001 #ifndef RecoAlgos_MasslessInvariantMass_h
00002 #define RecoAlgos_MasslessInvariantMass_h
00003 #include "DataFormats/Math/interface/LorentzVector.h"
00004 #include "DataFormats/Math/interface/Vector3D.h"
00005 
00006 struct MasslessInvariantMass {
00007   template<typename T1, typename T2>
00008   double operator()( const T1 & t1, const T2 & t2 ) const {
00009     math::XYZVector p1 = t1.momentum(), p2 = t2.momentum();
00010     math::XYZTLorentzVector v1( p1.x(), p1.y(), p1.z(), p1.r() ), v2( p2.x(), p2.y(), p2.z(), p2.r() );
00011     return ( v1 + v2 ).mass();
00012   }
00013 };
00014 
00015 #endif

Generated on Tue Jun 9 17:42:12 2009 for CMSSW by  doxygen 1.5.4