I have a gaussian peak in the range 79 GeV-101 GeV and I want to calculate the area under this peak. But th eanswer I am getting is zero. I want to do the same for a polynomial fit of order 2 in this same range.
TF1 *fit1 = new TF1(“nfit1”,“gaus(0)”,79,101);
fit1->Integral(159,203);//bin no 159 corresponds to 79 GeV and 203 corresponds to 101 GeV
What is wrong here?
I have a question, Aren’t bin numbers the arguments in the Integral function ? Then why is it written fit1->Integral(79,101)??
No, the bin numbers are for TH1::Integral. There are no real bins in TF1 so the arguments of TH1::Integral are the real x values.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.