CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/DQMOffline/JetMET/interface/SusyDQM/special_less.h

Go to the documentation of this file.
00001 #ifndef SPECIAL_LESS
00002 #define SPECIAL_LESS
00003 
00004 #include <functional>
00005 
00006 struct fabs_less { 
00007   bool operator()(const double x, const double y) const { 
00008     return fabs(x) < fabs(y); 
00009   } 
00010 };
00011 
00012 template <class T> 
00013 struct pt_less : std::binary_function <T,T,bool> {
00014   bool operator() (const T& x, const T& y) const
00015   {return x.Pt() < y.Pt();}
00016 };
00017 
00018 template <class T> 
00019 struct pair2_less : std::binary_function <T,T,bool> {
00020   bool operator() (const T& x, const T& y) const
00021   {return x.second < y.second;}
00022 };
00023 
00024 #endif