CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgHLTParticlePair.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTPARTICLEPAIR
2 #define DQMOFFLINE_TRIGGER_EGHLTPARTICLEPAIR
3 
4 //a useful struct for defining a pair of particles
5 
6 
7 namespace egHLT {
8  template<class T> struct ParticlePair{
9  const T& part1;
10  const T& part2;
11 
12  ParticlePair(const T& particle1,const T& particle2):part1(particle1),part2(particle2){}
14 
15  float mass()const{return (part1.p4()+part2.p4()).mag();}
16 
17  };
18 }
19 #endif
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
ParticlePair(const T &particle1, const T &particle2)
long double T