Fitting histogram with histograms or data array

Dear all,
I have an histogram containing my measured data and I know that these data are the sum of 5 different components. I have simulated these 5 components with MonteCarlo code and I put them in 5 different histograms.
All these histograms have same binning.
Now I would like to find the weight of each components in order to find the best fit to the measured data. data=w1h1+w2h2+w3h3+w4h4+w5*h5
I tried to use TFractionFitter but I don’t know how to get the weight and, however, I don’t know if it is right way to do it.
I read that sombody suggest to look into the tutorial “fithist.C” but I didn’t understand much.
Maybe this procedure can be done with data array instead of histograms.

Some suggestion?
Can somebody help me?

Thank you very much.

Hi all,
I think I solve the problem using “fithist.C” example.
Can somebody give me some information about the errors estimation in the fit? Are the errors equal to the Standard error or to the Standard deviation? Can I use these errors just as they are or I need to compute some statistics calculation?
Thank you very much.

Best regards,

Davide

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