Linear Combination of Histograms to fit a histogram


I am trying to do something like the following:

H = c1(h1) + c2(h2) + c3(h3) +…

where H, h1, h2, h3 are histograms with the same number of bins and x-axis. Is there a way to do this fit and get the corresponding c1, c2, c3, …?



I did try TFractionFitter but the fit almost never converges. I was wondering if there is something where I can have more options to configure such as set intial values for parameters etc. to help it converge.

Can I use TFit or TMinuit to define functions with histograms?

You can simply define your own chi^2 function.

Is there an example available that I can refer to? Would this be using TMinuit?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.