CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
HGCRecHitComparison.h File Reference
#include "DataFormats/HGCRecHit/interface/HGCRecHit.h"
#include <cstdint>

Go to the source code of this file.

Functions

bool operator< (const HGCRecHit &one, const HGCRecHit &other)
 
bool operator< (const HGCRecHit &one, const uint32_t &detid)
 
bool operator< (const uint32_t &detid, const HGCRecHit &other)
 

Function Documentation

bool operator< ( const HGCRecHit one,
const HGCRecHit other 
)
inline

Definition at line 10 of file HGCRecHitComparison.h.

References CaloRecHit::detid(), and CaloRecHit::energy().

10  {
11  if (one.detid() == other.detid()) {
12  return one.energy() < other.energy();
13  }
14  return one.detid() < other.detid();
15 }
constexpr float energy() const
Definition: CaloRecHit.h:29
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
bool operator< ( const HGCRecHit one,
const uint32_t &  detid 
)
inline

Definition at line 17 of file HGCRecHitComparison.h.

References CaloRecHit::detid().

17 { return one.detid() < detid; }
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
bool operator< ( const uint32_t &  detid,
const HGCRecHit other 
)
inline

Definition at line 19 of file HGCRecHitComparison.h.

References CaloRecHit::detid().

19 { return detid < other.detid(); }
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33