Simulation of dependence of the cross section of deuterons beam fragmentation into cumulative pions and protons on the mass of the target nucleus