CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MatchByDRDPt.h
Go to the documentation of this file.
1 #ifndef MatchByDRDPt_h_
2 #define MatchByDRDPt_h_
3 
9 
10 namespace reco {
11  template <typename T1, typename T2>
12  class MatchByDRDPt {
13  public:
14  MatchByDRDPt(const edm::ParameterSet& cfg) : deltaR_(cfg), maxDPtRel_(cfg.getParameter<double>("maxDPtRel")) {}
15  bool operator()(const T1& t1, const T2& t2) const {
16  return fabs(t1.pt() - t2.pt()) / t2.pt() < maxDPtRel_ && deltaR_(t1, t2);
17  }
18 
19  private:
21  double maxDPtRel_;
22  };
23 } // namespace reco
24 
25 #endif
MatchByDRDPt(const edm::ParameterSet &cfg)
Definition: MatchByDRDPt.h:14
tuple cfg
Definition: looper.py:296
reco::MatchByDR< T1, T2 > deltaR_
Definition: MatchByDRDPt.h:20
bool operator()(const T1 &t1, const T2 &t2) const
Definition: MatchByDRDPt.h:15