Fix thread safety problem in PFEnergyCalibration

Changed a function static to a file local const static initialized
by a helper function. This avoids multiple threads trying to modify
the function static simultaneously.