Optical properties and electronic structure of graphite