Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:18

0001 #ifndef CommonTools_Utils_DeltaPhiMinPairSelector_h
0002 #define CommonTools_Utils_DeltaPhiMinPairSelector_h
0003 /* \class DeltaPhiMinPairSelector
0004  *
0005  * \author Luca Lista, INFN
0006  *
0007  * $Id: DeltaPhiMinPairSelector.h,v 1.1 2007/06/19 15:39:08 llista Exp $
0008  */
0009 #include "DataFormats/Math/interface/deltaPhi.h"
0010 
0011 struct DeltaPhiMinPairSelector {
0012   DeltaPhiMinPairSelector(double deltaPhiMin) : deltaPhiMin_(deltaPhiMin) {}
0013   template <typename T1, typename T2>
0014   bool operator()(const T1& t1, const T2& t2) const {
0015     return deltaPhi(t1.phi(), t2.phi()) > deltaPhiMin_;
0016   }
0017 
0018 private:
0019   double deltaPhiMin_;
0020 };
0021 
0022 #endif