Skip to content

madspace: chili for lepton beams - #533

Merged
ramonpeter merged 1 commit into
massivefrom
lepton-chili
Nov 23, 2026
Merged

ramonpeter merged 1 commit into
massivefrom
lepton-chili

Conversation

@ramonpeter

Copy link
Copy Markdown
Contributor

Two commits on top of the review state.

CI fix: empty ETmin ranges of the massive kernels stay empty

The macOS wheel build failed test_massive_kernels_have_the_massless_limit and test_double_t_kernels_have_the_massless_limit in its scalar mode, for 4 of 20000 and 15 of 50000 events. The SIMD mode on macOS and both modes on Linux passed.

Where the ETmin floors leave no recoil, the massless kernels get a cut range of zero width and fall back to the kinematic one.
The scalar build on arm64 fuses multiply-adds, which leaves the mass² of a massless beam a rounding error of either sign.
A positive one gave the massive cut range a width of that size, so it kept a sliver far from the massless range.
These events have zero weight either way, so no cross section changed.

t_cut_bounds_etmin_massive and doublet_t1_etmin_clamp_massive now keep an empty cut range empty.
Both tests also run with beams whose components carry a relative error of 4e-16, which fails the same way on x86 without the fix.
Massless beams are bitwise unchanged. With a massive beam only events of zero weight move.

Chili for lepton beams

This replaces the "fixed separately" in the description.
Chili reads x1 and x2 off its final state, which lepton beams do not leave free, and it crashed for any lepton-beam process with a t-channel, massless beams included.
With fixed beams it got 3n − 4 random numbers where it takes 3n − 2. With a dressed-lepton density (beam.lepton_density) the split of the luminosity was skipped and 1 − x never set.

  • ChiliMapping(fixed_beams=True) generates the first n − 2 momenta as chili does and the last two as the two-body decay of Q = P − Σ p_i in the rest frame of Q, from 3n − 4 random numbers.
  • The rapidity of a particle runs up to its largest energy, reached with the others at their least mass. The bound √s/2 of hadronic chili cut off 7% of the phase space of a heavy particle among the first n − 2.
  • The inverse reads the rapidity off as sign(p_z) log((E + |p_z|) / m_T), which keeps its precision far forward.
  • With a dressed-lepton density the split samples ŝ, x1 and x2 as for the other modes, and chili builds the final state for fixed beams at √ŝ in the partonic frame, without the rapidity bounds of the lab cuts.
  • The mapping builds the beams itself, on their mass shells if they are massive. Hadronic chili is bitwise unchanged.
    madspace/tests/test_chili_fixed_beams.py (65 tests) checks the momenta, the volume against rambo, the round trip, that the inverse takes every rambo event into the unit cube, the density over a cut region, and the dressed-lepton split. test_massive_incoming.py now runs leptonic chili too.

Cross sections at 100k events per run, chili against the propagator mapping, repeated runs combined.

process chili propagator pull
w+ w- > t t~, W beams 2 × 500 GeV 26.9934(68) pb 26.9936(43) 0.0
w+ w- > t t~, W beams 400/600 GeV 27.6857(67) 27.6871(62) −0.2
w+ w- > z z, W beams 2 × 500 GeV 311.876(90) 311.718(91) +1.2
mu+ mu- > w+ w- (sm-lepton_masses), 2 × 500 GeV 2.68804(60) 2.68860(48) −0.7
e+ e- > w+ w-, 2 × 500 GeV 2.68867(47) 2.68847(40) +0.3
e+ e- > w+ w- z, 2 × 500 GeV 0.0592215(50) 0.0591785(55) +0.6
e+ e- > w+ w-, ISR (isronlyll), 2 × 250 GeV 7.6662(23) 7.6638(18) +0.8
e+ e- > w+ w- z, ISR (isronlyll), 2 × 500 GeV 0.0581075(49) 0.0581541(51) −0.7

The eight pulls give χ² = 3.6 for 8 degrees of freedom.
The decay of the last pair is isotropic, so chili samples it less well than the propagator mapping when that pair has to pass cuts (690k points for 100k events of e+ e- > w+ w- against 590k).

The rest of the madspace suite fails the same tests as before.

Chili reads x1 and x2 off the final state, which lepton beams do not leave
free. For fixed beams PhaseSpaceMapping handed chili 3n - 4 random numbers
where it takes 3n - 2, and the run crashed, with massless beams too. With a
dressed-lepton density it skipped the split of the luminosity, so 1 - x was
never set and the run crashed as well.

ChiliMapping(fixed_beams=True) generates the first n - 2 momenta as chili
does and the last two as the two-body decay of Q = P - sum p_i in the rest
frame of Q, from 3n - 4 random numbers. The rapidity of a particle runs up
to its largest energy, reached with the others at their least mass, so a
heavy particle among the first n - 2 keeps all of its phase space. The
inverse reads the rapidity off as sign(pz) log((E + |pz|) / mT), which
keeps its precision far forward.

PhaseSpaceMapping takes it for chili with fixed beams. With a dressed-lepton
density the split samples s_hat, x1 and x2 as for the other modes, and chili
builds the final state for fixed beams at sqrt(s_hat) in the partonic
frame, without the rapidity bounds of the cuts, which hold in the lab. In
both cases the mapping builds the beams itself, on their mass shells if
they are massive.

The first n - 1 momenta of hadronic chili move into chili_head_forward and
chili_head_inverse with the same operations, and its output is bitwise the
same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ud6YhkZXK3uDs1Z3nwdTi1
@ramonpeter
ramonpeter merged commit cc80040 into massive Nov 23, 2026
71 of 72 checks passed
@ramonpeter
ramonpeter deleted the lepton-chili branch November 23, 2026 10:22
@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.

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