Thickness and structure of thin films determined by background analysis in hard X-ray photoelectron spectroscopy