DataFormats
EcalRecHit
interface
EcalRecHitComparison.h
Go to the documentation of this file.
1
#ifndef EcalRecHitComparison_H
2
#define EcalRecHitComparison_H
3
4
#include "
DataFormats/EcalRecHit/interface/EcalRecHit.h
"
5
6
//ordering capability mandatory for lazy getter framework
7
// Comparison operators
8
inline
bool
operator<
(
const
EcalRecHit
& one,
const
EcalRecHit
&
other
) {
9
if
(one.
detid
() ==
other
.detid()) {
10
return
one.
energy
() <
other
.energy();
11
}
12
return
one.
detid
() <
other
.detid();
13
}
14
15
inline
bool
operator<
(
const
EcalRecHit
& one,
const
uint32_t& detid) {
return
one.
detid
() < detid; }
16
17
inline
bool
operator<
(
const
uint32_t& detid,
const
EcalRecHit
&
other
) {
return
detid <
other
.detid(); }
18
19
#endif
EcalRecHit
Definition:
EcalRecHit.h:15
EcalRecHit::detid
const DetId & detid() const
Definition:
EcalRecHit.h:72
operator<
bool operator<(const EcalRecHit &one, const EcalRecHit &other)
Definition:
EcalRecHitComparison.h:8
EcalRecHit::energy
float energy() const
Definition:
EcalRecHit.h:68
trackingPlots.other
other
Definition:
trackingPlots.py:1465
EcalRecHit.h
Generated for CMSSW Reference Manual by
1.8.16