Theoretical characterization of the holographic recording of diffraction grating in multicomponent media