-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Added test and improved implementation of RooMultiPdf class in codegen #19231
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
base: master
Are you sure you want to change the base?
Conversation
Test Results 19 files 19 suites 3d 19h 35m 15s ⏱️ Results for commit ec3b07d. ♻️ This comment has been updated with latest results. |
f5b9a6d
to
0ec75f4
Compare
@@ -36,6 +37,7 @@ class RooExtendPdf; | |||
class RooFormulaVar; | |||
class RooGamma; | |||
class RooGaussian; | |||
class RooMultiPdf; |
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.
Can you keep the list of classes here in alphabetical order like before? Thanks
@@ -81,6 +83,7 @@ void codegenImpl(ParamHistFunc &arg, CodegenContext &ctx); | |||
void codegenImpl(PiecewiseInterpolation &arg, CodegenContext &ctx); | |||
void codegenImpl(RooAbsArg &arg, CodegenContext &ctx); | |||
void codegenImpl(RooAddPdf &arg, CodegenContext &ctx); | |||
void codegenImpl(RooCategory &arg, CodegenContext &ctx); |
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.
alphabetical order
@@ -105,6 +108,7 @@ void codegenImpl(RooParamHistFunc &arg, CodegenContext &ctx); | |||
void codegenImpl(RooPoisson &arg, CodegenContext &ctx); | |||
void codegenImpl(RooPolyVar &arg, CodegenContext &ctx); | |||
void codegenImpl(RooPolynomial &arg, CodegenContext &ctx); | |||
void codegenImpl(RooMultiPdf &arg, CodegenContext &ctx); |
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.
alphabetical order
@@ -80,4 +80,4 @@ void rf101_basics() | |||
gPad->SetLeftMargin(0.15); | |||
xframe2->GetYaxis()->SetTitleOffset(1.6); | |||
xframe2->Draw(); | |||
} | |||
} |
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.
This change in the rf101_basics.C
file is unnecessary.
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.
Hi @GalinBistrev2, thank you very much for this PR! I have made a few change requests, mostly related to code style.
36653b5
to
6fe76c2
Compare
6fe76c2
to
ec3b07d
Compare
Here is the implementation of RooMultiPdf in codegen.A new MathFunc was added for RooMultiPdf and was used in the CodegenImpl.cxx file along with ternary expression genarator which serves the same purpose as the MathFunc.Those two methods do the same thing.The difference is that MathFunc works better for more than 2 pdfs listed.An additional sequence of lines was added for also for RooCategory since the implementation of the RooMultiPdf in the codegen can't work without it. A gtest file was made in order to test wheter the NLL is calculated correctly and whether the RooMultiPdf object correctly chooses the pdf.
The output of the test is the following