TKDE or TH1K for weighted events

Hi,

I’m trying to approximate some distributions that are used as a template for a fit. The distributions are a bit spiky due to a lack of statistics and the hope was, that a reasonable approximation would be smoother and therefore easier to fit.
The first things I found were the TKDE and TH1K classes, but both do not support weighted entries. My templates are generated from a Monte Carlo data set with weighted entries. Is there a generalization of one of these classes for weighted entries, or even a better way to do something like this?

Thank you,
Jan

Hi,

It is true TKDE does not support weighted events. It is something that needs to be implemented in the class.
However, you can try to use then the class RooKeysPdf of Roofit, I think it supports weighted events
(see root.cern.ch/root/html/RooKeysPdf.html )

Best Regards

Lorenzo