RooStats: ToyMCSampler getting true yield for each toy

Hi All,

I am working with the ToyMCSampler and I was wondering if its possible extract the true number of events generated for each toy? Is this information stored somewhere?

I want to look at the difference in the FittedYield and the TrueYield from the toy samples.

Thanks!
Rob

Hi Rob,

we saw your message and will come back to you soon with an answer.

Best,
Danilo

Hi,

Unfortunately this information is not stored in the detailed output. I had a patch for this that I could probably add this in the next ROOT version, but it is not general. It works only for number counting data.

If you want to have this information now, you can create your test statistic class deriving for example from the RooStats::ProfileLikelihoodCalculator and grab the data toy information overtime the function TestStatistic::Evaluate is called

Best Regards

Lorenzo

Hi,

Thanks! After editing the evaluate code in the test statistic and adding in a simple numEntries for the input data I was able to get the info.

Thanks!
Rob