CMS 3D CMS Logo

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
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
reco::MatchByDR
Definition: MatchByDR.h:12
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
reco::MatchByDRDPt::deltaR_
reco::MatchByDR< T1, T2 > deltaR_
Definition: MatchByDRDPt.h:20
MatchByDR.h
reco::MatchByDRDPt
Definition: MatchByDRDPt.h:12
edm::ParameterSet
Definition: ParameterSet.h:47
reco::MatchByDRDPt::operator()
bool operator()(const T1 &t1, const T2 &t2) const
Definition: MatchByDRDPt.h:15
reco::MatchByDRDPt::maxDPtRel_
double maxDPtRel_
Definition: MatchByDRDPt.h:21
looper.cfg
cfg
Definition: looper.py:296
reco::MatchByDRDPt::MatchByDRDPt
MatchByDRDPt(const edm::ParameterSet &cfg)
Definition: MatchByDRDPt.h:14
ParameterSet.h