X-ray photoelectron spectrum and band structure of TiC