Skip to content

Implement helpers and interface for both std::vector and ROOT::VecOps::RVec

Oliver Majersky requested to merge omajersk/fastframes:move-to-RVec into main

RVec allows to use a bunch of useful methods in ROOT::VecOps that make the interface behave in a bit more "numpy-like" way, i.e. using vectorized operations instead of writing a bunch of manual C++ methods doing element-by-element operations.

Currently, since FastFrames uses std::vector everywhere for variables and helper methods, this on a number of cases actually makes it hard for users to use the VecOps because implicit conversion to RVec does not always work out of the box in RDataFrame.

This MR introduces helper methods also for ROOT::VecOps::RVec in addition to the existing ones in std::vector. An extra config option use_rvec is introduced which if set True will make the FastFrames methods, such as the creation of LorentzVectors columns, use ROOT::VecOps::RVec instead of std::vector.

Edited by Oliver Majersky

Merge request reports