How to use RooHistPdf to do 2D fit and plot the fit result?

Hi,

you would need to scale the histogram to th observed number of events. I am not sure, but you might try to use the option RoOFit::Extended(true) in RooAbsReal::createHIstogram, otherwise you would need to rescale your produced histogram by hand calling TH1::Scale

Best Regards

Lorenzo