Sumw2 with log likelihood fitting


I’m having trouble getting the SumW2 option to work with roofit.

I have a macro `nllfit.C’ that ultimately fits a model made up of two RooHistPdfs to some data (a

The data is based upon a TH1F that has been scaled, therefore I’ve tried
using the SumW2Error(kTRUE) option during the fit. (I applied Sumw2() to the original histogram before scaling it.)

The fit itself works as been be seen by the output txt file nllfit.txt' and graphs filenllfit.png’

However when it comes to correcting the error matrix, the fit fails (i.e. this point in the .txt file “[#1] INFO:Fitting --RooAbsPdf::fitTo(model_forfit) Calculating sum-of-weights-squared correction matrix for covariance matrix” )

Does anyone know what I might be doing wrong?



nllfit.txt (5.39 KB)
nllfit.C (4.03 KB)


I can reproduce your problem, and I’m looking into this.