I have a pdf with a conditional observable (I’m doing a mass fit with a per-event error resolution) and I would like to evaluate the significance of the signal hypothesis given some data.
I’m trying to do this with RooStats but it seems to me it doesn’t use the ConditionalObservables(var) option when doing the fits on my pdf.
Right now I use the ProfileLikelihoodCalculator and the ProfileLikelihoodTestStat test statistics.
I tried setting the ModelConfig with option
ModelConfig::SetConditionalObservables(var)
but the result does not change if I set or unset it.
And anyway the result is wrong: doing a likelihood ratio “by hand” I obtain one significance value.
If I remove the ConditionalObservables(var) option in my code, I obtain the wrong result obtained by ProfileLikelihoodCalculator
Is there a way to tell RooStats to do the fits with the ConditionalObservables(var) option?
Hi,
Can you please attach to the forum your workspace file, so I can look in detail at this problem and in case fix the ProfileLikelihoodCalculator class,
thank you very much for helping.
I send my workspace.
The pdf is called “pdf_ext_total”, as a function of variable “Mass” and conditional to “MassRes”.
The parameters of interest are “N_bs” and “N_bd”, which, for the null hypothesis, are equal to zero.
The conditional observable is “MassRes”.
So I would like RooStats fit the pdf with this command somehow:
Is the data set to fit in the workspace ? Which one is it ? Will be easier also if the ModelConfig is imported in the workspace so the information on the pdf, observables, poi, etc… is saved in the workspace
in the attachment there is a workspace containing also a random RooDataSet, named global_data and the ModelConfig, called model.
By hand, I obtain a significance of 1.4954 sigma.
If I run the ProfileLikelihoodCalculator I obtain 1.6797 sigma, which I obtain if I don’t use the ConditionalObservables(*ws_->var("MassRes")) option in fitTo.
I hope this helps you in implementing this option.
Actually I need it implemented in the ProfileLikelihoodTestStat class too.
Thank you for your example. I have now fixed in the RooStats code the calculators to correctly deal with the global observables.
You can try in the current trunk (after SVN revision 46081). I will commit this fix also in the 5.34 patches
Setting in the ModelConfig is not sufficient, you need also to set also in the ProfiledLikelihoodTestStat class, since the test statistic class it is not built from the ModelConfig, but directly passing the model pdf instance. So the first one, as you presumed, should be the correct one.