17#ifndef ROOT_TUnfoldDensity
18#define ROOT_TUnfoldDensity
85 const char *axisSteering);
99 const char *regularisationDistribution=
nullptr,
100 const char *regularisationAxisSteering=
"*[UOB]");
102 ~ TUnfoldDensity(
void)
override;
105 const char *distribution,
106 const char *axisSteering);
126 const char *distribution=
nullptr,
const char *projectionMode=
nullptr,
TGraph **lCurvePlot=
nullptr,
TSpline **logTauXPlot=
nullptr,
TSpline **logTauYPlot=
nullptr);
130 const char *histogramTitle=
nullptr,
const char *distributionName=
nullptr,
131 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE)
const;
133 const char *histogramTitle=
nullptr,
const char *distributionName=
nullptr,
134 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE)
const;
136 const char *histogramTitle=
nullptr,
137 const char *distributionName=
nullptr,
138 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE,
141 const char *histogramTitle=
nullptr,
142 const char *distributionName=
nullptr,
143 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE,
Int_t includeError=3)
const;
144 TH1 *
GetInput(
const char *histogramName,
const char *histogramTitle=
nullptr,
145 const char *distributionName=
nullptr,
146 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE)
const;
148 const char *histogramName,
149 const char *histogramTitle=
nullptr,
150 const char *distributionName=
nullptr,
151 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE);
153 const char *histogramName,
154 const char *histogramTitle=
nullptr,
155 const char *distributionName=
nullptr,
156 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE);
158 const char *histogramTitle=
nullptr,
159 const char *distributionName=
nullptr,
160 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE);
162 const char *histogramTitle=
nullptr,
163 const char *distributionName=
nullptr,
164 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE);
166 const char *histogramName,
167 const char *histogramTitle=
nullptr,
168 const char *distributionName=
nullptr,
169 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE);
171 const char *histogramTitle=
nullptr,
172 const char *distributionName=
nullptr,
173 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE);
175 const char *histogramTitle=
nullptr,
176 const char *distributionName=
nullptr,
177 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE);
178 TH1 *
GetRhoIstatbgr(
const char *histogramName,
const char *histogramTitle=
nullptr,
179 const char *distributionName=
nullptr,
180 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE,
181 TH2 **ematInv=
nullptr);
182 TH1 *
GetRhoItotal(
const char *histogramName,
const char *histogramTitle=
nullptr,
183 const char *distributionName=
nullptr,
184 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE,
185 TH2 **ematInv=
nullptr);
187 const char *histogramTitle=
nullptr,
188 const char *distributionName=
nullptr,
189 const char *projectionMode=
nullptr,
Bool_t useAxisBinning=
kTRUE);
190 TH2 *
GetL(
const char *histogramName,
191 const char *histogramTitle=
nullptr,
193 TH1 *
GetLxMinusBias(
const char *histogramName,
const char *histogramTitle=
nullptr);
196 const char *histogramTitle=
nullptr,
Bool_t useAxisBinning=
kTRUE)
const;
198 const char *histogramTitle=
nullptr,
bool useAxisBinning=
true)
const;
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char mode
#define TUnfold_CLASS_VERSION
A TGraph is an object made of two arrays X and Y with npoints each.
TH1 is the base class of all histogram classes in ROOT.
Service class for 2-D histogram classes.
Base class for spline implementation containing the Draw/Paint methods.
Binning schemes for use with the unfolding algorithm TUnfoldDensity.
An algorithm to unfold distributions from detector to truth level.
void RegularizeOneDistribution(const TUnfoldBinning *binning, ERegMode regmode, EDensityMode densityMode, const char *axisSteering)
regularize the distribution fof the given node
EScanTauMode
scan mode for correlation scan
@ kEScanTauRhoAvg
average global correlation coefficient (from TUnfold::GetRhoI())
@ kEScanTauRhoMax
maximum global correlation coefficient (from TUnfold::GetRhoI())
@ kEScanTauRhoSquareAvgSys
average global correlation coefficient squared (from TUnfoldSys::GetRhoItotal())
@ kEScanTauRhoMaxSys
maximum global correlation coefficient (from TUnfoldSys::GetRhoItotal())
@ kEScanTauRhoSquareAvg
average global correlation coefficient squared (from TUnfold::GetRhoI())
@ kEScanTauRhoAvgSys
average global correlation coefficient (from TUnfoldSys::GetRhoItotal())
TH1 * GetRhoItotal(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE, TH2 **ematInv=nullptr)
retreive global correlation coefficients including all uncertainty sources
TH2 * GetEmatrixSysUncorr(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE)
retreive covaraince contribution from uncorrelated (statistical) uncertainties of the response matrix
Double_t GetDensityFactor(EDensityMode densityMode, Int_t iBin) const
density correction factor for a given bin
TH2 * GetRhoIJtotal(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE)
retreive correlation coefficients, including all uncertainties
TString GetOutputBinName(Int_t iBinX) const override
Get bin name of an outpt bin.
const TUnfoldBinning * fConstOutputBins
binning scheme for the output (truth level)
const TUnfoldBinning * GetOutputBinning(const char *distributionName=nullptr) const
locate a binning node for the unfolded (truth level) quantities
TUnfoldBinning * GetLBinning(void) const
return binning scheme for regularisation conditions (matrix L)
TH2 * GetEmatrixInput(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE)
get covariance contribution from the input uncertainties (data statistical uncertainties)
TUnfoldBinning * fRegularisationConditions
binning scheme for the regularisation conditions
TH2 * GetL(const char *histogramName, const char *histogramTitle=nullptr, Bool_t useAxisBinning=kTRUE)
access matrix of regularisation conditions in a new histogram
TUnfoldBinning * fOwnedOutputBins
pointer to output binning scheme if owned by this class
TH2 * GetEmatrixTotal(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE)
get covariance matrix including all contributions
TUnfoldBinning * fOwnedInputBins
pointer to input binning scheme if owned by this class
TH1 * GetDeltaSysBackgroundScale(const char *bgrSource, const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE)
retreive systematic 1-sigma shift corresponding to a background scale uncertainty
void RegularizeDistribution(ERegMode regmode, EDensityMode densityMode, const char *distribution, const char *axisSteering)
set up regularisation conditions
TH2 * GetProbabilityMatrix(const char *histogramName, const char *histogramTitle=nullptr, Bool_t useAxisBinning=kTRUE) const
get matrix of probabilities in a new histogram
TH1 * GetOutput(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE) const
retreive unfolding result as a new histogram
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
retreive unfolding result folded back as a new histogram
const TUnfoldBinning * GetInputBinning(const char *distributionName=nullptr) const
locate a binning node for the input (measured) quantities
TH1 * GetInput(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE) const
retreive input distribution in a new histogram
TH1 * GetRhoIstatbgr(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE, TH2 **ematInv=nullptr)
retreive global correlation coefficients including input (statistical) and background uncertainties
TH1 * GetDeltaSysSource(const char *source, const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE)
retreive a correlated systematic 1-sigma shift
TH1 * GetDeltaSysTau(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE)
retreive1-sigma shift corresponding to the previously specified uncertainty on tau
TH2 * GetEmatrixSysBackgroundUncorr(const char *bgrSource, const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE)
retreive covariance contribution from uncorrelated background uncertainties
const TUnfoldBinning * fConstInputBins
binning scheme for the input (detector level)
TH1 * GetLxMinusBias(const char *histogramName, const char *histogramTitle=nullptr)
get regularisation conditions multiplied by result vector minus bias L(x-biasScale*biasVector)
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
TUnfoldDensity(void)
only for use by root streamer or derived classes
TH1 * GetBias(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE) const
retreive bias vector as a new histogram
virtual Int_t ScanTau(Int_t nPoint, Double_t tauMin, Double_t tauMax, TSpline **scanResult, Int_t mode=kEScanTauRhoAvg, const char *distribution=nullptr, const char *projectionMode=nullptr, TGraph **lCurvePlot=nullptr, TSpline **logTauXPlot=nullptr, TSpline **logTauYPlot=nullptr)
scan a function wrt tau and determine the minimum
virtual Double_t GetScanVariable(Int_t mode, const char *distribution, const char *projectionMode)
calculate the function for ScanTau()
EDensityMode
choice of regularisation scale factors to cinstruct the matrix L
@ kDensityModeUser
scale factors from user function in TUnfoldBinning
@ kDensityModeNone
no scale factors, matrix L is similar to unity matrix
@ kDensityModeBinWidthAndUser
scale factors from multidimensional bin width and user function
@ kDensityModeBinWidth
scale factors from multidimensional bin width
TH1 * GetBackground(const char *histogramName, const char *bgrSource=nullptr, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE, Int_t includeError=3) const
retreive a background source in a new histogram
An algorithm to unfold distributions from detector to truth level, with background subtraction and pr...
EConstraint
type of extra constraint
@ kEConstraintArea
enforce preservation of the area
ERegMode
choice of regularisation scheme
@ kRegModeCurvature
regularize the 2nd derivative of the output distribution
EHistMap
arrangement of axes for the response matrix (TH2 histogram)
const TMatrixDSparse * GetDXDY(void) const
matrix of derivatives dx/dy