TFractionFitter and weights

Dear ROOT-experts,

I have a question concering the TFractionFitter. I have MC histograms with weights (efficiency corrections which change the shape of the distributions). As far as I know one has to use the Method TFractionFitter::SetWeight in a case ike this. The method requires a histogram with the wbin by bin weights for the corresponding MC template. Now I wonder if there is a simple way to create the needed histogram from my weighted histogram. The method should work in one (TH1F) and in two dimensions (TH2F). I would be glad if someone could give me an example.

Thank you very much in advance,

margoe

Dear Margoe,

I’m not quite sure I understand your question: is this about how to convert a weighted histogram into two histograms, one being the template and the
other the average weight per bin? I’m afraid I don’t see an easy way out here.
The proper thing seems to be to construct two histograms: one weighted, the other unweighted. The ratio will give you the weight histogram.
(Of course, to the extent that MC statistics is an issue, this is only an approximate treatment.) Does this answer your question?

                        Best regards,
                            Frank