Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef DataFormats_FTLRecHitComparison_H
0002 #define DataFormats_FTLRecHitComparison_H
0003 
0004 #include "DataFormats/FTLRecHit/interface/FTLRecHit.h"
0005 
0006 //ordering capability mandatory for lazy getter framework
0007 // Comparison operators
0008 inline bool operator<(const FTLRecHit& one, const FTLRecHit& other) {
0009   if (one.detid() == other.detid()) {
0010     return one.energy() < other.energy();
0011   }
0012   return one.detid() < other.detid();
0013 }
0014 
0015 inline bool operator<(const FTLRecHit& one, const uint32_t& detid) { return one.detid() < detid; }
0016 
0017 inline bool operator<(const uint32_t& detid, const FTLRecHit& other) { return detid < other.detid(); }
0018 
0019 #endif