Repository navigation
Conversation
CAF convention (review of SBNSoftware/sbnanaobj#201, #203): NaN is for a data member that was never set, -999 for one that was set to an invalid value. - makeSRBNBInfo() stores a missing FOM_best, tor_used, position, angle, width or bunch-rotation setting as -999 instead of NaN; a cut 0.98 < FOM_best <= 1 still rejects spills without a FOM. - update_flatcafs.py writes missing values as -999. - dump_bnb_quality.py reads -999 (and the NaN of flat CAFs updated before this change) as NaN, which the analysis tools use for "missing". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit d2e6e13)
This was referenced Nov 10, 2026
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.
develop version of #687 (same commit, cherry-picked). Stacked on #681 (
feature/bnb-bunch-rotation-develop): it shows only this change. Merge it after that one, and retarget it todeveloponce that one is merged.Description
Follow-up to Gianluca's review of SBNSoftware/sbnanaobj#201 and #203. The CAF convention is that NaN marks a data member that was never set, and -999 one that was set to an invalid value. The beam-quality fields in the CAF now follow it.
makeSRBNBInfo()(CAFMaker/FillExposure.cxx): a missingFOM_best,tor_used, beam position, angle or width at the target, or bunch-rotation setting is stored as -999 instead of NaN. The input value -999 and non-finite inputs both count as missing.fom_source(-1),fom_statusandfom_versionare unchanged. A cut0.98 < FOM_best <= 1still rejects spills without a FOM.update_flatcafs.py: writes missing values as -999, as CAFMaker does.dump_bnb_quality.py: reads -999 in these fields as NaN, and also the NaN of flat CAFs updated by the earlier version. The analysis tools downstream (bnb_fom*.py,fom_fixups.py,neighbor_fill.py,logger_fill.py) keep using NaN internally and are unchanged.bunch_rotation.pydocstring are updated.The
spillbnbinfoof a record with no matching spill is left default-constructed (NaN): it was never set.Testing
Built and tested on the Gen2 line (see #687). The cherry-pick onto develop applied with no conflicts; the develop branch itself was not built.
Companions: the PRs from branch
fix/bnb-fom-defaults-developin sbnobj, sbnanaobj and sbncode.Joseph Zennamo (with Claude Code)
🤖 Generated with Claude Code