Production of charged pions by 730-MeV protons from hydrogen and selected nuclei