[RF] RooTruthModel analytical integrals for general integration ranges #14021
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 analytical integral code of the
RooTruthModel
was making the wrong assumption that if one uses the single-sided bases, the minimum x value is always at zero (or the maximum value at zero, for the case of the flipped bases).This resulted in wrong integral values when integrating over a subrange, as reported here on the forum:
https://root-forum.cern.ch/t/possible-bug-in-integration-of-roobdecay-and-rooabsanaconvpdf/56968
This commit rewrites the RooTruthModel analytical integral code to also consider these cases. To avoid that with the additional code branches the code becomes too verbose, the code was refactored to use a helper function for evaluating indefinite integrals of symmetric or asymmetric basis functions.
The refactored code is tested by the integration tests in
stressRooFit
, and the problem that was reported on the forum is covered by a new unit test.