FastRamboMapping

class madspace.FastRamboMapping(self: madspace._madspace_py.FastRamboMapping, n_particles: SupportsInt, massless: bool, com: bool = True)

Bases: Mapping

Phase-space mapping based on the RAMBO algorithm.

Generates the momenta of an n_particles final state from a unit hypercube by recursively factorizing the \(n\)-body phase space into \(1\to2\) decays, following RAMBO [2] and its invertible RAMBO-on-diet variant [3]. The RAMBO-on-diet step maps the mass variables \(y_i\) to random numbers \(r_i\) as

\[r_i = (k+1)\,y_i - k\,y_i^{1+1/k}, \qquad k = n-i,\]

which is exactly flat but has no closed-form inverse for \(n>3\). FastRambo replaces it by a one-parameter rational-quadratic function [4]

\[G_\mathrm{RQF}(y_i, c_k) = \frac{y_i^2 + c_k\,y_i(1-y_i)}{1 + (c_k-2)\,y_i(1-y_i)},\]

The inverse and Jacobian of this map are closed-form, so the mapping stays strictly invertible while being fully analytic and vectorizable. Each \(c_k\) is fitted once to approximate the RAMBO-on-diet step. For \(c_1 = 2\) the two agree exactly. The weight then acquires a small non-uniform factor \(w_n(r)\). Massive final states (massless false) are obtained by reweighting a massless point rather than rescaling momenta. See [1], Sec. 2.3, for the derivation.

Entries marked with an index i are repeated for i = 0 … n - 1. batch is the batch dimension.

Inputs

  • random_i – float, shape (batch,) – the 3 * n_particles - 4 uniform random numbers in [0, 1) consumed by the mapping.

  • com_momentum – float, shape (batch, 4) – total incoming four-momentum. Present only when com is false.

Conditions

  • com_energy – float, shape (batch,) – total center-of-mass energy.

  • mass_i – float, shape (batch,) – final-state masses. Present only when massless is false.

Outputs

  • momentum_i – float, shape (batch, 4) – the n_particles final-state four-momenta.

In addition every mapping returns a weight (float, shape (batch,)), the Jacobian of the transformation.

References

Construct the mapping for a fixed multiplicity.

Parameters:
  • n_particles – Number of final-state particles; must be in [3, 12].

  • massless – If true all final-state particles are massless, otherwise the masses are read from the conditions.

  • com – If true the momenta are generated in the center-of-mass frame, otherwise the total incoming momentum is taken from the com_momentum input.

random_dim(self: madspace._madspace_py.FastRamboMapping) → int

Number of uniform random inputs consumed by the forward mapping, equal to 3 * n_particles - 4.