Error:exp param[0] out of range

Dear rooter,

I would like to fit a one-dimension histogram with a photomultiplier response function. The histogram and the programme have been attached in the attachment.
When I run this programme, I meet a Error. The error output is like this(ROOT version: 5.24/00, Windows):

[color=#FF0000]root [0].x PMTFit.c

Error: exp param[0]=7.60453e+006 up:709 low:-1.#INF out of range D:\PMTFit.c(19)
*** Interpreter error recovered ***
Error in TCint::AutoLoadCallback: failure loading library libGpad.dll for clas
s TCanvas
Error: C++ exception caught D:\PMTFit.c(136)
*** Interpreter error recovered ***
root [1][/color]

Can you help me? Thank you!

Best regards,
pmt.root (614 KB)
PMTFit.c (3.09 KB)

PMTFit.cxx (3.28 KB)

Yes, it works now. Thanks a lot.