Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TUnfoldIterativeEM.h
Go to the documentation of this file.
1// Author: Stefan Schmitt
2// DESY, 19/10/11
3
4// Version 17.9
5
6//////////////////////////////////////////////////////////////////////////
7// //
8// //
9// TUnfold provides functionality to correct data //
10// for migration effects. //
11// //
12// Citation: S.Schmitt, JINST 7 (2012) T10003 [arXiv:1205.6201] //
13// //
14// this class implements the iterative EM unfolding method //
15// (also called D'Agostini Method or "iterative Bayesian method") //
16// which has been "invented" independently by numnerous authors //
17// to unfold Poisson-distributed, mutually exclusive bins. //
18// See e.g. //
19// Richardson, W.H., Opt. Soc. Amer. A62 (1972), 55 //
20// Lucy, L.B., Astron. J. 79 (1974), 745. //
21// Vardi, Y., Shepp, L.A. and Kaufman, L., //
22// J. Amer. Stat. Assoc. 80 (1985), 8. //
23// Multhei, H.N. and Schorr, B., Nucl. Instr. Meth. A257 (1987), 371 //
24// D'Agostini, G., Nucl. Instr. Meth. A362 (1995), 487 //
25// //
26// The novelty with this implementation is that the number of //
27// iterations can be chosen based on SURE //
28// (Stein's unbiased Risk Estimator) //
29// See: //
30// Tibshirani, R.J. and Rosset, S., J. Amer. Stat. Assoc. 114, 526 //
31// [arXiv:1612.09415] //
32// //
33// This method is there for comparison with the Tihkonov unfolding. //
34// The interface is similar to "TUnfoldDensity" //
35// //
36//////////////////////////////////////////////////////////////////////////
37
38#ifndef ROOT_TUnfoldInterativeEM
39#define ROOT_TUnfoldInterativeEM
40
41#include "TUnfold.h"
42
43class TUnfoldBinning;
44
46 public:
48 TUnfoldIterativeEM(const TH2 *hist_A, TUnfold::EHistMap histmap,
49 const TUnfoldBinning *outputBins=nullptr,
50 const TUnfoldBinning *inputBins=nullptr);
51 ~TUnfoldIterativeEM() override;
52 virtual void DoUnfold(Int_t numIterations);
53 virtual Int_t SetInput(const TH1 *hist_y, Double_t scaleBias=1.0);
54 void SubtractBackground(const TH1 *hist_bgr,const char *name,
55 Double_t scale=1.0);
56 void DoUnfold(Int_t nIter,const TH1 *hist_y, Double_t scaleBias=1.0);
57 virtual Int_t ScanSURE(Int_t nIterMax,
58 TGraph **SURE=nullptr,
59 TGraph **df_deviance=nullptr);
60 TH1 *GetOutput(const char *histogramName,
61 const char *histogramTitle=nullptr,const char *distributionName=nullptr,
62 const char *projectionMode=nullptr,Bool_t useAxisBinning=kTRUE) const;
63 TH1 *GetFoldedOutput(const char *histogramName,
64 const char *histogramTitle=nullptr,const char *distributionName=nullptr,
65 const char *projectionMode=nullptr,Bool_t useAxisBinning=kTRUE,
66 Bool_t addBgr=kFALSE) const;
67 Double_t GetDeviance(void) const;
68 Double_t GetDF(void) const;
69 Double_t GetSURE(void) const;
70 protected:
71 virtual void Reset(void);
72 virtual void IterateOnce(void);
80 double fScaleBias;
81
85
86 ClassDefOverride(TUnfoldIterativeEM, TUnfold_CLASS_VERSION) //iterative Unfolding with scan of SURE
87};
88
89#endif
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
char name[80]
Definition TGX11.cxx:110
#define TUnfold_CLASS_VERSION
Definition TUnfold.h:105
A TGraph is an object made of two arrays X and Y with npoints each.
Definition TGraph.h:41
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:59
Service class for 2-D histogram classes.
Definition TH2.h:30
Mother of all ROOT objects.
Definition TObject.h:41
Binning schemes for use with the unfolding algorithm TUnfoldDensity.
const TUnfoldBinning * f_constInputBins
virtual void Reset(void)
Double_t GetDeviance(void) const
const TUnfoldBinning * f_constOutputBins
TUnfoldBinning * f_outputBins
Double_t GetSURE(void) const
virtual void DoUnfold(Int_t numIterations)
Double_t GetDF(void) const
TH1 * GetFoldedOutput(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE, Bool_t addBgr=kFALSE) const
void SubtractBackground(const TH1 *hist_bgr, const char *name, Double_t scale=1.0)
virtual void IterateOnce(void)
TH1 * GetOutput(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE) const
virtual Int_t SetInput(const TH1 *hist_y, Double_t scaleBias=1.0)
TUnfoldBinning * f_inputBins
virtual Int_t ScanSURE(Int_t nIterMax, TGraph **SURE=nullptr, TGraph **df_deviance=nullptr)
EHistMap
arrangement of axes for the response matrix (TH2 histogram)
Definition TUnfold.h:143