I am using RooUnfold for implementing Iterative Bayesian unfolding. I recently came across the RooUnfoldspec (tutorial) and had some basic questions regarding that:
How exactly should I fill my response?
I have two separate ROOT files and here is what I have in mind: I should filter the events based on eventnumber and runnumber from reco and true level, fill a th2d with those events and this will be my migration matrix. I feel that I still need correction factors (acceptance and efficiency). Should my response be equal to R = (eff * migration)/acc? and will this response be one of the inputs in RooUnfoldspec object?
Do I need an UnfoldingMatrix under RooUnfoldBayes while using RooUnfoldspec? If yes, how should I make use of it.
where the last two arguments are “includeUnderflow” which is false (otherwise the underflow would be included as a regular bin and unfolded alongside the others), and “-1” (threshold for pruning systematics, negative numbers mean “don’t prune”).
This performs the unfolding as described in the tutorial. With a vector representing the unfolded distribution given by:
Vunfolded = unfolded.Vunfold()
ok moving back to question 1. indeed the response histogram used in the definition above is typically a TH2D filled with matched truth and reco events. Acceptance/Efficiency is taken into account by necessitating the truth histogram which doesn’t have to be just the marginal distribution of the response. Similarly events that are expected in the measured distribution but aren’t included in the response are either subtracted from the data or included in the ‘recoBkgHist’ histogram. Nothing fancy is required, you just need your histograms as you would expect.
Some of these issues are also discussed in the slightly newer tutorial here but also in the tutorial that you reference. There are updated versions of all of these tutorials that are in progress that are evolving over these months so hopefully things will be a little more stable and better documented soon!
Thank you very much for your detailed answer. It made things much clearer now. We tried constructing the spec object in the way you mentioned and the unfolded distribution indeed matches with the truth!
I was wondering now how to propagate the uncertainties to the unfolded distribution. One of the ways would be to have a covariance matrix or toy experiments but I was curious to know if there are any developments concerning RooUnfoldspec object and uncertainties?