19#ifndef ROOT_TUnfoldSys
20#define ROOT_TUnfoldSys
129 const Int_t *binMap=0);
134 const Int_t *binMap=0);
#define ClassDef(name, id)
#define TUnfold_CLASS_VERSION
Service class for 2-Dim histogram classes.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
A sorted doubly linked list.
An algorithm to unfold distributions from detector to truth level, with background subtraction and pr...
void GetEmatrixSysSource(TH2 *ematrix, const char *source, const Int_t *binMap=0, Bool_t clearEmat=kTRUE)
Covariance contribution from a systematic variation of the response matrix.
TMatrixD * fAoutside
Input: underflow/overflow bins.
TMatrixDSparse * fDAinRelSq
Input: normalized errors from input matrix.
TMatrixDSparse * GetSummedErrorMatrixXX(void)
Determine total error matrix on the vector x.
Double_t GetChi2Sys(void)
Calculate total chi**2 including all systematic errors.
void VectorMapToHist(TH1 *hist_delta, const TMatrixDSparse *delta, const Int_t *binMap)
Map delta to hist_delta, possibly summing up bins.
void ScaleColumnsByVector(TMatrixDSparse *m, const TMatrixTBase< Double_t > *v) const
Scale columns of a matrix by the corresponding rows of a vector.
TMap * fDeltaCorrAx
Result: syst.shift from fSysIn on fAx.
TMatrixD * fYData
Input: fY prior to bgr subtraction.
void GetEmatrixFromVyy(const TMatrixDSparse *vyy, TH2 *ematrix, const Int_t *binMap, Bool_t clearEmat)
Propagate an error matrix on the input vector to the unfolding result.
void GetBackground(TH1 *bgr, const char *bgrSource=0, const Int_t *binMap=0, Int_t includeError=3, Bool_t clearHist=kTRUE) const
Get background into a histogram.
void InitTUnfoldSys(void)
Initialize pointers and TMaps.
void GetEmatrixSysBackgroundScale(TH2 *ematrix, const char *source, const Int_t *binMap=0, Bool_t clearEmat=kTRUE)
Covariance contribution from background normalisation uncertainty.
TMatrixDSparse * fVyyData
Input: error on fY prior to bgr subtraction.
Bool_t GetDeltaSysSource(TH1 *hist_delta, const char *source, const Int_t *binMap=0)
Correlated one-sigma shifts correspinding to a given systematic uncertainty.
TMatrixDSparse * fEmatUncorrAx
Result: syst.error from fDA2 on fAx.
void DoBackgroundSubtraction(void)
Perform background subtraction.
TMatrixDSparse * GetSummedErrorMatrixYY(void)
Determine total error matrix on the vector Ax.
Double_t fDtau
Input: error on tau.
void GetEmatrixInput(TH2 *ematrix, const Int_t *binMap=0, Bool_t clearEmat=kTRUE)
Covariance matrix contribution from input measurement uncertainties.
Bool_t GetDeltaSysBackgroundScale(TH1 *delta, const char *source, const Int_t *binMap=0)
Correlated one-sigma shifts from background normalisation uncertainty.
ESysErrMode
type of matrix specified with AddSysError()
@ kSysErrModeRelative
matrix gives the relative shifts
@ kSysErrModeMatrix
matrix is an alternative to the default matrix, the errors are the difference to the original matrix
@ kSysErrModeShift
matrix gives the absolute shifts
Bool_t GetDeltaSysTau(TH1 *delta, const Int_t *binMap=0)
Correlated one-sigma shifts from shifting tau.
virtual TMatrixDSparse * PrepareUncorrEmat(const TMatrixDSparse *m1, const TMatrixDSparse *m2)
Propagate uncorrelated systematic errors to a covariance matrix.
virtual void ClearResults(void)
Clear all data members which depend on the unfolding results.
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)
Define the input data for subsequent calls to DoUnfold(Double_t).
TMatrixDSparse * fEmatUncorrX
Result: syst.error from fDA2 on fX.
void SubtractBackground(const TH1 *hist_bgr, const char *name, Double_t scale=1.0, Double_t scale_error=0.0)
Specify a source of background.
void GetRhoItotal(TH1 *rhoi, const Int_t *binMap=0, TH2 *invEmat=0)
Get global correlatiocn coefficients, summing up all contributions.
TMap * fBgrIn
Input: size of background sources.
TMap * fDeltaCorrX
Result: syst.shift from fSysIn on fX.
TSortedList * GetSysSources(void) const
Get a new list of all systematic uuncertainty sources.
TMatrixD * fDAinColRelSq
Input: normalized column err.sq. (inp.matr.)
TMatrixDSparse * fDeltaSysTau
Result: systematic shift from tau.
void GetEmatrixSysTau(TH2 *ematrix, const Int_t *binMap=0, Bool_t clearEmat=kTRUE)
Covariance matrix contribution from error on regularisation parameter.
void AddSysError(const TH2 *sysError, const char *name, EHistMap histmap, ESysErrMode mode)
Specify a correlated systematic uncertainty.
void SetTauError(Double_t delta_tau)
Specify an uncertainty on tau.
TMap * fBgrErrUncorrInSq
Input: uncorr error squared from bgr sources.
TUnfoldSys(void)
Only for use by root streamer or derived classes.
virtual void PrepareSysError(void)
Matrix calculations required to propagate systematic errors.
void GetEmatrixSysUncorr(TH2 *ematrix, const Int_t *binMap=0, Bool_t clearEmat=kTRUE)
Covariance contribution from uncorrelated uncertainties of the response matrix.
void GetEmatrixTotal(TH2 *ematrix, const Int_t *binMap=0)
Get total error matrix, summing up all contributions.
void GetEmatrixSysBackgroundUncorr(TH2 *ematrix, const char *source, const Int_t *binMap=0, Bool_t clearEmat=kTRUE)
Covariance contribution from background uncorrelated uncertainty.
TMap * fBgrErrScaleIn
Input: background sources correlated error.
TSortedList * GetBgrSources(void) const
Get a new list of all background sources.
virtual TMatrixDSparse * PrepareCorrEmat(const TMatrixDSparse *m1, const TMatrixDSparse *m2, const TMatrixDSparse *dsys)
Propagate correlated systematic shift to an output vector.
TMap * fSysIn
Input: correlated errors.
An algorithm to unfold distributions from detector to truth level.
EConstraint
type of extra constraint
@ kEConstraintArea
enforce preservation of the area
ERegMode
choice of regularisation scheme
@ kRegModeSize
regularise the amplitude of the output distribution
EHistMap
arrangement of axes for the response matrix (TH2 histogram)
static constexpr double m2