CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DeltaRMinPairSelector.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_DeltaRMinPairSelector_h
2 #define CommonTools_Utils_DeltaRMinPairSelector_h
3 /* \class DeltaRMinPairSelector
4  *
5  * \author Luca Lista, INFN
6  *
7  * $Id: DeltaRMinPairSelector.h,v 1.1 2007/06/19 15:39:08 llista Exp $
8  */
10 
12  DeltaRMinPairSelector( double deltaRMin ) :
13  deltaRMin2_( deltaRMin * deltaRMin ) { }
14  template<typename T1, typename T2>
15  bool operator()( const T1 & t1, const T2 & t2 ) const {
16  return deltaR2( t1, t2 ) > deltaRMin2_;
17  }
18 
19 private:
20  double deltaRMin2_;
21 };
22 
23 
24 #endif
DeltaRMinPairSelector(double deltaRMin)
double deltaR2(const T1 &t1, const T2 &t2)
Definition: deltaR.h:36
bool operator()(const T1 &t1, const T2 &t2) const