CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
NumericSafeLessByPt< 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 NumericSafeLessByPt< T >

Definition at line 34 of file PtComparator.h.

Member Typedef Documentation

◆ first_argument_type

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

Definition at line 35 of file PtComparator.h.

◆ second_argument_type

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

Definition at line 36 of file PtComparator.h.

Member Function Documentation

◆ operator()()

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

Definition at line 37 of file PtComparator.h.

37  {
38  return fabs(a1.pt() - a2.pt()) > std::numeric_limits<double>::epsilon()
39  ? a1.pt() < a2.pt()
40  : fabs(a1.px() - a2.px()) > std::numeric_limits<double>::epsilon() ? a1.px() < a2.px()
41  : a1.pz() < a2.pz();
42  }

References testProducerWithPsetDescEmpty_cfi::a2, and geometryDiff::epsilon.

geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
testProducerWithPsetDescEmpty_cfi.a2
a2
Definition: testProducerWithPsetDescEmpty_cfi.py:35