Rivet API documentation

Rivet 4.1.3
ParticleBase container-combinatorics utils

Functions

template<typename CONTAINER, typename = isCIterable<CONTAINER>>
int Rivet::closestMassIndex (const CONTAINER &c, double mtarget, double mmin=-DBL_MAX, double mmax=DBL_MAX)
 Return the index from a vector which best matches mass(c[i]) to the target value.
template<typename CONTAINER1, typename CONTAINER2, typename = isCIterable<CONTAINER1, CONTAINER2>>
pair< int, int > Rivet::closestMassIndices (const CONTAINER1 &c1, const CONTAINER2 &c2, double mtarget, double mmin=-DBL_MAX, double mmax=DBL_MAX)
 Return the indices from two vectors which best match mass(c1[i], c2[j]) to the target value.
template<typename CONTAINER, typename T, typename = isCIterable<CONTAINER>>
int Rivet::closestMassIndex (const CONTAINER &c, const T &x, double mtarget, double mmin=-DBL_MAX, double mmax=DBL_MAX)
 Return the index from a vector which best matches mass(c[i], x) to the target value.
template<typename CONTAINER, typename T, typename = isCIterable<CONTAINER>>
int Rivet::closestMassIndex (const T &x, const CONTAINER &c, double mtarget, double mmin=-DBL_MAX, double mmax=DBL_MAX)
 Return the index from a vector which best matches mass(x, c[j]) to the target value.

Detailed Description

Function Documentation

◆ closestMassIndex() [1/3]

template<typename CONTAINER, typename T, typename = isCIterable<CONTAINER>>
int Rivet::closestMassIndex ( const CONTAINER & c,
const T & x,
double mtarget,
double mmin = -DBL_MAX,
double mmax = DBL_MAX )
inline

Return the index from a vector which best matches mass(c[i], x) to the target value.

A specialisation of closestMatchIndex from Utils.hh, with the function bound to Kin::mass as a common use-case.

References closestMatchIndex(), and Rivet::Kin::mass().

◆ closestMassIndex() [2/3]

template<typename CONTAINER, typename = isCIterable<CONTAINER>>
int Rivet::closestMassIndex ( const CONTAINER & c,
double mtarget,
double mmin = -DBL_MAX,
double mmax = DBL_MAX )
inline

Return the index from a vector which best matches mass(c[i]) to the target value.

A specialisation of closestMatchIndex from Utils.hh, with the function bound to Kin::mass as a common use-case.

References closestMatchIndex(), and Rivet::Kin::mass().

◆ closestMassIndex() [3/3]

template<typename CONTAINER, typename T, typename = isCIterable<CONTAINER>>
int Rivet::closestMassIndex ( const T & x,
const CONTAINER & c,
double mtarget,
double mmin = -DBL_MAX,
double mmax = DBL_MAX )
inline

Return the index from a vector which best matches mass(x, c[j]) to the target value.

A specialisation of closestMatchIndex from Utils.hh, with the function bound to Kin::mass as a common use-case.

References closestMatchIndex(), and Rivet::Kin::mass().

◆ closestMassIndices()

template<typename CONTAINER1, typename CONTAINER2, typename = isCIterable<CONTAINER1, CONTAINER2>>
pair< int, int > Rivet::closestMassIndices ( const CONTAINER1 & c1,
const CONTAINER2 & c2,
double mtarget,
double mmin = -DBL_MAX,
double mmax = DBL_MAX )
inline

Return the indices from two vectors which best match mass(c1[i], c2[j]) to the target value.

A specialisation of closestMatchIndex from Utils.hh, with the function bound to Kin::mass as a common use-case.

References closestMatchIndices(), and Rivet::Kin::mass().