I am new to roofit and sorry for naive questions.
I have N MC Trees from which I want to make WEIGHTED PDFs and fit them to data obtained from another Tree. I want my fit to be unbinned.
The fit in its simple form is
DATA = alpha * [ 1 MC pdf ] + (1-alpha) * [ N-1 MC pdf ]
So first in constructing [N-1 MC pdf] it looks impossible to add MC’s with their appropriate contribution.
I know how to extract a RooDataSet from a Tree, adding the luminosity weight to it.
But I cannot make the RooKeysPdf understand that the dataset is weighted. So my Pdf does not give me the appropriate integratal which is the expected number of events.
Also in doing the fit as I said, I need [ 1 MC pdf ] to be normalized to the expected number of events, too.
Any help on this?