Constraints for simultaneous fit


I am trying to perform a simultaneous fit of two datasets using models with constraints.
What I do is to generate two model config with inside the dataset and the constrained model (implemented with RooProdPdf), and then I just build the simultaneous model.
I have tried to look if there is some error when importing the models, even visualising with Graphviz but they seem to be as expected. However, when I perform the simultaneous fit, it seems to be a problem with the constraints. Here an example of what I get as INFO:

INFO:Minization – RooProdPdf::getConstraints(modelcons_240GeV_combModel) omitting term subslumi_240GeV as constraint term as it does not share any parameters with the other pdfs in product. To force inclusion in likelihood, add an explicit Constrain() argument for the target parameter.

From here it seems like there is no constrain … even if I see them in the combined model doing .Print(“t”)
I was just wondering if the procedure I mentioned before seems to you ok, or for simultaneous fit there is something else one has to do in order to deal with constraints … , or maybe is just a problem when I import the models in the combined workspace.

If you have any suggestion, please let me know.

Many thanks in advance.

Hi @ccazzaniga!

Is is possible that you provide us the code and optimally also the data to reproduce your problem? That would greatly help me to answer your question.



I can provide you the code that I use to perform the simultaneous fit … which seems to be problematic as I mentioned.
CombinedModel_v2.C (3.7 KB)

Thank you in advance

I cannot run your code, because I would need your input file as well.
However, I see from the error message that you report, the constraint term seems to be removed because it is added to a node (modelcons_240GeV_combModel) not dependent on the constraint parameter. The solution for tis is very simple, in the fitTo command, add the option Constrain(cParams), where cParams is an argset containing your constraint parameters


thanks, this solved my problem.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.