Fitting Gaussian with known mean, FWHM in 1D histogram

Hye
I have a 1D histogram and i want to fit a gaussian + straightline. Currently I am adopting the technique mentioned in root manual and specifying range. However, because of low statistics, the gaussian fit is not at all a good shape. I want to specify mean (along with range if possible) so that gaussian may be fitted across both sides of the mean.
Regards
Aatif

Hi,

use TF1::FixParameter() and TF1::SetParLimits(). Remember to pass the option “B” to TH1::Fit().

Cheers, Axel.