Skip to content

Massive incoming particles built by the phase-space mapping (#506) - #532

Open
ramonpeter wants to merge 5 commits into
claude/eva-mg7-helicity-density-50f744from
massive
Open

ramonpeter wants to merge 5 commits into
claude/eva-mg7-helicity-density-50f744from
massive

Conversation

@ramonpeter

@ramonpeter ramonpeter commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #506. Base: #502 (claude/eva-mg7-helicity-density-50f744).

Massive incoming particles built by the phase-space mapping

PhaseSpaceMapping now returns massive incoming particles (W and Z beams, muons with a mass, massive partons) on their mass shells, as madevent's genps.f builds them (mom2cx).
Its inverse takes the massive momenta, so the channel weights and Python users of the mapping see the momenta the matrix element sees.
DifferentialCrossSection uses the matching flux 1/(2√λ(ŝ, m1², m2²)).
The on-shell step that #502 adds to the Integrand is removed. The Integrand now only checks that the cross sections carry the incoming masses of the mapping.

Mapping

  • Rambo, s-channel, 2 → 1, the propagator chain and the color-ordered chain build the beams massive in the partonic frame (com_p_in_massive).
  • Both chains scatter off them with massive versions of their blocks. Each mapping picks them once, when the graph is built, so the massless kernels are unchanged.
    • The 2 → 2 blocks get the |t| range without the clamp at 0, because t > 0 is reached off a massive beam. They also get ETmin bounds with both ends tight for a massive beam, and rapidity clamps with the kinematics of massive beams.
    • The double-t block gets its |t1| and |t2| ranges, ETmin bounds and rapidity clamps, plus the scattering kernel with the Jacobian π/(2√λ).
    • The 2 → 3 block gets the massive |t1| range, the recoil ETmin floor of s23 for a massive beam, and the floor of −(p2 − k)² for the step with the opposite beam as recoil.
  • A range reaching below 0 is sampled as x − 2 min(x_min, 0) (Invariant::build_forward_shifted). The sampled range then starts at |x_min|, away from the pole of the power law, which keeps the cut efficiency of massless beams.
  • Chili builds the incoming momenta from its final state. It builds against the massless pair with the same sum and then puts that pair on its mass shells (incoming_on_shell). The Jacobian is unchanged, because dΦ_n depends only on the total momentum.
  • ŝ is sampled from (m1 + m2)² upward. A 2 → 1 process or fixed beams below that threshold give an empty mapping.

Cross section

  • DifferentialCrossSection(incoming_masses=...) uses diff_cross_section_massive.
  • mg7 passes the incoming masses of each subprocess.

Checks

  • With massless beams, forward and inverse are bitwise identical to mg7: EVA (pdlabel eva) beams, and massive incoming particles on their mass shell #502 merged with main. This covers rambo, propagator, chili and every color-ordered topology (single chain, double-t with a walk or a pair, central 2 → 2), leptonic and hadronic, with and without cuts.
  • madspace/tests/test_massive_incoming.py has 56 tests, all passing. Off W and Z beams they check:
    • the volume of every chain topology against massless beams above threshold, with and without cuts;
    • the inverse;
    • the color-ordered distributions against rambo;
    • that every event lies inside the massive ranges and clamps;
    • the massless limits of the new kernels.
  • The rest of the madspace suite fails the same tests as the base. test_mg7_massive_incoming.py, test_eva_mg7.py and test_gamma_upc.py pass.
  • At phase-space level, 1M points per mapping in every mode and color-ordered topology, leptonic and hadronic, with and without cuts. The 42 volume comparisons against massless beams have an rms pull of 0.95 (largest 2.1), and the weighted distributions match rambo.
  • Cross sections from the native mapping against the Integrand fix of mg7: EVA (pdlabel eva) beams, and massive incoming particles on their mass shell #502, at 100k events per run. Where several t-channel modes or runs were done, they are combined.
process this PR #502 pull madevent
w+ w- > t t~, W beams 2 × 500 GeV 26.9936(43) pb 26.9893(61) +0.6 26.99(7)
w+ w- > t t~, W beams 400/600 GeV 27.6871(62) 27.6901(60) −0.4 27.71(6)
mu+ mu- > t t~ (sm-lepton_masses) 0.166493(43) 0.166397(44) +1.6 0.1664(1)
w+ w- > z z, W beams 2 × 500 GeV 311.718(91) 311.851(73) −1.1
EVA w+ w- > t t~, 2 × 15 TeV 0.0112186(74) 0.0112046(69) +1.4
EVA w+ w- > z z, 2 × 15 TeV 0.022763(9) 0.022770(11) −0.5

The six pulls give χ² = 6.5 for 6 degrees of freedom. Per t-channel mode (propagator, rambo, and chili for EVA) the two agree within 0.6σ.

The following were not run: the GPU builds (no CUDA in the test environment), an [amplicol] process with massive beams (no pyAmpliCol build), and a proton-PDF process with massive partons (no LHAPDF set).

Not in this PR

  • Chili crashes with monochromatic beams, massless ones included, on main too. It is fixed separately.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ud6YhkZXK3uDs1Z3nwdTi1

ramonpeter and others added 5 commits November 23, 2026 07:38
…#506)

PhaseSpaceMapping returns massive incoming particles (W and Z beams, muons
with a mass, massive partons) on their mass shells, as madevent's genps.f
builds them (mom2cx), with an inverse that takes the massive momenta, and
DifferentialCrossSection takes the matching flux. This replaces the step of
#502 in the Integrand (incoming_on_shell after the mapping, with the flux
ratio in the weight), which is removed here.

