Structure and optical properties of TiN films prepared by dc sputtering and by ion beam assisted deposition.