hi all
i’m using ROOT version 5.27/06b and i have a TF1 defined in an x-range and would like to use the GetMinimumX and GetMaximumX functions to get that range. i see an unexpected behaviour: if i run the following macro:
// begin
#include “TF1.h”
#include
void test() {
TF1* f1 = new TF1(“test”, “[0] + [1]*x”, 20., 670.);
std::cout << "min: " << f1->GetMinimumX() << " max: " << f1->GetMaximumX() << std::endl;
}
//end
i would expect to get 20 and 670, instead it returns:
root [0] .L test.C+
root [1] test()
min: 26.5657 max: 26.5657
i have tried other functions and see different but still puzzling behaviours:
if i use the function: TF1* f1 = new TF1(“test”, “(1.22179*((1+(-0.000946228x))+(7.37821e-06(xx))))+(-4.8451e-08(x*(x*(x/(1+(0.0047976*x))))))”, 20., 670.);
i get them swapped:
root [0] .L test.C+
root [1] test()
min: 670 max: 20
am i doing something wrong, or have i misunderstood how the methods should work?
f