Repository navigation
[RF] Fix spurious checkForDup error when building Hesse parameter mask - #23860
Merged
dpiparo merged 1 commit intoOct 28, 2026
Merged
Conversation
The parameter independence analysis for the Minuit2 Hessian collects the leaves of each non-additive term of the minimized function into a RooArgSet. Distinct leaves with the same name are legal in a computation graph and do happen in practice: in binned-likelihood mode, each RooBinWidthFunction of a HistFactory model is replaced by its own clone of the "1" constant at compile time, so one channel pdf contains several distinct constants named "1" (prefixed with the channel name, e.g. "_SR_1_1"). The name-based duplicate check of RooArgSet then printed ERROR:InputArguments -- RooArgSet::checkForDup: ERROR argument with name _SR_1_1 is already in this set at the first Hesse of every such fit. The error was harmless, since same-named leaves share their name pointer and are merged in the group registry anyway, which can only make the mask more conservative. Register the undeduplicated leaf list directly and skip leaves that are already recorded for the current term. This drops the RooArgSet and its name lookup per leaf entirely, so it is also cheaper than before. Assisted-by: claude-code:claude-fable-5-1
guitargeek
force-pushed
the
hesse-mask-duplicate-leaf-names
branch
from
October 27, 2026 13:38
ab82fb8 to
91c0974
Compare
dpiparo
approved these changes
Oct 27, 2026
Test Results 24 files 24 suites 3d 23h 51m 58s ⏱️ Results for commit 91c0974. |
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.
The parameter independence analysis for the Minuit2 Hessian collects the leaves of each non-additive term of the minimized function into a RooArgSet. Distinct leaves with the same name are legal in a computation graph and do happen in practice: in binned-likelihood mode, each RooBinWidthFunction of a HistFactory model is replaced by its own clone of the "1" constant at compile time, so one channel pdf contains several distinct constants named "1" (prefixed with the channel name, e.g. "_SR_1_1"). The name-based duplicate check of RooArgSet then printed
ERROR:InputArguments -- RooArgSet::checkForDup: ERROR argument with
name _SR_1_1 is already in this set
at the first Hesse of every such fit. The error was harmless, since same-named leaves share their name pointer and are merged in the group registry anyway, which can only make the mask more conservative.
Register the undeduplicated leaf list directly and skip leaves that are already recorded for the current term. This drops the RooArgSet and its name lookup per leaf entirely, so it is also cheaper than before.
Assisted-by: Claude Fable 5.1
FYI @TomasDado