Gamma ray spectra simulation and optimization in neutron activation analysis