ROOT 6.08/07 Reference Guide |
TUnfold is used to decompose a measurement y into several sources x given the measurement uncertainties and a matrix of migrations A.
TUnfoldSys adds error propagation of systematic errors to TUnfold Also, background sources (with errors) can be subtracted.
For most applications, it is better to use TUnfoldDensity instead of using TUnfoldSys or TUnfold**
If you use this software, please consider the following citation S.Schmitt, JINST 7 (2012) T10003 [arXiv:1205.6201]
More documentation and updates are available on http://www.desy.de/~sschmitt
The following sources of systematic error are considered in TUnfoldSys
(a) uncorrelated errors on the input matrix histA, taken as the errors provided with the histogram. These are typically statistical errors from finite Monte Carlo samples
(b) correlated shifts of the input matrix histA. These shifts are taken as one-sigma effects when switchig on a given error soure. several such error sources may be defined
(c) a systematic error on the regularisation parameter tau
(d) uncorrelated errors on background sources, taken as the errors provided with the background histograms
(e) scale errors on background sources
In addition there is the (statistical) uncertainty of the input vector (i)
Source (a) is providede with the original histogram histA TUnfoldSys(histA,...)
Sources (b) are added by calls to AddSysError()
The systematic uncertainty on tau (c) is set by SetTauError()
Backgound sources causing errors of type (d) and (e) are added by SubtractBackground()
NOTE: Systematic errors (a), (b), (c) are propagated to the result AFTER unfolding
Background errors (d) and (e) are added to the data errors BEFORE unfolding
For this reason: errors of type (d) and (e) are INCLUDED in the standard error matrix and other methods provided by the base class TUnfold: GetOutput() GetEmatrix() ... whereas errors of type (a), (b), (c) are NOT INCLUDED in the methods provided by the base class TUnfold.
The error sources (b),(c) and (e) propagate to shifts of the result. These shifts may be accessed as histograms using the methods GetDeltaSysSource() corresponds to (b) GetDeltaSysTau() corresponds to (c) GetDeltaSysBackgroundScale() corresponds to (e) The error sources (a) and (d) originate from many uncorrelated errors, which in general are NOT uncorrelated on the result vector. Thus, there is no corresponding shift of the output vector, only error matrices are available
Method to get error matrix | corresponds to error sources |
---|---|
GetEmatrixSysUncorr() | (a) |
GetEmatrixSysSource() | (b) |
GetEmatrixSysTau() | (c) |
GetEmatrixSysBackgroundUncorr() | (d) |
GetEmatrixSysBackgroundScale() | (e) |
GetEmatrixInput() | (i) |
GetEmatrix() | (i)+(d)+(e) |
GetEmatrixTotal() | (i)+(a)+(b)+(c)+(d)+(e) |
Error matrices can be added to existing histograms. This is useful to retreive the sum of several error matrices. If the last argument of the GetEmatrixXXX() methods is set to kFALSE, the histogram is not cleared, but the error matrix is simply added to the existing histogram
Definition at line 51 of file TUnfoldSys.h.
Public Types | |
enum | ESysErrMode { kSysErrModeMatrix =0, kSysErrModeShift =1, kSysErrModeRelative =2 } |
Public Types inherited from TUnfold | |
enum | EConstraint { kEConstraintNone =0, kEConstraintArea =1 } |
enum | EHistMap { kHistMapOutputHoriz = 0, kHistMapOutputVert = 1 } |
enum | ERegMode { kRegModeNone = 0, kRegModeSize = 1, kRegModeDerivative = 2, kRegModeCurvature = 3, kRegModeMixed = 4 } |
Public Types inherited from TObject | |
enum | { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff } |
enum | { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) } |
enum | EStatusBits { kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4), kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13) } |
Public Member Functions | |
TUnfoldSys (const TH2 *hist_A, EHistMap histmap, ERegMode regmode=kRegModeSize, EConstraint constraint=kEConstraintArea) | |
virtual | ~ TUnfoldSys (void) |
void | AddSysError (const TH2 *sysError, const char *name, EHistMap histmap, ESysErrMode mode) |
void | GetBackground (TH1 *bgr, const char *bgrSource=0, const Int_t *binMap=0, Int_t includeError=3, Bool_t clearHist=kTRUE) const |
Double_t | GetChi2Sys (void) |
Bool_t | GetDeltaSysBackgroundScale (TH1 *delta, const char *source, const Int_t *binMap=0) |
Bool_t | GetDeltaSysSource (TH1 *hist_delta, const char *source, const Int_t *binMap=0) |
Bool_t | GetDeltaSysTau (TH1 *delta, const Int_t *binMap=0) |
void | GetEmatrixInput (TH2 *ematrix, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
void | GetEmatrixSysBackgroundScale (TH2 *ematrix, const char *source, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
void | GetEmatrixSysBackgroundUncorr (TH2 *ematrix, const char *source, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
void | GetEmatrixSysSource (TH2 *ematrix, const char *source, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
void | GetEmatrixSysTau (TH2 *ematrix, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
void | GetEmatrixSysUncorr (TH2 *ematrix, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
void | GetEmatrixTotal (TH2 *ematrix, const Int_t *binMap=0) |
void | GetRhoItotal (TH1 *rhoi, const Int_t *binMap=0, TH2 *invEmat=0) |
virtual Int_t | SetInput (const TH1 *hist_y, Double_t scaleBias=0.0, Double_t oneOverZeroError=0.0, const TH2 *hist_vyy=0, const TH2 *hist_vyy_inv=0) |
void | SetTauError (Double_t delta_tau) |
void | SubtractBackground (const TH1 *hist_bgr, const char *name, Double_t scale=1.0, Double_t scale_error=0.0) |
Public Member Functions inherited from TUnfold | |
TUnfold (const TH2 *hist_A, EHistMap histmap, ERegMode regmode=kRegModeSize, EConstraint constraint=kEConstraintArea) | |
virtual | ~TUnfold (void) |
Double_t | DoUnfold (Double_t tau, const TH1 *hist_y, Double_t scaleBias=0.0) |
virtual Double_t | DoUnfold (Double_t tau) |
void | GetBias (TH1 *bias, const Int_t *binMap=0) const |
Double_t | GetChi2A (void) const |
Double_t | GetChi2L (void) const |
void | GetEmatrix (TH2 *ematrix, const Int_t *binMap=0) const |
Double_t | GetEpsMatrix (void) const |
void | GetFoldedOutput (TH1 *folded, const Int_t *binMap=0) const |
void | GetInput (TH1 *inputData, const Int_t *binMap=0) const |
void | GetInputInverseEmatrix (TH2 *ematrix) |
void | GetL (TH2 *l) const |
virtual Double_t | GetLcurveX (void) const |
virtual Double_t | GetLcurveY (void) const |
void | GetLsquared (TH2 *lsquared) const |
Int_t | GetNdf (void) const |
void | GetNormalisationVector (TH1 *s, const Int_t *binMap=0) const |
Int_t | GetNpar (void) const |
Int_t | GetNr (void) const |
void | GetOutput (TH1 *output, const Int_t *binMap=0) const |
void | GetProbabilityMatrix (TH2 *A, EHistMap histmap) const |
Double_t | GetRhoAvg (void) const |
Double_t | GetRhoI (TH1 *rhoi, const Int_t *binMap=0, TH2 *invEmat=0) const |
void | GetRhoIJ (TH2 *rhoij, const Int_t *binMap=0) const |
Double_t | GetRhoMax (void) const |
Double_t | GetTau (void) const |
Int_t | RegularizeBins (int start, int step, int nbin, ERegMode regmode) |
Int_t | RegularizeBins2D (int start_bin, int step1, int nbin1, int step2, int nbin2, ERegMode regmode) |
Int_t | RegularizeCurvature (int left_bin, int center_bin, int right_bin, Double_t scale_left=1.0, Double_t scale_right=1.0) |
Int_t | RegularizeDerivative (int left_bin, int right_bin, Double_t scale=1.0) |
Int_t | RegularizeSize (int bin, Double_t scale=1.0) |
virtual Int_t | ScanLcurve (Int_t nPoint, Double_t tauMin, Double_t tauMax, TGraph **lCurve, TSpline **logTauX=0, TSpline **logTauY=0) |
void | SetBias (const TH1 *bias) |
void | SetConstraint (EConstraint constraint) |
void | SetEpsMatrix (Double_t eps) |
Public Member Functions inherited from TObject | |
TObject () | |
TObject constructor. More... | |
TObject (const TObject &object) | |
TObject copy ctor. More... | |
virtual | ~TObject () |
TObject destructor. More... | |
void | AbstractMethod (const char *method) const |
Use this method to implement an "abstract" method that you don't want to leave purely abstract. More... | |
virtual void | AppendPad (Option_t *option="") |
Append graphics object to current pad. More... | |
virtual void | Browse (TBrowser *b) |
Browse object. May be overridden for another default action. More... | |
virtual const char * | ClassName () const |
Returns name of class to which the object belongs. More... | |
virtual void | Clear (Option_t *="") |
virtual TObject * | Clone (const char *newname="") const |
Make a clone of an object using the Streamer facility. More... | |
virtual Int_t | Compare (const TObject *obj) const |
Compare abstract method. More... | |
virtual void | Copy (TObject &object) const |
Copy this to obj. More... | |
virtual void | Delete (Option_t *option="") |
Delete this object. More... | |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
Computes distance from point (px,py) to the object. More... | |
virtual void | Draw (Option_t *option="") |
Default Draw method for all objects. More... | |
virtual void | DrawClass () const |
Draw class inheritance tree of the class to which this object belongs. More... | |
virtual TObject * | DrawClone (Option_t *option="") const |
Draw a clone of this object in the current pad. More... | |
virtual void | Dump () const |
Dump contents of object on stdout. More... | |
virtual void | Error (const char *method, const char *msgfmt,...) const |
Issue error message. More... | |
virtual void | Execute (const char *method, const char *params, Int_t *error=0) |
Execute method on this object with the given parameter string, e.g. More... | |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=0) |
Execute method on this object with parameters stored in the TObjArray. More... | |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
Execute action corresponding to an event at (px,py). More... | |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
Issue fatal error message. More... | |
virtual TObject * | FindObject (const char *name) const |
Must be redefined in derived classes. More... | |
virtual TObject * | FindObject (const TObject *obj) const |
Must be redefined in derived classes. More... | |
virtual Option_t * | GetDrawOption () const |
Get option used by the graphics system to draw this object. More... | |
virtual const char * | GetIconName () const |
Returns mime type name of object. More... | |
virtual const char * | GetName () const |
Returns name of object. More... | |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
Returns string containing info about the object at position (px,py). More... | |
virtual Option_t * | GetOption () const |
virtual const char * | GetTitle () const |
Returns title of object. More... | |
virtual UInt_t | GetUniqueID () const |
Return the unique object id. More... | |
virtual Bool_t | HandleTimer (TTimer *timer) |
Execute action in response of a timer timing out. More... | |
virtual ULong_t | Hash () const |
Return hash value for this object. More... | |
virtual void | Info (const char *method, const char *msgfmt,...) const |
Issue info message. More... | |
virtual Bool_t | InheritsFrom (const char *classname) const |
Returns kTRUE if object inherits from class "classname". More... | |
virtual Bool_t | InheritsFrom (const TClass *cl) const |
Returns kTRUE if object inherits from TClass cl. More... | |
virtual void | Inspect () const |
Dump contents of this object in a graphics canvas. More... | |
void | InvertBit (UInt_t f) |
virtual Bool_t | IsEqual (const TObject *obj) const |
Default equal comparison (objects are equal if they have the same address in memory). More... | |
virtual Bool_t | IsFolder () const |
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More... | |
Bool_t | IsOnHeap () const |
virtual Bool_t | IsSortable () const |
Bool_t | IsZombie () const |
virtual void | ls (Option_t *option="") const |
The ls function lists the contents of a class on stdout. More... | |
void | MayNotUse (const char *method) const |
Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More... | |
virtual Bool_t | Notify () |
This method must be overridden to handle object notification. More... | |
void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
Use this method to declare a method obsolete. More... | |
void | operator delete (void *ptr) |
Operator delete. More... | |
void | operator delete[] (void *ptr) |
Operator delete []. More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *vp) |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, void *vp) |
TObject & | operator= (const TObject &rhs) |
TObject assignment operator. More... | |
virtual void | Paint (Option_t *option="") |
This method must be overridden if a class wants to paint itself. More... | |
virtual void | Pop () |
Pop on object drawn in a pad to the top of the display list. More... | |
virtual void | Print (Option_t *option="") const |
This method must be overridden when a class wants to print itself. More... | |
virtual Int_t | Read (const char *name) |
Read contents of object with specified name from the current directory. More... | |
virtual void | RecursiveRemove (TObject *obj) |
Recursively remove this object from a list. More... | |
void | ResetBit (UInt_t f) |
virtual void | SaveAs (const char *filename="", Option_t *option="") const |
Save this object in the file specified by filename. More... | |
virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
Save a primitive as a C++ statement(s) on output stream "out". More... | |
void | SetBit (UInt_t f, Bool_t set) |
Set or unset the user status bits as specified in f. More... | |
void | SetBit (UInt_t f) |
virtual void | SetDrawOption (Option_t *option="") |
Set drawing option for object. More... | |
virtual void | SetUniqueID (UInt_t uid) |
Set the unique object id. More... | |
virtual void | SysError (const char *method, const char *msgfmt,...) const |
Issue system error message. More... | |
Bool_t | TestBit (UInt_t f) const |
Int_t | TestBits (UInt_t f) const |
virtual void | UseCurrentStyle () |
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More... | |
virtual void | Warning (const char *method, const char *msgfmt,...) const |
Issue warning message. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) |
Write this object to the current directory. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const |
Write this object to the current directory. More... | |
Protected Attributes | |
TMatrixD * | fAoutside |
TMap * | fBgrErrScaleIn |
TMap * | fBgrErrUncorrInSq |
TMap * | fBgrIn |
TMatrixD * | fDAinColRelSq |
TMatrixDSparse * | fDAinRelSq |
TMap * | fDeltaCorrAx |
TMap * | fDeltaCorrX |
TMatrixDSparse * | fDeltaSysTau |
Double_t | fDtau |
TMatrixDSparse * | fEmatUncorrAx |
TMatrixDSparse * | fEmatUncorrX |
TMap * | fSysIn |
TMatrixDSparse * | fVyyData |
TMatrixD * | fYData |
Protected Attributes inherited from TUnfold | |
TMatrixDSparse * | fA |
Double_t | fBiasScale |
EConstraint | fConstraint |
TArrayI | fHistToX |
TMatrixDSparse * | fL |
ERegMode | fRegMode |
TArrayD | fSumOverY |
Double_t | fTauSquared |
TMatrixDSparse * | fVyy |
TMatrixD * | fX0 |
TArrayI | fXToHist |
TMatrixD * | fY |
Private Member Functions | |
void | InitTUnfoldSys (void) |
Additional Inherited Members | |
Static Public Member Functions inherited from TUnfold | |
static const char * | GetTUnfoldVersion (void) |
Static Public Member Functions inherited from TObject | |
static Long_t | GetDtorOnly () |
Return destructor only flag. More... | |
static Bool_t | GetObjectStat () |
Get status of object stat flag. More... | |
static void | SetDtorOnly (void *obj) |
Set destructor only flag. More... | |
static void | SetObjectStat (Bool_t stat) |
Turn on/off tracking of objects in the TObjectTable. More... | |
Static Protected Member Functions inherited from TUnfold | |
static void | DeleteMatrix (TMatrixD **m) |
static void | DeleteMatrix (TMatrixDSparse **m) |
#include <TUnfoldSys.h>
Enumerator | |
---|---|
kSysErrModeMatrix | |
kSysErrModeShift | |
kSysErrModeRelative |
Definition at line 83 of file TUnfoldSys.h.
|
protected |
Definition at line 135 of file TUnfoldSys.cxx.
TUnfoldSys::TUnfoldSys | ( | const TH2 * | hist_A, |
EHistMap | histmap, | ||
ERegMode | regmode = kRegModeSize , |
||
EConstraint | constraint = kEConstraintArea |
||
) |
Definition at line 142 of file TUnfoldSys.cxx.
|
virtual |
void TUnfoldSys::AddSysError | ( | const TH2 * | sysError, |
const char * | name, | ||
EHistMap | histmap, | ||
ESysErrMode | mode | ||
) |
Definition at line 217 of file TUnfoldSys.cxx.
Reimplemented from TUnfold.
Definition at line 608 of file TUnfoldSys.cxx.
Definition at line 300 of file TUnfoldSys.cxx.
void TUnfoldSys::GetBackground | ( | TH1 * | bgr, |
const char * | bgrSource = 0 , |
||
const Int_t * | binMap = 0 , |
||
Int_t | includeError = 3 , |
||
Bool_t | clearHist = kTRUE |
||
) | const |
Definition at line 480 of file TUnfoldSys.cxx.
Definition at line 1187 of file TUnfoldSys.cxx.
Bool_t TUnfoldSys::GetDeltaSysBackgroundScale | ( | TH1 * | delta, |
const char * | source, | ||
const Int_t * | binMap = 0 |
||
) |
Definition at line 958 of file TUnfoldSys.cxx.
Bool_t TUnfoldSys::GetDeltaSysSource | ( | TH1 * | hist_delta, |
const char * | source, | ||
const Int_t * | binMap = 0 |
||
) |
Definition at line 940 of file TUnfoldSys.cxx.
Definition at line 980 of file TUnfoldSys.cxx.
|
protected |
Definition at line 1076 of file TUnfoldSys.cxx.
void TUnfoldSys::GetEmatrixInput | ( | TH2 * | ematrix, |
const Int_t * | binMap = 0 , |
||
Bool_t | clearEmat = kTRUE |
||
) |
Definition at line 1047 of file TUnfoldSys.cxx.
void TUnfoldSys::GetEmatrixSysBackgroundScale | ( | TH2 * | ematrix, |
const char * | source, | ||
const Int_t * | binMap = 0 , |
||
Bool_t | clearEmat = kTRUE |
||
) |
Definition at line 1010 of file TUnfoldSys.cxx.
void TUnfoldSys::GetEmatrixSysBackgroundUncorr | ( | TH2 * | ematrix, |
const char * | source, | ||
const Int_t * | binMap = 0 , |
||
Bool_t | clearEmat = kTRUE |
||
) |
Definition at line 1057 of file TUnfoldSys.cxx.
void TUnfoldSys::GetEmatrixSysSource | ( | TH2 * | ematrix, |
const char * | source, | ||
const Int_t * | binMap = 0 , |
||
Bool_t | clearEmat = kTRUE |
||
) |
Definition at line 991 of file TUnfoldSys.cxx.
void TUnfoldSys::GetEmatrixSysTau | ( | TH2 * | ematrix, |
const Int_t * | binMap = 0 , |
||
Bool_t | clearEmat = kTRUE |
||
) |
Definition at line 1031 of file TUnfoldSys.cxx.
void TUnfoldSys::GetEmatrixSysUncorr | ( | TH2 * | ematrix, |
const Int_t * | binMap = 0 , |
||
Bool_t | clearEmat = kTRUE |
||
) |
Definition at line 704 of file TUnfoldSys.cxx.
Definition at line 1094 of file TUnfoldSys.cxx.
Definition at line 1211 of file TUnfoldSys.cxx.
|
protected |
Definition at line 1150 of file TUnfoldSys.cxx.
|
protected |
Definition at line 1112 of file TUnfoldSys.cxx.
Definition at line 551 of file TUnfoldSys.cxx.
|
protectedvirtual |
Definition at line 910 of file TUnfoldSys.cxx.
Definition at line 619 of file TUnfoldSys.cxx.
|
protectedvirtual |
Definition at line 717 of file TUnfoldSys.cxx.
|
protected |
Definition at line 1227 of file TUnfoldSys.cxx.
|
virtual |
Reimplemented from TUnfold.
Definition at line 410 of file TUnfoldSys.cxx.
Definition at line 933 of file TUnfoldSys.cxx.
void TUnfoldSys::SubtractBackground | ( | const TH1 * | hist_bgr, |
const char * | name, | ||
Double_t | scale = 1.0 , |
||
Double_t | scale_error = 0.0 |
||
) |
Definition at line 441 of file TUnfoldSys.cxx.
|
protected |
Definition at line 1266 of file TUnfoldSys.cxx.
|
protected |
Definition at line 57 of file TUnfoldSys.h.
|
protected |
Definition at line 61 of file TUnfoldSys.h.
|
protected |
Definition at line 60 of file TUnfoldSys.h.
|
protected |
Definition at line 59 of file TUnfoldSys.h.
|
protected |
Definition at line 56 of file TUnfoldSys.h.
|
protected |
Definition at line 55 of file TUnfoldSys.h.
|
protected |
Definition at line 68 of file TUnfoldSys.h.
|
protected |
Definition at line 67 of file TUnfoldSys.h.
|
protected |
Definition at line 69 of file TUnfoldSys.h.
|
protected |
Definition at line 62 of file TUnfoldSys.h.
|
protected |
Definition at line 66 of file TUnfoldSys.h.
|
protected |
Definition at line 65 of file TUnfoldSys.h.
|
protected |
Definition at line 58 of file TUnfoldSys.h.
|
protected |
Definition at line 64 of file TUnfoldSys.h.
|
protected |
Definition at line 63 of file TUnfoldSys.h.