Number of events with weighed datased

Dear Roofit experts,
I’m fitting a weighed dataset and I find myself unable to extract the real number of events of my PDF components (e.g. signal and background) since roofit fits the sum of weights. The weights represent the effect of an acceptance functions and their absolute scale has no physical meaning. In short if I have a setup like this:

...
RooDataSet dataset_w("dataset_w", "", var_set, Import(*tree), WeightVar("weight"));
...
RooAddPdf pdf("pdf","", RooArgList(pdfSgn, pdfBkg), RooArgList(nSgn, nBkg));
pdf.fitTo(dataset_w, Offset(true), SumW2Error(kTRUE));
...

where dataset_w has 1000 events with weight 2. The fitted nSgn and nBkg will add up to 2000, not 1000. Is there a way to convert the estimated effective number of events back to the real number of events?

Thanks,
Alberto

Hi @a.bragagnolo,

thanks for asking this question! There is no general way to go back to the number of unweighted entries without knowing the weight distribution, that’s why RooFit can’t do this for you.

If you know the weight distribution, you can do it yourself by dividing by the average weight. For example if you know your mean acceptance is 0.5, you just have to divide your weighted events by 0.5 or not?

Cheers,
Jonas

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.