File indexing completed on 2024-04-06 12:01:18
0001 #ifndef CommonTools_Utils_DeltaRMinPairSelector_h
0002 #define CommonTools_Utils_DeltaRMinPairSelector_h
0003
0004
0005
0006
0007
0008
0009 #include "DataFormats/Math/interface/deltaR.h"
0010
0011 struct DeltaRMinPairSelector {
0012 DeltaRMinPairSelector(double deltaRMin) : deltaRMin2_(deltaRMin * deltaRMin) {}
0013 template <typename T1, typename T2>
0014 bool operator()(const T1& t1, const T2& t2) const {
0015 return deltaR2(t1, t2) > deltaRMin2_;
0016 }
0017
0018 private:
0019 double deltaRMin2_;
0020 };
0021
0022 #endif