1 |
antoniov |
1.1 |
#ifndef ForwardAnalysis_Utilities_EtaComparator_h
|
2 |
|
|
#define ForwardAnalysis_Utilities_EtaComparator_h
|
3 |
|
|
|
4 |
|
|
/** \class EtaComparator
|
5 |
|
|
*
|
6 |
|
|
* Compare by eta
|
7 |
|
|
*
|
8 |
|
|
*/
|
9 |
|
|
|
10 |
|
|
namespace forwardAnalysis {
|
11 |
|
|
|
12 |
|
|
template<typename T>
|
13 |
|
|
struct LessByEta {
|
14 |
|
|
typedef T first_argument_type;
|
15 |
|
|
typedef T second_argument_type;
|
16 |
|
|
bool operator()( const T & t1, const T & t2 ) const {
|
17 |
|
|
return t1.eta() < t2.eta();
|
18 |
|
|
}
|
19 |
|
|
};
|
20 |
|
|
|
21 |
|
|
template<typename T>
|
22 |
|
|
struct GreaterByEta {
|
23 |
|
|
typedef T first_argument_type;
|
24 |
|
|
typedef T second_argument_type;
|
25 |
|
|
bool operator()( const T & t1, const T & t2 ) const {
|
26 |
|
|
return t1.eta() > t2.eta();
|
27 |
|
|
}
|
28 |
|
|
};
|
29 |
|
|
|
30 |
|
|
} // namespace
|
31 |
|
|
#endif
|