Your profile histogram looks great! I think that, for linear interpolation in ROOT, you could use the TGraphErrors class to create a graph from your TProfile. Then, TGraphErrors::Interpolate can be used for linear interpolation at any point.
Hereās a quick example:
// Assuming 'h_profPt' is your TProfile
TGraphErrors graph(h_profPt->GetNbinsX());
for (int i = 0; i < h_profPt->GetNbinsX(); ++i) {
graph.SetPoint(i, h_profPt->GetBinCenter(i+1), h_profPt->GetBinContent(i+1));
graph.SetPointError(i, 0, h_profPt->GetBinError(i+1));
}
// Now you can use graph.Interpolate(x) for any x-value
This should give you a linearly interpolated value at any x. Hope this helps!