Hello Experts
I have defined a simple TF2 function(say f2) and I get the maximum value of the function using GetMaximum(). But I couldn’t find the x and y values corresponding to that maximum
value of the function or any value of function. So please point me if there is any inbuilt function in root for TF2 to get x and y value corresponding to the function value.

ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided

Hi, I am trying to get x and y value corresponding to the maximum value of the function. The method you suggested TF2::GetMaximumXY, gives the value of the function for the given x and y. Here is the function bellow

The arguments (co,coh) to the GetMaximumXY method are “return parameters”, an older way of returning multiple values from a function in C/C++. The actual function return value is indeed the maximum, but if you look at the values of co and coh after calling the function, you’ll see they have changed to the X & Y location of that maximum.