Differences in generate() and generateBinned()

Hello all,

I created a RooNDKeysPDF object with low statistics, so it has some spikes and all. I noticed, however, that if i generate a new dataset based on this PDF, there are differences between the following:

  1. generating a RooDataSet with generate() and then creating the binnedClone()
  2. generating a RooDataHist with generateBinned()

The former seems to be more precise, but more time consuming.

I’m guessing this has something to do with the internal integrator. I tried to play around with the RooFoamGenerator and setting some parameters, but with no luck.

Are there any options that I’m missing?


There is difference between generate and generateBinned. Generate use the full pdf to generate the data, while generateBinned makes first an histogram using the bin centre of the pdf (and not its integral in the bin) and then generate the data from the obtained histogram. If you have spikes within a bin it is clear that there will be differences and the first one will be more accurate, but more CPU time consuming


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