Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:50

0001 #ifndef DQMOFFLINE_TRIGGER_EGHLTPARTICLEPAIR
0002 #define DQMOFFLINE_TRIGGER_EGHLTPARTICLEPAIR
0003 
0004 //a useful struct for defining a pair of particles
0005 
0006 namespace egHLT {
0007   template <class T>
0008   struct ParticlePair {
0009     const T& part1;
0010     const T& part2;
0011 
0012     ParticlePair(const T& particle1, const T& particle2) : part1(particle1), part2(particle2) {}
0013     ~ParticlePair() = default;
0014 
0015     float mass() const { return (part1.p4() + part2.p4()).mag(); }
0016   };
0017 }  // namespace egHLT
0018 #endif