Mapping
- Without a t-channel chain (s-channel, rambo, 2 -> 1) and in the chain of
  the propagator mode the beams are built massive in the partonic frame
  (com_p_in_massive). The chain scatters off them with massive versions of
  its 2 -> 2 blocks, chosen when the graph is built so that the massless
  kernels stay as they are.
  - t_inv_min_max_massive (and its value and cut variants) does not clamp
    the |t| range at 0, since t > 0 is reached near the forward direction
    off a massive beam.
  - The Invariant samples |t| - min(|t|_min, 0), which is |t| wherever the
    range stays at or above 0.
  - t_rapidity_clamp_massive has the rapidity bounds with the kinematics of
    massive beams in their rest frame, written without cancellations.
  - The ETmin bound of a massive beam keeps its lower end only, from
    2 pa.p1 >= pa_+ p1_-, which never cuts into the phase space.
- Chili and the color-ordered chain build the final state against the
  massless pair with the same sum and put it on its mass shells afterwards
  (incoming_on_shell, now with light-cone components and an above_threshold
  output in place of the flux ratio). For chili, whose final state fixes the
  incoming momenta, that is its construction. The color-ordered chain has no
  massive versions of its double-t and 2 -> 3 blocks yet. The Jacobian is
  that of the massless pair, since dPhi_n depends on the sum only.
- s_hat is sampled from (m1 + m2)^2 on. A 2 -> 1 process or fixed beams below
  that give an empty mapping, chili points below it no weight.

Cross section
- DifferentialCrossSection(incoming_masses=...) uses the flux
  1/(2 sqrt(lambda(s_hat, m1^2, m2^2))) (diff_cross_section_massive), and
  Integrand checks that the cross sections have the masses of the mapping.

Checks
- Massless beams give forward and inverse bitwise identical to the parent
  commit for rambo, propagator, chili and color-ordered, leptonic and
  hadronic, with and without cuts.
- madspace/tests/test_massive_incoming.py (30 tests) covers momenta on shell
  with the same sum, the inverse, the phase-space volume of massless beams
  with and without cuts, every |t| that passes the cuts inside the massive
  rapidity and ETmin ranges, the massless limit of the massive kernels and
  the flux. The rest of the suite fails as on the parent commit.
- mg7 against madevent and against the parent commit (#502 with its
  Integrand step)
    w+ w- > t t~, W beams 2 x 500 GeV   26.98(4) pb   madevent 26.99(7)   parent 27.01(4)
    w+ w- > t t~, W beams 400/600 GeV   27.66(4) pb   madevent 27.71(6)   parent 27.73(4)
    mu+ mu- > t t~ (sm-lepton_masses)   0.16615(20)   madevent 0.1664(1)  parent 0.16655(20)
    EVA w+ w- > t t~, 2 x 15 TeV        0.011207(32)                      parent 0.011197(31)
    w+ w- > z z, W beams 2 x 500 GeV    312.6(8)                          parent 312.2(7)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ud6YhkZXK3uDs1Z3nwdTi1
