Open adavidzh opened 10 years ago
Hi,
The nuisance pdf has to be created from the simultaneous pdf because that's what RooStats expects (and in general a ModelConfig doesn't have to provide a nuisance pdf), so the constraint should just be added together with the product of all others in three places, depending on the model: 1) in each pdf of the roosimultaneous, for models that are 100% compatible with plain roostats https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit/blob/development/python/ShapeTools.py#L79-87 2) directly in the simultaneous pdf (for when the optimization for faster workspace building is enabled in text2workspace, which however might break RooStats modules that remake the nuisance pdf, since utils::makeNuisancePdfis aware of this optimization but roostats is not ) https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit/blob/development/python/ShapeTools.py#L120-121 3) into the nuisance pdf, for counting experiments that don't use roosimultaneous https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit/blob/development/python/ModelTools.py#L427-429
One suggested refactoring could be to make once the RooArgList or RooArgSet of all the constraints (e.g. when creating the nuisances) and then reuse that in (1), (2) and (3)
Giovanni
On Tue, May 6, 2014 at 10:55 AM, André David notifications@github.comwrote:
In Hgg there is a use case to add constraint terms based on the model POIs that they are using. Having a way to, in general, add terms to the likelihood seems useful. This is similar to a nuisance which has a pdf but no associated global constraint.
Ideas for possible implementation (for discussion/edition):
- Models export to workspace a RooAbsPdf implementing the constraint in doParametersOfInterest.
- PhysicsModel gets a new method that returns the list of constraints to be plugged to the Likelihood.
- The terms can then be added to the RooProdPdf built in ModelTools.pyhttps://github.com/cms-analysis/HiggsAnalysis-CombinedLimit/blob/development/python/ModelTools.py#L258-L274
- It is not clear to @nucleosynthesishttps://github.com/nucleosynthesisand me how to hook this properly into the C++ side, since we could not find if/where nuisancePdfis reused (it seems to be rebuilt in utils::makeNuisancePdf).
@gpetruc https://github.com/gpetruc, any ideas on how to plug this idea in without breaking everything else?
— Reply to this email directly or view it on GitHubhttps://github.com/cms-analysis/HiggsAnalysis-CombinedLimit/issues/127 .
In Hgg there is a use case to add constraint terms based on the model POIs that they are using. Having a way to, in general, add terms to the likelihood seems useful. This is similar to a nuisance which has a pdf but no associated global constraint.
Ideas for possible implementation (for discussion/edition):
RooAbsPdf
implementing the constraint indoParametersOfInterest
.PhysicsModel
gets a new method that returns the list of constraints to be plugged to the Likelihood.RooProdPdf
built inModelTools.py
nuisancePdf
is reused (it seems to be rebuilt inutils::makeNuisancePdf
).@gpetruc, any ideas on how to plug this idea in without breaking everything else?