Dear experts,
I computed a simple integral for a gauss function [1] but I do not understand the output [2]. Actually the histogram is fill with 10000 events, so why intA is not lose to 10000?
Regards
[2]
intA: 197.945
intB: 99.5247
[1]
void test(){
TH1D *hgaus = new TH1D (“hgaus”, “”, 100, -1, 1);
hgaus->FillRandom(“gaus”, 10000);
hgaus->Draw();
hgaus->Fit(“gaus”);
TF1 *fit=hgaus->GetFunction(“gaus”);
double intA{fit->Integral(-1, 1)};
double intB{fit->Integral(0, 1)};
cout<<"intA: "<<intA<<endl;
cout<<"intB: "<<intB<<endl;
}