Simple Test program for the class TUnfoldDensity.
1-dimensional unfolding with background subtraction
the goal is to unfold the underlying "true" distribution of a variable Pt
the reconstructed Pt is measured in 24 bins from 4 to 28 the generator-level Pt is unfolded into 10 bins from 6 to 26
- plus underflow bin from 0 to 6
- plus overflow bin above 26 there are two background sources bgr1 and bgr2 the signal has a finite trigger efficiency at a threshold of 8 GeV
one type of systematic error is studied, where the signal parameters are changed
Finally, the unfolding is compared to a "bin-by-bin" correction method
TUnfold version is V17.9
chi**2=25.3912+4.28619 / 11
bin truth result (stat) (bgr) (sys)
===+=====+=========+========+========+=======
1 4002 4261.3 +/-137.0 +/- 8.9 +/-473.2 (unfolding)
4190.1 +/-128.7 +/-104.7 +/-266.3 (bin-by-bin)
2 1816 1775.1 +/- 82.0 +/- 7.3 +/- 25.2 (unfolding)
1714.1 +/- 61.0 +/- 17.0 +/- 70.8 (bin-by-bin)
3 1011 1020.9 +/- 60.1 +/- 6.7 +/- 24.8 (unfolding)
959.5 +/- 40.9 +/- 9.2 +/- 43.3 (bin-by-bin)
4 593 526.9 +/- 45.2 +/- 6.1 +/- 15.0 (unfolding)
506.2 +/- 27.9 +/- 6.6 +/- 45.2 (bin-by-bin)
5 379 371.6 +/- 38.6 +/- 6.5 +/- 19.8 (unfolding)
351.8 +/- 22.6 +/- 6.0 +/- 29.2 (bin-by-bin)
6 256 341.5 +/- 34.4 +/- 6.0 +/- 9.2 (unfolding)
282.5 +/- 19.2 +/- 5.2 +/- 46.6 (bin-by-bin)
7 193 182.0 +/- 30.1 +/- 5.7 +/- 7.5 (unfolding)
177.7 +/- 15.8 +/- 4.9 +/- 22.5 (bin-by-bin)
8 137 147.1 +/- 28.4 +/- 5.6 +/- 7.0 (unfolding)
133.6 +/- 13.9 +/- 4.5 +/- 20.5 (bin-by-bin)
9 123 109.6 +/- 26.3 +/- 5.4 +/- 10.4 (unfolding)
98.6 +/- 12.1 +/- 4.1 +/- 20.7 (bin-by-bin)
10 78 100.7 +/- 24.7 +/- 6.1 +/- 8.4 (unfolding)
89.7 +/- 13.2 +/- 5.0 +/- 17.1 (bin-by-bin)
{
do {
} else {
}
(*intLumi) ++;
}
{
new TH2D(
"unfolding matrix",
";ptgen;ptrec",
new TH2D(
"unfolding matrix sys",
";ptgen;ptrec",
0.05,
0.05,
3.5,
100.,
-3.0,
0.1,
-0.5,
0.2,
0.01,
};
4.0,
0.95
};
}
}
0.05,
0.05,
3.5,
100.,
-4.0,
0.1,
-0.5,
0.2,
0.01,
};
4.0,
0.95
};
}
} else {
}
}
}
0.05,
0.05,
3.5,
100.,
-2.0,
0.1,
-0.5,
0.2,
0.01,
};
}
} else {
}
}
}
<<
" / "<<
unfold.GetNdf()<<
"\n";
}
}
}
"background1");
output.SaveAs(
"testUnfold3.ps");
std::cout<<"bin truth result (stat) (bgr) (sys)\n";
std::cout<<"===+=====+=========+========+========+=======\n";
("%3d %5.0f %8.1f +/-%5.1f +/-%5.1f +/-%5.1f (unfolding)",
(" %8.1f +/-%5.1f +/-%5.1f +/-%5.1f (bin-by-bin)",
<<"\n\n";
}
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
R__EXTERN TStyle * gStyle
A TGraph is an object made of two arrays X and Y with npoints each.
1-D histogram with a double per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
static void SetDefaultSumw2(Bool_t sumw2=kTRUE)
When this static function is called with sumw2=kTRUE, all new histograms will automatically activate ...
2-D histogram with a double per channel (see TH1 documentation)
Service class for 2-D histogram classes.
Random number generator class based on M.
This is the base class for the ROOT Random number generators.
Base class for spline implementation containing the Draw/Paint methods.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
An algorithm to unfold distributions from detector to truth level.
EDensityMode
choice of regularisation scale factors to cinstruct the matrix L
@ kDensityModeBinWidth
scale factors from multidimensional bin width
@ kSysErrModeMatrix
matrix is an alternative to the default matrix, the errors are the difference to the original matrix
static const char * GetTUnfoldVersion(void)
return a string describing the TUnfold version
EConstraint
type of extra constraint
@ kEConstraintArea
enforce preservation of the area
ERegMode
choice of regularisation scheme
@ kRegModeCurvature
regularize the 2nd derivative of the output distribution
@ kHistMapOutputHoriz
truth level on x-axis of the response matrix
Double_t Exp(Double_t x)
Returns the base-e exponential function of x, which is e raised to the power x.
Double_t Log(Double_t x)
Returns the natural logarithm of x.
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Version 17.6, in parallel to changes in TUnfold
History:
- Version 17.5, in parallel to changes in TUnfold
- Version 17.4, in parallel to changes in TUnfold
- Version 17.3, in parallel to changes in TUnfold
- Version 17.2, in parallel to changes in TUnfold
- Version 17.1, in parallel to changes in TUnfold
- Version 17.0, change to use the class TUnfoldDensity
- Version 16.1, parallel to changes in TUnfold
- Version 16.0, parallel to changes in TUnfold
- Version 15, simple example including background subtraction
This file is part of TUnfold.
TUnfold is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
TUnfold is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with TUnfold. If not, see http://www.gnu.org/licenses/.
- Author
- Stefan Schmitt DESY, 14.10.2008
Definition in file testUnfold3.C.