ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/ForwardAnalysis/Utilities/interface/EtaComparator.h
Revision: 1.1
Committed: Tue Jan 4 22:44:10 2011 UTC (14 years, 4 months ago) by antoniov
Content type: text/plain
Branch: MAIN
Log Message:
add PF-related modules

File Contents

# User Rev Content
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