-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Fixes evaluate() function in RooRealL #9456
Conversation
Can one of the admins verify this patch? |
@guitargeek This is a redo of #9402, now rebased on master. |
@phsft-bot build |
Starting build on |
Build failed on ROOT-debian10-i386/cxx14. Failing tests: |
Build failed on ROOT-ubuntu2004/soversion. Failing tests: |
Build failed on ROOT-performance-centos8-multicore/default. Failing tests: |
Build failed on ROOT-ubuntu16/nortcxxmod. Failing tests: |
Build failed on mac11/cxx17. Failing tests: |
Build failed on mac1015/python3. Failing tests: |
Build failed on windows10/cxx14. |
I see why it failed, that stressRooFit test that failed was passed on my pc so when updating the reference file with all the plots the relevant plot was not included. I will add it manually and commit |
Is |
@Axel-Naumann The file was already there, I just modified it. I am not sure how it would end up on https://root.cern. |
Sorry, I confused this file with a different RooFit test file, all good! |
No problem! @guitargeek I fixed the bug that was causing the tests to fail |
@phsft-bot build |
Starting build on |
Build failed on ROOT-debian10-i386/cxx14. Errors:
|
Build failed on mac11/cxx17. Errors:
|
Build failed on ROOT-performance-centos8-multicore/default. Errors:
|
Build failed on mac1015/python3. Errors:
|
Build failed on ROOT-ubuntu16/nortcxxmod. Errors:
|
Build failed on ROOT-ubuntu2004/soversion. Errors:
|
@@ -6456,4 +6456,4 @@ class TestBasic804 : public RooUnitTest | |||
|
|||
return kTRUE ; | |||
} | |||
} ; | |||
} ; |
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.
You don't need to touch that file.
Hi @Zeff020, thanks for the quick followup! I have made a few more change requests, they are a bit minute but I hope to teach you some of the good practices we use here for the future :) Also, if you introduce any new source file to RooFit, please format it with When you have done the formatting and implemented my comments, we can test and merge. |
@phsft-bot build |
Starting build on |
Build failed on mac11/cxx17. Failing tests:
And 4 more |
@phsft-bot build |
Starting build on |
Build failed on mac11/cxx17. Failing tests:
And 4 more |
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, thanks for the PR and addressing the review comments!
std::shared_ptr<RooFit::TestStatistics::RooRealL> likelihood_real( | ||
new RooFit::TestStatistics::RooRealL("likelihood", "", likelihood)); |
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.
std::shared_ptr<RooFit::TestStatistics::RooRealL> likelihood_real( | |
new RooFit::TestStatistics::RooRealL("likelihood", "", likelihood)); | |
auto likelihood_real = std::make_shared<RooFit::TestStatistics::RooRealL>("likelihood", "", likelihood); |
Just for the next time: you should use make_shared
to create objects directly wrapped by shared pointers, and you can use auto
to automatically deduce type when it's clear to the reader what the type is anyway (here it would be clear because of the type in make_shared
).
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.
I see, will do!
Build failed on windows10/cxx14. Errors:
|
Build failed on ROOT-ubuntu2004/soversion. Errors:
|
Starting build on |
Build failed on ROOT-ubuntu16/nortcxxmod. Errors:
|
Build failed on ROOT-debian10-i386/cxx14. Errors:
|
Build failed on ROOT-performance-centos8-multicore/default. Errors:
|
Build failed on mac1015/python3. Errors:
|
Build failed on windows10/cxx14. Errors:
|
Build failed on mac11/cxx17. Errors:
|
Build failed on ROOT-ubuntu2004/soversion. Errors:
|
This Pull request:
Changes or fixes:
The evaluate() function on the RooFit::TestStatistics::RooRealL class was not functional. This PR fixes it by adding a RooArgSet member to RooRealL called vars_obs_ which initially contains the same variables as the RooArgProxy and ensures that the proxy variables are properly transferred to the internal variables of the likelihood (contained in the RooArgSet vars_obs_) before evaluation.
This change was made with the help of @wverkerke
Checklist:
This PR fixes #