Toy date generation with RooSimultaneous pdf

Dear experts,

     I used RooSimultaneous pdf to generate toy in this way:

         RooDataHist     *asimovData0       = combPdf->generateBinned(RooArgSet(*obstmp, *m_cat),  NumEvents(n_datatot),Extended(),Asimov());

      here, the simultaneous pdf includes 3 category, and in each category, there are different observed variable, So obstmp set includes 3 variables.

    n_datatot = 7759,  but when I printed out the information of the generated RooDataHist, I got:

           asimovData0->numEntries() = 3000000
           asimovData0->sumEntries() = 7759

   why the number of entries is so large.  It causes the speed of next step of fitting this toy data is very slow.

   Is there any suggestion?   Many thanks.

Cheers,
Yanping

Hi,
Since you are using a RooDataHist the asimovData0->numEntries() is the number of bins of your data set.
Thuis is probably taken from the number of bins of your observable variable (obstmp).
Just do obstmp->setBins( nbins) where bins is a lower number of bins

Best Regards

Lorenzo