Combined unfolding
Goal: perform a combined unfolding of several jet observables
- Replicas for correlations in RM (either using the tool by ATLAS or by imlpementing our own replicas).
- Rethink the filling of histograms to be more modular (gaol: test the unfolding of each observable separately).
- Background in unfolding (tweak TUnfold---see below)
- Try to better handle fake / miss in unfolding, as well as RM variations, using native tools of
TUnfoldDensity
Bootstrap
One way is to use the tool by ATLAS. For installation:
wget https://zenodo.org/record/5361038/files/BootstrapGenerator-v1.11.2.zip
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../install
make
make install
Alternativ is just to implement the method by yourself (probably easier). Some example may be found here and information on Wikipedia is also available.
Correlations in background (copy paste from email exchange with Stefan Schmitt)
here is my corollar for the background subtraction.
- the code is located in:
TUnfoldSys.h
TUnfoldSysV17.cxx
- the following method has to take an additional argument
TUnfoldSys::SubtractBackground(... , TH2 *correlations=0)
- the C-code to be modified in
TUnfoldSysV17.cxx
is this one:- Line 377ff
TUnfoldSysV17::DoBackgroundSubtraction
- Line 354ff
TUnfoldSysV17::SubtractBackground
- Line 584ff
TUnfoldSysV17::GetBackground
- Line 1281ff
TUnfoldSysV17::GetEmatrixSysBackgroundUncorr
- Line 377ff
Basically everywhere where the data member fBgrErrUncorrInSq
is used, the impact of the modification has to be checked. better to also check in TUnfoldDensity... These are the methods which I found:
-
TUnfoldSysV17::DoBackgroundSubtraction
construct background-subtracted data and corresponding covariance matrix, using all stored background sources -
TUnfoldSysV17::SubtractBackground
store data for a given backgriound source -
TUnfoldSysV17::GetBackground
get background and uncertainties in a histogram -
TUnfoldSysV17::GetEmatrixSysBackgroundUncorr
calculate uncertainty contribution to teh result from background "uncorrelated" errors
Present way of background subtraction works like this:
-
fBgrErrUncorrInSq
holds aTMatrixD
of dimension (N,1). These are the diagonal elements of the background uncorrelated uncertainties.
New way of implementing the backgroung subtraction:
-
fBgrErrUncorrInSq
is going to hold a matrix of dimension (N,N) if no correlation coefficients are specified, only the diagonals will be non-zero otherwise, the covariance matrix is constructed from the correlation coefficients and the diagional errors.
Anticipated changes:
-
TUnfoldSysV17::DoBackgroundSubtraction
- line 433-451: add NxN matrix instead of only adding diagonals
-
TUnfoldSysV17::SubtractBackground
- line 546-555: construct NxN matrix, set up diagonals and off-diagonals taking into account correlation coefficients
-
TUnfoldSysV17::GetBackground
- line 630: use diagonal element (i,i) instead of (i,0)
-
TUnfoldSysV17::GetEmatrixSysBackgroundUncorr
- line 1288: instead of calling
emat=MultiplyMSparseMSparseTranspVector(...)
, one will have to do two matrix multiplications:(DXDY() * dySquared) * DXDY()^transposed
whereDXDY()
is a "sparse" matrix anddysquared
is a "normal" matrix. Something like this:
- line 1288: instead of calling
TMatrixDSparse *tmp=MultiplyMSparseM(DXDY(),dySquared);
emat=MultiplyMSparseMSparseTranspVector(tmp,DXDY(),0);
delete tmp;
Edited by Patrick Connor