Review (and document) the set of 'vocabulary' functions used to retrieve information from event model classes
'vocabulary' functions are free-standing functions (which the compiler can find, through eg. ADL) which return the information contained by event-model classes in a generic way.
An example use-case is:
template <typename T>
auto my_function( const T& thing) {
using LHCb::Event::threeMomentum;
auto momentum = threeMomentum(thing);
// do interesting things with momentum
}
i.e. these functions are part of the 'opt-in' mechanism which allows code to be written without need of explicit knowledge of the event model type(s) that are passed to it. These functions provide a generic and uniform way to obtain basic information (such as points, (momentum) vectors, covariance matrices, masses, ..) from any event model class which is capable of providing them. Any additional event model class that wants to 'opt-in' to this should provide the relevant free standing functions
The current set of functions is:
auto trackState( SomeSpecificType const& item )
auto slopes( SomeSpecificType const& item )
auto threeMomentum( SomeSpecificType const& item )
auto fourMomentum( SomeSpecificType const& item )
auto mass2( SomeSpecificType const& item )
auto endVertexPos( SomeSpecificType const& item )
auto referencePoint( SomeSpecificType const& item )
auto threeMomCovMatrix( SomeSpecificType const& item )
auto threeMomPosCovMatrix( SomeSpecificType const& item )
auto momPosCovMatrix( SomeSpecificType const& item )
auto momCovMatrix( SomeSpecificType const& item )
auto pid( SomeSpecificType const& item )
auto decayProducts( SomeSpecificType const& item )
auto subCombination( SomeSpecificType const& item )
The return values of these functions should (ideally) be a SIMD-friendly types, eg. Vec3<float_v>
for threeMomentum
to allow the calling code to be vectorized.