50 gROOT->SetStyle(
"Plain");
62 TH1D *
xini =
new TH1D(
"xini",
"MC truth", nbins, -10.0, 10.0);
63 TH1D *
bini =
new TH1D(
"bini",
"MC reco", nbins, -10.0, 10.0);
64 TH2D *
Adet =
new TH2D(
"Adet",
"detector response", nbins, -10.0, 10.0, nbins, -10.0, 10.0);
67 TH1D *
data =
new TH1D(
"data",
"data", nbins, -10.0, 10.0);
71 TH2D *
statcov =
new TH2D(
"statcov",
"covariance matrix", nbins, -10.0, 10.0, nbins, -10.0, 10.0);
74 for (
Int_t i= 0; i<100000; i++) {
85 for (
Int_t i=0; i<10000; i++) {
93 cout <<
"Created toy distributions and errors for: " << endl;
94 cout <<
"... \"true MC\" and \"reconstructed (smeared) MC\"" << endl;
95 cout <<
"... \"true data\" and \"reconstructed (smeared) data\"" << endl;
96 cout <<
"... the \"detector response matrix\"" << endl;
99 for (
int i=1; i<=
data->GetNbinsX(); i++) {
148 for (
int i=1; i<=
unfres->GetNbinsX(); i++) {
156 leg->SetBorderSize(0);
157 leg->SetFillColor(0);
158 leg->SetFillStyle(0);
159 leg->AddEntry(
unfres,
"Unfolded Data",
"p");
161 leg->AddEntry(
data,
"Reconstructed Data",
"l");
162 leg->AddEntry(
xini,
"True MC",
"l");
164 TCanvas *
c1 =
new TCanvas(
"c1",
"Unfolding toy example with TSVDUnfold", 1000, 900 );
170 frame->
SetTitle(
"Unfolding toy example with TSVDUnfold" );
178 data->SetLineColor(4);
179 data->SetLineWidth(2);
180 unfres->SetMarkerStyle(20);
184 xini->SetLineColor(8);
185 xini->SetLineWidth(2);
200 c2->SetRightMargin ( 0.15 );
203 covframe->SetTitle(
"TSVDUnfold covariance matrix" );
204 covframe->GetXaxis()->SetTitle(
"x variable" );
205 covframe->GetYaxis()->SetTitle(
"x variable" );
206 covframe->GetXaxis()->SetTitleOffset( 1.25 );
207 covframe->GetYaxis()->SetTitleOffset( 1.29 );
221 dframe->SetTitle(
"TSVDUnfold |d_{i}|" );
222 dframe->GetXaxis()->SetTitle(
"i" );
223 dframe->GetYaxis()->SetTitle(
"|d_{i}|" );
224 dframe->GetXaxis()->SetTitleOffset( 1.25 );
225 dframe->GetYaxis()->SetTitleOffset( 1.29 );
226 dframe->SetMinimum( 0.001 );
229 ddist->SetLineWidth( 2 );
230 ddist->Draw(
"same" );
#define R(a, b, c, d, e, f, g, h, i)
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
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
1-D histogram with a double per channel (see TH1 documentation)
void SetTitle(const char *title) override
Change/set the title.
void Draw(Option_t *option="") override
Draw this histogram with options.
2-D histogram with a double per channel (see TH1 documentation)
This class displays a legend box (TPaveText) containing several legend entries.
Use the TLine constructor to create a simple line.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Random number generator class based on M.
SVD Approach to Data Unfolding.
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Double_t Sqrt(Double_t x)
Returns the square root of x.