Test program as an example for a user specific regularisation scheme.
Generate Monte Carlo and Data events The events consist of:
The signal is a resonance. It is generated with a Breit-Wigner, smeared by a Gaussian
- Unfold the data. The result is:
- The background level
The shape of the resonance, corrected for detector effects
The regularisation is done on the curvature, excluding the bins near the peak.
- produce some plots
tau=0.000286365
chi**2=160.946+4.9728 / 147
(int) 0
{
do {
do {
} while(t>=1.0);
} while(t<=0.0);
return t;
} else {
do {
do {
} while(t>=1.0);
} while(t>=0.0);
return t;
}
}
} else {
}
}
{
4.0,
0.2);
}
3.8,
0.15);
}
+1.5);
std::cout<<"Unfolding result may be wrong\n";
}
std::cout<<
"tau="<<
unfold.GetTau()<<
"\n";
std::cout<<
"chi**2="<<
unfold.GetChi2A()<<
"+"<<
unfold.GetChi2L()
<<
" / "<<
unfold.GetNdf()<<
"\n";
output.
SaveAs(
"testUnfold2.ps");
return 0;
}
int Int_t
Signed integer 4 bytes (int)
double Double_t
Double 8 bytes.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
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)
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)
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
void SaveAs(const char *filename="", Option_t *option="") const override
Save the pad content in a file.
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.
An algorithm to unfold distributions from detector to truth level.
ERegMode
choice of regularisation scheme
@ kRegModeNone
no regularisation, or defined later by RegularizeXXX() methods
@ kRegModeCurvature
regularize the 2nd derivative of the output distribution
@ kHistMapOutputVert
truth level on y-axis of the response matrix
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
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, updated for changed methods in TUnfold
- Version 16.1, parallel to changes in TUnfold
- Version 16.0, parallel to changes in TUnfold
- Version 15, with automatic L-curve scan, simplified example
- Version 14, with changes in TUnfoldSys.cxx
- Version 13, with changes to TUnfold.C
- Version 12, with improvements to TUnfold.cxx
- Version 11, print chi**2 and number of degrees of freedom
- Version 10, with bug-fix in TUnfold.cxx
- Version 9, with bug-fix in TUnfold.cxx, TUnfold.h
- Version 8, with bug-fix in TUnfold.cxx, TUnfold.h
- Version 7, with bug-fix in TUnfold.cxx, TUnfold.h
- Version 6a, fix problem with dynamic array allocation under windows
- Version 6, re-include class MyUnfold in the example
- Version 5, move class MyUnfold to separate files
- Version 4, with bug-fix in TUnfold.C
- Version 3, with bug-fix in TUnfold.C
- Version 2, with changed ScanLcurve() arguments
- Version 1, remove L curve analysis, use ScanLcurve() method instead
- Version 0, L curve analysis included here
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 testUnfold2.C.