CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
NumericSafeGreaterByPt< T > Struct Template Reference

#include <PtComparator.h>

Public Types

typedef T first_argument_type
 
typedef T second_argument_type
 

Public Member Functions

bool operator() (const T &a1, const T &a2)
 

Detailed Description

template<class T>
struct NumericSafeGreaterByPt< T >

Definition at line 46 of file PtComparator.h.

Member Typedef Documentation

template<class T>
typedef T NumericSafeGreaterByPt< T >::first_argument_type

Definition at line 47 of file PtComparator.h.

template<class T>
typedef T NumericSafeGreaterByPt< T >::second_argument_type

Definition at line 48 of file PtComparator.h.

Member Function Documentation

template<class T>
bool NumericSafeGreaterByPt< T >::operator() ( const T a1,
const T a2 
)
inline

Definition at line 49 of file PtComparator.h.

References geometryDiff::epsilon.

49  {
50  return fabs(a1.pt() - a2.pt()) > std::numeric_limits<double>::epsilon()
51  ? a1.pt() > a2.pt()
52  : fabs(a1.px() - a2.px()) > std::numeric_limits<double>::epsilon() ? a1.px() > a2.px()
53  : a1.pz() > a2.pz();
54  }