Dear experts
I just have some troubles using RooHistPdf and RooAddPdf. The output shows
[#1] INFO:DataHandling -- RooDataHist::adjustBinning(hist1): fit range of variable x expanded to nearest bin boundaries: [0,10] --> [0,10]
[#1] INFO:DataHandling -- RooDataHist::adjustBinning(hist2): fit range of variable x expanded to nearest bin boundaries: [0,10] --> [0,10]
[#1] INFO:DataHandling -- RooDataHist::adjustBinning(hsum): fit range of variable x expanded to nearest bin boundaries: [0,10] --> [0,10]
[#1] INFO:Minization -- RooMinimizer::optimizeConst: activating const optimization
[#1] INFO:Minization -- The following expressions have been identified as constant and will be precalculated and cached: (sum)
Error in <ROOT::Math::Fitter::SetFCN>: FCN function has zero parameters
[#0] WARNING:Minization -- RooMinimizer::hesse: Error, run Migrad before Hesse!
[#1] INFO:Minization -- RooMinimizer::optimizeConst: deactivating const optimization
[#1] INFO:InputArguments -- RooAbsData::plotOn(hist1) INFO: dataset has non-integer weights, auto-selecting SumW2 errors instead of Poisson errors
Thank you! The post really helped me. One more thing concerns me is that how RooFit deals with the histograms errors of RooDataHist when the object RooHistPdf is defined. And would asymmetrical binning after averaging give any effect?
Yes, I mean, binning of RooDataHist is not uniform when I create RooHistPdf. You mention “RooFit pays attention to the errors of the data”. Does it means that RooHistPdf does not consider the error of the RooDataHist?
There is a difference between errors of data (the stuff you fit to) and errors of a model (the stuff you use to fit). The error of the former is correctly taken into account, also when the data come from a RooDataHist. The error of the latter is a systematic uncertainty, and this needs to be taken into account by varying the fit model.
Non-uniform binning should not be a problem. The HistPDF takes care of normalising the bins.