Dear all,
I have two things with RooUnblindPrecision (and other RooUnblind* ?) I did not find an answer for/believe it may be a bug. I am using ROOT 6.04 with Python 2.
I create a RooRealVar
var1 = RooRealVar(“var1”, “var1”, 42, 0, 50)
and blind it
blind_var1 = RooUnblindPrecision(“blind_var1”, “blind_var1”, blind_str, blind_central_val, blind_sigma_val, var1)
as expected, calling getVal does not reveal the original value.
blind_var1.getVal() # -> 600
The stored value is still the true one
blind_var1.getVariables()[‘var1’] # ->42
Problem 1:
However, blind_var1.getHiddenVal() returns 600 as well (and not the expected 42). On the other hand, when running a fit (building a pdf, invoking fitTo) and running blind_var1.getHiddenVal() again returns the true value (whereas .getVal() returns a wrong, blinded one as expected).
Why does getHiddenVal not correctly return the true, stored value after initialization but after a fit?
Problem 2:
I want to set the hidden value and try to retrieve it in order to test the blinding. However, it is not clear to me, how to set a value on a RooUnblindPrecision object.
I have tried:
- accessing the stored value and set the value: blind_var1.getVariables()[‘var1’].setVal(11)
which nearly does the things. blind_var1.getVariables()[‘var1’].getVal() returns 11. However, blind_var1.getVal or blind_var1.getHiddenVal still return the same things as before (600), so neither a changed, blinded value nor the truth. - calling setValueDirty on RooUnblindPrecision, to make it aware of changes. Did not change anything.
So how can I properly “set” a RooUnblindPrecision (stored) value?
Thanks for all the help!