ROOT 6.12/07 Reference Guide |
An algorithm to unfold distributions from detector to truth level.
TUnfoldDensity is used to decompose a measurement y into several sources x, given the measurement uncertainties, background b and a matrix of migrations A. The method can be applied to a large number of problems, where the measured distribution y is a linear superposition of several Monte Carlo shapes. Beyond such a simple template fit, TUnfoldDensity has an adjustable regularisation term and also supports an optional constraint on the total number of events. Background sources can be specified, with a normalisation constant and normalisation uncertainty. In addition, variants of the response matrix may be specified, these are taken to determine systematic uncertainties. Complex, multidimensional arrangements of signal and background bins are managed with the help of the class TUnfoldBinning.
If you use this software, please consider the following citation
S.Schmitt, JINST 7 (2012) T10003 [arXiv:1205.6201]
Detailed documentation and updates are available on http://www.desy.de/~sschmitt
A detailed documentation of the various GetXXX() methods to control systematic uncertainties is given with the method TUnfoldSys.
in literature on unfolding, the "standard" test case is a one-dimensional distribution without underflow or overflow bins. The migration matrix is almost diagonal.
This "standard" case is rarely realized for real problems.
Often one has to deal with multi-dimensional distributions. In addition, there are underflow and overflow bins or other background bins, possibly determined with the help of auxiliary measurements.
In TUnfoldDensity, such complex binning schemes are handled with the help of the class TUnfoldBinning. For both the measurement and the truth there is a tree structure. The tree nodes may correspond to single bins (e.g. nuisance parameters) or may hold multi-dimensional distributions.
For example, the "measurement" tree could have two leaves, one for the primary distribution and one for auxiliary measurements. Similarly, the "truth" tree could have two leaves, one for the signal and one for the background. Each of the leaves may then have a multi-dimensional distribution.
The class TUnfoldBinning takes care to map all bins of the "measurement" to a one-dimensional vector y. Similarly, the "truth" bins are mapped to the vector x.
In TUnfoldDensity, two methods are implemented to determine tau**2
Each of the algorithms has its own advantages and disadvantages. The algorithm (1) does not work if the input data are too similar to the MC prediction. Typical no-go cases of the L-curve scan are:
The algorithm (2) only works if the variable does have a real minimum as a function of tau. If global correlations are minimized, the situation is as follows: The matrix of migration typically introduces negative correlations. The area constraint introduces some positive correlation. Regularisation on the "size" introduces no correlation. Regularisation on 1st or 2nd derivatives adds positive correlations.
For these reasons, "size" regularisation does not work well with the tau-scan: the higher tau, the smaller rho, but there is no minimum. As a result, large values of tau (too strong regularisation) are found. In contrast, the tau-scan is expected to work better with 1st or 2nd derivative regularisation, because at some point the negative correlations from migrations are approximately cancelled by the positive correlations from the regularisation conditions.
whichever algorithm is used, the output has to be checked:
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/.
Version 17.6, with updated doxygen comments and bug-fixes in TUnfoldBinning
Definition at line 48 of file TUnfoldDensity.h.
Public Types | |
enum | EDensityMode { kDensityModeNone =0, kDensityModeBinWidth =1, kDensityModeUser =2, kDensityModeBinWidthAndUser =3 } |
choice of regularisation scale factors to cinstruct the matrix L More... | |
enum | EScanTauMode { kEScanTauRhoAvg =0, kEScanTauRhoMax =1, kEScanTauRhoAvgSys =2, kEScanTauRhoMaxSys =3, kEScanTauRhoSquareAvg =4, kEScanTauRhoSquareAvgSys =5 } |
scan mode for correlation scan More... | |
Public Types inherited from TUnfoldSys | |
enum | ESysErrMode { kSysErrModeMatrix =0, kSysErrModeShift =1, kSysErrModeRelative =2 } |
type of matrix specified with AddSysError() More... | |
Public Types inherited from TUnfold | |
enum | EConstraint { kEConstraintNone =0, kEConstraintArea =1 } |
type of extra constraint More... | |
enum | EHistMap { kHistMapOutputHoriz = 0, kHistMapOutputVert = 1 } |
arrangement of axes for the response matrix (TH2 histogram) More... | |
enum | ERegMode { kRegModeNone = 0, kRegModeSize = 1, kRegModeDerivative = 2, kRegModeCurvature = 3, kRegModeMixed = 4 } |
choice of regularisation scheme More... | |
Public Types inherited from TObject | |
enum | { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kInconsistent = 0x08000000, kBitMask = 0x00ffffff } |
enum | { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) } |
enum | EDeprecatedStatusBits { kObjInCanvas = BIT(3) } |
enum | EStatusBits { kCanDelete = BIT(0), kMustCleanup = BIT(3), kIsReferenced = BIT(4), kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13) } |
Public Member Functions | |
TUnfoldDensity (void) | |
Only for use by root streamer or derived classes. More... | |
TUnfoldDensity (const TH2 *hist_A, EHistMap histmap, ERegMode regmode=kRegModeCurvature, EConstraint constraint=kEConstraintArea, EDensityMode densityMode=kDensityModeBinWidthAndUser, const TUnfoldBinning *outputBins=0, const TUnfoldBinning *inputBins=0, const char *regularisationDistribution=0, const char *regularisationAxisSteering="*[UOB]") | |
Eet up response matrix A, uncorrelated uncertainties of A, regularisation scheme and binning schemes. More... | |
virtual | ~ TUnfoldDensity (void) |
TH1 * | GetBackground (const char *histogramName, const char *bgrSource=0, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE, Int_t includeError=3) const |
Retrieve a background source in a new histogram. More... | |
TH1 * | GetBias (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) const |
Retrieve bias vector as a new histogram. More... | |
TH1 * | GetDeltaSysBackgroundScale (const char *bgrSource, const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) |
Retrieve systematic 1-sigma shift corresponding to a background scale uncertainty. More... | |
TH1 * | GetDeltaSysSource (const char *source, const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) |
Retrieve a correlated systematic 1-sigma shift. More... | |
TH1 * | GetDeltaSysTau (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) |
Retrieve 1-sigma shift corresponding to the previously specified uncertainty on tau. More... | |
TH2 * | GetEmatrixInput (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) |
Get covariance contribution from the input uncertainties (data statistical uncertainties). More... | |
TH2 * | GetEmatrixSysBackgroundUncorr (const char *bgrSource, const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) |
Retrieve covariance contribution from uncorrelated background uncertainties. More... | |
TH2 * | GetEmatrixSysUncorr (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) |
Retrieve covariance contribution from uncorrelated (statistical) uncertainties of the response matrix. More... | |
TH2 * | GetEmatrixTotal (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) |
Get covariance matrix including all contributions. More... | |
TH1 * | GetFoldedOutput (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE, Bool_t addBgr=kFALSE) const |
Retrieve unfolding result folded back as a new histogram. More... | |
TH1 * | GetInput (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) const |
Retrieve input distribution in a new histogram. More... | |
const TUnfoldBinning * | GetInputBinning (const char *distributionName=0) const |
Locate a binning node for the input (measured) quantities. More... | |
TH2 * | GetL (const char *histogramName, const char *histogramTitle=0, Bool_t useAxisBinning=kTRUE) |
Access matrix of regularisation conditions in a new histogram. More... | |
TUnfoldBinning * | GetLBinning (void) const |
return binning scheme for regularisation conditions (matrix L) More... | |
TH1 * | GetLxMinusBias (const char *histogramName, const char *histogramTitle=0) |
Get regularisation conditions multiplied by result vector minus bias L(x-biasScale*biasVector). More... | |
TH1 * | GetOutput (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) const |
retrieve unfolding result as a new histogram More... | |
const TUnfoldBinning * | GetOutputBinning (const char *distributionName=0) const |
Locate a binning node for the unfolded (truth level) quantities. More... | |
TH2 * | GetProbabilityMatrix (const char *histogramName, const char *histogramTitle=0, Bool_t useAxisBinning=kTRUE) const |
Get matrix of probabilities in a new histogram. More... | |
TH2 * | GetRhoIJtotal (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE) |
Retrieve correlation coefficients, including all uncertainties. More... | |
TH1 * | GetRhoIstatbgr (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE, TH2 **ematInv=0) |
Retrieve global correlation coefficients including input (statistical) and background uncertainties. More... | |
TH1 * | GetRhoItotal (const char *histogramName, const char *histogramTitle=0, const char *distributionName=0, const char *projectionMode=0, Bool_t useAxisBinning=kTRUE, TH2 **ematInv=0) |
Retrieve global correlation coefficients including all uncertainty sources. More... | |
virtual Double_t | GetScanVariable (Int_t mode, const char *distribution, const char *projectionMode) |
Calculate the function for ScanTau(). More... | |
void | RegularizeDistribution (ERegMode regmode, EDensityMode densityMode, const char *distribution, const char *axisSteering) |
Set up regularisation conditions. More... | |
virtual Int_t | ScanTau (Int_t nPoint, Double_t tauMin, Double_t tauMax, TSpline **scanResult, Int_t mode=kEScanTauRhoAvg, const char *distribution=0, const char *projectionMode=0, TGraph **lCurvePlot=0, TSpline **logTauXPlot=0, TSpline **logTauYPlot=0) |
Scan a function wrt tau and determine the minimum. More... | |
Public Member Functions inherited from TUnfoldSys | |
TUnfoldSys (const TH2 *hist_A, EHistMap histmap, ERegMode regmode=kRegModeSize, EConstraint constraint=kEConstraintArea) | |
Set up response matrix A, uncorrelated uncertainties of A and regularisation scheme. More... | |
TUnfoldSys (void) | |
Only for use by root streamer or derived classes. More... | |
virtual | ~ TUnfoldSys (void) |
void | AddSysError (const TH2 *sysError, const char *name, EHistMap histmap, ESysErrMode mode) |
Specify a correlated systematic uncertainty. More... | |
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. More... | |
TSortedList * | GetBgrSources (void) const |
Get a new list of all background sources. More... | |
Double_t | GetChi2Sys (void) |
Calculate total chi**2 including all systematic errors. More... | |
Bool_t | GetDeltaSysBackgroundScale (TH1 *delta, const char *source, const Int_t *binMap=0) |
Correlated one-sigma shifts from background normalisation uncertainty. More... | |
Bool_t | GetDeltaSysSource (TH1 *hist_delta, const char *source, const Int_t *binMap=0) |
Correlated one-sigma shifts correspinding to a given systematic uncertainty. More... | |
Bool_t | GetDeltaSysTau (TH1 *delta, const Int_t *binMap=0) |
Correlated one-sigma shifts from shifting tau. More... | |
void | GetEmatrixInput (TH2 *ematrix, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
Covariance matrix contribution from input measurement uncertainties. More... | |
void | GetEmatrixSysBackgroundScale (TH2 *ematrix, const char *source, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
Covariance contribution from background normalisation uncertainty. More... | |
void | GetEmatrixSysBackgroundUncorr (TH2 *ematrix, const char *source, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
Covariance contribution from background uncorrelated uncertainty. More... | |
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. More... | |
void | GetEmatrixSysTau (TH2 *ematrix, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
Covariance matrix contribution from error on regularisation parameter. More... | |
void | GetEmatrixSysUncorr (TH2 *ematrix, const Int_t *binMap=0, Bool_t clearEmat=kTRUE) |
Covariance contribution from uncorrelated uncertainties of the response matrix. More... | |
void | GetEmatrixTotal (TH2 *ematrix, const Int_t *binMap=0) |
Get total error matrix, summing up all contributions. More... | |
void | GetRhoItotal (TH1 *rhoi, const Int_t *binMap=0, TH2 *invEmat=0) |
Get global correlatiocn coefficients, summing up all contributions. More... | |
TSortedList * | GetSysSources (void) const |
Get a new list of all systematic uuncertainty sources. More... | |
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). More... | |
void | SetTauError (Double_t delta_tau) |
Specify an uncertainty on tau. More... | |
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. More... | |
Public Member Functions inherited from TUnfold | |
TUnfold (const TH2 *hist_A, EHistMap histmap, ERegMode regmode=kRegModeSize, EConstraint constraint=kEConstraintArea) | |
Set up response matrix and regularisation scheme. More... | |
TUnfold (void) | |
Only for use by root streamer or derived classes. More... | |
virtual | ~TUnfold (void) |
virtual Double_t | DoUnfold (Double_t tau) |
Perform the unfolding for a given regularisation parameter tau. More... | |
Double_t | DoUnfold (Double_t tau, const TH1 *hist_y, Double_t scaleBias=0.0) |
Perform the unfolding for a given input and regularisation. More... | |
void | GetBias (TH1 *bias, const Int_t *binMap=0) const |
Get bias vector including bias scale. More... | |
Double_t | GetChi2A (void) const |
get χ2A contribution determined in recent unfolding More... | |
Double_t | GetChi2L (void) const |
Get \( chi^{2}_{L} \) contribution determined in recent unfolding. More... | |
void | GetEmatrix (TH2 *ematrix, const Int_t *binMap=0) const |
Get output covariance matrix, possibly cumulated over several bins. More... | |
Double_t | GetEpsMatrix (void) const |
get numerical accuracy for Eigenvalue analysis when inverting matrices with rank problems More... | |
void | GetFoldedOutput (TH1 *folded, const Int_t *binMap=0) const |
Get unfolding result on detector level. More... | |
void | GetInput (TH1 *inputData, const Int_t *binMap=0) const |
Input vector of measurements. More... | |
void | GetInputInverseEmatrix (TH2 *ematrix) |
Get inverse of the measurement's covariance matrix. More... | |
void | GetL (TH2 *l) const |
Get matrix of regularisation conditions. More... | |
virtual Double_t | GetLcurveX (void) const |
Get value on x-axis of L-curve determined in recent unfolding. More... | |
virtual Double_t | GetLcurveY (void) const |
Get value on y-axis of L-curve determined in recent unfolding. More... | |
void | GetLsquared (TH2 *lsquared) const |
Get matrix of regularisation conditions squared. More... | |
Int_t | GetNdf (void) const |
get number of degrees of freedom determined in recent unfolding More... | |
void | GetNormalisationVector (TH1 *s, const Int_t *binMap=0) const |
Histogram of truth bins, determined from summing over the response matrix. More... | |
Int_t | GetNpar (void) const |
Get number of truth parameters determined in recent unfolding. More... | |
Int_t | GetNr (void) const |
Get number of regularisation conditions. More... | |
void | GetOutput (TH1 *output, const Int_t *binMap=0) const |
Get output distribution, possibly cumulated over several bins. More... | |
void | GetProbabilityMatrix (TH2 *A, EHistMap histmap) const |
Get matrix of probabilities. More... | |
Double_t | GetRhoAvg (void) const |
get average global correlation determined in recent unfolding More... | |
Double_t | GetRhoI (TH1 *rhoi, const Int_t *binMap=0, TH2 *invEmat=0) const |
Get global correlation coefficients, possibly cumulated over several bins. More... | |
void | GetRhoIJ (TH2 *rhoij, const Int_t *binMap=0) const |
Get correlation coefficients, possibly cumulated over several bins. More... | |
Double_t | GetRhoMax (void) const |
get maximum global correlation determined in recent unfolding More... | |
Double_t | GetTau (void) const |
Return regularisation parameter. More... | |
Int_t | RegularizeBins (int start, int step, int nbin, ERegMode regmode) |
Add regularisation conditions for a group of bins. More... | |
Int_t | RegularizeBins2D (int start_bin, int step1, int nbin1, int step2, int nbin2, ERegMode regmode) |
Add regularisation conditions for 2d unfolding. More... | |
Int_t | RegularizeCurvature (int left_bin, int center_bin, int right_bin, Double_t scale_left=1.0, Double_t scale_right=1.0) |
Add a regularisation condition on the curvature of three truth bin. More... | |
Int_t | RegularizeDerivative (int left_bin, int right_bin, Double_t scale=1.0) |
Add a regularisation condition on the difference of two truth bin. More... | |
Int_t | RegularizeSize (int bin, Double_t scale=1.0) |
Add a regularisation condition on the magnitude of a truth bin. More... | |
virtual Int_t | ScanLcurve (Int_t nPoint, Double_t tauMin, Double_t tauMax, TGraph **lCurve, TSpline **logTauX=0, TSpline **logTauY=0, TSpline **logTauCurvature=0) |
Scan the L curve, determine tau and unfold at the final value of tau. More... | |
void | SetBias (const TH1 *bias) |
Set bias vector. More... | |
void | SetConstraint (EConstraint constraint) |
Set type of area constraint. More... | |
void | SetEpsMatrix (Double_t eps) |
set numerical accuracy for Eigenvalue analysis when inverting matrices with rank problems More... | |
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... | |
ULong_t | CheckedHash () |
Checked and record whether for this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. 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 selected pad for instance with: gROOT->SetSelectedPad(gPad) . 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... | |
Bool_t | HasInconsistentHash () const |
Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. 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... | |
R__ALWAYS_INLINE Bool_t | IsOnHeap () const |
virtual Bool_t | IsSortable () const |
R__ALWAYS_INLINE 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... | |
R__ALWAYS_INLINE 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 Member Functions | |
Double_t | GetDensityFactor (EDensityMode densityMode, Int_t iBin) const |
Density correction factor for a given bin. More... | |
virtual TString | GetOutputBinName (Int_t iBinX) const |
Get bin name of an output bin. More... | |
void | RegularizeDistributionRecursive (const TUnfoldBinning *binning, ERegMode regmode, EDensityMode densityMode, const char *distribution, const char *axisSteering) |
Recursively add regularisation conditions for this node and its children. More... | |
void | RegularizeOneDistribution (const TUnfoldBinning *binning, ERegMode regmode, EDensityMode densityMode, const char *axisSteering) |
Regularize the distribution of the given node. More... | |
Protected Member Functions inherited from TUnfoldSys | |
virtual void | ClearResults (void) |
Clear all data members which depend on the unfolding results. More... | |
void | DoBackgroundSubtraction (void) |
Perform background subtraction. More... | |
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. More... | |
TMatrixDSparse * | GetSummedErrorMatrixXX (void) |
Determine total error matrix on the vector x. More... | |
TMatrixDSparse * | GetSummedErrorMatrixYY (void) |
Determine total error matrix on the vector Ax. More... | |
virtual TMatrixDSparse * | PrepareCorrEmat (const TMatrixDSparse *m1, const TMatrixDSparse *m2, const TMatrixDSparse *dsys) |
Propagate correlated systematic shift to an output vector. More... | |
virtual void | PrepareSysError (void) |
Matrix calculations required to propagate systematic errors. More... | |
virtual TMatrixDSparse * | PrepareUncorrEmat (const TMatrixDSparse *m1, const TMatrixDSparse *m2) |
Propagate uncorrelated systematic errors to a covariance matrix. More... | |
void | ScaleColumnsByVector (TMatrixDSparse *m, const TMatrixTBase< Double_t > *v) const |
Scale columns of a matrix by the corresponding rows of a vector. More... | |
void | VectorMapToHist (TH1 *hist_delta, const TMatrixDSparse *delta, const Int_t *binMap) |
Map delta to hist_delta, possibly summing up bins. More... | |
Protected Member Functions inherited from TUnfold | |
void | AddMSparse (TMatrixDSparse *dest, Double_t f, const TMatrixDSparse *src) const |
Add a sparse matrix, scaled by a factor, to another scaled matrix. More... | |
Bool_t | AddRegularisationCondition (Int_t i0, Double_t f0, Int_t i1=-1, Double_t f1=0., Int_t i2=-1, Double_t f2=0.) |
Add a row of regularisation conditions to the matrix L. More... | |
Bool_t | AddRegularisationCondition (Int_t nEle, const Int_t *indices, const Double_t *rowData) |
Add a row of regularisation conditions to the matrix L. More... | |
void | ClearHistogram (TH1 *h, Double_t x=0.) const |
Initialize bin contents and bin errors for a given histogram. More... | |
TMatrixDSparse * | CreateSparseMatrix (Int_t nrow, Int_t ncol, Int_t nele, Int_t *row, Int_t *col, Double_t *data) const |
Create a sparse matrix, given the nonzero elements. More... | |
virtual Double_t | DoUnfold (void) |
Core unfolding algorithm. More... | |
void | ErrorMatrixToHist (TH2 *ematrix, const TMatrixDSparse *emat, const Int_t *binMap, Bool_t doClear) const |
Add up an error matrix, also respecting the bin mapping. More... | |
const TMatrixDSparse * | GetAx (void) const |
vector of folded-back result More... | |
Int_t | GetBinFromRow (int ix) const |
converts matrix row to truth histogram bin number More... | |
const TMatrixDSparse * | GetDXDAM (int i) const |
matrix contributions of the derivative dx/dA More... | |
const TMatrixDSparse * | GetDXDAZ (int i) const |
vector contributions of the derivative dx/dA More... | |
const TMatrixDSparse * | GetDXDtauSquared (void) const |
vector of derivative dx/dtauSquared, using internal bin counting More... | |
const TMatrixDSparse * | GetDXDY (void) const |
matrix of derivatives dx/dy More... | |
const TMatrixDSparse * | GetE (void) const |
matrix E, using internal bin counting More... | |
const TMatrixDSparse * | GetEinv (void) const |
matrix E-1, using internal bin counting More... | |
Int_t | GetNx (void) const |
returns internal number of output (truth) matrix rows More... | |
Int_t | GetNy (void) const |
returns the number of measurement bins More... | |
Double_t | GetRhoIFromMatrix (TH1 *rhoi, const TMatrixDSparse *eOrig, const Int_t *binMap, TH2 *invEmat) const |
Get global correlation coefficients with arbitrary min map. More... | |
Int_t | GetRowFromBin (int ix) const |
converts truth histogram bin number to matrix row More... | |
const TMatrixDSparse * | GetVxx (void) const |
covariance matrix of the result More... | |
const TMatrixDSparse * | GetVxxInv (void) const |
inverse of covariance matrix of the result More... | |
const TMatrixDSparse * | GetVyyInv (void) const |
inverse of covariance matrix of the data y More... | |
const TMatrixD * | GetX (void) const |
vector of the unfolding result More... | |
TMatrixDSparse * | InvertMSparseSymmPos (const TMatrixDSparse *A, Int_t *rank) const |
Get the inverse or pseudo-inverse of a positive, sparse matrix. More... | |
TMatrixDSparse * | MultiplyMSparseM (const TMatrixDSparse *a, const TMatrixD *b) const |
Multiply sparse matrix and a non-sparse matrix. More... | |
TMatrixDSparse * | MultiplyMSparseMSparse (const TMatrixDSparse *a, const TMatrixDSparse *b) const |
Multiply two sparse matrices. More... | |
TMatrixDSparse * | MultiplyMSparseMSparseTranspVector (const TMatrixDSparse *m1, const TMatrixDSparse *m2, const TMatrixTBase< Double_t > *v) const |
Calculate a sparse matrix product \( M1*V*M2^{T} \) where the diagonal matrix V is given by a vector. More... | |
TMatrixDSparse * | MultiplyMSparseTranspMSparse (const TMatrixDSparse *a, const TMatrixDSparse *b) const |
Multiply a transposed Sparse matrix with another sparse matrix,. More... | |
Protected Member Functions inherited from TObject | |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
Interface to ErrorHandler (protected). More... | |
void | MakeZombie () |
Protected Attributes | |
const TUnfoldBinning * | fConstInputBins |
binning scheme for the input (detector level) More... | |
const TUnfoldBinning * | fConstOutputBins |
binning scheme for the output (truth level) More... | |
TUnfoldBinning * | fOwnedInputBins |
pointer to input binning scheme if owned by this class More... | |
TUnfoldBinning * | fOwnedOutputBins |
pointer to output binning scheme if owned by this class More... | |
TUnfoldBinning * | fRegularisationConditions |
binning scheme for the regularisation conditions More... | |
Protected Attributes inherited from TUnfoldSys | |
TMatrixD * | fAoutside |
Input: underflow/overflow bins. More... | |
TMap * | fBgrErrScaleIn |
Input: background sources correlated error. More... | |
TMap * | fBgrErrUncorrInSq |
Input: uncorr error squared from bgr sources. More... | |
TMap * | fBgrIn |
Input: size of background sources. More... | |
TMatrixD * | fDAinColRelSq |
Input: normalized column err.sq. (inp.matr.) More... | |
TMatrixDSparse * | fDAinRelSq |
Input: normalized errors from input matrix. More... | |
TMap * | fDeltaCorrAx |
Result: syst.shift from fSysIn on fAx. More... | |
TMap * | fDeltaCorrX |
Result: syst.shift from fSysIn on fX. More... | |
TMatrixDSparse * | fDeltaSysTau |
Result: systematic shift from tau. More... | |
Double_t | fDtau |
Input: error on tau. More... | |
TMatrixDSparse * | fEmatUncorrAx |
Result: syst.error from fDA2 on fAx. More... | |
TMatrixDSparse * | fEmatUncorrX |
Result: syst.error from fDA2 on fX. More... | |
TMap * | fSysIn |
Input: correlated errors. More... | |
TMatrixDSparse * | fVyyData |
Input: error on fY prior to bgr subtraction. More... | |
TMatrixD * | fYData |
Input: fY prior to bgr subtraction. More... | |
Protected Attributes inherited from TUnfold | |
TMatrixDSparse * | fA |
response matrix A More... | |
Double_t | fBiasScale |
scale factor for the bias More... | |
EConstraint | fConstraint |
type of constraint to use for the unfolding More... | |
TArrayI | fHistToX |
mapping of histogram bins to matrix indices More... | |
TMatrixDSparse * | fL |
regularisation conditions L More... | |
ERegMode | fRegMode |
type of regularisation More... | |
TArrayD | fSumOverY |
truth vector calculated from the non-normalized response matrix More... | |
Double_t | fTauSquared |
regularisation parameter tau squared More... | |
TMatrixDSparse * | fVyy |
covariance matrix Vyy corresponding to y More... | |
TMatrixD * | fX0 |
bias vector x0 More... | |
TArrayI | fXToHist |
mapping of matrix indices to histogram bins More... | |
TMatrixD * | fY |
input (measured) data y More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from TUnfold | |
static const char * | GetTUnfoldVersion (void) |
Return a string describing the TUnfold version. More... | |
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) |
delete matrix and invalidate pointer More... | |
static void | DeleteMatrix (TMatrixDSparse **m) |
delete sparse matrix and invalidate pointer More... | |
#include <TUnfoldDensity.h>
choice of regularisation scale factors to cinstruct the matrix L
Enumerator | |
---|---|
kDensityModeNone | no scale factors, matrix L is similar to unity matrix |
kDensityModeBinWidth | scale factors from multidimensional bin width |
kDensityModeUser | scale factors from user function in TUnfoldBinning |
kDensityModeBinWidthAndUser | scale factors from multidimensional bin width and user function |
Definition at line 63 of file TUnfoldDensity.h.
scan mode for correlation scan
Enumerator | |
---|---|
kEScanTauRhoAvg | average global correlation coefficient (from TUnfold::GetRhoI()) |
kEScanTauRhoMax | maximum global correlation coefficient (from TUnfold::GetRhoI()) |
kEScanTauRhoAvgSys | average global correlation coefficient (from TUnfoldSys::GetRhoItotal()) |
kEScanTauRhoMaxSys | maximum global correlation coefficient (from TUnfoldSys::GetRhoItotal()) |
kEScanTauRhoSquareAvg | average global correlation coefficient squared (from TUnfold::GetRhoI()) |
kEScanTauRhoSquareAvgSys | average global correlation coefficient squared (from TUnfoldSys::GetRhoItotal()) |
Definition at line 105 of file TUnfoldDensity.h.
TUnfoldDensity::TUnfoldDensity | ( | void | ) |
Only for use by root streamer or derived classes.
Definition at line 177 of file TUnfoldDensity.cxx.
TUnfoldDensity::TUnfoldDensity | ( | const TH2 * | hist_A, |
EHistMap | histmap, | ||
ERegMode | regmode = kRegModeCurvature , |
||
EConstraint | constraint = kEConstraintArea , |
||
EDensityMode | densityMode = kDensityModeBinWidthAndUser , |
||
const TUnfoldBinning * | outputBins = 0 , |
||
const TUnfoldBinning * | inputBins = 0 , |
||
const char * | regularisationDistribution = 0 , |
||
const char * | regularisationAxisSteering = "*[UOB]" |
||
) |
Eet up response matrix A, uncorrelated uncertainties of A, regularisation scheme and binning schemes.
[in] | hist_A | matrix that describes the migrations |
[in] | histmap | mapping of the histogram axes to the unfolding output |
[in] | regmode | (default=kRegModeSize) global regularisation mode |
[in] | constraint | (default=kEConstraintArea) type of constraint |
[in] | densityMode | (default=kDensityModeBinWidthAndUser) regularisation scale factors to construct the matrix L |
[in] | outputBins | (default=0) binning scheme for truth (unfolding output) |
[in] | inputBins | (default=0) binning scheme for measurement (unfolding input) |
[in] | regularisationDistribution | (default=0) selection of regularized distribution |
[in] | regularisationAxisSteering | (default=0) detailed regularisation steering for selected distribution |
The parameters hist_A, histmap, constraint are explained with the TUnfoldSys constructor.
The parameters outputBins,inputBins set the binning schemes. If these arguments are zero, simple binning schemes are constructed which correspond to the axes of the histogram hist_A.
The parameters regmode, densityMode, regularisationDistribution, regularisationAxisSteering together control how the initial matrix L of regularisation conditions is constructed. as explained in RegularizeDistribution().
Definition at line 218 of file TUnfoldDensity.cxx.
|
virtual |
TH1 * TUnfoldDensity::GetBackground | ( | const char * | histogramName, |
const char * | bgrSource = 0 , |
||
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE , |
||
Int_t | includeError = 3 |
||
) | const |
Retrieve a background source in a new histogram.
[in] | histogramName | name of the histogram |
[in] | bgrSource | the background source to retrieve |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
[in] | includeError | (default=3) type of background errors to be included (+1 uncorrelated bgr errors, +2 correlated bgr errors) |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 751 of file TUnfoldDensity.cxx.
TH1 * TUnfoldDensity::GetBias | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) | const |
Retrieve bias vector as a new histogram.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 683 of file TUnfoldDensity.cxx.
TH1 * TUnfoldDensity::GetDeltaSysBackgroundScale | ( | const char * | bgrSource, |
const char * | histogramName, | ||
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) |
Retrieve systematic 1-sigma shift corresponding to a background scale uncertainty.
[in] | bgrSource | identifier of the background |
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 947 of file TUnfoldDensity.cxx.
TH1 * TUnfoldDensity::GetDeltaSysSource | ( | const char * | source, |
const char * | histogramName, | ||
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) |
Retrieve a correlated systematic 1-sigma shift.
[in] | source | identifier of the systematic uncertainty source |
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 913 of file TUnfoldDensity.cxx.
TH1 * TUnfoldDensity::GetDeltaSysTau | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) |
Retrieve 1-sigma shift corresponding to the previously specified uncertainty on tau.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 980 of file TUnfoldDensity.cxx.
|
protected |
Density correction factor for a given bin.
[in] | densityMode | type of factor to calculate |
[in] | iBin | bin number |
return a multiplicative factor, for scaling the regularisation conditions from this bin.
For densityMode=kDensityModeNone the factor is set to unity. For densityMode=kDensityModeBinWidth the factor is set to 1/binArea where the binArea is the product of the bin widths in all dimensions. If the width of a bin is zero or can not be determined, the factor is set to zero. For densityMode=kDensityModeUser the factor is determined from the method TUnfoldBinning::GetBinFactor(). For densityMode=kDensityModeBinWidthAndUser, the results of kDensityModeBinWidth and kDensityModeUser are multiplied.
Definition at line 333 of file TUnfoldDensity.cxx.
TH2 * TUnfoldDensity::GetEmatrixInput | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) |
Get covariance contribution from the input uncertainties (data statistical uncertainties).
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 1126 of file TUnfoldDensity.cxx.
TH2 * TUnfoldDensity::GetEmatrixSysBackgroundUncorr | ( | const char * | bgrSource, |
const char * | histogramName, | ||
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) |
Retrieve covariance contribution from uncorrelated background uncertainties.
[in] | bgrSource | identifier of the background |
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 1095 of file TUnfoldDensity.cxx.
TH2 * TUnfoldDensity::GetEmatrixSysUncorr | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) |
Retrieve covariance contribution from uncorrelated (statistical) uncertainties of the response matrix.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 1064 of file TUnfoldDensity.cxx.
TH2 * TUnfoldDensity::GetEmatrixTotal | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) |
Get covariance matrix including all contributions.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 1178 of file TUnfoldDensity.cxx.
TH1 * TUnfoldDensity::GetFoldedOutput | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE , |
||
Bool_t | addBgr = kFALSE |
||
) | const |
Retrieve unfolding result folded back as a new histogram.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
[in] | addBgr | (default=false) if true, include the background contribution (useful for direct comparison to data) |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 715 of file TUnfoldDensity.cxx.
TH1 * TUnfoldDensity::GetInput | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) | const |
Retrieve input distribution in a new histogram.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 781 of file TUnfoldDensity.cxx.
const TUnfoldBinning * TUnfoldDensity::GetInputBinning | ( | const char * | distributionName = 0 | ) | const |
Locate a binning node for the input (measured) quantities.
[in] | distributionName | (default=0) distribution to look for. if zero, return the root node |
returns: pointer to a TUnfoldBinning object or zero if not found
Definition at line 1282 of file TUnfoldDensity.cxx.
TH2 * TUnfoldDensity::GetL | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) |
Access matrix of regularisation conditions in a new histogram.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. if histogramTitle is null, choose a title automatically.
Definition at line 1205 of file TUnfoldDensity.cxx.
|
inline |
return binning scheme for regularisation conditions (matrix L)
Definition at line 197 of file TUnfoldDensity.h.
TH1 * TUnfoldDensity::GetLxMinusBias | ( | const char * | histogramName, |
const char * | histogramTitle = 0 |
||
) |
Get regularisation conditions multiplied by result vector minus bias L(x-biasScale*biasVector).
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
returns a new histogram. This is a measure of the level of regularization required per regularisation condition. If there are (negative or positive) spikes, these regularisation conditions dominate over the other regularisation conditions and may introduce the largest biases.
Definition at line 1243 of file TUnfoldDensity.cxx.
TH1 * TUnfoldDensity::GetOutput | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) | const |
retrieve unfolding result as a new histogram
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
return value: pointer to a new histogram. If useAxisBinning is set and if the selected distribution fits into a root histogram (1,2,3 dimensions) then return a histogram with the proper binning on each axis. Otherwise, return a 1D histogram with equidistant binning. If the histogram title is zero, a title is assigned automatically.
The axisSteering is defines as follows: "axis[mode];axis[mode];..." where:
examples: imagine the binning has two axis, named x and y.
Definition at line 651 of file TUnfoldDensity.cxx.
Get bin name of an output bin.
[in] | iBinX | bin number |
Return value: name of the bin. The name is constructed from the entries in the binning scheme and includes information about the bin borders etc.
Reimplemented from TUnfold.
Definition at line 307 of file TUnfoldDensity.cxx.
const TUnfoldBinning * TUnfoldDensity::GetOutputBinning | ( | const char * | distributionName = 0 | ) | const |
Locate a binning node for the unfolded (truth level) quantities.
[in] | distributionName | (default=0) distribution to look for. if zero, return the root node |
returns: pointer to a TUnfoldBinning object or zero if not found
Definition at line 1298 of file TUnfoldDensity.cxx.
TH2 * TUnfoldDensity::GetProbabilityMatrix | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) | const |
Get matrix of probabilities in a new histogram.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. if histogramTitle is null, choose a title automatically.
Definition at line 1153 of file TUnfoldDensity.cxx.
TH2 * TUnfoldDensity::GetRhoIJtotal | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE |
||
) |
Retrieve correlation coefficients, including all uncertainties.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
returns a new histogram. See method GetOutput() for a detailed description of the arguments
Definition at line 1012 of file TUnfoldDensity.cxx.
TH1 * TUnfoldDensity::GetRhoIstatbgr | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE , |
||
TH2 ** | ematInv = 0 |
||
) |
Retrieve global correlation coefficients including input (statistical) and background uncertainties.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
[out] | ematInv | (default=0) to return the inverse covariance matrix |
returns a new histogram. See method GetOutput() for a detailed description of the arguments. The inverse of the covariance matrix is stored in a new histogram returned by ematInv if that pointer is non-zero.
Definition at line 865 of file TUnfoldDensity.cxx.
TH1 * TUnfoldDensity::GetRhoItotal | ( | const char * | histogramName, |
const char * | histogramTitle = 0 , |
||
const char * | distributionName = 0 , |
||
const char * | axisSteering = 0 , |
||
Bool_t | useAxisBinning = kTRUE , |
||
TH2 ** | ematInv = 0 |
||
) |
Retrieve global correlation coefficients including all uncertainty sources.
[in] | histogramName | name of the histogram |
[in] | histogramTitle | (default=0) title of the histogram |
[in] | distributionName | (default=0) identifier of the distribution to be extracted |
[in] | axisSteering | (default=0) detailed steering within the extracted distribution |
[in] | useAxisBinning | (default=true) if set to true, try to extract a histogram with proper binning and axis labels |
[out] | ematInv | (default=0) to return the inverse covariance matrix |
returns a new histogram. See method GetOutput() for a detailed description of the arguments. The inverse of the covariance matrix is stored in a new histogram returned by ematInv if that pointer is non-zero.
Definition at line 814 of file TUnfoldDensity.cxx.
|
virtual |
Calculate the function for ScanTau().
[in] | mode | the variable to be calculated |
[in] | distribution | distribution for which the variable is to be calculated |
[in] | axisSteering | detailed steering for selecting bins on the axes of the distribution (see method GetRhoItotal()) |
return value: the scan result for the given choice of tau (for which the unfolding was performed prior to calling this method)
In ScanTau() the unfolding is repeated for various choices of tau. For each tau, after unfolding, GetScanVariable() is called to determine the scan result for this choice of tau.
the following modes are implemented
Definition at line 1668 of file TUnfoldDensity.cxx.
void TUnfoldDensity::RegularizeDistribution | ( | ERegMode | regmode, |
EDensityMode | densityMode, | ||
const char * | distribution, | ||
const char * | axisSteering | ||
) |
Set up regularisation conditions.
[in] | regmode | basic regularisation mode (see class TUnfold) |
[in] | densityMode | how to apply bin-wise factors |
[in] | distribution | name of the TUnfoldBinning node for which the regularisation conditions shall be set (zero matches all nodes) |
[in] | axisSteering | regularisation fine-tuning |
axisSteering is a string with several tokens, separated by a semicolon: "axisName[options];axisName[options];..."
.
example: axisSteering="*[UOB]"
uses bin widths to calculate derivatives but underflow/overflow bins are not regularized
Definition at line 384 of file TUnfoldDensity.cxx.
|
protected |
Recursively add regularisation conditions for this node and its children.
[in] | binning | current node |
[in] | regmode | regularisation mode |
[in] | densityMode | type of regularisation scaling |
[in] | distribution | target distribution(s) name |
[in] | axisSteering | steering within the target distribution(s) |
Definition at line 402 of file TUnfoldDensity.cxx.
|
protected |
Regularize the distribution of the given node.
[in] | binning | current node |
[in] | regmode | regularisation mode |
[in] | densityMode | type of regularisation scaling |
[in] | axisSteering | detailed steering for the axes of the distribution |
Definition at line 423 of file TUnfoldDensity.cxx.
|
virtual |
Scan a function wrt tau and determine the minimum.
[in] | nPoint | number of points to be scanned |
[in] | tauMin | smallest tau value to study |
[in] | tauMax | largest tau value to study |
[out] | scanResult | the scanned function wrt log(tau) |
[in] | mode | 1st parameter for the scan function |
[in] | distribution | 2nd parameter for the scan function |
[in] | projectionMode | 3rd parameter for the scan function |
[out] | lCurvePlot | for monitoring, shows the L-curve |
[out] | logTauXPlot | for monitoring, L-curve(X) as a function of log(tau) |
[out] | logTauYPlot | for monitoring, L-curve(Y) as a function of log(tau) |
Return value: the coordinate number on the curve scanResult which corresponds to the minimum
The function is scanned by repeating the following steps nPoint times
The method GetScanVariable() defines scans of correlation coefficients, where mode is chosen from the enum EScanTauMode. In addition one may set distribution and/or projectionMode to refine the calculation of correlations (e.g. restrict the calculation to the signal distribution and/or exclude underflow and overflow bins). See the documentation of GetScanVariable() for details. Alternative scan variables may be defined by overriding the GetScanVariable() method.
Automatic choice of scan range: if (tauMin,tauMax) do not correspond to a valid tau range (e.g. tauMin=tauMax=0.0) then the tau range is determined automatically. Use with care!
Definition at line 1344 of file TUnfoldDensity.cxx.
|
protected |
binning scheme for the input (detector level)
Definition at line 53 of file TUnfoldDensity.h.
|
protected |
binning scheme for the output (truth level)
Definition at line 51 of file TUnfoldDensity.h.
|
protected |
pointer to input binning scheme if owned by this class
Definition at line 57 of file TUnfoldDensity.h.
|
protected |
pointer to output binning scheme if owned by this class
Definition at line 55 of file TUnfoldDensity.h.
|
protected |
binning scheme for the regularisation conditions
Definition at line 59 of file TUnfoldDensity.h.