ParticleBase::byPTAscending Struct Reference

#include <ParticleBase.hh>

List of all members.


Detailed Description

Struct for sorting by increasing transverse momentum in STL set, sort, etc.

Definition at line 24 of file ParticleBase.hh.


Public Member Functions

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

Member Function Documentation

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

Definition at line 25 of file ParticleBase.hh.

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

00025                                                                                  {
00026         double pt2left = left.momentum().pT2();
00027         double pt2right = right.momentum().pT2();
00028         return pt2left < pt2right;
00029       }

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

Definition at line 31 of file ParticleBase.hh.

00031                                                                                  {
00032         return (*this)(*left, *right);
00033       }


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