How to find the area error using peakfind.C

The binwidth that I have chosen is 1. But I guess the other software has may be 0.3. But in my code, when I play with the bin width for calibrated histogram:
TH1* h_energy = new TH1F(“h_energy”, “Calibrated Energy Spectra”,4096,0,4096);
the calibration always shifts. For reference, I am attaching the code that I wrote with the help of Peakfind.C and I am including the input file also.
root.zip (6.7 KB)