Phase space#
phase_space() generates unweighted \(n\)-body phase space for arbitrary masses with EvtGen’s phase space routine. In contrast to Generator, it needs no particle or decay table, so it can be called with different masses in one process and next to a Generator.
from pyevtgen import phase_space
momenta = phase_space(3.0969, [0.1350, 0.1396, 0.4937], n=200_000, seed=0)
momenta.shape
EvtMTRandomEngine:Mersenne-Twister random number generator with seed = 1430957218
(200000, 3, 4)
The result has shape (n_events, n_daughters, 4) with four-momenta \((E, p_x, p_y, p_z)\) in the rest frame of the parent. Unweighted phase space is uniform over the Dalitz plot:
Number of daughters#
The routine supports 2 to 15 daughters, but it uses accept-reject sampling whose efficiency drops steeply with the number of daughters. The table below shows the generation rate for pions from a parent of 3 GeV. Beyond about nine daughters, generation becomes impractically slow, and a running call cannot be interrupted.
For four or more daughters, see Four-body decays.
Invalid input raises a ValueError, for instance when the daughters are heavier than the parent:
try:
phase_space(1.0, [0.6, 0.6], n=1)
except ValueError as error:
print(error)
Parent mass must exceed the sum of the daughter masses