-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[RF] RooPolyFunc improvements #11953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RF] RooPolyFunc improvements #11953
Conversation
c406335 to
9a16379
Compare
* Add a new constructor and change an existing one slightly to avoid collisions. * Add getters for internal variables. * Fix bugs in printout.
9a16379 to
2dc3946
Compare
2dc3946 to
2a0ee54
Compare
68cab5d to
136a3b9
Compare
The `RooPolyFunc::taylorExpand()` had several overloads that were dangerously similar. To avoid user error, the overloads are reduced to a single one that includes all the functionality of the others. This entails an interface change, but it's acceptable because the function has only existed since 6.26 and is used by a few users in ATLAS. Therefore, the benefits of this change outweigh the disadvantages.
136a3b9 to
cab77a7
Compare
The `RooAbsCollection::snapshot()` overload with an output parameter
should be preferred in the RooFit implementation:
* it doesn't return a pointer that the caller needs to remember to
delete
* the returned pointer doesn't need to be upcasted to the actual type
* less memory allocation on the heap
Like all other RooFit generator context classes, the `RooEffGenContext` should never participate in IO.
cab77a7 to
736075c
Compare
|
@phsft-bot build |
|
Starting build on |
guitargeek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for the improvement!
The unit tests were failing initially, because your PR effectively made an interface change: if one was passing an integer as the observableValue as the value to extend the function around, it now hit your new overload where the order integer is at the same position as the observaleValue float in the old overload.
To avoid this confusion due to type ambiguity, I took the liberty of going one step further with the interface change and reduced all three overloads of taylorExpand to one, such that there can't be any ambiguity anymore.
I also added some general code improvement commits while at it.
Thanks again for the contribution!
|
Build failed on ROOT-ubuntu18.04/nortcxxmod. Warnings:
And 60 more Failing tests:
|
|
Build failed on ROOT-performance-centos8-multicore/cxx17. Warnings:
And 130 more Failing tests:
|
|
Build failed on mac12/noimt. Warnings:
And 53 more Failing tests:
|
|
Build failed on mac11/cxx14. Warnings:
And 54 more Failing tests:
|
|
Build failed on ROOT-ubuntu2004/python3. Errors:
|
This Pull request:
Adds more functionality to the RooPolyFunc
Changes or fixes:
Add a new constructor and change an existing one slightly to avoid collisions.
Add getters for internal variables.
Fix bugs in printout.
Checklist:
This PR fixes #