Data unfolding using Singular Value Decomposition
TSVDUnfold example
Data unfolding using Singular Value Decomposition (hep-ph/9509307)
Example distribution and smearing model from Tim Adye (RAL)
#include <iostream>
{
Double_t xeff = 0.3 + (1.0 - 0.3)/20.0*(xt + 10.0);
if (x > xeff) return cutdummy;
else {
return xt+xsmear;
}
}
void TSVDUnfoldExample()
{
gROOT->SetStyle(
"Plain");
TH1D *xini =
new TH1D(
"xini",
"MC truth", nbins, -10.0, 10.0);
TH1D *bini =
new TH1D(
"bini",
"MC reco", nbins, -10.0, 10.0);
TH2D *Adet =
new TH2D(
"Adet",
"detector response", nbins, -10.0, 10.0, nbins, -10.0, 10.0);
TH1D *data =
new TH1D(
"data",
"data", nbins, -10.0, 10.0);
TH1D *datatrue =
new TH1D(
"datatrue",
"data truth", nbins, -10.0, 10.0);
TH2D *statcov =
new TH2D(
"statcov",
"covariance matrix", nbins, -10.0, 10.0, nbins, -10.0, 10.0);
for (
Int_t i= 0; i<100000; i++) {
if (x != cutdummy) {
}
}
for (
Int_t i=0; i<10000; i++) {
if (x != cutdummy)
}
cout << "Created toy distributions and errors for: " << endl;
cout << "... \"true MC\" and \"reconstructed (smeared) MC\"" << endl;
cout << "... \"true data\" and \"reconstructed (smeared) data\"" << endl;
cout << "... the \"detector response matrix\"" << endl;
}
ustatcov->
Add( uadetcov );
utaucov->
Add( uadetcov );
}
leg->
AddEntry(unfres,
"Unfolded Data",
"p");
leg->
AddEntry(datatrue,
"True Data",
"l");
leg->
AddEntry(data,
"Reconstructed Data",
"l");
TCanvas *c1 =
new TCanvas(
"c1",
"Unfolding toy example with TSVDUnfold", 1000, 900 );
frame->
SetTitle(
"Unfolding toy example with TSVDUnfold" );
covframe->
SetTitle(
"TSVDUnfold covariance matrix" );
ustatcov->
Draw(
"colzsame" );
dframe->
SetTitle(
"TSVDUnfold |d_{i}|" );
}
- Authors
- Kerstin Tackmann, Andreas Hoecker, Heiko Lacker
Definition in file TSVDUnfoldExample.C.