Hello,
I am having problems when I try to perform an integral of a TF2 function.
I defined a function:
TF2* f = new TF2(“f”,func, xmin , xmax, ymin, ymax, 0 )
where func is a C function with no parameters:
Double_t func(Double_t x, Double_t par)
{…}
When I call f->Integral(x1, x2, y1, y2) I get a segmentation violation.
But if I call f->Eval(any value) first, and then f->Integral(a1,a2,y1,y2) I get a result!!!
But it is wrong!!!
Do you know if there is any problem with TF2::Integral for C functions??
But, if I comment line (**) and I execute the same as above:
root> .L macro.C
root> main(0.5, 0.53, 0.4, 0.48 )
fa->Eval() = 1.0000E-1
fa->integral() = 0.0000E+00