Hi all,
thanks to help on these forums I’m getting close to what I want or need.
I have my code displaying a histogram from root and I’m able to use a cubic spline to fit that histogram (code below).
But now I need to interpolate the cubic spline fit of the histogram. My histogram has 1001 bins and I need 1000001 points in my interpolated fit. Could somebody please throw me some hints of where to start?
When I get that going there’ll be a few more questions but they can wait. Baby steps.
Thanks people and have a good weekend.
Regards
Tim
TH1D *h2;
gDirectory->GetObject("EnergyLoss", h2);
c1->cd(2);
h2->Draw();
TSpline3 *spline = new TSpline3(h2);
spline->SetLineColor(kRed);
spline->Draw("SAME");
h2->GetXaxis()->SetTitle("Depth (m)");
h2->GetXaxis()->CenterTitle(1); // center the name of the x-axis
gPad->SetGridx(1);
gPad->SetGridy(1);
gPad->Modified();