CMS 3D CMS Logo

HGCRecHitComparison.h
Go to the documentation of this file.
1 #ifndef HGCRecHitComparison_H
2 #define HGCRecHitComparison_H
3 
5 
6 #include <cstdint>
7 
8 //ordering capability mandatory for lazy getter framework
9 // Comparison operators
10 inline bool operator<( const HGCRecHit& one, const HGCRecHit& other) {
11  if(one.detid() == other.detid()){ return one.energy() < other.energy(); }
12  return one.detid() < other.detid();}
13 
14 inline bool operator<( const HGCRecHit& one, const uint32_t& detid) {
15  return one.detid() < detid;}
16 
17 inline bool operator<( const uint32_t& detid, const HGCRecHit& other) {
18  return detid < other.detid();}
19 
20 #endif
21 
const DetId & detid() const
Definition: CaloRecHit.h:21
float energy() const
Definition: CaloRecHit.h:17
bool operator<(const HGCRecHit &one, const HGCRecHit &other)