Repository navigation
mg7: EVA (pdlabel eva) beams, and massive incoming particles on their mass shell - #502
Open
oliviermattelaer wants to merge 8 commits into
Open
oliviermattelaer wants to merge 8 commits into
oliviermattelaer wants to merge 8 commits into
Conversation
The W, Z and photon content of e/mu beams, madevent's pdlabel = eva, now in mg7/madspace: - madspace EvaFlux + eva_density / eva_leg_density kernels: a port of ElectroweakFlux.f and the checks of ElectroweakFluxDriver.f (LLA/LP/NLP, q2/pt evolution, eva_xcut, mu^2 floor, beam polarisation, no density for a charge-violating W). Checked against the compiled Fortran to 1e-12. - The densities depend on the vector boson's helicity. The Integrand uses the helicity sums (flavour prior, pdf1/pdf2); DifferentialCrossSection takes the helicity row the matrix element picked, decodes the two incoming helicities per flavour, maps legs to beams with the mirror index and uses x n f_lambda(x, mu): an unbiased estimate of sum_h f f |M_h|^2. - The incoming W/Z are put on their mass shell with the massive flux 1/(2 sqrt(lambda)), as madevent's genps.f (the mapping hands out massless incoming momenta). - mg7 wiring: [beam] eva, lepton1/2, polarization1/2, eva_order, eva_evolution, eva_xcut; x sampled, no PDF, alpha_s from the param card, M_W/M_Z/e^2 from the loaded library; lepton beams in the LHE <init>; 2 -> 1 allowed; refusals (surrogate, summed interference helicities, MLM/CKKW-L, lepton_density/upc_flux, AmpliCol). The default card of a W/Z-initiated process now has EVA beams instead of monochromatic W/Z. - Run card: set pdlabel eva, lpp +-3/+-4, polbeam1/2, ievo_eva, evaorder, eva_xcut translate, in set and in from_LO. w+ w- > t t~ (e+ e- at 2x15 TeV, mu_F = 91.188) vs madevent: 1.1185(46)e-2 vs 1.118182e-2 pb, eva_xcut=0 2.1952(92)e-2 vs 2.187245e-2, evaorder=1 3.840(15)e-3 vs 3.837e-3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- EVA beams by default whenever both beams carry a W or Z, photons next to them included (madevent's rule; the photon made the card take the proton-PDF branch before). - from_LO: pdlabel = eva covers both beams before pdlabel1/2 follow it. - Refuse an EVA 2 -> 1 below the threshold of its on-shell incoming W/Z (w+ w- > h: madevent fails with a NaN there) and merged subprocesses with different incoming masses. - Unit tests for the default card, set translation, from_LO and the validity checks; docs/source/madevent_to_mg7.rst. Validated against madevent (group_subprocesses false): w+ w- > h h at a 10 TeV muon collider 3.2243(99)e-3 vs 3.241(10)e-3 pb, polbeam1=-80 + NLP + pt evolution 1.9391(63)e-4 vs 1.933(6)e-4; z/a z/a > t t~ 0.05476(18) vs 0.05489(15); w+ w- > h at M_H = 300 0.15636(32) vs 0.1563(2); with MadNIS hh 3.2419(54)e-3 at 45% unweighting efficiency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
madspace's phase-space mappings build the incoming momenta massless and diff_cross_section uses the massless flux 1/(2 s_hat); madevent (genps.f) puts massive incoming particles on their mass shell (mom2cx) with the flux 1/(2 sqrt(lambda(s_hat, m1^2, m2^2))), and for monochromatic beams takes s from the massive beam momenta (stot). w+ w- > t t~ with 2 x 500 GeV W beams was 10% low in mg7. - incoming_on_shell moves to the general kinematics kernels and the Integrand applies it to every massive incoming pair, not only EVA: same sum, directions kept in the pair rest frame, flux ratio s/sqrt(lambda) in the weight, zero below threshold. - MadgraphProcess._massive_beams: e_cm and beam rapidity of monochromatic massive beams from E_i and p_i = sqrt(E_i^2 - m_i^2), so the beams come out exactly as madevent's. mg7 vs madevent (group_subprocesses false): w+ w- > t t~ W beams 2x500 GeV 26.996(73) vs 26.99(7) pb (was 24.228(61)), 400/600 GeV 27.650(73) vs 27.71(6) (was 24.773(61)); mu+ mu- > t t~ (sm-lepton_masses) 0.16626(34) vs 0.1664(1); b b~ > h (13 TeV, mu = 125) 0.6742(20) vs 0.6736(6); EVA w+ w- > t t~ unchanged, 1.1159(47)e-2 vs 1.118182e-2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`set pdlabel <other>`, `set lpp 1` and now `set lpp 0` switch beam.eva off through one helper, which also resets the EVA-only beam polarisations (check_eva_validity refused the card otherwise) and warns when the card stays leptonic: the beams are then monochromatic beams of the incoming particles. `set pdlabel lhapdf` on an EVA card no longer reports "unchanged", and an unknown PDF label no longer switches EVA off before failing. `set polbeam` without EVA warns that the card is invalid until pdlabel eva is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@theoheimel , this is still under dev, but worth that you take a look early due to the helicity requirement on the PDF for this... (and we likely need this for tommorow anyway) |
init_beam now calls _massive_beams for leptonic beams, which reads the incoming masses from subprocess_data. A real MadgraphProcess loads it in load_cards before init_beam; the stub built with object.__new__ did not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Monochromatic beams of massive particles with different incoming masses in different subprocesses: each subprocess gets the s and beam rapidity of its own massive beam momenta (MadgraphProcess.beam_kinematics), as madevent's stot per P directory, instead of the massless 4 E1 E2 for all. * The monochromatic W/Z beam warning is issued once by _massive_beams, not as a side effect of eva_flux() with a flag on the process. * _eva_ew_inputs falls back to the param card only for an unknown parameter name or a missing card entry; other library errors are raised. * One comment for the pdlabel1/2 handling of from_LO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
So @ramonpeter, what do you think? we keep it like this for the moment, or go to massive mapping in madspace? |
Contributor
|
Given that we have feature deadline tomorrow, I will not make it. I started to look into it already |
Contributor
Author
|
But do you agree on this PR or we do report it to v1.1 ? |
Contributor
Author
|
let's pospone it |
richardphysics
approved these changes
Nov 21, 2026
Contributor
|
hi @oliviermattelaer @ramonpeter @theoheimel, apologies for the slow reply! everything looks good on my end |
ramonpeter
pushed a commit
that referenced
this pull request
Nov 23, 2026
Conflicts with gamma-UPC (#503) and the AmpliCol flavour levels, resolved as their union: - run card: beam.eva and beam.upc_flux side by side. A gamma-UPC pdlabel or lpp = 2 switches EVA off, as any other pdlabel does, and check_eva_validity already refuses the two together. - MadgraphProcess: EVA, then gamma-UPC, then the monochromatic massive beams, which a gamma-UPC run (per-nucleon s) is not. - MadgraphSubprocess, AmpliCol: both beam types, each refused by AmpliCol. - Integrand: the EVA checks next to parton_density_output, EvaFlux next to DiscreteFlavorLevels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ud6YhkZXK3uDs1Z3nwdTi1
ramonpeter
added a commit
that referenced
this pull request
Nov 23, 2026
…#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
ramonpeter
added a commit
that referenced
this pull request
Nov 23, 2026
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
Conflicts with gamma-UPC (#503) and the AmpliCol flavour levels, resolved as their union: - run card: beam.eva and beam.upc_flux side by side. A gamma-UPC pdlabel or lpp = 2 switches EVA off, as any other pdlabel does, and check_eva_validity already refuses the two together. - MadgraphProcess: EVA, then gamma-UPC, then the monochromatic massive beams, which a gamma-UPC run (per-nucleon s) is not. - MadgraphSubprocess, AmpliCol: both beam types, each refused by AmpliCol. - Integrand: the EVA checks next to parton_density_output, EvaFlux next to DiscreteFlavorLevels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ud6YhkZXK3uDs1Z3nwdTi1
ramonpeter
force-pushed
the
claude/eva-mg7-helicity-density-50f744
branch
from
November 23, 2026 06:40
bb38f67 to
8832d20
Compare
ramonpeter
added a commit
that referenced
this pull request
Nov 23, 2026
…#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
ramonpeter
added a commit
that referenced
this pull request
Nov 23, 2026
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
…ty-density-50f744
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EVA in mg7/madspace (
pdlabel eva). The W, Z and photon content of e±/μ± beams now works in mg7, matching madevent.ElectroweakFlux.fand the checks inElectroweakFluxDriver.f: LLA, LP and NLP, q² or pT evolution,eva_xcut, the μ² floor, and the fLpol mix. They are inmadspace/src/kernels/eva.hppandEvaFlux/EvaLegTables(phasespace/eva.{hpp,cpp}).DifferentialCrossSectionthen multiplies the helicity-averaged |M|² by n₁ f_λ₁ n₂ f_λ₂, using the neweva_leg_densitykernel. This is an unbiased estimate of Σ f_λ₁ f_λ₂ |M_λ₁λ₂|², the same estimate as madevent'snhel = 1. The helicity-summed density is used only for flavour sampling and for pdf1/pdf2.[beam]keyseva,lepton1/2,polarization1/2,eva_order,eva_evolution,eva_xcut. Thesetcommandspdlabel eva,lpp ±3/±4,polbeam,evaorder,ievo_evaandeva_xcuttranslate to them, and so doesfrom_LO. A process with incoming W/Z gets madevent's EVA setup as its default card.Massive incoming particles on their mass shell (all processes, not only EVA). madspace's mappings build massless incoming momenta and used the flux 1/(2ŝ). madevent (
genps.f) puts massive partons on shell and uses 1/(2√λ(ŝ, m₁², m₂²)).incoming_on_shellkernel (kinematics.hpp) puts every massive incoming pair on shell with the same total momentum. The Integrand multiplies by ŝ/√λ, and points below threshold get zero weight.MadgraphProcess._massive_beamsgives monochromatic massive beams madevent's √s and beam rapidity. The lab momenta come out identical to madevent's.w+ w- > t t~with W beams was 10% low, and EVA W W was 13–15% low.Validation: mg7 vs madevent (CPU,
group_subprocesses falseon the madevent side)w+ w- > t t~, e+e- 2×15 TeV, LLAeva_xcut 0evaorder 1w+ w- > h h, μ+μ− 2×5 TeV, LLAz/a z/a > t t~w+ w- > h, M_H = 300 (2→1)w+ w- > t t~, W beams 2×500 GeVmu+ mu- > t t~, sm-lepton_massesb b~ > h, 13 TeV, μ = 125test_eva_mg7).w+ w- > t t~take madevent 40 s wall on 18 cores and mg7 4 s on 8 threads, at the same precision (about 10× wall-clock).Tests
test_eva_mg7(7 tests) andtest_mg7_massive_incoming(2 tests).test_banner(175 tests),test_mg7.*(323, 1 skipped) andtest_eepdf_lhagrid(34).Not validated
Known limitation
The phase-space mapping itself still builds massless incoming momenta. The t-channel inverse used for the channel weights sees the on-shell momenta, but the channel weights still sum to one at every point, so the result is not biased.
🤖 Generated with Claude Code