I am using method TF1::GetMaximumX to find the x-coordinate corresponding to the maximum of a TF1 function used to fit a histogram.
What is the precision of this method? I looked into the class reference (ROOT: TF1 Class Reference) but I could not find this information.
Hi,
The precision of the method is the epsilon parameter passed in TF1::GetMaximumX. The same value is used both as absolute and relative precision.
For more control you can always use directly the BrentMinimizer class that is used in the TF1 implementation of GetMaximumX.
thanks for the reply.
But in this sentence: “epsilon (default = 1.E-10) controls the relative accuracy (if |x| > 1 ) and absolute (if |x| < 1)” what does |x| refers to?
TF1::GetMaximumX works fine, I just wanted to know which error I should quote for the result.
In my case |x|<1 and hence I deduce that the error is relative and equal to 1.E-10 (I used the default value for epsilon).