Optical emission spectra and ion energy distribution functions in TiN deposition process by reactive pulsed magnetron sputtering