Hi! I’m having some problems to get a integral of a function that is inside in a total function. I fit this function with 3 functions: 2 gaussian and a constant. Now, I need to get the Integral (and his error) of one of this gaussians.
This is the code of the fitting functions: pastebin[dot]com/etaHYUpW
This is the code of the fit: pastebin[dot]com/xj8UPEEC
cout << "AREA: " << funcFit->Integral(1230, 1260) << " +/- " << funcFit->IntegralError(1230, 1260) << endl;
With this last code funcFit->Integral I get the fit of the totalFit.
In this case I need the integral of the gaussian without the noise and the little pile-up on the right (2nd gaussian).
I don’t know how to do this, has anybody an idea?