rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
ParticleBase container-combinatorics utils

Functions

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

◆ closestMassIndex() [2/3]

template<typename CONTAINER , typename = isCIterable<CONTAINER>>
int Rivet::closestMassIndex ( 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 Rivet::closestMatchIndex().

◆ closestMassIndex() [3/3]

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

Return the index from a vector which best matches fn(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 Rivet::closestMatchIndex().

◆ closestMassIndices()

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

Return the indices from two vectors which best match fn(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 Rivet::closestMatchIndices().