Maybe it will be sufficient to try:
Double_t dE = hSpectrumCalibrated->GetBinWidth(1) / 2.0; // half of the "fixed" bin width
// ...
hSpectrumCalibrated->Fill(ENERGY_CAL[i] + dE);
However, in principle, you should create a histogram with variable bin sizes.
See also:
1 Like