Fit a sum of gaussian

Dear experts,

I wonder if it is possible to fit an histogram with the sum of 3 gaussians, if I do not know the range?
Actually I saw this tutorial: root.cern.ch/root/html/tutorial … fit.C.html
But there we have to provide the range…
I do not want to use a separate gauss depending on the range, but a global sum of 3 gauss which will contribute in each bin.

Regards

Hi,

you may start to have a look to this tutorial: root.cern.ch/root/html/tutorial … emo.C.html . You can see how to fit the sum of two functions, in this case for signal and background respectively.
If there are questions in adapting the example to the 3 gaussians case, just write back.

Cheers,
Danilo

Dear dpiparo,

thank you for your answer, this is what I needed.

Regards