Tools in ROOT equivalent to numpy in python

Dear ROOT experts,

I am switching some analysis steps from pyroot to compiled c++ root for speed reasons. I am using numpy currently for some simple array calculations, like the mean, median, min/max etc. I am wondering what the equivalent in C++ root would be? I looked around in TMath, but did not really find yet what I was looking for. For example I would loop over an nutuple, and extract values into an array or vector or other container - then I need the median of those numbers - what would be the simplest way of doing this in C++ root? I know this is simple enough to just do myself, but I would just generally like to learn how to best do things like this in C++ root.


ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Please have a look into RDataFrame. It will probably satisfy your needs.

Also RVec as a 1D numpy array substitute

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.