CMS 3D CMS Logo

L1TkElectronEtComparator.h
Go to the documentation of this file.
1 #ifndef L1Trigger_L1TTrackMatch_L1TkElectronEtComparator_HH
2 #define L1Trigger_L1TTrackMatch_L1TkElectronEtComparator_HH
4 
5 namespace L1TkElectron {
6  class EtComparator {
7  public:
8  bool operator()(const l1t::EGamma& a, const l1t::EGamma& b) const {
9  double et_a = 0.0;
10  double et_b = 0.0;
11  double cosh_a_eta = cosh(a.eta());
12  double cosh_b_eta = cosh(b.eta());
13 
14  if (cosh_a_eta > 0.0)
15  et_a = a.energy() / cosh_a_eta;
16  if (cosh_b_eta > 0.0)
17  et_b = b.energy() / cosh_b_eta;
18 
19  return et_a > et_b;
20  }
21  };
22 } // namespace L1TkElectron
23 #endif
bool operator()(const l1t::EGamma &a, const l1t::EGamma &b) const
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119