Is there a way to access the number of events from a given PDF sub-shape in a generated dataset?
For example, if I do:
ws.factory(
'SUM::model('
'nsig[50, 0, 100]*SUM::sig(f1[0.74, 0, 1] * Gaussian::g1(x, mg[0, -10, 10], o1[3, 0, 5]), Gaussian::g2(x, mg, o2[3, 0, 5])),'
'nbkg[10, 0, 100]*Chebychev::bkg(x, {c11[-0.33, -1, 1], c12[-0.33, -1, 0]}),'
')'
)
data = ws.pdf('model').generate(
ROOT.RooArgSet(ws.var('x')),
ROOT.RooFit.Extended(),
)
I will get a dataset with ~50 signal and ~10 background:
but what if I want to know the exact values of nsig
and nbkg
in my dataset, e.g., when doing a RooMCStudy
?