Sigma condition fit

Dear experts,
I have a dataset which follows a normal distribution and I have to fit it with a gaussian function within +/- 1 sigma. How can I achieve this?

What I tried is:
func = new TF1(“func”, “gaus”);
hist->Fill();
func->SetParameter(1, hist->GetMean());
func->FixParameter(2, 1);
hist->Fit(“func”, “B”);
But it does not work as expected. Any suggestions?

Thank you in advance!

hist->Fit("gaus", "", "", hist->GetMean() - hist->GetRMS(), hist->GetMean() + hist->GetRMS());

Thanks a lot!