Hi,
I have a fucntion which i used to fit my signal hisogram (The fitted histgram is attached).
Now I want to calculate the number of events using this fit funciton by its integration. The relevant part of code which does this is:
=====================
…
…
…
arglist[0]=0.;
gMinuit->mnexcm(“SIMPLEX”, arglist ,0,ierflg);
gMinuit->mnexcm(“IMPROVE”, arglist ,0,ierflg);
//Get the parameters
Double_t p[5],errp[5];
gMinuit->GetParameter(0, p[0], errp[0]);
gMinuit->GetParameter(1, p[1], errp[1]);
gMinuit->GetParameter(2, p[2], errp[2]);
gMinuit->GetParameter(3, p[3], errp[3]);
gMinuit->GetParameter(4, p[4], errp[4]);
TF1 *f1 = new TF1(“plotfunc”,plotfunc,xmin,xmax,5);
f1->SetParameters§;
f1->Print();
double Tot_SB=0.0;
Tot_SB= f1->Integral(2000.0,3000.0); //Get the interal in the range 2000-3000 GeV
cout<<Tot_SB<<endl;
The “Tot_SB” comes out to be 1817.54 which does not seems to be correct if one see the fitted histogram.
Could someone help me how to get correct integral value from the fitted function???
Thanks in advance.
with best,
sushil