fastjet 2.4.5
Public Types | Public Member Functions
fastjet::cms::NumericSafeGreaterByEt< T > Struct Template Reference

#include <SortByEt.h>

List of all members.

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 fastjet::cms::NumericSafeGreaterByEt< T >

Definition at line 34 of file SortByEt.h.


Member Typedef Documentation

template<class T>
typedef T fastjet::cms::NumericSafeGreaterByEt< T >::first_argument_type

Definition at line 35 of file SortByEt.h.

Definition at line 36 of file SortByEt.h.


Member Function Documentation

template<class T>
bool fastjet::cms::NumericSafeGreaterByEt< T >::operator() ( const T &  a1,
const T &  a2 
) [inline]

Definition at line 37 of file SortByEt.h.

                                            {
    // FastJet::PseudoJet does not provide a direct access to Et2
    // Plus, we want it to be computed in the same way as in the CMS
    // code (actually the Root code that is used by CMS)
    double et1 = a1.Et();
    double et2 = a2.Et();

    // now we can come back to the CMS code
    return
      fabs (et1-et2) > std::numeric_limits<double>::epsilon() ? et1 > et2 :
      fabs (a1.px()-a2.px()) > std::numeric_limits<double>::epsilon() ? a1.px() > a2.px() :
      a1.pz() > a2.pz();
  }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines