We report on double-differential inclusive cross sections of the production of secondary protons, charged pions, and deuterons, in the interactions with a 5% λ abs thick stationary tantalum target, of proton and pion beams with momentum from ±3 GeV/c to ±15 GeV/c. Results are given for secondary particles with production angles 20°< θ < 125°. They are of particular relevance for the optimization of the design parameters of the proton driver of a neutrino factory. PACS 13.85.Ni · 25.40.Qa