Get bin content of specific RooCategory from RooDataHist

Dear experts,

I am looking for a way to get the bin content of a RooDataHist for a specific category of data. When using a function like plotOn() you get the Cut() option to select the category you want to plot. If I understood correctly from the documentation, the bin content in a RooDataHist can be obtained through weight(). Is there something similar to Cut() for the weight() function?

Thank you!

Hi @bibsession ,
sorry for the late reply, we need @moneta or @jonas here, let’s ping them.


You can use the function Reduce of RooAbsData to make a reduced dataset for the specific category,
see ROOT: RooAbsData Class Reference and also as example the tutorial
ROOT: tutorials/roofit/rf402_datahandling.C File Reference



1 Like

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