129 while(childNode)
delete childNode;
131 if(GetParentNode() && (GetParentNode()->GetChildNode()==
this)) {
134 if(GetPrevNode()) prevNode->
nextNode=nextNode;
135 if(GetNextNode()) nextNode->
prevNode=prevNode;
137 delete fAxisLabelList;
138 if(fBinFactorFunction) {
139 if(!
dynamic_cast<TF1 *
>(fBinFactorFunction))
140 delete fBinFactorFunction;
171 if(startWithRootNode) {
210(
const char *
name,
Int_t nBins,
const char *binNames)
230 :
TNamed(axis.GetName(),axis.GetTitle())
233 AddAxis(axis,includeUnderflow,includeOverflow);
246(
const char *
name,
Int_t nBins,
const char *binNames)
263 "binning \"%s\" already has parent \"%s\", can not be added to %s",
269 "binning \"%s\" has previous node \"%s\", can not be added to %s",
275 "binning \"%s\" has next node \"%s\", can not be added to %s",
285 while(
child->nextNode) {
317 Fatal(
"AddAxis",
"number of bins %d is not positive",
321 Fatal(
"AddAxis",
"xmin=%f required to be smaller than xmax=%f",
327 for(
Int_t i=0;i<=nBin;i++) {
328 binBorders[i]=
x+i*dx;
330 r=
AddAxis(
name,nBin,binBorders,hasUnderflow,hasOverflow);
331 delete [] binBorders;
351 for(
Int_t i=0;i<nBin;i++) {
356 delete [] binBorders;
377 Fatal(
"AddAxis",
"node already has %d bins without axis",
380 Fatal(
"AddAxis",
"number of bins %d is not positive",
385 for(
Int_t i=0;i<=nBin;i++) {
386 (*bins)(i)=binBorders[i];
388 Fatal(
"AddAxis",
"bin border %d is not finite",i);
390 }
else if((i>0)&&((*bins)(i)<=(*bins)(i-1))) {
391 Fatal(
"AddAxis",
"bins not in order x[%d]=%f <= %f=x[%d]",
392 i,(*bins)(i),(*bins)(i-1),i-1);
398 Int_t bitMask=1<<axis;
432 out<<
"TUnfoldBinning \""<<
GetName()<<
"\" has ";
464 (ibin<fAxisLabelList->GetEntriesFast());ibin++) {
577(
const char *histogramName,
const char *histogramTitle,
Int_t const *axisList)
586 for(iEnd=2;iEnd>0;iEnd--) {
587 if(axisList[iEnd]>=0)
break;
589 for(
Int_t i=0;i<=iEnd;i++) {
612(
const char *histogramName,
const char *histogramTitle,
630 }
else if(xAxis>=0) {
636 }
else if(yAxis>=0) {
668(
Bool_t originalAxisBinning,
const char *axisSteering)
const
670 Int_t axisBins[3],axisList[3];
728(
const char *histogramName,
Bool_t originalAxisBinning,
Int_t **binMap,
729 const char *histogramTitle,
const char *axisSteering)
const
731 Int_t nBin[3],axisList[3];
739 neNode->GetDistributionBinning(axisList[0]);
742 neNode->GetDistributionBinning(axisList[1]);
745 neNode->GetDistributionBinning(axisList[2]);
746 r=
new TH3D(histogramName,title,
751 r=
new TH2D(histogramName,title,
759 if(originalAxisBinning) {
761 "Original binning can not be represented as THxx");
763 r=
new TH1D(histogramName,title,nBin[0],0.5,nBin[0]+0.5);
789(
const char *histogramName,
Bool_t originalAxisBinning,
Int_t **binMap,
790 const char *histogramTitle,
const char *axisSteering)
const
792 Int_t nBin[3],axisList[3];
803 if(originalAxisBinning) {
804 Info(
"CreateErrorMatrixHistogram",
805 "Original binning can not be represented on one axis");
807 r=
new TH2D(histogramName,title,nBin[0],0.5,nBin[0]+0.5,
808 nBin[0],0.5,nBin[0]+0.5);
833 char const *histogramName,
Bool_t originalXAxisBinning,
834 Bool_t originalYAxisBinning,
char const *histogramTitle)
836 Int_t nBinX[3],axisListX[3];
838 xAxis->
GetTHxxBinning(originalXAxisBinning ? 1 : 0,nBinX,axisListX,
nullptr);
840 Int_t nBinY[3],axisListY[3];
842 yAxis->
GetTHxxBinning(originalYAxisBinning ? 1 : 0,nBinY,axisListY,
nullptr);
845 (histogramName,histogramTitle,axisListX[0],yAxis,axisListY[0]);
852 return new TH2D(histogramName,title,
856 return new TH2D(histogramName,title,
858 nBinY[0],0.5,0.5+nBinY[0]);
864 return new TH2D(histogramName,title,
865 nBinX[0],0.5,0.5+nBinX[0],
868 return new TH2D(histogramName,title,
869 nBinX[0],0.5,0.5+nBinX[0],
870 nBinY[0],0.5,0.5+nBinY[0]);
890 const char *axisSteering)
const
892 for(
Int_t i=0;i<3;i++) {
899 (maxDim,axisBins,axisList,axisSteering);
920 if(count!=1)
r=
nullptr;
955(
Int_t maxDim,
Int_t *axisBins,
Int_t *axisList,
const char *axisSteering)
const
961 Int_t isOptionGiven[3];
966 for(
Int_t i=0;i<numDimension;i++) {
967 if(isOptionGiven[0] & (1<<i))
continue;
970 if((
r>0)&&(
r<=maxDim)) {
976 for(
Int_t i=0;i<numDimension;i++) {
977 if(isOptionGiven[0] & (1<<i))
continue;
989 for(
Int_t i=0;i<numDimension;i++) {
991 if(isOptionGiven[0] &
mask)
continue;
1017 r +=
child->GetTHxxBinsRecursive(axisSteering);
1020 Int_t axisBins[3],axisList[3];
1037 for(
Int_t i=0;i<nMax;i++) {
1054 if((globalBin<0)||(globalBin>=nMax)) {
1055 Error(
"SetBinMapEntry",
"global bin number %d outside range (max=%d)",
1058 binMap[globalBin]=destBin;
1074(
Int_t *binMap,
const char *axisSteering,
Int_t firstBinX)
const {
1076 Int_t axisBins[3],axisList[3];
1081 Error(
"FillBinMap1D",
"distribution %s with steering=%s is not 1D",
1082 (
char *)
GetName(),axisSteering);
1086 r =
child->FillBinMap1D(binMap,axisSteering,
r);
1101(
const TH1 *hist,
Int_t nDim,
const Int_t *axisList,
const char *axisSteering)
1145 Fatal(
"CreateBinMap",
"called with nDim=%d but GetNonemptyNode()=nullptr",
1165(
Int_t startBin,
const char *axisSteering,
Int_t *binMap)
const
1171 nbin +=
child->FillBinMapRecursive(startBin+nbin,axisSteering,binMap);
1204 const char *axisSteering,
Int_t *binMap)
const
1210 Int_t isOptionGiven[3+10];
1212 Int_t haveSelectedBin=0;
1213 for(
Int_t i=3;i<3+10;i++) {
1214 haveSelectedBin |= isOptionGiven[i];
1220 for(
Int_t i=0;i<dimension;i++) {
1229 Fatal(
"FillBinMapSingleNode",
1230 "bin %d outside binning scheme",
1233 Fatal(
"FillBinMapSingleNode",
1234 "bin %d located in %s %d-%d rather than %s %d=%d",
1235 i,(
const char *)
dest->GetName(),
1236 dest->GetStartBin(),
dest->GetEndBin(),
1242 for(
Int_t axis=0;axis<dimension;axis++) {
1245 if(((axisBins[axis]<0)&&(isOptionGiven[1] &
mask))||
1246 ((axisBins[axis]>=axisNbin[axis])&&(isOptionGiven[2] &
mask)))
1249 if((axisBins[axis]>=0)&&(axisBins[axis]<axisNbin[axis])&&
1250 (haveSelectedBin &
mask)) {
1251 if(!(isOptionGiven[3+axisBins[axis]] &
mask)) skip=
kTRUE;
1262 ibin[0]=ibin[1]=ibin[2]=0;
1263 for(
Int_t hdim=0;hdim<nDim;hdim++) {
1264 Int_t axis=axisList[hdim];
1265 ibin[hdim]=axisBins[axis]+1;
1267 binMap[globalBin]=hist->
GetBin(ibin[0],ibin[1],ibin[2]);
1270 }
else if(nDim==1) {
1278 Error(
"FillBinMapSingleNode",
"inconsistent dimensions %d %d",nDim,
1282 if(axisList[ii]>=0) {
1283 binMap[globalBin]=axisBins[axisList[ii]]+1;
1288 Fatal(
"FillBinMapSingleNode",
"inconsistent dimensions %d %d",nDim,
1298 for(
Int_t axis=dimension-1;axis>=0;axis--) {
1300 if(isOptionGiven[0] &
mask) {
1304 Int_t iBin=axisBins[axis];
1305 Int_t nMax=axisNbin[axis];
1315 binMap[globalBin] = startBin +
r;
1317 binMap[globalBin] = startBin + axisBins[0];
1324 for(
Int_t axis=dimension-1;axis>=0;axis--) {
1326 if(isOptionGiven[0] &
mask) {
1330 Int_t nMax=axisNbin[axis];
1347(
const char *histogramName,
const TH1 *globalBins,
1348 const TH2 *globalBinsEmatrix,
Bool_t originalAxisBinning,
1349 const char *axisSteering)
const
1368 Int_t *binMap=
nullptr;
1371 if(!
r)
return nullptr;
1375 if(binMap[iSrc]>nMax) nMax=binMap[iSrc];
1383 Int_t iDest=binMap[iSrc];
1387 if(!globalBinsEmatrix) {
1392 if(binMap[jSrc]==iDest) {
1400 for(
Int_t i=0;i<=nMax;i++) {
1424 Fatal(
"GetBinNumber",
1425 "called with 1 argument for %d dimensional distribution",
1443 Fatal(
"GetBinNumber",
1444 "called with 2 arguments for %d dimensional distribution",
1470 Fatal(
"GetBinNumber",
1471 "called with 3 arguments for %d dimensional distribution",
1499 Fatal(
"GetBinNumber",
1500 "called with 4 arguments for %d dimensional distribution",
1530 Fatal(
"GetBinNumber",
1531 "called with 5 arguments for %d dimensional distribution",
1563 Fatal(
"GetBinNumber",
1564 "called with 6 arguments for %d dimensional distribution",
1609 Fatal(
"GetBinNumber",
1610 "no axes are defined for node %s",
1619 if(!(
x[dim]>=(*bins)[i0])) {
1622 }
else if(!(
x[dim]<(*bins)[i1])) {
1628 if(
x[dim]<(*bins)[i2]) {
1636 iAxisBins[dim]=iBin;
1664 for(
Int_t axis=0;axis<dimension;axis++) {
1668 Int_t i=axisBins[axis];
1669 if(i<0) thisAxisString +=
"[ufl]";
1670 else if(i>=bins->
GetNrows()-1) thisAxisString +=
"[ofl]";
1675 axisString =
":"+thisAxisString+axisString;
1680 Int_t i=axisBins[0];
1706 Int_t pos=axisBins[axis];
1709 }
else if(pos>=bins->
GetNrows()-1) {
1712 r *= (*bins)(pos+1)-(*bins)(pos);
1752 for(
Int_t axis=0;axis<dimension;axis++) {
1754 (axis,axisBins[axis]);
1756 r *= function->EvalPar(
x,function->GetParameters());
1759 r *= function->Eval(
x[0]);
1767 Error(
"GetBinFactor",
1768 "internal error: user function is neiter TF1 or TVectorD");
1810 if((axis>=0)&&(axis<dimension)) {
1814 Int_t centerBin= axisBins[axis];
1815 axisBins[axis] =centerBin-1;
1819 }
else if((axisBins[axis]<0)&&(nMax>=3)) {
1820 axisBins[axis]=nMax-1;
1828 axisBins[axis] =centerBin+1;
1832 }
else if((axisBins[axis]==nMax)&&(nMax>=3)) {
1859 for(
Int_t axis=0;axis<dimension;axis++) {
1862 if(axisBins[axis]<0) *uStatus |= (1<<axis);
1863 if(axisBins[axis]>=nBin) *oStatus |= (1<<axis);
1881 if(bin<fAxisLabelList->GetEntriesFast()) {
1899 if((axis>=0)&&(axis<GetDistributionDimension())) {
1900 TVectorD const *bins=GetDistributionBinning(axis);
1903 if(includeUnderflow && HasUnderflow(axis)) {
1904 Double_t w=GetDistributionUnderflowBinWidth(axis);
1910 if(includeOverflow && HasOverflow(axis)) {
1911 Double_t w=GetDistributionOverflowBinWidth(axis);
1921 Error(
"GetDistributionAverageBinSize",
"axis %d does not exist",axis);
1938 return (*bins)[1]-(*bins)[0];
1978 }
else if(bin>=bins->
GetNrows()-1) {
1982 r=0.5*((*bins)[bin+1]+(*bins)[bin]);
2002 if(isBelow) *isBelow=0;
2003 if(isAbove) *isAbove=0;
2005 for(
Int_t axis=dimension-1;axis>=0;axis--) {
2007 Int_t i=axisBins[axis];
2013 if((i>=0)&&(i<nMax)) {
2014 if(
r>=0)
r =
r*nMax +i;
2017 if((i<0)&&(isBelow)) *isBelow |= 1<<axis;
2018 if((i>=nMax)&&(isAbove)) *isAbove |= 1<<axis;
2028 Fatal(
"ToGlobalBin",
"bad input %d for dimensionless binning %s %d",
2029 axisBins[0],(
const char *)
GetName(),
2058 for(
int axis=0;axis<dimension;axis++) {
2066 axisBins[axis] += i % nMax;
2096(
const char *axisSteering,
const char *options,
Int_t *isOptionGiven)
const
2099 for(
Int_t i=0;i<nOpt;i++) isOptionGiven[i]=0;
2104 for(
Int_t i=0;i<nPattern;i++) {
2109 if((bracketBegin>0)&&(pattern[
len-1]==
']')) {
2110 TString axisId=pattern(0,bracketBegin);
2112 if((axisId[0]==
'*')&&(axisId.
Length()==1)) {
2117 for(
Int_t j=0;j<nAxis;j++) {
2123 for(
Int_t o=0;o<nOpt;o++) {
2124 if(pattern.
Last(options[o])>bracketBegin) {
2125 isOptionGiven[o] |=
mask;
2129 Error(
"DecodeAxisSteering",
2130 "steering \"%s\" does not end with [options]",
2131 (
const char *)pattern);
static void indent(ostringstream &buf, int indent_level)
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t child
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
TVectorT< Double_t > TVectorD
Class to manage histogram axis.
const char * GetTitle() const override
Returns title of object.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
1-D histogram with a double per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual Int_t GetDimension() const
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
2-D histogram with a double per channel (see TH1 documentation)
Service class for 2-D histogram classes.
Double_t GetBinContent(Int_t binx, Int_t biny) const override
3-D histogram with a double per channel (see TH1 documentation)
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
Int_t GetEntriesFast() const
Int_t GetEntries() const override
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const override
void AddLast(TObject *obj) override
Add object in the next empty slot in the array.
Collectable string class.
Mother of all ROOT objects.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
Ssiz_t Last(char c) const
Find last occurrence of a character c.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Binning schemes for use with the unfolding algorithm TUnfoldDensity.
void PrintStream(std::ostream &out, Int_t indent=0, int debug=0) const
print some information about this binning tree
Int_t ToGlobalBin(Int_t const *axisBins, Int_t *isBelow=nullptr, Int_t *isAbove=nullptr) const
get global bin number, given axis bin numbers
Bool_t HasOverflow(int axis) const
check whether the axis has an overflow bin
TH1 * CreateHistogram(const char *histogramName, Bool_t originalAxisBinning=kFALSE, Int_t **binMap=nullptr, const char *histogramTitle=nullptr, const char *axisSteering=nullptr) const
create a THxx histogram capable to hold the bins of this binning node and its children
Int_t FillBinMapSingleNode(const TH1 *hist, Int_t startBin, Int_t nDim, const Int_t *axisList, const char *axisSteering, Int_t *binMap) const
fill bin map for a single node
virtual Double_t GetDistributionOverflowBinWidth(Int_t axis) const
return bin width assigned to the overflow bin
Int_t fFirstBin
global bin number of the first bin
void SetBinFactorFunction(Double_t normalisation, TF1 *userFunc=nullptr)
set normalisation factor and function which are used in calls to GetBinFactor()
TH1 * ExtractHistogram(const char *histogramName, const TH1 *globalBins, const TH2 *globalBinsEmatrix=nullptr, Bool_t originalAxisBinning=kTRUE, const char *axisSteering=nullptr) const
Int_t UpdateFirstLastBin(Bool_t startWithRootNode=kTRUE)
update fFirstBin and fLastBin members of this node and its children
TString BuildHistogramTitle(const char *histogramName, const char *histogramTitle, Int_t const *axisList) const
construct a title
Int_t FillBinMapRecursive(Int_t startBin, const char *axisSteering, Int_t *binMap) const
recursively fill bin map
Int_t FillBinMap1D(Int_t *binMap, const char *axisSteering, Int_t firstBinX) const
map all global bins referenced by this node to the one-dimensional histogram destHist,...
TUnfoldBinning * parentNode
mother node
Int_t GetDistributionDimension(void) const
query dimension of this node's distribution
TUnfoldBinning const * GetPrevNode(void) const
previous sister node
void SetBinFactor(Double_t normalisation, TObject *factors)
set normalisation factors which are used in calls to GetBinFactor()
TUnfoldBinning * childNode
first daughter node
TString GetBinName(Int_t iBin) const
get the name of a bin
Int_t GetTH1xNumberOfBins(Bool_t originalAxisBinning=kTRUE, const char *axisSteering=nullptr) const
return the number of histogram bins required when storing this binning in a one-dimensional histogram
virtual Double_t GetDistributionUnderflowBinWidth(Int_t axis) const
return bin width assigned to the underflow bin
Double_t GetBinSize(Int_t iBin) const
get N-dimensional bin size
Int_t GetDistributionNumberOfBins(void) const
number of bins in the distribution possibly including under/overflow
Double_t GetGlobalFactor(void) const
return global scaling factor for this node
Int_t GetGlobalBinNumber(Double_t x) const
locate a bin in a one-dimensional distribution
Bool_t HasUnconnectedBins(void) const
check whether there are bins but no axis
virtual Double_t GetBinFactor(Int_t iBin) const
return scaling factor for the given global bin number
TUnfoldBinning * nextNode
next sister
TObject * fBinFactorFunction
function to calculate a scale factor from bin centres (may be a TF1 or a TVectorD
Int_t GetTHxxBinning(Int_t maxDim, Int_t *axisBins, Int_t *axisList, const char *axisSteering) const
calculate properties of a THxx histogram to store this binning
const TUnfoldBinning * GetNonemptyNode_r(int &count) const
Int_t fHasUnderflow
bit fields indicating whether there are underflow bins on the axes
Int_t GetEndBin(void) const
last+1 bin of this node (includes children)
TObjArray * fAxisLabelList
for each axis its name (TObjString), or names of unconnected bins
Double_t fBinFactorConstant
common scale factor for all bins of this node
TUnfoldBinning const * GetNextNode(void) const
next sister node
Bool_t HasUnderflow(int axis) const
check whether an axis has an underflow bin
Int_t * CreateEmptyBinMap(void) const
create an empty bin map, useful together with the getter methods of class TUnfold and TUnfoldSys
TUnfoldBinning const * GetParentNode(void) const
mother node
@ MAXDIM
maximum numner of axes per distribution
static TH2D * CreateHistogramOfMigrations(TUnfoldBinning const *xAxis, TUnfoldBinning const *yAxis, char const *histogramName, Bool_t originalXAxisBinning=kFALSE, Bool_t originalYAxisBinning=kFALSE, char const *histogramTitle=nullptr)
create a TH2D histogram capable to hold the bins of the two input binning schemes on the x and y axes...
TObjArray * fAxisList
for each axis the bin borders (TVectorD)
Int_t fLastBin
global bin number of the last(+1) bin, including daughters
void GetBinUnderflowOverflowStatus(Int_t iBin, Int_t *uStatus, Int_t *oStatus) const
return bit maps indicating underflow and overflow status
virtual Double_t GetDistributionBinCenter(Int_t axis, Int_t bin) const
return bin center for a given axis and bin number
Int_t fDistributionSize
number of bins in this node's distribution
Int_t fHasOverflow
bit fields indicating whether there are overflow bins on the axes
const TUnfoldBinning * GetNonemptyNode(void) const
find a node which has non-empty distributions if there is none or if there are many,...
void Initialize(Int_t nBins)
initialize variables for a given number of bins
void SetBinMapEntry(Int_t *binMap, Int_t globalBin, Int_t destBin) const
set one entry in a bin map
virtual Double_t GetDistributionAverageBinSize(Int_t axis, Bool_t includeUnderflow, Bool_t includeOverflow) const
get average bin size on the specified axis
void DecodeAxisSteering(const char *axisSteering, const char *options, Int_t *isOptionGiven) const
decode axis steering
virtual Bool_t IsBinFactorGlobal(void) const
check whether there is only a global scaling factor for this node
TString GetDistributionAxisLabel(Int_t axis) const
get name of an axis
TUnfoldBinning * AddBinning(TUnfoldBinning *binning)
add a TUnfoldBinning as the last child of this node
const TObjString * GetUnconnectedBinName(Int_t bin) const
return the bin names of unconnected bins
Int_t GetBinNeighbours(Int_t globalBin, Int_t axis, Int_t *prev, Double_t *distPrev, Int_t *next, Double_t *distNext, Bool_t isPeriodic=kFALSE) const
get neighbour bins along the specified axis
TVectorD const * GetDistributionBinning(Int_t axis) const
get vector of bin borders for one axis
Int_t * CreateBinMap(const TH1 *hist, Int_t nDim, const Int_t *axisList, const char *axisSteering) const
create mapping from global bin number to a histogram for this node
TH2D * CreateErrorMatrixHistogram(const char *histogramName, Bool_t originalAxisBinning, Int_t **binMap=nullptr, const char *histogramTitle=nullptr, const char *axisSteering=nullptr) const
create a TH2D histogram capable to hold a covariance matrix
Bool_t AddAxis(const char *name, Int_t nBins, const Double_t *binBorders, Bool_t hasUnderflow, Bool_t hasOverflow)
add an axis with the specified bin borders
TUnfoldBinning * prevNode
previous sister
TUnfoldBinning const * GetRootNode(void) const
return root node of the binnig scheme
Int_t GetStartBin(void) const
first bin of this node
TUnfoldBinning const * ToAxisBins(Int_t globalBin, Int_t *axisBins) const
return distribution in which the bin is located and bin numbers on the corresponding axes
TUnfoldBinning const * FindNode(char const *name) const
traverse the tree and return the first node which matches the given name
TUnfoldBinning(const char *name=nullptr, Int_t nBins=0, const char *binNames=nullptr)
create a new node without axis
Int_t GetTHxxBinsRecursive(const char *axisSteering) const
calculate number of bins required to store this binning with teh given axisSteering
TUnfoldBinning const * GetChildNode(void) const
first daughter node
Int_t GetTHxxBinningSingleNode(Int_t maxDim, Int_t *axisBins, Int_t *axisList, const char *axisSteering) const
get the properties of a histogram capable to hold the distribution attached to this node
TString BuildHistogramTitle2D(const char *histogramName, const char *histogramTitle, Int_t xAxis, const TUnfoldBinning *yAxisBinning, Int_t yAxis) const
construct a histogram title for a 2D histogram with different binning schemes on x and y axis
Element * GetMatrixArray()
Int_t Finite(Double_t x)
Check if it is finite with a mask in order to be consistent in presence of fast math.
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.