PhaseSpaceMapping¶
-
class PhaseSpaceMapping : public madspace::Mapping¶
Full \(2 \to n\) phase-space mapping for one diagram topology.
Assembles a complete mapping from the elementary building blocks along the recursive decomposition of the tree-level phase space (Sec. 2.2 of [1]),
\[ \int \mathrm{d}\Phi_n = \Big[\textstyle\prod_i \int \mathrm{d}s_i\Big] \Big[\textstyle\prod_j \int \mathrm{d}\Phi^{(\phi,t)}_{2,j}\Big] \Big[\textstyle\prod_k \int \mathrm{d}\Phi^{(\tilde s,t)}_{2,k}\Big] \Big[\textstyle\prod_l \int \mathrm{d}\Phi_{3,l}\Big] \Big[\textstyle\prod_m \int \mathrm{d}\Phi^{(\phi,\theta)}_{2,m}\Big]. \]The time-like invariants are sampled with Invariant, the s-channel decays with TwoBodyDecay / ThreeBodyDecay, and the PDF convolution with Luminosity. TChannelMode selects the t-channel strategy. The second constructor takes a flat list of external masses instead of a Topology and is used for the topology-free TChannelMode::rambo and TChannelMode::chili modes.
batchis the leading batch dimension.n_outis the number of outgoing particles.Inputs
random–float, shape(batch, random_dim())– the unit-hypercube coordinates.discrete–int, shape(batch, discrete_dim())– the discrete channel choices. Present only whendiscrete_dim()is nonzero.
Conditions
permutation_index–int, shape(batch,)– which permutation channel to use. Present only when more than one permutation is given.mirror_index–int, shape(batch,)– 1 to take leg 1 from beam 2 and leg 2 from beam 1. Present only whenmirror_beamsis set; it followspermutation_index.
Outputs
momenta–float, shape(batch, n_out + 2, 4)– all momenta (incoming beams first, then outgoing).x1–float, shape(batch,)– first parton momentum fraction.x2–float, shape(batch,)– second parton momentum fraction.
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 (Sec. 2.2)
Public Types
-
enum TChannelMode¶
How the space-like (t-channel) part of the phase space is generated.
Values:
-
enumerator propagator¶
A chain of 2->2 blocks (TPropagatorMapping).
-
enumerator rambo¶
FastRamboMapping on the t-channel legs.
-
enumerator chili¶
Collider coordinates (ChiliMapping).
-
enumerator color_ordered¶
A color-ordered chain (ColorOrderedMapping).
-
enumerator propagator¶
Public Functions
-
PhaseSpaceMapping(const Topology &topology, double cm_energy, bool leptonic = false, double invariant_power = 0.8, TChannelMode t_channel_mode = propagator, const std::optional<Cuts> &cuts = std::nullopt, const std::vector<std::vector<std::size_t>> &permutations = {}, const std::optional<std::vector<std::size_t>> &color_order = std::nullopt, double beam_rapidity = 0., bool mirror_beams = false)¶
- Parameters:
topology – The diagram topology to follow. See Topology.
cm_energy – Total collision energy.
leptonic – If true, skip the PDF convolution (no
x1/x2sampling).invariant_power – Exponent of the
1/s^psampling of every time-like invariant. See Invariant.t_channel_mode – The TChannelMode strategy.
cuts – Fiducial cuts to fold into the sampling. See Cuts.
permutations – One outgoing-particle permutation per channel. More than one enables the
permutation_indexcondition.color_order – Color ordering for TChannelMode::color_ordered.
beam_rapidity – Rapidity of the beams’ centre-of-mass frame in the lab frame the momenta are returned in: 0.5 ln(E1 / E2) for beam energies E1 (along +z) and E2, with
cm_energy= 2 sqrt(E1 E2). The phase space is generated in the beams’ frame and boosted into the lab before the cuts, so rapidity cuts act in the lab.mirror_beams – Add the
mirror_indexcondition: for index 1 the event is rotated by pi about the x axis in the beams’ frame (leg 1 from beam 2, leg 2 from beam 1) before the lab boost and the cuts. With identical beams that is a rotation of the lab event too.
-
PhaseSpaceMapping(const std::vector<double> &external_masses, double cm_energy, bool leptonic = false, double invariant_power = 0.8, TChannelMode mode = rambo, const std::optional<Cuts> &cuts = std::nullopt, const std::optional<std::vector<std::size_t>> &color_order = std::nullopt, double beam_rapidity = 0., bool mirror_beams = false)¶
- Parameters:
external_masses – Masses of all external particles, the two beams first. A trivial topology is built from them.
cm_energy – Total collision energy.
leptonic – If true, skip the PDF convolution.
invariant_power – Exponent of the
1/s^pinvariant sampling. See Invariant.mode – The TChannelMode strategy (default TChannelMode::rambo).
cuts – Fiducial cuts. See Cuts.
color_order – Color ordering for TChannelMode::color_ordered.
beam_rapidity – Rapidity of the beams’ centre-of-mass frame in the lab frame the momenta are returned in: 0.5 ln(E1 / E2) for beam energies E1 (along +z) and E2, with
cm_energy= 2 sqrt(E1 E2). The phase space is generated in the beams’ frame and boosted into the lab before the cuts, so rapidity cuts act in the lab.mirror_beams – Add the
mirror_indexcondition: for index 1 the event is rotated by pi about the x axis in the beams’ frame (leg 1 from beam 2, leg 2 from beam 1) before the lab boost and the cuts. With identical beams that is a rotation of the lab event too.
-
inline std::size_t random_dim() const¶
Number of continuous unit-hypercube inputs consumed by the forward map.
-
inline virtual std::size_t discrete_dim() const override¶
Number of discrete channel choices.
-
inline std::size_t particle_count() const¶
Total number of particles, incoming and outgoing.
-
inline std::size_t channel_count() const¶
Number of permutation channels.
-
inline double beam_rapidity() const¶
Rapidity of the beams’ centre-of-mass frame in the lab frame.
-
inline bool mirror_beams() const¶
Whether the mapping takes the
mirror_indexcondition.
-
inline bool empty() const¶
True when the cuts exclude the whole region this mapping samples: a pair mass cut puts a propagator’s floor at or above the upper end of its on-shell window.
Every point then fails the cuts, so the channel contributes nothing and should be dropped rather than sampled.
Public Static Functions
-
static inline std::size_t random_dim_for(const Topology &topology, bool leptonic)¶
Number of continuous unit-hypercube inputs a forward map over
topologyconsumes.A 1 -> n decay and a leptonic (fixed-s) 2 -> n collision both have 3n-4 degrees of freedom. A hadronic 2 -> n adds the beam momentum fractions, i.e. one further sampled invariant on top of s_hat, giving 3n-2. A hadronic 2 -> 1 collision keeps a single random number, the rapidity of the produced particle, since s_hat is fixed at its mass.
- Parameters:
topology – The decay topology.
leptonic – If true, skip the PDF convolution.
- Throws:
std::invalid_argument – for a 2 -> 1 topology without PDFs.