Fit integral issue

Attached is the test macro I am trying to calculate integral under the fit curve. I do not understand why the fit integral is approx (or maybe exactly) 10 times the expected value or the corresponding th1::integral value. Can some please explain?

void test() {
   TH1F* trial = new TH1F("","",100,-5, 5);
   TRandom3 rndgen;
   for (int i = 0; i < 10000; ++i)
   TF1 *g = new TF1("g","gaus",-5.,5.);
//   g->SetParameters(2,0,1);
   //default gaus integration method uses 6 points
   //not suitable to integrate on a large domain
   double r1 = g->Integral(-5.,5.);
   double r2 = trial->Integral(trial->FindBin(-5),trial->FindBin(5));
//   trial->GetYaxis()->SetRangeUser(0,2);
   printf("g->Integral(-5,5)               = %g\n",r1);
   printf("hist->Integral(-5,5)            = %g\n",r2);


Result I get is

g->Integral(-5,5) = 0.0991864
hist->Integral(-5,5) = 1

ROOT Version: 6.26.14

Use instead:

double r2 = trial->Integral(trial->FindBin(-5),trial->FindBin(5), "width");

This worked. The values are much closer now, and probably will keep on getting close the better the fit. Can you explain what the “width” option did here?

Thank You

See ROOT: TH1 Class Reference