Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
258 commits
Select commit Hold shift + click to select a range
a5e3b6a
madevent crossing #6/#7: make partition_crossing_classes per-flavor
oliviermattelaer Jul 22, 2026
d7bed92
madevent crossing M0 fix: NFLAV must be iden (max_flavor), not masks
oliviermattelaer Jul 22, 2026
262042f
madevent crossing #6/#7: per-flavor auto_dsig routing to a shared bas…
oliviermattelaer Jul 22, 2026
5411452
madevent crossing: helicity recycling + router (drop the merged-group…
oliviermattelaer Jul 22, 2026
685b2fa
madevent crossing: madevent now accepts crossing (update the gate test)
oliviermattelaer Jul 22, 2026
f0cf84c
madevent crossing: fix router LHE colour flow (COLMAP)
oliviermattelaer Jul 22, 2026
b7a1cc7
madevent crossing: block beam polarisation + EVA under crossing
oliviermattelaer Jul 22, 2026
bed7fd6
madevent crossing Track B: cross-group ME reuse via symlink (lepton/p…
oliviermattelaer Jul 22, 2026
d390d9a
madevent crossing Track B: share the base .o + parallel build of all …
oliviermattelaer Jul 22, 2026
a2c0a0c
madevent crossing Track B: event helicity (+colour) remap for cross-g…
oliviermattelaer Jul 22, 2026
e1a456a
madevent crossing Track B: share the optim too via a union good-hel
oliviermattelaer Jul 22, 2026
ab2ed1c
madevent crossing Track B: tag 'crossing' limitation for cross-group too
oliviermattelaer Jul 22, 2026
523f888
madevent crossing Track B: CONFIGMAP for the multi-channel channel
oliviermattelaer Jul 22, 2026
2184a7b
madevent crossing: degate cross-group sharing for hadronic p p
oliviermattelaer Jul 22, 2026
4ec2ae7
aloha: drop the T-channel (spacelike) propagator width at runtime
oliviermattelaer Jul 23, 2026
d0fae02
madevent cross-group crossing (Track B): fix colour selection and hel…
oliviermattelaer Jul 23, 2026
5a09d7a
madevent crossing: fix crossed-leg event helicity label (drop the ext…
oliviermattelaer Jul 23, 2026
2b22dd5
standalone helicity: replace the NHEL table with a canonical encoder/…
oliviermattelaer Jul 23, 2026
9d23414
madevent crossing: get_nhel decoder + runtime crossed-helicity encode
oliviermattelaer Jul 24, 2026
562abbb
test: madevent crossed W+ helicity asymmetry (p p > w+ j) regression
oliviermattelaer Jul 24, 2026
ba11fe7
colour: canonical colour-flow code (generator + injectivity test)
oliviermattelaer Jul 24, 2026
23ae101
colour: decoder for the canonical colour-flow code + round-trip test
oliviermattelaer Jul 24, 2026
f75fff4
test: LHE colour-flow structure + ratio for p p > t t~
oliviermattelaer Jul 24, 2026
d35498a
test: use u u~ > u u~ for the LHE colour-flow guard (strongly asymmet…
oliviermattelaer Jul 24, 2026
1f3cbbb
madevent crossing: route the router's colour translation through the …
oliviermattelaer Jul 24, 2026
48b360e
madevent: rebuild event colour tags from the canonical code, drop the…
oliviermattelaer Jul 24, 2026
4b59d3b
mg7: emit the canonical colour-flow code into subprocesses.json
oliviermattelaer Jul 24, 2026
62f3ffb
madmatrix: bake the colour-flow code into coloramps.h
oliviermattelaer Jul 24, 2026
5ead1b3
Merge remote-tracking branch 'origin/main' into claude/fortran-cross-…
oliviermattelaer Jul 24, 2026
8b7512d
crossing: unify the good-helicity remap on a runtime encode (drop the…
oliviermattelaer Jul 25, 2026
d424f1e
crossing: record crossed subprocesses as metadata instead of dropping…
oliviermattelaer Jul 25, 2026
36f74a1
crossing (standalone): fold crossed subprocesses into the base direct…
oliviermattelaer Jul 25, 2026
d3db049
crossing (madevent/grouped): reconstruct crossed subprocesses from me…
oliviermattelaer Jul 25, 2026
88b5c83
crossing: make merge_crossing='record' the default (standalone folds …
oliviermattelaer Jul 25, 2026
a7c766c
test: partition test generates unmerged (merge_crossing='record' is n…
oliviermattelaer Jul 25, 2026
c539500
crossing (check_sa): demo only the folded subprocesses, at their stan…
oliviermattelaer Jul 25, 2026
6e683be
crossing (standalone_cpp): drop the ghremap table for a runtime good-…
oliviermattelaer Jul 26, 2026
1eb6ec7
crossing (standalone_mg7): crossed-event selected helicity code [UNVA…
oliviermattelaer Jul 26, 2026
4663f18
crossing (standalone_mg7): per-lane helicity — drop the good-hel unio…
oliviermattelaer Jul 26, 2026
66e3ae0
check crossing (standalone_mg7): add --precision (f/m/d) build option
oliviermattelaer Jul 26, 2026
901eae7
crossing (standalone_mg7): fold crossed subprocesses into the base di…
oliviermattelaer Jul 26, 2026
9b8772b
crossing (standalone_mg7): check_sa demos the folded crossings at the…
oliviermattelaer Jul 26, 2026
7ca8de3
crossing (standalone): compute the crossed denominator at runtime, dr…
oliviermattelaer Jul 26, 2026
cfae5ff
crossing (standalone_mg7): zero an invalid crossing's ME instead of m…
oliviermattelaer Jul 26, 2026
879764b
crossing (standalone_cpp + standalone_mg7): decode the crossing at ru…
oliviermattelaer Jul 26, 2026
35706c9
zerowidth_external: drop the width of an external particle's internal…
oliviermattelaer Jul 27, 2026
b8c086f
goodhel (standalone): C-parity de-duplication of the helicity sum
oliviermattelaer Jul 27, 2026
9727872
Switcher interface update
oliviermattelaer Jul 27, 2026
1184f5a
goodhel (standalone_cpp): C-parity de-duplication of the helicity sum
oliviermattelaer Jul 27, 2026
b0d0fd4
goodhel (madevent): C-parity de-duplication of the init full-sum loop
oliviermattelaer Jul 27, 2026
1af4acf
goodhel (standalone_mg7): C-parity de-duplication of the helicity sum
oliviermattelaer Jul 27, 2026
c3f49fb
goodhel (madevent group): C-parity de-duplication of the init full-su…
oliviermattelaer Jul 27, 2026
6e2e1de
goodhel (madevent recycling): C-parity amplitude-drop in matrix<i>_op…
oliviermattelaer Jul 27, 2026
b7cf9aa
Merge branch 'main' into claude/fortran-cross-symmetry-3f13f3
oliviermattelaer Jul 27, 2026
8dd6dc7
update ALOHA IOTest goldens for the T-channel runtime width drop
oliviermattelaer Jul 27, 2026
6bbab77
tests(aloha): materialize reduced-expression temporaries in globals (…
oliviermattelaer Jul 27, 2026
299f6aa
crossing: fix _build_flav_pdg_tables IndexError on decay chains
oliviermattelaer Jul 27, 2026
952d727
zerowidth_external: keep the width on decay-chain resonances
oliviermattelaer Jul 27, 2026
9bcdc0a
crossing (decay chains): build tables over decay leaves, exempt the I…
oliviermattelaer Jul 27, 2026
f1a7472
tests(export_v4): update test_header + test_generate_helas_diagrams f…
oliviermattelaer Jul 27, 2026
5c9563c
tests(consistency): unblock crossing + compare 4 backends per flavor
oliviermattelaer Jul 28, 2026
808b29a
crossing (decay chains): inherit and apply production crossings
oliviermattelaer Jul 28, 2026
d2b0831
tests: madevent decay-chain crossing xsec regression
oliviermattelaer Jul 28, 2026
2849a38
madevent: skip redundant hel recycling of Track B symlinked matrices
oliviermattelaer Jul 28, 2026
bcd5457
tests(flavor): unblock crossing fallout + bump the t-channel-width re…
oliviermattelaer Jul 28, 2026
ad99cac
zerowidth_external: keep the width of off-shell-tagged fields; refres…
oliviermattelaer Jul 28, 2026
f72bebe
tests(density_mode): refresh the reference density matrices + observa…
oliviermattelaer Jul 28, 2026
89425f0
madspin: generate the decay matrix element with --use_crossing=False
oliviermattelaer Jul 28, 2026
69e5b95
madspin/mg7: fix parallel build race on aloha_object/model_object F90…
oliviermattelaer Jul 28, 2026
6dcfedd
tests(decay-chain/grouping): unblock crossing guard + refresh ALOHA g…
oliviermattelaer Jul 28, 2026
d915ff8
tests: register zerowidth_external default + unblock polarized-decay …
oliviermattelaer Jul 28, 2026
1003dc9
crossing: never cross perturbative processes; robust decay/reweight/l…
oliviermattelaer Jul 29, 2026
a9464af
fix test_mass_reweighting: refresh reference for crossing-aware tree-…
oliviermattelaer Jul 29, 2026
9dc63b2
MadSpin: consume folded crossed subprocesses in the onshell/density path
oliviermattelaer Jul 29, 2026
ca08083
tests(parallel): refresh ALOHA python goldens + short-xsec reference …
oliviermattelaer Jul 29, 2026
2ae2f5d
gauge test: treat the propagator width consistently across schemes/ga…
oliviermattelaer Jul 29, 2026
6667a9f
MadSpin: make single-top t-channel work with crossing across all spin…
oliviermattelaer Jul 29, 2026
ad6daaa
tests(decay-comparator): unblock crossing guard on the decay generations
oliviermattelaer Jul 29, 2026
233ce84
fix FD gauge link failure for massive-lepton Goldstone-Yukawa (FFVx_F…
oliviermattelaer Jul 29, 2026
6cfa00e
tests(mlm-reweight)+reweight: unblock crossing guard; fix --use_cross…
oliviermattelaer Jul 29, 2026
d19891c
crossing: expand folded crossings automatically instead of demanding …
oliviermattelaer Jul 29, 2026
2d89c93
goodhel (C-parity): make the de-duplication all-or-nothing and persis…
oliviermattelaer Jul 29, 2026
ae26087
reweight: read folded crossed subprocesses instead of unfolding them
oliviermattelaer Jul 30, 2026
e2be559
crossing: reject codes that name no crossing, in the decoder
oliviermattelaer Jul 30, 2026
be59140
crossing: bake a Track-A crossing base's optim over every helicity co…
oliviermattelaer Jul 30, 2026
e826041
crossing: weight a routed call with the dependent's multi-channel row
oliviermattelaer Jul 30, 2026
bf880b3
crossing: give a cross-group routed call the dependent's multi-channe…
oliviermattelaer Jul 30, 2026
86a7992
reweight: convert NEGATIVE merged-particle labels to physical PDGs
oliviermattelaer Jul 30, 2026
223bb34
tests(density_mode): drop the shadowed duplicate test_density_mode_us…
oliviermattelaer Jul 30, 2026
9b8d4fb
check_flavor: test merged-particle membership through abs() on every leg
oliviermattelaer Jul 30, 2026
7751cee
reweight(density): write the canonical average density matrix in mult…
oliviermattelaer Jul 30, 2026
7f7639f
crossing: keep the multi-channel row kwarg out of an exporter that ne…
oliviermattelaer Jul 30, 2026
0b07679
reweight: skip the non-PDG id_to_path keys when looking for a crossing
oliviermattelaer Jul 30, 2026
354c0b4
madmatrix: report the lane's own good-helicity row in allselhel
oliviermattelaer Jul 30, 2026
80a2306
madmatrix: encode a crossed event's helicity in the cHel state order
oliviermattelaer Jul 30, 2026
87dca11
ci: bind the crossing-symmetry tests to CI jobs
oliviermattelaer Jul 30, 2026
21e8d0e
tests: inclusive crossing xsec regression on p p > t t~ j j
oliviermattelaer Jul 30, 2026
9d644bf
tests: C-parity good-helicity de-duplication regression
oliviermattelaer Jul 30, 2026
88bf7fd
tests(mlm-reweight): drop the stale crossing comment
oliviermattelaer Jul 30, 2026
c845eb6
crossing: match config-map diagrams on the propagator particle too
oliviermattelaer Jul 31, 2026
16b5743
crossing: routers reselect the colour flow with their own mask
oliviermattelaer Aug 1, 2026
c9cb0a4
crossing: name the flavor class, not the ordinal, in the crossed PDG …
oliviermattelaer Jul 30, 2026
1aa4aaf
crossing: name the modules a final-leg split could free
oliviermattelaer Jul 31, 2026
279b617
flavor: let a matrix element be told which flavors are not its own
oliviermattelaer Jul 31, 2026
53705b1
flavor: carry the exclusion on the process, not the matrix element
oliviermattelaer Jul 31, 2026
14c467f
crossing: peel the flavor class a crossing reaches leg-swapped
oliviermattelaer Aug 1, 2026
73b1aea
crossing: filter a crossing base's optim on the good-hel union, not o…
oliviermattelaer Aug 2, 2026
fcd8218
optimise pure gluon amplitudes by unrolling the 4-gluon vertex
oliviermattelaer Aug 4, 2026
5c9cdb3
record why the quartic currents cannot be summed as they stand
oliviermattelaer Aug 4, 2026
1c1722a
drop the auxiliary line generation, keep the diagram set intact
oliviermattelaer Aug 4, 2026
98d288f
add reroot_diagram, turning a diagram around its final vertex
oliviermattelaer Aug 4, 2026
3b3ed9e
add the plan for the pure gluon amplitude optimisation
oliviermattelaer Aug 4, 2026
25fc6d1
enforce the seed rule inside diagram generation
oliviermattelaer Aug 4, 2026
7da06ba
reconstruct the full diagram set by unrolling the seed
oliviermattelaer Aug 4, 2026
0ad9327
leave the seed rule off for decay chains
oliviermattelaer Aug 5, 2026
18fa381
record what steps 1-5 measured, and why the current sum is blocked
oliviermattelaer Aug 5, 2026
8e634cf
sum the quartic current into the cubic one instead of the amplitude
oliviermattelaer Aug 5, 2026
d8f21b6
record that the current sum lands at the amplitudes
oliviermattelaer Aug 5, 2026
bfbf910
measure what the second substitution would really be worth
oliviermattelaer Aug 5, 2026
29b0c67
carry the current sum into madevent
oliviermattelaer Aug 5, 2026
06ad287
record the madevent port and what it does to AMP2
oliviermattelaer Aug 5, 2026
ceba0c4
measure the integration both ways: no effect either side
oliviermattelaer Aug 5, 2026
e93dfa1
carry the current sum into madmatrix
oliviermattelaer Aug 5, 2026
1ae5c34
record the madmatrix port and the slot cost it exposes
oliviermattelaer Aug 5, 2026
5b421bc
recycle the slots the current sums take
oliviermattelaer Aug 5, 2026
5210b17
record the slot recycling and what is left for madmatrix
oliviermattelaer Aug 5, 2026
34486c0
measure memory and speed for g g > N g, N=2..5, in both backends
oliviermattelaer Aug 5, 2026
fefb115
drop the unit test output that got committed by mistake
oliviermattelaer Aug 5, 2026
7c446c2
measure what the diagram order is worth, and why it is not shipped yet
oliviermattelaer Aug 5, 2026
cd18597
add the madmatrix seven gluon row
oliviermattelaer Aug 5, 2026
65c457f
check the colour structure when pairing a quartic current with a cubi…
oliviermattelaer Aug 5, 2026
2c34b7c
find why the reordering breaks madmatrix: an antisymmetric current me…
oliviermattelaer Aug 5, 2026
d80a7a0
table the memory and speed across the three states of the branch
oliviermattelaer Aug 5, 2026
c5624c1
build the unrolled vertices with their legs in a canonical order, and…
oliviermattelaer Aug 5, 2026
473d04f
update the tables for the canonical leg order and the reordering
oliviermattelaer Aug 5, 2026
4be9871
search the diagram order for the slot count, and keep the simple one
oliviermattelaer Aug 5, 2026
5e5d7b3
turn the four gluon switch into a set option, and add the slots mode
oliviermattelaer Aug 5, 2026
2f8aeaa
exploit index-permutation symmetry in the color basis and color matrix
oliviermattelaer Aug 5, 2026
7f50f03
let each output pick the diagram order, from the me exporter
oliviermattelaer Aug 5, 2026
b4aecfd
record why auto cannot be the default yet: it breaks fks
oliviermattelaer Aug 5, 2026
5a2bb1d
make the four gluon merging safe for NLO, and keep it opt-in
oliviermattelaer Aug 5, 2026
dab4a8d
index the JAMP matrix instead of scanning every column of it
oliviermattelaer Aug 6, 2026
15cb14e
record the scan for a fourth consumer, and what it bounds
oliviermattelaer Aug 6, 2026
0911a2d
build the powers of Nc in the JAMP coefficients once per power
oliviermattelaer Aug 6, 2026
db46ee2
crossing: the recycled optim's union is the SIGN map, not the GHREMAP…
oliviermattelaer Aug 6, 2026
390c493
encode the color matrix by one line per orbit, and split the contract…
oliviermattelaer Aug 6, 2026
b66e13e
look for the JAMP sub-expressions by orbits of the color basis symmetry
oliviermattelaer Aug 6, 2026
bb8b465
carry the color flow factors as powers of i, not as signs
oliviermattelaer Aug 6, 2026
e4f76be
write the color flow definitions out as tables, keeping the orbit opt…
oliviermattelaer Aug 6, 2026
d21bdad
finish the color flow optimisation with the plain scan
oliviermattelaer Aug 6, 2026
7c659b5
keep whichever of the two optimisations is the shorter, on small proc…
oliviermattelaer Aug 6, 2026
d253574
use the orbit equivariant optimisation for madevent too
oliviermattelaer Aug 6, 2026
c840ec0
read the amplitudes into a buffer so madevent can use the tables too
oliviermattelaer Aug 6, 2026
018e56b
find the reversal symmetry of the color basis and fold the color matr…
oliviermattelaer Aug 6, 2026
04ce4e0
sum |M|^2 over one color flow per reversal pair
oliviermattelaer Aug 6, 2026
48ab222
work out one color flow per reversal pair and copy the other
oliviermattelaer Aug 6, 2026
e965843
Revert "work out one color flow per reversal pair and copy the other"
oliviermattelaer Aug 6, 2026
386a3ff
fold the color matrix only where the template sums over the pairs
oliviermattelaer Aug 6, 2026
d26858b
carry the folded color sum in the madevent templates, switched off
oliviermattelaer Aug 6, 2026
10a1dad
gather the folded color flows without opening a block
oliviermattelaer Aug 7, 2026
9fe3443
sum |M|^2 with real arithmetic
oliviermattelaer Aug 7, 2026
ee8a18b
refresh the madevent references for the folded color sum
oliviermattelaer Aug 7, 2026
b7291d7
Revert "sum |M|^2 with real arithmetic"
oliviermattelaer Aug 7, 2026
58879ec
walk whole numbers when every coefficient shares its power of i
oliviermattelaer Aug 7, 2026
990cd7f
sum the color for every helicity at once, through BLAS
oliviermattelaer Aug 7, 2026
b33129e
leave the helicity guard alone when BLAS is off
oliviermattelaer Aug 7, 2026
6be84b4
drop the INIT_CF call that belongs to another session
oliviermattelaer Aug 7, 2026
2b26e0e
give madevent the common block its color matrix is rebuilt into
oliviermattelaer Aug 7, 2026
49aa8a3
Merge branch 'claude/colour-reflection' into claude/gracious-moser-25…
oliviermattelaer Aug 7, 2026
c99a102
put the stored IOTest references back
oliviermattelaer Aug 7, 2026
27b7d3a
Merge branch 'claude/madevent-init-cf' into claude/gracious-moser-253876
oliviermattelaer Aug 7, 2026
f889950
regenerate the three stored comparison files
oliviermattelaer Aug 7, 2026
7fd3a33
sum the color of every helicity in one batched BLAS-3 call, for madevent
oliviermattelaer Aug 7, 2026
7614a93
mg7: keep the flavors carried by processes mapped onto one matrix ele…
oliviermattelaer Aug 6, 2026
eca43df
make a failed run fail as a failed run, not as a disagreement
oliviermattelaer Aug 6, 2026
ab161ac
build the (n-2)! Del Duca-Dixon-Maltoni basis for multi-gluon processes
oliviermattelaer Aug 7, 2026
7487ad5
give standalone the same color flow work as madevent
oliviermattelaer Aug 7, 2026
adeb002
Merge branch 'claude/madevent-blas-colour-sum' into claude/dixon-malt…
oliviermattelaer Aug 7, 2026
6f559c3
give madmatrix the DDM color basis and the Kleiss-Kuijf color flows
oliviermattelaer Aug 7, 2026
ed00d1a
fold the madmatrix color sum onto one flow per reversal pair
oliviermattelaer Aug 7, 2026
4ca220c
give the madmatrix color flows the sub-expressions the fortran ones have
oliviermattelaer Aug 7, 2026
332bf68
fix the FPTYPE=f build of the madmatrix check_sa driver
oliviermattelaer Aug 7, 2026
20446e4
send the C++ color sum through a host BLAS
oliviermattelaer Aug 7, 2026
449de54
Merge branch 'claude/competent-haslett-2092a6' into claude/madmatrix-…
oliviermattelaer Aug 7, 2026
e93f684
Merge branch 'claude/madmatrix-cpu-blas' into claude/dixon-maltoni-gl…
oliviermattelaer Aug 7, 2026
4bb8e20
Merge branch 'claude/madmatrix-colour-fold' into claude/dixon-maltoni…
oliviermattelaer Aug 7, 2026
4bdf039
fold the cuBLAS color sum onto one flow per reversal pair
oliviermattelaer Aug 7, 2026
ed9f672
Merge branch 'claude/madmatrix-jamp-cse' into claude/dixon-maltoni-gl…
oliviermattelaer Aug 7, 2026
1852bf7
Merge branch 'claude/cranky-franklin-bc7ec5' into claude/dixon-malton…
oliviermattelaer Aug 7, 2026
cb9756e
Merge branch 'claude/gluon-amplitude-optimization-8706f5' into claude…
oliviermattelaer Aug 7, 2026
d718ce8
share the orbit equivariant color-flow search with the madmatrix backend
oliviermattelaer Aug 7, 2026
84a0d91
Merge branch 'claude/fortran-cross-symmetry-3f13f3' into claude/colou…
oliviermattelaer Aug 7, 2026
35b15c6
take the colour flows of a grouped ME from the flow basis, not the basis
oliviermattelaer Aug 7, 2026
a9aeb99
let the BLAS colour sum honour the C-parity de-duplication
oliviermattelaer Aug 8, 2026
6774d09
never let a helicity-recycled line split inside its own indent
oliviermattelaer Aug 8, 2026
c1dcd22
crossing: build the check_sa demo only when a crossing was folded in
oliviermattelaer Aug 8, 2026
2c2e1a9
ask the bad-amplitude filters with sets, not linear scans
oliviermattelaer Aug 8, 2026
cf683b9
emit the HELAS call sequence as its own chunked, -O0 source files
oliviermattelaer Aug 8, 2026
667fe0c
ask the bad-amplitude filters with sets, not linear scans
oliviermattelaer Aug 8, 2026
1485f7f
keep the amplitude-file split safe against wrapped calls and re-output
oliviermattelaer Aug 8, 2026
c17ec86
default the amplitude files to the global flag, not -O0
oliviermattelaer Aug 8, 2026
b43dd36
memoize compute_flavor_masks: once per matrix element, not four to si…
oliviermattelaer Aug 8, 2026
f78fd43
Merge mainline (claude/nice-haibt-68e760) into the crossing branch
oliviermattelaer Aug 8, 2026
cfa89f6
Merge branch 'claude/getamp-chunked-file' into claude/colour-merge-re…
oliviermattelaer Aug 8, 2026
e72fb13
ask the helicity DAG for the externals it already knows, not for a path
oliviermattelaer Aug 8, 2026
00174f1
stop re-parsing the HELAS line once per object unfolded out of it
oliviermattelaer Aug 8, 2026
bb3d7d4
Merge branch 'claude/helrecycle-dag-memo' into claude/colour-merge-re…
oliviermattelaer Aug 8, 2026
04e57ca
standalone: add --hel_recycling (helicity recycling for the SA output)
oliviermattelaer Jul 31, 2026
a4888f7
hel_recycling: select SMATRIXHEL on the canonical helicity code
oliviermattelaer Jul 31, 2026
f3fc491
hel_recycling: serve crossed FLAV_IDX from a union helicity table
oliviermattelaer Jul 31, 2026
107edc3
hel_recycling: reuse the C-parity partner's |M|^2 instead of recomput…
oliviermattelaer Jul 31, 2026
e37c140
tests: acceptance coverage for the helicity-recycled standalone
oliviermattelaer Jul 31, 2026
fa777cd
hel_recycling: split the recycled helas block into chunked -O0 subrou…
oliviermattelaer Jul 31, 2026
5191b46
hel_recycling: give the recycled standalone the full entry-point API
oliviermattelaer Jul 31, 2026
294c5bc
hel_recycle: say which chunker belongs to which backend
oliviermattelaer Aug 8, 2026
e471720
hel_recycling: dimension AMP and declare the color-flow tables like G…
oliviermattelaer Aug 8, 2026
aab7dc3
hel_recycling: fill the color matrix in the recycled files
oliviermattelaer Aug 8, 2026
902a6bc
hel_recycling: let the recycled amplitude file follow the global flag
oliviermattelaer Aug 8, 2026
8b087e3
hel_recycling: spread the recycled chunks over one file per core
oliviermattelaer Aug 8, 2026
4d2b4b9
hel_recycling: allocate the helicity-major AMP instead of linking it in
oliviermattelaer Aug 8, 2026
9998278
pick a split_amps column group by masking, not by rescanning every am…
oliviermattelaer Aug 8, 2026
92475e8
hel_recycling: hand the recycled colour stage back to the shared rout…
oliviermattelaer Aug 8, 2026
c30770a
Merge the recycled colour stage into the standalone hel_recycling branch
oliviermattelaer Aug 8, 2026
a5c7a17
hel_recycling: gather the amplitudes of a helicity row before the mad…
oliviermattelaer Aug 9, 2026
467862f
mg7: pick the color flow from a mask built on the color flow basis
oliviermattelaer Aug 9, 2026
9f984d9
hel_recycle: never wrap a statement onto a blank physical line
oliviermattelaer Aug 9, 2026
f8bd46c
Merge claude/dixon-maltoni-gluon-basis-69e1d7
oliviermattelaer Aug 9, 2026
feaf337
Guard the authors.md read in EasterEgg.post_banner
oliviermattelaer Aug 10, 2026
51f55cb
crossing: honour --use_crossing on the output line
oliviermattelaer Aug 10, 2026
8d10421
madmatrix: pick the colour flow codes from the flow basis, not the DD…
oliviermattelaer Aug 10, 2026
ebe7bc1
madmatrix: scan only the recorded crossings for good helicities
oliviermattelaer Aug 10, 2026
73ca0f8
matchbox: make the fortran export produce code that compiles again
oliviermattelaer Aug 10, 2026
f8cee43
Merge claude/magical-cohen-d76e19: guard the authors.md read in post_…
oliviermattelaer Aug 10, 2026
f992670
Merge claude/elated-booth-286080: honour --use_crossing on the output…
oliviermattelaer Aug 10, 2026
91b42a6
Merge claude/compassionate-mendel-99312a
oliviermattelaer Aug 10, 2026
2941d85
matchbox: thread the flavor index through the split-orders template
oliviermattelaer Aug 10, 2026
2822859
matchbox: make the drivers written next to matrix.f link against it
oliviermattelaer Aug 10, 2026
8ea9e6a
fix the madmatrix OpenMP build: complete the sigmaKin shared() clause
oliviermattelaer Aug 10, 2026
ed1efde
fks: write the color matrix out in full, the templates cannot read it…
oliviermattelaer Aug 10, 2026
83b9f2f
madmatrix: halve the C-parity good-helicity list instead of skipping …
oliviermattelaer Aug 10, 2026
d6c00b1
C-parity dedup: require the pair mismatch to be significant, not just…
oliviermattelaer Aug 10, 2026
660f53f
madmatrix: C-parity de-duplication for the CROSSED path too
oliviermattelaer Aug 10, 2026
92088eb
Merge claude/zen-kilby-daf621: fix the madmatrix OpenMP sigmaKin shar…
oliviermattelaer Aug 10, 2026
3d8320f
refuse loop-induced output for the formats with no MadLoop backend
oliviermattelaer Aug 10, 2026
d408a0d
Merge branch 'claude/jovial-blackwell-30340e' into claude/stoic-noyce…
oliviermattelaer Aug 10, 2026
2cc0d1f
Merge branch 'claude/goofy-mccarthy-7d4171' into claude/stoic-noyce-1…
oliviermattelaer Aug 10, 2026
366ce2c
Merge claude/csym-crossed: C-parity helicity de-duplication in madmat…
oliviermattelaer Aug 10, 2026
045f2d0
madmatrix OpenMP: share cNGoodMaxCross on the crossing path
oliviermattelaer Aug 10, 2026
921b203
Merge the moved crossing tip into claude/colour-merge-retime
oliviermattelaer Aug 10, 2026
c63a990
check crossing: build matrix2py.so on macOS, and stop a failed build …
oliviermattelaer Aug 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions .github/workflows/acceptancetest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1389,3 +1389,101 @@ jobs:
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_density_mode_vs_standalone_LI1 -pA -t0 -l INFO



# ---------------------------------------------------------------------------
# Crossing symmetry (tests/acceptance_tests/test_standalone_cross_symmetry.py)
#
# Split by toolchain and cost. NOTE: test_manager.py exits 1 when a test is
# SKIPPED (not only when it fails), and the crossing tests self-skip when
# gfortran / f2py / g++ are missing -- so the toolchain steps below are not
# optional, they are what keeps these jobs green.
# ---------------------------------------------------------------------------
acceptancetest_crossing_static:
# The parts that only inspect generated code / python objects: the crossing
# partition of a multi-flavor process, the multi-channel config map that
# pairs a routed subprocess's channels with the base's diagrams, the
# canonical colour-flow code, and the outputs that cannot decode a crossing
# (they get the folded crossings expanded back instead). No compilation, so
# this is the fast smoke test.
#
# TestCrossingConfigMap earns its place here rather than in an integration
# job because what it guards is invisible downstream: a mis-paired config map
# leaves every matrix element and the cross section itself correct, and only
# degrades the multi-channel sampling, so no xsec comparison catches it
# reliably -- it shows up as a slow, unstable integration behind an error
# estimate that no longer means anything.
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache

- name: crossing partition / config map / colour-flow code / unsupported outputs
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestCrossingPartition TestCrossingConfigMap TestColorFlowCode TestCrossingUnsupportedOutput -t0 -l INFO


acceptancetest_crossing_fortran:
# The fortran standalone reference suite: a crossed SMATRIX call must
# reproduce the process it crosses into (2->2 and 2->3, every merged flavor,
# split orders), the density matrix must follow the crossing, an s-channel
# constraint must disable the machinery, and the good-helicity sets must obey
# the crossing's row permutation. TestGoodHelCParityDedup rides along (same
# backend, ~10s): the C-parity de-duplication of the helicity sum must hold
# where it engages and refuse itself where the pairs do not match.
# Needs gfortran AND f2py (restore-pip-cache provides meson/ninja and sets
# f2py_compiler); the f2py-backed tests skip without it, which fails the job.
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache

- name: crossing symmetry + C-parity good-helicity dedup, fortran standalone
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestStandaloneCrossSymmetry TestGoodHelCParityDedup -t0 -l INFO


acceptancetest_crossing_cpp:
# The two C++ backends (standalone_cpp and standalone_mg7/madmatrix, incl.
# the per-event mixed-crossing SIMD page) plus the `check crossing`
# subcommand end to end over all three exporters.
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache

- name: crossing symmetry, C++ / madmatrix backends and `check crossing`
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestStandaloneCppCrossSymmetry TestStandaloneMg7CrossSymmetry TestCheckCrossingCommand -t0 -l INFO


acceptancetest_standalone_mg7_openmp:
# The CPU sigmaKin loop of the madmatrix backend is an
# 'omp parallel for default( none )', so every variable it uses must be
# listed in its shared() clause or the generated CPPProcess.cc does not
# compile at all. Three of them were missing. Nothing noticed, because no
# build ever turns OpenMP on: it is opt-in (USEOPENMP=1, #758) and
# madmatrix.mk force-disables it on Darwin. This job compiles the generated
# file with OpenMP explicitly, so the shared() clause stays complete.
# Needs only a C++ compiler (no madspace, no heptools).
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache

- name: test one of the test test_standalone_mg7_openmp
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_standalone_mg7_openmp -pA -t0 -l INFO
91 changes: 91 additions & 0 deletions .github/workflows/acceptancetest_madevent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -996,3 +996,94 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_madevent_mssm_gogo -pA -t0 -l INFO


# ---------------------------------------------------------------------------
# Crossing symmetry, madevent end-to-end. Each of these runs one or more full
# (small) madevent generations, hence one job apiece.
# ---------------------------------------------------------------------------
acceptancetest_crossing_madevent_labels:
# The event LABELS a crossed subprocess writes to the LHE: the W+ helicity of
# p p > w+ j (the crossed leg is a massive vector, so a bad relabel scrambles
# it), the colour flow of u u~ > u u~ (98/2 asymmetric, so a swapped flow
# label is detectable), and the colour flow a within-group router CHOOSES
# (which mask it selects with, not just which label it writes).
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache

- name: crossed helicity and colour-flow labels written to the LHE
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestMadeventCrossingHelicity TestMadeventColorFlowRatio -t0 -l INFO

# Separate step (and ~4 minutes of its own): a within-group router must
# RESELECT the colour flow with its own colour-config mask rather than
# relabel the one its base picked. Only an event-level comparison sees
# this -- the cross section agreed to 0.02% while ~10% of the affected
# flavour class carried a flow the --use_crossing=False build never picks
# -- so this integrates the process twice and compares the colour-topology
# distribution class by class.
- name: within-group router colour selection
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestMadeventRouterColorSelection -t0 -l INFO


acceptancetest_crossing_madevent_xsec:
# The cross-section-level guards on the crossing router: each process is
# integrated twice (crossing-routed vs --use_crossing=False, same seed) and
# the two results must agree.
# p p > w+ j, w+ > j j decay chain riding on a crossed production
# p p > t t~ j j inclusive, and the only test that integrates the
# cross-GROUP (Track B) router
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache

- name: crossing cross-section regressions (decay chain + inclusive)
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestMadeventDecayChainCrossing TestMadeventInclusiveCrossingXsec -t0 -l INFO


acceptancetest_crossing_reweight:
# The folded-subprocess layout of the default (crossing on) standalone output,
# and the reweighting of a sample whose events sit in a grouped subprocess
# where every merged leg is an anti-particle (the -81 label regression).
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache

- name: folded subprocesses + merged anti-particle labels in reweight
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_standalone_crossing_folds_qqx_subprocess test_reweight_merged_antiparticle_labels -pA -t0 -l INFO


acceptancetest_density_multicore:
# do_reweight splits the event file across jobs in multicore mode; each job
# writes the average density matrix of its own chunk and the mother interface
# has to recombine them into the canonical Average_density_matrix_*.txt.
# Generates 3000 events (> nevt_job) so the file is really split, then
# reweights twice (1 core vs 2) -- the slowest of the new jobs.
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache

- name: test one of the test test_density_mode_multicore
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_density_mode_multicore -pA -t0 -l INFO
22 changes: 22 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -733,3 +733,25 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_generate_ewsud_ttbar test_generate_ewsud_ww test_generate_ewsud_zz -t0


unittest_34:
# Unit tests added with the crossing-symmetry feature:
# tests/unit_tests/interface/test_reweight_density.py
# (TestAverageDensityMatrix: the average-density-matrix helpers shared by
# DensityInterface and CommonRunCmd.do_reweight's multicore recombination)
# tests/unit_tests/various/test_reweight_interface.py
# (TestPdgForMeCall: merged-particle labels, both signs, resolved to the
# event's concrete PDGs before the fortran call)
# Pure python, no toolchain: the whole job is a couple of seconds.
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true

steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/restore-pip-cache

- name: reweight density / merged-label unit tests
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py TestAverageDensityMatrix TestPdgForMeCall -t0
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ nsqso_born.inc
docs/build/
tests/input_files/IOTestsComparison_BackUp/
tests/input_files/IOTestsComparison/**/*.BackUp

# output of ./tests/test_manager.py
UNITTEST_proc/
102 changes: 87 additions & 15 deletions MadSpin/decay.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,30 @@
logger = logging.getLogger('decay.stdout') # -> stdout
logger_stderr = logging.getLogger('decay.stderr') # ->stderr

import contextlib

@contextlib.contextmanager
def _no_merge_crossing():
"""Temporarily disable crossing-symmetry folding (merge_crossing='record')
for the enclosed MG5 generation.

MadSpin's legacy full_decay_chain (madspin_v1) and onshell_v1 paths evaluate
the production matrix element through a PDG-dispatch interface (the
standalone_msP fortran driver / smatrixhel) that cannot reach a crossing-
folded subprocess, so their generation must keep every subprocess on its own
(as before the crossing feature). The density path is crossing-aware and
keeps crossing on. MG_MERGE_CROSSING=off is the documented escape hatch
(see madgraph_interface.do_add)."""
saved = os.environ.get('MG_MERGE_CROSSING')
os.environ['MG_MERGE_CROSSING'] = 'off'
try:
yield
finally:
if saved is None:
os.environ.pop('MG_MERGE_CROSSING', None)
else:
os.environ['MG_MERGE_CROSSING'] = saved

import random
import math
from madgraph import MG5DIR, MadGraph5Error
Expand Down Expand Up @@ -3097,11 +3121,12 @@ def generate_all_matrix_element(self):

commandline = commandline.replace('add process', 'generate',1)
logger.info(commandline)

mgcmd.exec_cmd(commandline, precmd=True)

with _no_merge_crossing():
mgcmd.exec_cmd(commandline, precmd=True)
commandline = 'output standalone_msP %s %s' % \
(pjoin(path_me,'production_me'), ' '.join(list(self.list_branches.keys())))
mgcmd.exec_cmd(commandline, precmd=True)
(pjoin(path_me,'production_me'), ' '.join(list(self.list_branches.keys())))
mgcmd.exec_cmd(commandline, precmd=True)
logger.info('Done %.4g' % (time.time()-start))

# 3. Create all_ME + topology objects ----------------------------------
Expand Down Expand Up @@ -3181,7 +3206,8 @@ def generate_all_matrix_element(self):
commandline += self.get_proc_with_decay(proc, one_decay, mgcmd._curr_model, self.options)
commandline = commandline.replace('add process', 'generate',1)
logger.info(commandline)
mgcmd.exec_cmd(commandline, precmd=True)
with _no_merge_crossing():
mgcmd.exec_cmd(commandline, precmd=True)
# remove decay with 0 branching ratio.
mgcmd.remove_pointless_decay(self.banner.param_card)
commandline = 'output standalone_msF %s %s' % (pjoin(path_me,'full_me'),
Expand Down Expand Up @@ -5123,7 +5149,17 @@ def generate_all_matrix_element(self):

commandline = commandline.replace('add process', 'generate',1)
mgcmd = self.mgcmd
mgcmd.exec_cmd(commandline, precmd=True)
# The legacy onshell_v1 path (mode=='onshell') evaluates the production
# ME through smatrixhel, which dispatches on concrete PDGs and returns 0
# for a crossing-folded subprocess (-> production_me==0 -> ZeroDivision).
# Keep every subprocess on its own for it, exactly like full_decay_chain.
# The density path (mode=='density') is crossing-aware (GET_DENSITY_IDX
# via _resolve_crossed) and keeps crossing on.
if self.mode == 'onshell':
with _no_merge_crossing():
mgcmd.exec_cmd(commandline, precmd=True)
else:
mgcmd.exec_cmd(commandline, precmd=True)
# remove decay with 0 branching ratio.
#mgcmd.remove_pointless_decay(self.banner.param_card)
#
Expand All @@ -5135,16 +5171,52 @@ def generate_all_matrix_element(self):
# store information about matrix element
for matrix_element in mgcmd._curr_matrix_elements.get_matrix_elements():
me_string = matrix_element.get('processes')[0].shell_string()
for me in matrix_element.get('processes'):
dirpath = pjoin(path_me, ms_me_subdir, 'SubProcesses', "P%s" % me_string)
# get the orignal order:
initial = []
final = [l.get('id') for l in me.get_legs_with_decays()\
if l.get('state') or initial.append(l.get('id'))]

def register(leg_ids, _pdir="P%s" % me_string):
# ``leg_ids`` is the ordered list of external PDG ids (initial
# then final, in leg order). Build the (sorted) lookup tag and
# keep the natural leg order for momentum extraction. A base
# process always wins over a crossed one, so never overwrite.
initial = [i for i, l in zip(leg_ids, order_state) if not l]
final = [i for i, l in zip(leg_ids, order_state) if l]
order = (tuple(initial), tuple(final))
initial.sort(), final.sort()
tag = (tuple(initial), tuple(final))
self.all_me[tag] = {'pdir': "P%s" % me_string, 'order': order}
tag = (tuple(sorted(initial)), tuple(sorted(final)))
self.all_me.setdefault(tag, {'pdir': _pdir, 'order': order})

for me in matrix_element.get('processes'):
legs = me.get_legs_with_decays()
order_state = [l.get('state') for l in legs]
register([l.get('id') for l in legs])

# Crossed subprocesses folded into this matrix element with crossing
# symmetry on (merge_crossing='record') were NOT generated as their
# own directory: only the representative partner is on disk. Its
# crossing-aware SMATRIX (smatrixhel dispatches on the signed PDGs,
# see interface_madspin.calculate_matrix_element) can still compute
# them, so register each crossed process against the SAME pdir.
# Without this the onshell/density lookup misses e.g. the recorded
# q q~ > t t~ g (partner of the kept q g > t t~ q) and raises
# KeyError. The decays never cross (they ride on their production
# leg), so re-attach the base decay chains before expanding, exactly
# as the exporter does for the check_sa crossing demo.
try:
crossed_processes = matrix_element.get('crossed_processes')
except Exception:
crossed_processes = []
base_decays = matrix_element.get('processes')[0].get('decay_chains')
for cross_entry in crossed_processes:
proc = cross_entry[0]
if base_decays:
proc = copy.copy(proc)
proc.set('decay_chains', base_decays)
# empty LegList (same class as proc's legs) forces
# get_legs_with_decays to recompute with the re-attached decays
proc.set('legs_with_decays', proc.get('legs').__class__())
legs = proc.get_legs_with_decays()
else:
legs = proc.get('legs')
order_state = [l.get('state') for l in legs]
register([l.get('id') for l in legs])

return self.all_me

Expand Down
Loading
Loading