I am trying to understand what happens behind the scenes when I call : RooDataSet *ds = hpdf.generate(observable, AutoBinned(0), NumEvents(100) ); where hpdf is a RooHistPdf. Specifically, are the events generated using accept/reject method as described here [https://en.wikipedia.org/wiki/Rejection_sampling] ?
It depends on the interpolation option. If no interpolation is used, it uses binned generation (something like throwing poisson random numbers in each bin).
If interpolation is used, it uses accept/reject.