I am trying to fit one histogram to another in roofit and I believe I have the fitting part down but now I cannot figure out how to retrieve the histogram that was allowed to vary. Here is the general idea of the process I am using:
Sorry, I should have been a bit more clear. I need the histogram for sig so I can pull and display the error in each bin after the fit. I understand that I can get the integral from the fit in the range with Nsig.getVal(); and Nsig.getError(); but I want to be able to display the error in each bin from the fit.
Would you like to get the error in the fitted function values after the fit in each bin ?
You can do this by using the option RooFit::VisualizeError(fitResult) in the plotOn method of the pdf .
Sorry, that didn’t seem to work. In that the function VisualizeError() doesn’t seem to be defined. Perhaps I can define what I want in another way. In Root for a normal TH1F* histogram I can use the function histogram->Integral(min,max); to get the error between min and max I can do this