Hey,
I have a .root file with with two plots using TMultiGraph. How can I write a script to load the root file and fit a function on each of the graphs?
TFile *f = new
TFile("some_root_file.root");
TF1 f1("log10 fit","[0]*pow(log10(x),2)+[1]*log10(x)+[2]",0,10e+04); // this is the function I want to fit
f1.SetLineColor(kRed); f1.SetLineStyle(2);
So that is what I have so far, I’m quite new to ROOT so I’m not sure how to explicitly select one of the graphs and use that fit (I would like to use the fit for both graphs on the canvas)