Not getting right mean and sigma from the distribution

Try to change the first line into “#if 1” and run again.

Instead of "gaus(0)+x*[3]+[4]" try "gaus(0)+pol1(3)" (equal to "gaus(0)+[3]+x*[4]") or "gaus(0)+pol2(3)" or "gaus(0)+pol3(3)".