rivet is hosted by Hepforge, IPPP Durham
ParticleBase::byEAscending Struct Reference

Struct for sorting by increasing energy. More...

#include <ParticleBase.hh>

List of all members.

Public Member Functions

bool operator() (const ParticleBase &left, const ParticleBase &right) const
bool operator() (const ParticleBase *left, const ParticleBase *right) const

Detailed Description

Struct for sorting by increasing energy.

Definition at line 138 of file ParticleBase.hh.


Member Function Documentation

bool operator() ( const ParticleBase left,
const ParticleBase right 
) const [inline]

Definition at line 139 of file ParticleBase.hh.

References FourMomentum::E(), and ParticleBase::momentum().

                                                                                 {
        double pt2left = left.momentum().E();
        double pt2right = right.momentum().E();
        return pt2left < pt2right;
      }
bool operator() ( const ParticleBase left,
const ParticleBase right 
) const [inline]

Definition at line 145 of file ParticleBase.hh.

                                                                                 {
        return (*this)(*left, *right);
      }

The documentation for this struct was generated from the following file: