Hi rooters,
I have encounter a problem with TF1::Integral.
here is my code snippet:
//start****
#include <TMath.h>
#include <TF1.h>
double poisson(double *r, double *par);
void bug_integral(){
TF1 tf1=new TF1(“bug”,poisson,0,100,3);
tf1->SetParameters(14.5, 10.2, 1);
for(int n=280; n<300; n++)
cout<<“Integral(0,”<<n<<") = "<Integral(0,n)<<endl;
}
double poisson(double r, double par){
return TMath::Poisson(par[2],par[1]+r[0]par[0]);
}
//end
the output is :
//start******
Processing bug_integral.C…
Integral(0,280) = 2.86932e-05
Integral(0,281) = 2.86937e-05
Integral(0,282) = 2.86941e-05
Integral(0,283) = 2.86946e-05
Integral(0,284) = 2.8695e-05
Integral(0,285) = 2.86954e-05
Integral(0,286) = 2.86958e-05
Integral(0,287) = 2.86962e-05
Integral(0,288) = 2.86966e-05
Integral(0,289) = 2.8697e-05
Integral(0,290) = 9.977e-13
Integral(0,291) = 9.29284e-13
Integral(0,292) = 8.65544e-13
Integral(0,293) = 8.06163e-13
Integral(0,294) = 7.50843e-13
Integral(0,295) = 6.99306e-13
Integral(0,296) = 6.51297e-13
Integral(0,297) = 6.06572e-13
Integral(0,298) = 5.6491e-13
Integral(0,299) = 5.26101e-13
//end******
It seems to me that after n=290, the results of integral are not correctly returned.
can someone point me what’s wrong with it?
Best regards,
Mingshui