Skip to content
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] Bug in RooSimultaneous::extendMode() #6894

Closed
lmoneta opened this issue Dec 1, 2020 · 2 comments · Fixed by #6898
Closed

[RF] Bug in RooSimultaneous::extendMode() #6894

lmoneta opened this issue Dec 1, 2020 · 2 comments · Fixed by #6898

Comments

@lmoneta
Copy link
Member

lmoneta commented Dec 1, 2020

When a simultaneous pdf is composed by a not-extended pdf and an extended pdf, RooSimultaneous::extendMode() returns
MustBeExtended or CanNotBeExtended depending on the initial category value.

See example and report on
https://root-forum.cern.ch/t/use-of-roosimultaneous-pdf-with-mustbeextended-and-cannotbeextended-pdfs/42462

@lmoneta
Copy link
Member Author

lmoneta commented Dec 1, 2020

A related problem is also in RooNLLVar::create that is called by RooAbsTestStatistic::initSimMode,
https://root.cern/doc/master/RooAbsTestStatistic_8cxx_source.html#l00500

When the sub-likelihood is created using the component pdf, one should pass the extend flag only if the pdf canBeExtended()

lmoneta added a commit to lmoneta/root that referenced this issue Dec 1, 2020
For returning the extend mode examine all the pdf in the list and
flag as CanExtend or MustExtend if just one of the pdf can be extended.

Fix also passing the extended flags when creating the sub-NLL in RooNLLVar::create().
If one of the sim component cannot be extended then switch off the extended flag for that component. Before it was passed for all components.

This fixes issue root-project#6894
lmoneta added a commit to lmoneta/root that referenced this issue Dec 4, 2020
For returning the extend mode examine all the pdf in the list and
flag as CanExtend or MustExtend if just one of the pdf can be extended.

Fix also passing the extended flags when creating the sub-NLL in RooNLLVar::create().
If one of the sim component cannot be extended then switch off the extended flag for that component. Before it was passed for all components.

This fixes issue root-project#6894
@lmoneta lmoneta linked a pull request Dec 7, 2020 that will close this issue
Triage automation moved this from Needs triage to Closed Dec 7, 2020
lmoneta added a commit that referenced this issue Dec 7, 2020
For returning the extend mode examine all the pdf in the list and
flag as CanExtend or MustExtend if just one of the pdf can be extended.

Fix also passing the extended flags when creating the sub-NLL in RooNLLVar::create().
If one of the sim component cannot be extended then switch off the extended flag for that component. Before it was passed for all components.

This fixes issue #6894
HDembinski pushed a commit to HDembinski/root that referenced this issue Dec 9, 2020
For returning the extend mode examine all the pdf in the list and
flag as CanExtend or MustExtend if just one of the pdf can be extended.

Fix also passing the extended flags when creating the sub-NLL in RooNLLVar::create().
If one of the sim component cannot be extended then switch off the extended flag for that component. Before it was passed for all components.

This fixes issue root-project#6894
@jbdvdr
Copy link

jbdvdr commented Apr 20, 2021

Hello,

In root-6.24, I have the impression that this fix unfortunately seems to imply a crash in evaluate : when there is a non-extendable category and an extendable one in the RooSimultaneous, canBeExtended() will be true, and then expectedEvents will be called also for the non extendable category, and this will make the code crashes, I think.

Running the macro posted here https://root-forum.cern.ch/t/use-of-roosimultaneous-pdf-with-mustbeextended-and-cannotbeextended-pdfs/42462 within 6.24, I get
RooSimultaneous::fsbBA[ indexCat=catBA A=fsbA B=fsbB ] = [#0] FATAL:Generation -- Requesting expected number of events from a RooProdPdf that does not contain an extended p.d.f
Error in TRint::HandleTermInput(): std::logic_error caught: RooProdPdf fsbA could not be extended.

Best,

Jean-Baptiste

@hahnjo hahnjo added this to Issues in Fixed in 6.24/00 via automation Jul 20, 2021
@guitargeek guitargeek changed the title Bug in RooSimultaneous::extendMode() [RF] Bug in RooSimultaneous::extendMode() Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants