suppose that you have defined a model in RooStats, with some arbitrary pdf.
Then you want to fill a vector of random numbers, sampled from one of those pdf.
Is there an easy way to do that? (I guess starting from wspace->pdf(“nameOfPdf”)…).
in fact I tried in that way but I got always a flat spectrum… I have solved the problem in a different way (I created an identical roofit object with the same expression and the same parameters). It’s not an elegant solution, but it was just made for debugging purposes, and it could be fine.