scikit-hep / pyhf

pure-Python HistFactory implementation with tensors and autodiff
https://pyhf.readthedocs.io/
Apache License 2.0
279 stars 83 forks source link

Changing constraint terms for nuisance parameters #820

Open alexander-held opened 4 years ago

alexander-held commented 4 years ago

Question

It can be useful to test the effect of uniform constraint terms when debugging fits. What is the pyhf way to do this? When converting a workspace from xml (with pyhf 0.4.1) with this measurement

<Measurement Name="freeFloating" Lumi="1" LumiRelErr="0.1" ExportOnly="True"  >
  <POI>NF_ttH</POI>
  <ParamSetting Const="True">Lumi</ParamSetting>
  <ConstraintTerm Type="Uniform" RelativeUncertainty="1">ttb_Rad</ConstraintTerm>
</Measurement>

the ConstraintTerm is not picked up, even though it should act on the systematics with name ttb_Rad. I am not sure whether this is within or beyond HistFactory scope.

Relevant Issues and Pull Requests

none that I am aware of

kratsg commented 4 years ago

We don't support both (a) uniform constraint terms; (b) having configurable constraint types.

It's not technically impossible to implement it in pyhf, but I need to think about the use-case. In this example, are you constraining the parameter ttb_Rad to only be [-1,1] when it's normally an unconstrained normalization factor? How does this differ from changing the bounds on that parameter in this case?

alexander-held commented 4 years ago

The parameter ttb_Rad in this example controls a HistoSys and OverallSys term, and would usually come with a Gaussian constraint term. It is not a NormFactor. I am looking for a way to remove that constraint term, and one way of doing this in ROOT is as shown in that snippet above (there might be other ways to achieve the same).