Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:55:44

0001 #ifndef L1Trigger_L1TTrackMatch_L1TkElectronEtComparator_HH
0002 #define L1Trigger_L1TTrackMatch_L1TkElectronEtComparator_HH
0003 #include "DataFormats/L1Trigger/interface/EGamma.h"
0004 
0005 namespace L1TkElectron {
0006   class EtComparator {
0007   public:
0008     bool operator()(const l1t::EGamma& a, const l1t::EGamma& b) const {
0009       double et_a = 0.0;
0010       double et_b = 0.0;
0011       double cosh_a_eta = cosh(a.eta());
0012       double cosh_b_eta = cosh(b.eta());
0013 
0014       if (cosh_a_eta > 0.0)
0015         et_a = a.energy() / cosh_a_eta;
0016       if (cosh_b_eta > 0.0)
0017         et_b = b.energy() / cosh_b_eta;
0018 
0019       return et_a > et_b;
0020     }
0021   };
0022 }  // namespace L1TkElectron
0023 #endif