I am using the iterative (“Bayesian”) method based on the Roounfolding package to do unfolding for my analysis, and I already filled the response matrix R by response = ROOT.RooUnfoldResponse (hMeas, hTrue),
but now I want to do the backfolding test, which means I should get the R^(-1), I was wondering is there a way to get R^(-1) directly if I already have R prepared? Otherwise should I get the R^(-1) by filling it again with response = ROOT.RooUnfoldResponse (hTrue, hMeas)?
Thanks @jonas for tagging me.
Indeed RooUnfold is a comparatively small project, and experts are usually in high demand - so sorry for dropping the ball on your question.
As for the matter at hand: the way in which the unfolding is done depends very much on the method you use. In principle, not all methods even need to have an “inverse migration matrix”, since whether the computation is done as a matrix or in a different way is very much up to the method.
Strictly speaking, R^-1 is only available for RooUnfoldInvert, which is the unregularized matrix-inversion method.
You are in luck though, because RooUnfoldBayes does provide a method called “UnfoldingMatrix”, which gives you back a matrix that is used to propagate the errors between the folded and the unfolded space - depending on what you’re trying to do, this might be just what you need.
In general, it would be interesting to understand what you’re trying to achieve, as the inverse of the folding matrix is strictly speaking only related to your unfolding method when you use RooUnfoldInvert.
Please feel free to follow up with further questions.
They are roughly inverses of one another. hMresponse is the response matrix, e.g. the matrix that maps your unfolded space to your folded space. Depending on whether you put true or false as an argument, you will receive the normalized or non-normalized version. hUMatrix is then the regularized unfolding matrix, that is, it’s basically the regularized form of the inverse of the matrix you get when you do Mresponse(true).