Search of a minimum

I have a TNtuple with 3 variables x, y and z; I consider z as a function of the other two variables x and y.
I’m looking for the minimum value of z stored in the TNtuple and the corresponding x and y values.
How can I solve this problem with ROOT?

This is quite easy. Do,eg;

int nrows = ntuple.Draw("x:y:z","","goff"); double *x = ntuple.GetV1(); double *y = ntuple.GetV2(); double *z = ntuple.GetV3(); int locmin = TMath::LocMin(nrows,z); printf("Found minimum of z for entry: %d, x=%g, y=%g, z=%g\n", locmin,x[locmin],y[locmin],z[locmin]);


that is what I need :slight_smile: