Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
7df832b
add chek crossing functionality (with f2py call to fortran)
oliviermattelaer Jul 21, 2026
077c737
Extend crossing symmetry to standalone_cpp/mg7 and add check-crossing…
oliviermattelaer Jul 22, 2026
af7f5d0
Keep crossed subprocesses under --use_crossing=False (restore 3.x com…
oliviermattelaer Jul 22, 2026
0af8317
madevent crossing M0 (slice 1): SMATRIX/MATRIX crossing holes, OFF by…
oliviermattelaer Jul 22, 2026
ce366da
madevent crossing M0 (slice 2): ON path for the group SMATRIX (compil…
oliviermattelaer Jul 22, 2026
85ded67
madevent crossing M0: disable helicity recycling for a crossing output
oliviermattelaer Jul 22, 2026
2d8d1ff
madevent crossing: support helicity recycling (drop the disable)
oliviermattelaer Jul 22, 2026
1fbac01
madevent crossing #6/#7 (piece 1): partition_crossing_classes helper
oliviermattelaer Jul 22, 2026
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
db46ee2
crossing: the recycled optim's union is the SIGN map, not the GHREMAP…
oliviermattelaer Aug 6, 2026
cb9756e
Merge branch 'claude/gluon-amplitude-optimization-8706f5' into claude…
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
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
84a5e6f
crossing: default OFF for every mode, and pin the choice in every test
oliviermattelaer Aug 14, 2026
4692bd4
crossing: make --use_crossing=True able to turn crossing ON again
oliviermattelaer Aug 14, 2026
c213805
test_config: list the two set-options the colour merge added
oliviermattelaer Aug 14, 2026
f54bc1c
helicity: emit the C-parity partner table instead of searching for it
oliviermattelaer Aug 17, 2026
602235d
helicity: define the allowed-code list once per matrix element
oliviermattelaer Aug 17, 2026
665bf55
splitOrders: carry the standalone features that do not need a crossing
oliviermattelaer Aug 17, 2026
1a71f60
crossing: do not fold into a template that cannot decode a crossing
oliviermattelaer Aug 18, 2026
5fc1360
crossing: stop the auto model import from eating --use_crossing
oliviermattelaer Aug 18, 2026
6a55dc0
splitOrders: fold crossings instead of refusing to
oliviermattelaer Aug 18, 2026
af590a2
crossing: a polarized leg breaks crossing symmetry
oliviermattelaer Aug 25, 2026
8cda572
crossing: gate the fortran helicity filter on tau, the map every back…
oliviermattelaer Aug 25, 2026
68d1f16
Merge origin/main into the crossing branch
oliviermattelaer Sep 19, 2026
7005f3d
Merge origin/main (CI bundling, #184) into the crossing branch
oliviermattelaer Sep 19, 2026
cddbdce
CI: restore heptools for the madevent crossing bundle
oliviermattelaer Sep 19, 2026
7e77cde
MadSpin: never cross, even when the proc card asked for it
oliviermattelaer Sep 19, 2026
f69a03d
test_madevent_ufo_aloha: the assembled FFV2_4_3 drops the spacelike w…
oliviermattelaer Sep 19, 2026
04f98f9
test_cmd: restore read_average_density_matrix; gg>gogo Fortran reference
oliviermattelaer Sep 19, 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
58 changes: 58 additions & 0 deletions .github/workflows/acceptancetest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -976,3 +976,61 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_madspin_loop_induced -pA -t0 -l INFO


acceptancetest_crossing_bundle:
# Crossing symmetry (tests/acceptance_tests/test_standalone_cross_symmetry.py)
# and the madmatrix OpenMP build, run one after the other. Each keeps its own
# step, run even when an earlier one failed.
#
# NOTE: test_manager.py exits 1 when a test is SKIPPED, and the crossing
# tests self-skip without gfortran / f2py / g++: restore-pip-cache (meson,
# ninja, f2py_compiler) is what keeps these steps green.
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

# ---- crossing, static ----
# Generated code / python objects only, no compilation: the crossing
# partition, the multi-channel config map (a mis-paired map leaves every
# ME and the cross section correct and only degrades the sampling, so no
# xsec comparison catches it), the colour-flow code, and the outputs
# that cannot decode a crossing.
- name: "crossing: partition / config map / colour-flow code / unsupported outputs"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestCrossingPartition TestCrossingConfigMap TestColorFlowCode TestCrossingUnsupportedOutput -t0 -l INFO

# ---- crossing, fortran standalone ----
# A crossed SMATRIX call must reproduce the process it crosses into, the
# density matrix must follow the crossing, and the C-parity helicity
# de-duplication must hold where it engages and refuse itself elsewhere.
- name: "crossing: fortran standalone + C-parity good-helicity dedup"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestStandaloneCrossSymmetry TestGoodHelCParityDedup -t0 -l INFO

# ---- crossing, madmatrix ----
# `output standalone` (incl. the per-event mixed-crossing SIMD page) and
# the `check crossing` subcommand over both exporters.
- name: "crossing: madmatrix backend and check crossing"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestStandaloneMg7CrossSymmetry TestCheckCrossingCommand -t0 -l INFO

# ---- madmatrix OpenMP ----
# The CPU sigmaKin loop is an 'omp parallel for default( none )': every
# variable it uses must sit in its shared() clause or CPPProcess.cc does
# not compile. OpenMP is opt-in (USEOPENMP=1) and off on Darwin, so
# nothing else ever builds it.
- name: "test_standalone_mg7_openmp"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_standalone_mg7_openmp -pA -t0 -l INFO
61 changes: 61 additions & 0 deletions .github/workflows/acceptancetest_madevent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -569,3 +569,64 @@ jobs:
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_madevent_merged_flavor_uq test_madevent_flavor_zjj -pA -t0 -l INFO


acceptancetest_madevent_crossing_bundle:
# Crossing symmetry end to end in madevent, plus the density reweighting
# that splits over cores. Run one after the other; each keeps its own step,
# run even when an earlier one failed.
#
# restore_heptools: the default LO PDF is an LHAPDF set (NNPDF4.0), so
# every madevent launch needs lhapdf-config.
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
- uses: ./.github/actions/restore_heptools

# ---- crossed event labels ----
# The W+ helicity of p p > w+ j (a crossed massive vector) and the colour
# flow of u u~ > u u~ (98/2 asymmetric, so a swapped label shows).
- name: "crossing: crossed helicity and colour-flow labels written to the LHE"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestMadeventCrossingHelicity TestMadeventColorFlowRatio -t0 -l INFO

# ---- within-group router colour selection (~4 min) ----
# A router must RESELECT the colour flow with its own mask, not relabel
# its base's pick. Only an event-level comparison sees it: the cross
# section agreed to 0.02% while ~10% of a flavour class carried a flow
# the uncrossed build never picks.
- name: "crossing: within-group router colour selection"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestMadeventRouterColorSelection -t0 -l INFO

# ---- crossing cross sections ----
# Crossing-routed vs --use_crossing=False, same seed: p p > w+ j, w+ > j j
# (decay chain on a crossed production) and p p > t t~ j j (the only
# integration of the cross-GROUP router).
- name: "crossing: cross-section regressions (decay chain + inclusive)"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -pA TestMadeventDecayChainCrossing TestMadeventInclusiveCrossingXsec -t0 -l INFO

# ---- folded layout + reweight labels ----
- name: "crossing: folded subprocesses + merged anti-particle labels in reweight"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_standalone_crossing_folds_qqx_subprocess test_reweight_merged_antiparticle_labels -pA -t0 -l INFO

# ---- density, multicore ----
# The event file is split across jobs; each writes the average density
# matrix of its chunk and the mother interface must recombine them.
- name: "test_density_mode_multicore"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_density_mode_multicore -pA -t0 -l INFO
14 changes: 13 additions & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -431,20 +431,32 @@ jobs:


unittest_new_coverage:
# New unit tests added in 3.7.1: q_polynomial and hepmc_parser
# New unit tests added in 3.7.1: q_polynomial and hepmc_parser, and the
# reweight density / merged-label ones added with crossing symmetry
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
permissions:
contents: read

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

- name: test q_polynomial and hepmc_parser modules
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_q_polynomial test_hepmc_parser -t0

# TestAverageDensityMatrix: the average-density-matrix helpers shared by
# DensityInterface and do_reweight's multicore recombination.
# TestPdgForMeCall: merged-particle labels, both signs, resolved to the
# event's concrete PDGs before the fortran call. Pure python.
- name: reweight density / merged-label unit tests
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py TestAverageDensityMatrix TestPdgForMeCall -t0


unittest_write_model:
# runs alone: excluded from the shared unittest jobs due to side effects
Expand Down
37 changes: 30 additions & 7 deletions MadSpin/decay.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,29 @@
MAX_COMPAT_FLAVS = 500


_USE_CROSSING_FLAG = re.compile(r'\s--use_crossing(=\S*)?(?=\s|$)')

def without_crossing(commandline):
"""Pin --use_crossing=False on every generate / add process of
`commandline` (';'-separated commands, as MadSpin hands them to exec_cmd).

MadSpin reaches each matrix element per event flavor, through the entry
points taking a FLAVOR array (GET_DENSITY, SMATRIX), and finds it by the
processes the matrix element lists: neither can see a crossing folded onto
a base. Its production lines are copied from the banner's proc card, so a
--use_crossing=True there came back here and folded those subprocesses
away. Any flag already on the line is dropped first; [...] (perturbative)
lines are left alone, crossing is never applied to them.
"""
out = []
for cmd in commandline.split(';'):
head = cmd.strip()
if head.startswith(('generate', 'add process')) and '[' not in head:
cmd = _USE_CROSSING_FLAG.sub('', cmd).rstrip() + \
' --use_crossing=False'
out.append(cmd)
return ';'.join(out)

class MadSpinError(MadGraph5Error):
pass

Expand Down Expand Up @@ -3292,7 +3315,7 @@ def generate_all_matrix_element(self):
else:
commandline += 'add process %s; ' % proc

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

mgcmd.exec_cmd(commandline, precmd=True)
Expand Down Expand Up @@ -3365,7 +3388,7 @@ def generate_all_matrix_element(self):
if not proc.strip().startswith(('add','generate')):
proc = 'add process %s' % proc
commandline += self.get_proc_with_decay(proc, decay_text, mgcmd._curr_model, self.options)
commandline = commandline.replace('add process', 'generate',1)
commandline = without_crossing(commandline.replace('add process', 'generate',1))
else:
for key in decay_text_correlated:
for proc in processes:
Expand All @@ -3376,7 +3399,7 @@ def generate_all_matrix_element(self):
else:
one_decay = ', '.join(decay_text_correlated[key])
commandline += self.get_proc_with_decay(proc, one_decay, mgcmd._curr_model, self.options)
commandline = commandline.replace('add process', 'generate',1)
commandline = without_crossing(commandline.replace('add process', 'generate',1))
logger.info(commandline)
mgcmd.exec_cmd(commandline, precmd=True)
# remove decay with 0 branching ratio.
Expand Down Expand Up @@ -3443,7 +3466,7 @@ def generate_all_matrix_element(self):
proc = proc.split("@",1)[0]
commandline+="add process %s @%i --no_warning=duplicate;" % (proc,i)
i+=1
commandline = commandline.replace('add process', 'generate',1)
commandline = without_crossing(commandline.replace('add process', 'generate',1))
mgcmd.exec_cmd(commandline, precmd=True)
# remove decay with 0 branching ratio.
mgcmd.remove_pointless_decay(self.banner.param_card)
Expand Down Expand Up @@ -5415,15 +5438,15 @@ def fill_all_me(self, prod_or_decay):
# legacy options 'onshell_v1' and 'madspin_v1' store both the production and the decay in a single folder
if self.options['spinmode'] in ['onshell_v1', 'madspin_v1']:
commandline += self.get_decay_command()
commandline = commandline.replace('add process', 'generate',1)
commandline = without_crossing(commandline.replace('add process', 'generate',1))
mgcmd.exec_cmd(commandline, precmd=True)

commandline = 'output standalone_fortran %s --prefix=int' % pjoin(path_me, ms_me_subdir)
logger.info(commandline)
mgcmd.exec_cmd(commandline, precmd=True)
fill_all_me(self, "production")
else:
commandline_production = commandline.replace('add process', 'generate',1)
commandline_production = without_crossing(commandline.replace('add process', 'generate',1))
commandline_production += 'output standalone_fortran %s --prefix=int --density=1' % pjoin(path_me, ms_me_subdir)

logger.info(commandline_production)
Expand All @@ -5434,7 +5457,7 @@ def fill_all_me(self, prod_or_decay):

commandline_decay = self.get_decay_command()
commandline_decay += 'output standalone_fortran %s --prefix=int --density=1 -f' % pjoin(path_me, ms_me_decay_subdir) #we add -f, else it would ask us if we want to clean the folder madspin_decay and madspin_me
commandline_decay = commandline_decay.replace('add process', 'generate',1)
commandline_decay = without_crossing(commandline_decay.replace('add process', 'generate',1))

logger.info(commandline_decay)
mgcmd.exec_cmd(commandline_decay, precmd=True)
Expand Down
1 change: 1 addition & 0 deletions Template/LO/Source/.make_opts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime
STDLIB=-lstdc++
PYTHIA8_PATH=NotInstalled
STDLIB_FLAG=
AMP_FLAG=
#end_of_make_opts_variables

BIASLIBDIR=../../../lib/
Expand Down
36 changes: 35 additions & 1 deletion Template/LO/SubProcesses/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,29 @@ endif

MATRIX_HEL = $(patsubst %.f,%.o,$(wildcard matrix*_orig.f))
MATRIX = $(patsubst %.f,%.o,$(wildcard matrix*_optim.f))
# Crossing-symmetry routers: matrix*_router.f share a base subprocess's matrix
# element and are never recycled, so they are compiled into both the forhel and
# the optimized binaries alongside the recycled bases. When recycling is off the
# matrix*.f glob below already covers them.
ROUTER = $(patsubst %.f,%.o,$(wildcard matrix*_router.f))
# Amplitude chunks: at high multiplicity the HELAS call sequence of a matrix
# element is emitted as its own set of files, one subroutine each, so that it
# is not one enormous basic block (gfortran's cost on which grows faster than
# linearly) and so that it can carry its own optimisation flag -- see AMP_FLAG
# below. matrix<i>_origamp<k>.f goes into both binaries, because a matrix
# element that has no helicity to recycle is reused as its own optimized copy.
ORIGAMP = $(patsubst %.f,%.o,$(wildcard matrix*_origamp*.f))
OPTIMAMP = $(patsubst %.f,%.o,$(wildcard matrix*_optimamp*.f))
AMPCHUNK = $(ORIGAMP) $(OPTIMAMP)
ifeq ($(strip $(MATRIX_HEL)),)
MATRIX = $(patsubst %.f,%.o,$(wildcard matrix*.f))
AMPCHUNK =
else
MATRIX += $(ROUTER) $(AMPCHUNK)
MATRIX_HEL += $(ROUTER) $(ORIGAMP)
endif
# every matrix object except the amplitude chunks, which get a rule of their own
MATRIX_CORE = $(filter-out $(AMPCHUNK),$(sort $(MATRIX) $(MATRIX_HEL)))


PROCESS= driver.o myamp.o genps.o unwgt.o setcuts.o \
Expand Down Expand Up @@ -82,8 +102,15 @@ $(LIBDIR)libgammaUPC.$(libext):
cd ../../Source/PDF/gammaUPC; make

# Add source so that the compiler finds the DiscreteSampler module.
$(MATRIX): %.o: %.f
$(MATRIX_CORE): %.o: %.f
$(FC) $(FFLAGS) $(MATRIX_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC
# The amplitude chunks carry their own flag, which lands after FFLAGS and so
# wins over the GLOBAL_FLAG. It is empty by default: splitting the sequence up
# is what makes it compilable, and dropping it to -O0 on top buys about 1.5x
# more on the compile but costs 19% of the run time at g g > t t~ 3g and 61% at
# g g > 5g. Set amp_flag in the run_card when the compile is the problem.
$(AMPCHUNK): %.o: %.f
$(FC) $(FFLAGS) $(MATRIX_FLAG) $(AMP_FLAG) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC
%.o: %.f
$(FC) $(FFLAGS) -c $< -I../../Source/ -I../../Source/PDF/gammaUPC

Expand All @@ -107,3 +134,10 @@ initcluster.o: message.inc

clean:
$(RM) *.o gensym madevent madevent_forhel

# Track B cross-group crossing: present only in a dependent P directory, it makes
# the base group's matrix<b> object(s) be symlinked from the base directory
# instead of recompiled here (see write_crossgroup_mk). Included LAST so its
# specific rules override the makefile's %.o pattern / $(MATRIX) static-pattern
# rules. Absent (a no-op) elsewhere.
-include crossgroup.mk
8 changes: 8 additions & 0 deletions aloha/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
complex_mass = False # Tag for activating the complex mass scheme
t_channel_width = False # Whether to keep the width i*M*Gamma in the propagator
# denominator for spacelike (t-channel, P^2<0) momenta.
# False (default): drop it there -- the correct tree-level
# treatment outside the complex-mass scheme (a t-channel
# propagator has no pole to regulate, and the spurious
# width breaks gauge cancellations). True: keep the width
# in every propagator (legacy behaviour). Ignored when
# complex_mass is True (the width lives in the mass then).
unitary_gauge = True # Tag choosing between Feynman Gauge or unitary gauge
# 0/False: Feynman
# 1/True: unitary
Expand Down
Loading
Loading