Band Structure of Layer Crystals NbSe2 and MoS2 and an Interpretation of Their Optical Spectra