PhaseSpaceMapping¶
- class madspace.PhaseSpaceMapping(*args, **kwargs)¶
Bases:
MappingFull \(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)
Overloaded function.
__init__(self: madspace._madspace_py.PhaseSpaceMapping, topology: madspace._madspace_py.Topology, cm_energy: typing.SupportsFloat, leptonic: bool = False, invariant_power: typing.SupportsFloat = 0.8, t_channel_mode: madspace._madspace_py.PhaseSpaceMapping.TChannelMode = <TChannelMode.propagator: 0>, cuts: madspace._madspace_py.Cuts | None = None, permutations: collections.abc.Sequence[collections.abc.Sequence[typing.SupportsInt]] = [], color_order: collections.abc.Sequence[typing.SupportsInt] | None = None, beam_rapidity: typing.SupportsFloat = 0.0, mirror_beams: bool = False) -> None
- 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.
__init__(self: madspace._madspace_py.PhaseSpaceMapping, external_masses: collections.abc.Sequence[typing.SupportsFloat], cm_energy: typing.SupportsFloat, leptonic: bool = False, invariant_power: typing.SupportsFloat = 0.8, mode: madspace._madspace_py.PhaseSpaceMapping.TChannelMode = <TChannelMode.rambo: 1>, cuts: madspace._madspace_py.Cuts | None = None, color_order: collections.abc.Sequence[typing.SupportsInt] | None = None, beam_rapidity: typing.SupportsFloat = 0.0, mirror_beams: bool = False) -> None
- 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.
- class TChannelMode(*args, **kwargs)¶
Bases:
pybind11_objectMembers:
propagator
rambo
chili
color_ordered
Overloaded function.
__init__(self: madspace._madspace_py.PhaseSpaceMapping.TChannelMode, value: typing.SupportsInt) -> None
__init__(self: madspace._madspace_py.PhaseSpaceMapping.TChannelMode, name: str) -> None
- chili = <TChannelMode.chili: 2>¶
- color_ordered = <TChannelMode.color_ordered: 3>¶
- PhaseSpaceMapping.TChannelMode.name -> str
- propagator = <TChannelMode.propagator: 0>¶
- rambo = <TChannelMode.rambo: 1>¶
- property value¶
- beam_rapidity(self: madspace._madspace_py.PhaseSpaceMapping) float¶
Rapidity of the beams’ centre-of-mass frame in the lab frame.
- channel_count(self: madspace._madspace_py.PhaseSpaceMapping) int¶
Number of permutation channels.
- chili = <TChannelMode.chili: 2>¶
- color_ordered = <TChannelMode.color_ordered: 3>¶
- cuts(self: madspace._madspace_py.PhaseSpaceMapping) madspace._madspace_py.Cuts¶
The cuts, applied to the lab-frame momenta.
- discrete_dim(self: madspace._madspace_py.PhaseSpaceMapping) int¶
Number of discrete channel choices.
- empty(self: madspace._madspace_py.PhaseSpaceMapping) bool¶
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.
- mirror_beams(self: madspace._madspace_py.PhaseSpaceMapping) bool¶
Whether the mapping takes the
mirror_indexcondition.
- particle_count(self: madspace._madspace_py.PhaseSpaceMapping) int¶
Total number of particles, incoming and outgoing.
- propagator = <TChannelMode.propagator: 0>¶
- rambo = <TChannelMode.rambo: 1>¶
- random_dim(self: madspace._madspace_py.PhaseSpaceMapping) int¶
Number of continuous unit-hypercube inputs consumed by the forward map.