The nuclear reaction efficiency correction for silicon and germanium detectors