FastRamboMapping¶
- class madspace.FastRamboMapping(self: madspace._madspace_py.FastRamboMapping, n_particles: SupportsInt, massless: bool, com: bool = True)¶
Bases:
MappingPhase-space mapping based on the RAMBO algorithm.
Generates the momenta of an
n_particlesfinal 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 (
masslessfalse) are obtained by reweighting a massless point rather than rescaling momenta. See [1], Sec. 2.3, for the derivation.Entries marked with an index
iare repeated fori = 0 … n - 1.batchis the batch dimension.Inputs
random_i–float, shape(batch,)– the3 * n_particles - 4uniform random numbers in [0, 1) consumed by the mapping.com_momentum–float, shape(batch, 4)– total incoming four-momentum. Present only whencomis false.
Conditions
com_energy–float, shape(batch,)– total center-of-mass energy.mass_i–float, shape(batch,)– final-state masses. Present only whenmasslessis false.
Outputs
momentum_i–float, shape(batch, 4)– then_particlesfinal-state four-momenta.
In addition every mapping returns a
weight(float, shape(batch,)), the Jacobian of the transformation.References
[1] T. Heimel, O. Mattelaer, R. Winterhalder, “MadSpace”, https://arxiv.org/abs/2602.06895
[2] R. Kleiss, W. J. Stirling, S. D. Ellis, Comput. Phys. Commun. 40 (1986) 359, https://doi.org/10.1016/0010-4655(86)90119-0
[3] S. Plätzer, “RAMBO on diet”, https://arxiv.org/abs/1308.2922
[4] C. Durkan et al., “Neural spline flows”, https://arxiv.org/abs/1906.04032
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_momentuminput.
- random_dim(self: madspace._madspace_py.FastRamboMapping) int¶
Number of uniform random inputs consumed by the forward mapping, equal to
3 * n_particles - 4.