Simulating Gauss Peaks

proton_peaks.C (2.2 KB) Hello,

I am trying to generate a histogram with two gaussian peaks having a known mean and sigma value.

And then I fit the two peaks by a sum of gaussian function to calculate the mean and sigma.

But, I don’t understand, how to vary the amplitude or peak heights of the two peaks. The relative intensity for the two peaks is supposed to be different.

My code is attached.


h->FillRandom("gaus", ntimes); // default ntimes = 5000

1 Like