I would recommend you to check one of the special sources SPECSOUR - BEAMSPOT.
BEAMSPOT, the source consists of multiple beam spots. The user defines through the cards [SPOTBEAM], [SPOTPOS], [SPOTDIR] and [SPOTTRAN] the locations, directions, transformation and beam characteristics of those sources. In this case, the card needs as WHAT(1) is the number of beam spots that are used. The user can define up to 15000 beam spots with different weights.
Afterwards, you normalize your result as usual. In your case weight (defined in the SPOBEAM card) for tauon beam will be 2/5 and for pion beam will be 3/5. Afterwards, you normalize output by *5 (particles).
the SPECSOUR - BEAMSPOT source only allows to use the standard Gaussian / Flat distribution for the particle’s momentum.
For other distributions a source user routine has to be used. However in this case the specified beam spots are ignored, and the starting location has to be defined in the source user routine.