but I am probably doing the wrong thing because the results is not what I expect.
I saw that it is possible to fit Nsig and Nbkg but with :
RooAddPdf sum(“sum”,“Signal+Bkg”,RooArgList(Sig,Bkg),RooArgList(Nsig,Nbkg),gausFrac); and the extended fit it seems that I cannot use the additional argument gauFrac that is needed to fit my data.
I guess there is something obvious that I am not doing.
Thanks for any idea
Cheers
Fabien
You can either perform an extended fit (fit for Ns and Nb with a Poisson constain to the number of entries Ntot in your dataset) or a non-extended fit where the number of entries in the dataset is kept as total normalisation.
number of bins in dh : dh.numEntries() : 100
sum of weights in dh : dh.sum(kFALSE) : 907244
integral over histogram : dh.sum(kTRUE) : 9.07244e+06
It seems that dh.numEntries() give the number of bin and dh.sum(kTRUE) the number of entries. What surprised my is that the number of entries given by “ROOT” :
hRoot->GetEntries() = 2.41455e+06
is different from the one given by “ROOFIT”
dh.sum(kTRUE) = 9.07244e+06
I am using ROOT 5.22.00d/slc4_amd64_gcc34.
Any idea ?