Each subprocess passes its incoming masses to DifferentialCrossSection, for
the flux 1/(2 sqrt(lambda(s_hat, m1^2, m2^2))) of the massive incoming
particles the phase-space mapping builds. The test of #502 for the on-shell
kernel checks its above_threshold output in place of the flux ratio, and the
comment in madgraph_process.py now says that the mapping puts the incoming
momenta on their mass shells.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ud6YhkZXK3uDs1Z3nwdTi1
ColorOrderedMapping builds massive beams on their mass shells, as the
propagator chain does, and every block of the chain scatters off them with
massive versions of its kernels, chosen when the graph is built. The
projection onto the massless pair (incoming_on_shell) is left for chili,
whose final state fixes the incoming momenta.

Kernels
- Double-t block: the |t1| and |t2| ranges, their ETmin bounds, the rapidity
  clamps and the scattering with the Jacobian pi / (2 sqrt(lambda)), in the
  light-cone components of the beams in their rest frame. |t1| reaches down
  to -(ma - m1)^2 where p1 can move with the velocity of pa.
- 2 -> 3 block: the |t1| range of the massive 2 -> 2 kernels, the recoil
  ETmin floor of s23 for a massive pa, and the floor of -(p2 - k)^2 in the
  step with the opposite beam as recoil (recoil_v_min_massive).
- The ETmin bounds of the massive 2 -> 2 kernels keep both ends now, each the
  least or largest value of a light-cone product instead of a dropped term.
  Off W and Z beams the lower ends had been up to ma^2 too low.
- Invariant::build_forward_shifted samples x - 2 min(x_min, 0), so that a
  range reaching below 0 starts at |x_min| rather than at the pole of the
  power law. With 1/|t| sampling and cuts the shift by min(x_min, 0) put most
  points just above a lower edge that the cuts reject.
- massive_incoming_masses in base, for TPropagatorMapping and
  ColorOrderedMapping.

Checks
- Massless beams give forward and inverse bitwise identical to the parent
  commit for rambo, propagator, chili and every color-ordered topology
  (single chain, double-t with a walk or a pair, central 2 -> 2), leptonic
  and hadronic, with and without cuts.
- test_massive_incoming.py (56 tests) checks, off W and Z beams, the
  phase-space volume of every topology against massless beams above the
  threshold, with and without cuts and with at least half their cut
  efficiency, the inverse, the weighted distributions against rambo, every
  event inside the massive double-t, s23 and v ranges and clamps, and the
  massless limits of the new kernels. The rest of the suite fails as on the
  parent commit.
- mg7 with the propagator chain, against madevent and the parent commit
    w+ w- > t t~, W beams 2 x 500 GeV   27.02(4) pb   madevent 26.99(7)   parent 26.98(4)
    w+ w- > t t~, W beams 400/600 GeV   27.64(4) pb   madevent 27.71(6)   parent 27.66(4)
    mu+ mu- > t t~ (sm-lepton_masses)   0.16638(20)   madevent 0.1664(1)  parent 0.16615(20)
    EVA w+ w- > t t~, 2 x 15 TeV        0.011255(33)                      parent 0.011207(32)
    w+ w- > z z, W beams 2 x 500 GeV    313.2(8)                          parent 312.6(8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ud6YhkZXK3uDs1Z3nwdTi1
@ramonpeter

Copy link
Copy Markdown
Contributor Author

@oliviermattelaer this removes the integrand fix in #502 and instead builds the massive incoming particles directly in the mapping.

@github-actions

Copy link
Copy Markdown
Contributor

How CI reacts to this PR

  • Not a draft: the full CI runs automatically when the PR is opened and on every push.
  • Draft: only the unittest and IOtest workflows run. Mark the PR "Ready for review" to start the full CI.
  • run-ci label: while this label is on the PR, every job keeps running after a failure, so you see all failures. Without it, the first failing job cancels the other runs of that commit.
  • Closing or merging: the unfinished CI runs of this PR are cancelled. A merge gets its own run on main.
  • Pushes to main: the full CI runs after each merge.
  • Other branches: run CI only through workflow_dispatch.
  • Forks: the runs use a read-only token, so they cannot cancel each other.
  • Merge: a green CI and one approval are required to merge.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant