After energy calibration, some histogram bins are empty

A better idea is to “calibrate” the original histogram:

a = z[0]; b = z[1] # En = a * Ch + b ("channel to energy" calibration)
ax = h.GetXaxis() # an axis with fix bins (will be scaled with a linear function)
ax.Set(ax.GetNbins(), a * ax.GetXmin() + b, a * ax.GetXmax() + b)
h.ResetStats()