Closed alexander-held closed 2 years ago
Hi all,
My name is Alberto Prades Ibañez and I am an ATLAS PhD student who is doing a top quark mass measurement. For my analysis I have implemented a Likelihood Unfolding approach where I have a set of nuisance parameters for the uncertainties (with their gaussian priors) and a Nuisance Parameter for the Top MC mass (with a uniform/flat prior).
While talking with the experts (Tomas Dado and @alexander-held ) I was told that the uniform prior had a bug. The bug is explained in this issue but it seems it was never been solved. I would to encourage the HistFactory/Root team to solve it because it is a really important feature for our analysis (and I am sure that also for many more analysis that will come in the future).
Cheers,
Alberto Prades
Hi all,
I am also interested in this. Is there perhaps a workaround that would enable us to have an unconstrained shape-only nuisance parameter?
Best, Miha
Hi! Thanks for reminding me of this issue. I missed it last year, as it didn't get RooFit/RooStats
label, sorry!
I have opened a PR to fix the inconsistency: https://github.com/root-project/root/pull/10525
And you are right, the label for constant nuisance parameters are not consistent on the XML and C++ side. As you noticed, in XML it's NoConstraint
and in C++ Measurement
class the label NoSyst
is used, however, I would not change this in HistFactory because changing this longstanding naming might surprise users.
Let me know if this is good for you and feel free to open new issues in case you have any other problems!
Hi @guitargeek, @lmoneta,
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Sincerely, :robot:
Thanks a lot @guitargeek!
And you are right, the label for constant nuisance parameters are not consistent on the XML and C++ side. As you noticed, in XML it's NoConstraint and in C++ Measurement class the label NoSyst is used, however, I would not change this in HistFactory because changing this longstanding naming might surprise users.
Sticking with the existing names sounds good to me, I wouldn't want to break existing code.
Describe the bug
The HistFactory xml specification allows for editing constraint terms of nuisance parameters in the measurement with constructions like:
Constraint terms can be removed from
OverallSys
modifiers, but the same method does not seem to work forHistoSys
modifiers (and the setting seems to be silently ignored).Constraint term "removal" can be achieved by changing the constraint term to be uniform, but
RooStats::HistFactory::Measurement::AddNoSyst
also provides an alternative method. The xml created from that seems to be incompatible withhist2workspace
, as the xml usesNoSyst
andhist2workspace
seems to (at least parse)NoConstraint
instead, but crashes forNoSyst
.Expected behavior
I expect constraint term editing to work for both
OverallSys
andHistoSys
modifiers. Both approaches of changing the constraint term to be uniform and removing it completely should work withhist2workspace
.To Reproduce
Download the required input files from https://cernbox.cern.ch/index.php/s/AO4ruN3G7LNtcRo. They contain a minimal HistFactory workspace specification (xml + ROOT file with histograms) and a simple script to fit the workspace.
Baseline for comparisons
To establish the baseline behavior, run
hist2workspace
on the provided HistFactory workspace (xml + ROOT) and perform a fit:The relevant best-fit parameter values are:
OverallSys
with uniform constraint [working as expected]To see the behavior of the
OverallSys
modifier when removing the associated constraint term, edit the xml and add theConstraintTerm
configuration. The measurement should then look like this:Repeat the workspace conversion and fitting:
and the result is now
where the pull for
alpha_NP_norm
has increased, which makes sense given the removal of its constraint term.HistoSys
with uniform constraint [not working as expected]To see the behavior of the
HistoSys
modifier when removing the associated constraint term, edit the xml and add theConstraintTerm
configuration forNP_shape
. The measurement should then look like this:Repeat the workspace conversion and fitting:
and the result is again
which is exactly the same as the initial result when
was not used. The setting seems to have been ignored.
Using
NoSyst
[crashing, unexpected behavior in workaround]In addition to
Uniform
,NoSyst
is also available: https://github.com/root-project/root/blob/c2c918c2662a02f3668b5044007e12d220133e71/roofit/histfactory/src/Measurement.cxx#L401-L406When using the following measurement (
Uniform
replaced byNoSyst
):hist2workspace
crashes:In
ConfigParser.cxx
,NoConstraint
appears: https://github.com/root-project/root/blob/c2c918c2662a02f3668b5044007e12d220133e71/roofit/histfactory/src/ConfigParser.cxx#L509-L514When using that via
hist2workspace
runs but the parameter forNP_norm
disappears from the fit results.Setup
ROOT 6.24/06 in a container built with Debian 10
Additional context
none