CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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> class MatchByDRDPt {
12  public:
14  deltaR_(cfg),
15  maxDPtRel_(cfg.getParameter<double>("maxDPtRel")) {}
16  bool operator() (const T1& t1, const T2& t2) const {
17  return fabs(t1.pt()-t2.pt())/t2.pt()<maxDPtRel_ &&
18  deltaR_(t1,t2);
19  }
20  private:
22  double maxDPtRel_;
23  };
24 }
25 
26 
27 #endif
MatchByDRDPt(const edm::ParameterSet &cfg)
Definition: MatchByDRDPt.h:13
tuple cfg
Definition: looper.py:259
bool operator()(const T1 &t1, const T2 &t2) const
Definition: MatchByDRDPt.h:16
reco::MatchByDR< T1, T2 > deltaR_
Definition: MatchByDRDPt.h:21