RooSimultaneous fit on categories with different x variables using RooDataSet

Continuing the discussion from RooSimultaneous fit on categories with different x variables - bad combined data:

I have rewritted this code to use RooDataSet, you told that this is more efficient than RooDataHist like in original one.

rf_example1.C (5.2 KB)

Hello,

Thanks for the update!
Is there a particular question for @moneta ?

Cheers,
Danilo

I wanted to ask about this statement
" One another thing is that is not efficient to build RooDataHist objects with multi-variables. For example for 2 variables with n1 and n2 bins, RooFit will allocate n1 x n2 bins."
How many bins are allocated when using RooDataSet? This is important if use this approach to fit a large number of ranges, not two, as in the example, but, for example, 100?

rf_example2.C (5.2 KB)
Updated code, bug fixed in hist2tree() function

Hi @purgenetik1, thanks for sharing the script, that looks correct to me!

The RooDataSet is like a table with one row per bin, and one column to tell which category (or “line” in your case) the bin corresponds to. The number of entries in total is therefore the sum of bin numbers, and this approach is very suitable is for fitting many categories (in fact, the ATLAS Higgs combination fits are fitting hundreds of measurement channels simultaneously using this approach!).

Cheers,
Jonas

I also want to note the universal method of converting any histogram into a tree, which allows to skip RooDataHist fitting in favor of unbinned RooDataSet fit.

I also want to note the universal method of converting any histogram into a tree, which allows to skip RooDataHist fitting in favor of unbinned RooDataSet fit.

Sorry but I’m not sure, is this a question?

Jonas

No, just comment, one can close this issue, thank u for response.

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