more agressive pruning of diagram without flavor#33
Open
oliviermattelaer wants to merge 4 commits into
Open
Conversation
theoheimel
approved these changes
Jul 13, 2026
theoheimel
left a comment
Contributor
There was a problem hiding this comment.
I tested the two processes from #13 (comment) and both run now and the cross section in MG7 appears to be correct. So from my side, we can merge this
Contributor
Author
|
I would say that i would like to check the following:
|
Contributor
|
The build wheel issue was unrelated and I fixed it in main |
Contributor
Author
|
update on the status for w+ _anti_neutrino > z ta+
Note "manual" check of merged/unmerged (with fortran output) are consistent .... So the issue is not fortran related but purely C++ and Python that does return zero |
FLV coupling definition (single source of truth): - add base_objects.FLV_Coupling.get_partner_indices() and route the Fortran, C++, mg7 and Python backends through it, fixing the transposed PARTNER/PARTNER2/VAL table for a single merged leg not in the first position (e.g. the merged neutrino of w+ ta+ vt~) - process_checks: pass the flavor group position (not the PDG) and index 1 (not -1) for unmerged legs to smatrix, matching the standalone FLAV_TABLE - mg7: null-initialise FLV_COUPLING::value[] so the cIPF_value setup does not dereference uninitialised pointers (segfault on single-entry couplings) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The MGONGPU_HARDCODE_PARAM cIPF_value initializer read every value[] slot unconditionally (and via `.real()` on a cxtype* pointer). Flavor slots with no coupling are null (FLV_COUPLING constructor), so guard each read as `value[i] ? value[i]->real() : 0`, matching the runtime (non-hardcoded) path and fixing both the null dereference and the pointer access. mg7: fix out-of-bounds flavor index in the runtime flavor table (segfault) The per-flavor tFlavors table (used at runtime to index the FLV_COUPLING partner1/partner2/value arrays, size max_flavor) was built with a naive f-1: for a merged leg flavors[0] holds the constituent PDG, so a merged neutrino gave index 16-1=15, well out of range -> out-of-bounds read and segfault. Convert a merged leg's PDG to its 0-based position inside the merged group instead (unmerged legs map to 0). This only surfaced for merged leptons/neutrinos; light quarks worked because PDG 1..4 equals the position. Matches the standalone_cpp flavor_table, which was already correct. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
update on the status for w+ _anti_neutrino > z ta+
@Qubitol, check carefully the list commit since it change some deep stuff for the madmatrix side (which was creating some segfault for this process) |
Open
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.
run the trimming
By default this also remove diagram only possible for symmetric flavor that the one considered.
the standalone --mask=False does not trim those last one for a simplify debugging/check