Maybe you could help me with solving this problem.
The four-momenta in the initial state have the following form:
$$p_1=(x_1\cdot\frac{\sqrt{s}}{2},0,0,x_1\cdot\frac{\sqrt{s}}{2})
p_2=(x_2\cdot\frac{\sqrt{s}}{2},0,0,-x_2\cdot\frac{\sqrt{s}}{2})$$
The routine that generates the final state...