Optical absorption and resonance Raman scattering of carbon nanotubes