Kalanand's May 2012 Log

   April 2012   
May 2012
   June 2012   

May 1st

Unfolding of an observed distribution using RooUnfold

From David Lopes-Pegna.
Here is a collection of some instructions for the SVD unfolding (I did it 
first time in 2007 and last time in 2009, so bear with me).

As I said, I'm fine with any method, whatever is the easiest and quickest. 
This one is pretty robust, and the regularization parameter nicely allows 
to control the bias.

If you want to unfold, you need four things:

* Your measured distribution.

* A reco'd MC distribution (with cuts and everything like you treat data,
  except for obvious things like bkgd subtraction and weightings of course).

* A true MC distribution (unbiased, so without any cuts or skimming or
  anything like that, but this of course also depends on what effects you
  want to unfold, the above assumes you want to unfold for both efficiencies
  and resolution).

* The detector response matrix, which contains the information about
  resolution and/or (relative) efficiencies (depending on what you want to
  unfold). The matrix should have reco on the x axis and true on the y axis.

I attached a macro with an example (unfold.cc) The other code necessary is here:
and there is a README with some instructions. This version of the 
unfolding gives you a normalized unfolded spectrum, but it's easy 
to change that.

Hmmm .... turns out the above link needs a password :( 
I put all in ~dlopes/public on lxplus

-rw-r--r-- 1 dlopes zh   23794 May  2 02:59 RooUnfHistoSvd.cc
-rw-r--r-- 1 dlopes zh    2559 May  2 03:00 RooUnfHistoSvd.rdl
-rw-r--r-- 1 dlopes zh    1016 May  2 03:00 RooUnfHistoSvd.readme
-rw-r--r-- 1 dlopes zh     448 May  2 03:01 RooUnfHistoSvd_LinkDef.rdl
-rw-r--r-- 1 dlopes zh     171 May  2 03:02 link_RooUnfHistoSvd.mk
-rw-r--r-- 1 dlopes zh     290 May  2 03:02 root_RooUnfHistoSvd.mk
-rw-r--r-- 1 dlopes zh    1104 May  2 03:03 GNUmakefile
-rw-r--r-- 1 dlopes zh    6097 May  2 03:03 GNUmakefile.standalone 

My example uses my class directly (this is what I am doing), but there is
also an interface from the RooUnfold tool (which also has interfaces to
other methods):

There are some things that require some thought/work, two of which are

* Choosing the bin size. If your bins are smaller than your resolution, you
  will introduce large bin-by-bin correlations.

* Choosing the regularization. This will need toys or something like that 
  to be sure that you control the bias (the other two macros).

Both these things are true for any (non-trivial) unfolding method, though.
Attached files: unftoys_new.cc     unftoys_basic.cc     unfold.cc

Go to April's log

Last modified: Sat May 5 12:00:56 CST 2012