Rivet: 4-vector comparison functions (for sorting)

| Rivet 3.1.9

Modules
4-vector comparison functions (for sorting)
Functions for 4-momenta

## Modules
| MT calculation
| 4-vector string representations
typedef std::vector< FourVector > | Rivet::FourVectors
typedef std::vector< FourMomentum > | Rivet::FourMomenta

## \f$ |\Delta y| \f$ calculations from 4-momentum vectors
bool | Rivet::cmpMomByPt (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by decreasing pT.
bool | Rivet::cmpMomByAscPt (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by increasing pT.
bool | Rivet::cmpMomByP (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by decreasing 3-momentum magnitude |p|.
bool | Rivet::cmpMomByAscP (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by increasing 3-momentum magnitude |p|.
bool | Rivet::cmpMomByEt (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by decreasing transverse energy.
bool | Rivet::cmpMomByAscEt (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by increasing transverse energy.
bool | Rivet::cmpMomByE (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by decreasing energy.
bool | Rivet::cmpMomByAscE (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by increasing energy.
bool | Rivet::cmpMomByMass (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by decreasing mass.
bool | Rivet::cmpMomByAscMass (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by increasing mass.
bool | Rivet::cmpMomByEta (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by increasing eta (pseudorapidity)
bool | Rivet::cmpMomByDescEta (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by decreasing eta (pseudorapidity)
bool | Rivet::cmpMomByAbsEta (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by increasing absolute eta (pseudorapidity)
bool | Rivet::cmpMomByDescAbsEta (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by increasing absolute eta (pseudorapidity)
bool | Rivet::cmpMomByRap (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by increasing rapidity.
bool | Rivet::cmpMomByDescRap (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by decreasing rapidity.
bool | Rivet::cmpMomByAbsRap (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by increasing absolute rapidity.
bool | Rivet::cmpMomByDescAbsRap (const FourMomentum &a, const FourMomentum &b)
| Comparison to give a sorting by decreasing absolute rapidity.
template<typename MOMS , typename CMP >
MOMS & | Rivet::isortBy (MOMS &pbs, const CMP &cmp)
| Sort a container of momenta by cmp and return by reference for non-const inputs.
template<typename MOMS , typename CMP >
MOMS | Rivet::sortBy (const MOMS &pbs, const CMP &cmp)
| Sort a container of momenta by cmp and return by value for const inputs.
template<typename MOMS >
MOMS & | Rivet::isortByPt (MOMS &pbs)
| Sort a container of momenta by pT (decreasing) and return by reference for non-const inputs.
template<typename MOMS >
MOMS | Rivet::sortByPt (const MOMS &pbs)
| Sort a container of momenta by pT (decreasing) and return by value for const inputs.
template<typename MOMS >
MOMS & | Rivet::isortByE (MOMS &pbs)
| Sort a container of momenta by E (decreasing) and return by reference for non-const inputs.
template<typename MOMS >
MOMS | Rivet::sortByE (const MOMS &pbs)
| Sort a container of momenta by E (decreasing) and return by value for const inputs.
template<typename MOMS >
MOMS & | Rivet::isortByEt (MOMS &pbs)
| Sort a container of momenta by Et (decreasing) and return by reference for non-const inputs.
template<typename MOMS >
MOMS | Rivet::sortByEt (const MOMS &pbs)
| Sort a container of momenta by Et (decreasing) and return by value for const inputs.

## Detailed Description

## Typedef Documentation

## ◆ FourVectors

typedef std::vector<FourVector> Rivet::FourVectors

Typedefs for lists of vector types

## Function Documentation

## ◆ isortBy()

template<typename MOMS , typename CMP >

MOMS & Rivet::isortBy | ( | MOMS & | pbs,
|  | const CMP & | cmp
| ) |  |
| inline

Sort a container of momenta by cmp and return by reference for non-const inputs.

Todo:
  Add sorting by phi [0..2PI]

References Rivet::cmp().

Referenced by Rivet::isortByE(), Rivet::isortByEt(), and Rivet::isortByPt().