Calculation of Spectra of Neutrons and Charged Particles Produced in a Target of a Neutron Generator