*-*-*-*-*-*-*-*-*Normal constructor for fix bin size histograms*-*-*-*-*-*-*
*-* ==============================================
Creates the main histogram structure:
name : name of histogram (avoid blanks)
title : histogram title
nbins : number of bins
xlow : low edge of first bin
xup : upper edge of last bin (not included in last bin)
When an histogram is created, it is automatically added to the list
of special objects in the current directory.
To find the pointer to this histogram in the current directory
by its name, do:
TH1F *h1 = (TH1F*)gDirectory->FindObject(name);
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*Normal constructor for variable bin size histograms*-*-*-*-*-*-*
*-* ===================================================
Creates the main histogram structure:
name : name of histogram (avoid blanks)
title : histogram title
nbins : number of bins
xbins : array of low-edges for each bin
This is an array of size nbins+1
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Performs the operation: this = this + c1*h1
if errors are defined (see TH1::Sumw2), errors are also recalculated.
Note that if h1 has Sumw2 set, Sumw2 is automatically called for this
if not already set.

*-*-*-*-*Replace contents of this histogram by the addition of h1 and h2*-*-*
*-* ===============================================================
this = c1*h1 + c2*h2
if errors are defined (see TH1::Sumw2), errors are also recalculated
Note that if h1 or h2 have Sumw2 set, Sumw2 is automatically called for this
if not already set.

Compute integral (cumulative sum of bins)
The result stored in fIntegral is used by the GetRandom functions.
This function is automatically called by GetRandom when the fIntegral
array does not exist or when the number of entries in the histogram
has changed since the previous call to GetRandom.
The resulting integral is normalized to 1

*-*-*-*-*-*-*Copy this histogram structure to newth1*-*-*-*-*-*-*-*-*-*-*-*
*-* =======================================
Note that this function does not copy the list of associated functions.
Use TObJect::Clone to make a full copy of an histogram.

*-*-*-*-*-*-*-*-*-*-*Compute distance from point px,py to a line*-*-*-*-*-*
*-* ===========================================
*-* Compute the closest distance of approach from point px,py to elements
*-* of an histogram.
*-* The distance is computed in pixels units.
*-*
*-* Algorithm:
*-* Currently, this simple model computes the distance from the mouse
*-* to the histogram contour only.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*-*-*-*-*Divide this histogram by h1*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ===========================
this = this/h1
if errors are defined (see TH1::Sumw2), errors are also recalculated.
Note that if h1 has Sumw2 set, Sumw2 is automatically called for this
if not already set.

*-*-*-*-*Replace contents of this histogram by the division of h1 by h2*-*-*
*-* ==============================================================
this = c1*h1/(c2*h2)
if errors are defined (see TH1::Sumw2), errors are also recalculated
Note that if h1 or h2 have Sumw2 set, Sumw2 is automatically called for this
if not already set.

*-*-*-*-*-*-*-*-*-*-*Draw this histogram with options*-*-*-*-*-*-*-*-*-*-*-*
*-* ================================
*-*
*-* This histogram is added in the list of objects to be drawn in the
*-* current pad.
*-* It is important to note that only a reference to this histogram is added.
*-* This means that if the histogram contents change between pad redraws,
*-* the current histogram contents will be shown.
*-* Use function DrawCopy to force a copy of the histogram at the time
*-* of the Draw operation in the Pad list.
*-*
*-* The following options are supported on all types:
*-* "AXIS" : Draw only axis
*-* "HIST" : Draw only histo contour. (if histo has errors, errors are not drawn)
*-* "SAME" : Superimpose on previous picture in the same pad
*-* "CYL" : Use Cylindrical coordinates
*-* "POL" : Use Polar coordinates
*-* "SPH" : Use Spherical coordinates
*-* "PSR" : Use PseudoRapidity/Phi coordinates
*-* "LEGO" : Draw a lego plot with hidden line removal
*-* "LEGO1" : Draw a lego plot with hidden surface removal
*-* "LEGO2" : Draw a lego plot using colors to show the cell contents
*-* "SURF" : Draw a surface plot with hidden line removal
*-* "SURF1" : Draw a surface plot with hidden surface removal
*-* "SURF2" : Draw a surface plot using colors to show the cell contents
*-* "SURF3" : same as SURF with in addition a contour view drawn on the top
*-* "SURF4" : Draw a surface using Gouraud shading
*-*
*-* The following options are supported for 1-D types:
*-* "AH" : Draw histogram, but not the axis labels and tick marks
*-* "B" : Bar chart option
*-* "C" : Draw a smooth Curve througth the histogram bins
*-* "E" : Draw error bars
*-* "E0" : Draw error bars including bins with o contents
*-* "E1" : Draw error bars with perpendicular lines at the edges
*-* "E2" : Draw error bars with rectangles
*-* "E3" : Draw a fill area througth the end points of the vertical error bars
*-* "E4" : Draw a smoothed filled area through the end points of the error bars
*-* "L" : Draw a line througth the bin contents
*-* "P" : Draw current marker at each bin
*-* "*H" : Draw histogram with a * at each bin
*-*
*-*
*-* The following options are supported for 2-D types:
*-* "ARR" : arrow mode. Shows gradient between adjacent cells
*-* "BOX" : a box is drawn for each cell with surface proportional to contents
*-* "COL" : a box is drawn for each cell with a color scale varying with contents
*-* "COLZ" : same as "COL". In addition the color mapping is also drawn
*-* "CONT" : Draw a contour plot (same as CONT0)
*-* "CONT0" : Draw a contour plot using colors to distinguish contours
*-* "CONT1" : Draw a contour plot using line styles to distinguish contours
*-* "CONT2" : Draw a contour plot using the same line style for all contours
*-* "CONT3" : Draw a contour plot using fill area colors
*-* "FB" : With LEGO or SURFACE, suppress the Front-Box
*-* "BB" : With LEGO or SURFACE, suppress the Back-Box
*-* "SCAT" : Draw a scatter-plot (default)
*-*
*-* Note that most options above can be concatenated, example:
*-* h-Draw("e1same");
*-* Options are case insensitive
*-*
*-* When using the options "BOX", "COL" or "COLZ", the color palette used
*-* is the one defined in the current style (see TStyle::SetPalette)
*-*
*-* When using the "CONT" or "SURF" or "LEGO" options, the number
*-* of contour levels can be changed via TH1::SetContour.
*-* (default is 20 equidistant levels)
*-*
*-* When option "same" is specified, the statistic box is not drawn.
*-* Specify option "sames" to force painting statistics with option "same"
*-* When option "sames" is given, one can use the following technique
*-* to rename a previous "stats" box and/or change its position
*-* Root > TPaveStats *st = (TPaveStats*)gPad->GetPrimitive("stats")
*-* Root > st->SetName(newname)
*-* Root > st->SetX1NDC(newx1); //new x start position
*-* Root > st->SetX2NDC(newx2); //new x end position
*-* Root > newhist->Draw("sames")
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*Copy this histogram and Draw in the current pad*-*-*-*-*-*-*-*
*-* ===============================================
*-*
*-* Once the histogram is drawn into the pad, any further modification
*-* using graphics input will be made on the copy of the histogram,
*-* and not to the original object.
*-*
*-* See Draw for the list of options
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*Evaluate function f1 at the center of bins of this histogram-*-*-*-*
*-* ============================================================
*-*
*-* If option "R" is specified, the function is evaluated only
*-* for the bins included in the function range.
*-* If option "A" is specified, the value of the function is added to the
*-* existing bin contents
*-* If option "S" is specified, the value of the function is used to
*-* generate an integer value, distributed according to the Poisson
*-* distribution, with f1 as the mean.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
*-* =========================================
*-* This member function is called when a histogram is clicked with the locator
*-*
*-* If Left button clicked on the bin top value, then the content of this bin
*-* is modified according to the new position of the mouse when it is released.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*-*-*-*Increment bin with abscissa X by 1*-*-*-*-*-*-*-*-*-*-*
*-* ==================================
*-*
*-* if x is less than the low-edge of the first bin, the Underflow bin is incremented
*-* if x is greater than the upper edge of last bin, the Overflow bin is incremented
*-*
*-* If the storage of the sum of squares of weights has been triggered,
*-* via the function Sumw2, then the sum of the squares of weights is incremented
*-* by 1 in the bin corresponding to x.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*-*Increment bin with abscissa X with a weight w*-*-*-*-*-*-*-*
*-* =============================================
*-*
*-* if x is less than the low-edge of the first bin, the Underflow bin is incremented
*-* if x is greater than the upper edge of last bin, the Overflow bin is incremented
*-*
*-* If the storage of the sum of squares of weights has been triggered,
*-* via the function Sumw2, then the sum of the squares of weights is incremented
*-* by w^2 in the bin corresponding to x.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*-*Fill this histogram with an array x and weights w*-*-*-*-*
*-* =================================================
*-*
*-* ntimes: number of entries in arrays x and w (array size must be ntimes*stride)
*-* x: array of values to be histogrammed
*-* w: array of weighs
*-* stride: step size through arrays x and w
*-*
*-* If the storage of the sum of squares of weights has been triggered,
*-* via the function Sumw2, then the sum of the squares of weights is incremented
*-* by w[i]^2 in the bin corresponding to x[i].
*-* if w is NULL each entry is assumed a weight=1
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*-*-*-*-*Increment cell defined by x,y by 1*-*-*-*-*-*-*-*-*-*
*-* ==================================
*-*
*-* if x or/and y is less than the low-edge of the corresponding axis first bin,
*-* the Underflow cell is incremented.
*-* if x or/and y is greater than the upper edge of corresponding axis last bin,
*-* the Overflow cell is incremented.
*-*
*-* If the storage of the sum of squares of weights has been triggered,
*-* via the function Sumw2, then the sum of the squares of weights is incremented
*-* by 1in the cell corresponding to x,y.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*-*-*-*-*Increment cell defined by x,y by a weight w*-*-*-*-*-*
*-* ===========================================
*-*
*-* if x or/and y is less than the low-edge of the corresponding axis first bin,
*-* the Underflow cell is incremented.
*-* if x or/and y is greater than the upper edge of corresponding axis last bin,
*-* the Overflow cell is incremented.
*-*
*-* If the storage of the sum of squares of weights has been triggered,
*-* via the function Sumw2, then the sum of the squares of weights is incremented
*-* by w^2 in the cell corresponding to x,y.
*-*
*-* NB: function only valid for a TH2x object
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*-*-*-*-*Increment cell defined by x,y,z by a weight w*-*-*-*-*
*-* =============================================
*-*
*-* If the storage of the sum of squares of weights has been triggered,
*-* via the function Sumw2, then the sum of the squares of weights is incremented
*-* by w^2 in the cell corresponding to x,y,z.
*-*
*-* NB: function only valid for a TH3x object
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*Fill a 2-D histogram with an array of values and weights*-*-*-*
*-* ========================================================
*-*
*-* ntimes: number of entries in arrays x and w (array size must be ntimes*stride)
*-* x: array of x values to be histogrammed
*-* y: array of y values to be histogrammed
*-* w: array of weights
*-* stride: step size through arrays x, y and w
*-*
*-* If the storage of the sum of squares of weights has been triggered,
*-* via the function Sumw2, then the sum of the squares of weights is incremented
*-* by w[i]^2 in the cell corresponding to x[i],y[i].
*-* if w is NULL each entry is assumed a weight=1
*-*
*-* NB: function only valid for a TH2x object
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*Fill histogram following distribution in function fname*-*-*-*
*-* =======================================================
*-*
*-* The distribution contained in the function fname (TF1) is integrated
*-* over the channel contents.
*-* It is normalized to 1.
*-* Getting one random number implies:
*-* - Generating a random number between 0 and 1 (say r1)
*-* - Look in which bin in the normalized integral r1 corresponds to
*-* - Fill histogram channel
*-* ntimes random numbers are generated
*-*
*-* One can also call TF1::GetRandom to get a random variate from a function.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*

*-*-*-*-*-*Return Global bin number corresponding to x,y,z*-*-*-*-*-*-*
*-* ===============================================
*-*
*-* 2-D and 3-D histograms are represented with a one dimensional
*-* structure.
*-* This has the advantage that all existing functions, such as
*-* GetBinContent, GetBinError, GetBinFunction work for all dimensions.
*-* See also TH1::GetBin
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*-*-*-*-*Fit histogram with function fname*-*-*-*-*-*-*-*-*-*-*
*-* =================================
*-*
*-* fname is the name of an already predefined function created by TF1 or TF2
*-* Predefined functions such as Gaus, Expo and Poln are automatically
*-* created by ROOT.
*-*
*-* The list of fit options is given in parameter option.
*-* option = "W" Set all errors to 1
*-* = "I" Use integral of function in bin instead of value at bin center
*-* = "L" Use Loglikelihood method (default is chisquare method)
*-* = "U" Use a User specified fitting algorithm (via SetFCN)
*-* = "Q" Quiet mode (minimum printing)
*-* = "V" Verbose mode (default is between Q and V)
*-* = "E" Perform better Errors estimation using Minos technique
*-* = "M" More. Improve fit results
*-* = "R" Use the Range specified in the function range
*-* = "N" Do not store the graphics function, do not draw
*-* = "0" Do not plot the result of the fit. By default the fitted function
*-* is drawn unless the option"N" above is specified.
*-* = "+" Add this new fitted function to the list of fitted functions
*-* (by default, any previous function is deleted)
*-*
*-* When the fit is drawn (by default), the parameter goption may be used
*-* to specify a list of graphics options. See TH1::Draw for a complete
*-* list of these options.
*-*
*-* In order to use the Range option, one must first create a function
*-* with the expression to be fitted. For example, if your histogram
*-* has a defined range between -4 and 4 and you want to fit a gaussian
*-* only in the interval 1 to 3, you can do:
*-* TF1 *f1 = new TF1("f1","gaus",1,3);
*-* histo->Fit("f1","R");
*-*
*-* You can specify boundary limits for some or all parameters via
*-* f1->SetParLimits(p_number, parmin, parmax);
*-* if parmin>=parmax, the parameter is fixed
*-* Note that you are not forced to fix the limits for all parameters.
*-* For example, if you fit a function with 6 parameters, you can do:
*-* func->SetParameters(0,3.1,1.e-6,0.1,-8,100);
*-* func->SetParLimits(4,-10,-4);
*-* func->SetParLimits(5, 1,1);
*-* With this setup, parameters 0->3 can vary freely
*-* Parameter 4 has boundaries [-10,-4] with initial value -8
*-* Parameter 5 is fixed to 100.
*-*
*-* Note that option "I" gives better results but is slower.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Project slices along X in case of a 2-D histogram, then fit each slice
with function f1 and make a histogram for each fit parameter
Only bins along Y between binmin and binmax are considered.
if f1=0, a gaussian is assumed
Before invoking this function, one can set a subrange to be fitted along X
via f1->SetRange(xmin,xmax)
The argument option (default="QNR") can be used to change the fit options.
"Q" means Quiet mode
"N" means do not show the result of the fit
"R" means fit the function in the specified function range
Note that the generated histograms are added to the list of objects
in the current directory. It is the user's responsability to delete
these histograms.
Example: Assume a 2-d histogram h2
Root > h2->FitSlicesX(); produces 4 TH1D histograms
with h2_0 containing parameter 0(Constant) for a Gaus fit
of each bin in Y projected along X
with h2_1 containing parameter 1(Mean) for a gaus fit
with h2_2 containing parameter 2(RMS) for a gaus fit
with h2_chi2 containing the chisquare/number of degrees of freedom for a gaus fit
Root > h2->FitSlicesX(0,15,22,10);
same as above, but only for bins 15 to 22 along Y
and only for bins in Y for which the corresponding projection
along X has more than cut bins filled.

Project slices along Y in case of a 2-D histogram, then fit each slice
with function f1 and make a histogram for each fit parameter
Only bins along X between binmin and binmax are considered.
if f1=0, a gaussian is assumed
Before invoking this function, one can set a subrange to be fitted along Y
via f1->SetRange(ymin,ymax)
The argument option (default="QNR") can be used to change the fit options.
"Q" means Quiet mode
"N" means do not show the result of the fit
"R" means fit the function in the specified function range
Note that the generated histograms are added to the list of objects
in the current directory. It is the user's responsability to delete
these histograms.
Example: Assume a 2-d histogram h2
Root > h2->FitSlicesY(); produces 4 TH1D histograms
with h2_0 containing parameter 0(Constant) for a Gaus fit
of each bin in X projected along Y
with h2_1 containing parameter 1(Mean) for a gaus fit
with h2_2 containing parameter 2(RMS) for a gaus fit
with h2_chi2 containing the chisquare/number of degrees of freedom for a gaus fit
Root > h2->FitSlicesY(0,15,22,10);
same as above, but only for bins 15 to 22 along X
and only for bins in X for which the corresponding projection
along Y has more than cut bins filled.
A complete example of this function is given in tutorial:fitslicesy.C
with the following output:
/*
*/

Project slices along Z in case of a 3-D histogram, then fit each slice
with function f1 and make a 2-d histogram for each fit parameter
Only cells in the bin range [binminx,binmaxx] and [binminy,binmaxy] are considered.
if f1=0, a gaussian is assumed
Before invoking this function, one can set a subrange to be fitted along Z
via f1->SetRange(zmin,zmax)
The argument option (default="QNR") can be used to change the fit options.
"Q" means Quiet mode
"N" means do not show the result of the fit
"R" means fit the function in the specified function range
Example: Assume a 3-d histogram h3
Root > h3->FitSlicesZ(); produces 4 TH2D histograms
with h3_0 containing parameter 0(Constant) for a Gaus fit
of each cell in X,Y projected along Z
with h3_1 containing parameter 1(Mean) for a gaus fit
with h3_2 containing parameter 2(RMS) for a gaus fit
with h3_chi2 containing the chisquare/number of degrees of freedom for a gaus fit
Root > h3->Fit(0,15,22,0,0,10);
same as above, but only for bins 15 to 22 along X
and only for cells in X,Y for which the corresponding projection
along Z has more than cut bins filled.

*-*-*-*-*-*Return Global bin number corresponding to binx,y,z*-*-*-*-*-*-*
*-* ==================================================
*-*
*-* 2-D and 3-D histograms are represented with a one dimensional
*-* structure.
*-* This has the advantage that all existing functions, such as
*-* GetBinContent, GetBinError, GetBinFunction work for all dimensions.
*-*
*-* In case of a TH1x, returns binx directly.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

return a random number distributed according the histogram bin contents.
This function checks if the bins integral exists. If not, the integral
is evaluated, normalized to one.
The integral is automatically recomputed if the number of entries
is not the same then when the integral was computed.
NB Only valid for 1-d histograms. Use GetRandom2 or 3 otherwise.

*-*-*-*-*-*-*-*-*-*-*Multiply this histogram by h1*-*-*-*-*-*-*-*-*-*-*-*-*
*-* =============================
this = this*h1
If errors of this are available (TH1::Sumw2), errors are recalculated.
Note that if h1 has Sumw2 set, Sumw2 is automatically called for this
if not already set.

*-*-*-*-*Replace contents of this histogram by multiplication of h1 by h2*-*
*-* ================================================================
this = (c1*h1)*(c2*h2)
If errors of this are available (TH1::Sumw2), errors are recalculated.
Note that if h1 or h2 have Sumw2 set, Sumw2 is automatically called for this
if not already set.

*-*-*-*-*-*-*-*-*Control routine to paint any kind of histograms*-*-*-*-*-*-*
*-* ===============================================
This function is automatically called by TCanvas::Update.
(see TH1::Draw for the list of options)

*-*-*-*-*Project a 2-D histogram into a profile histogram along X*-*-*-*-*-*
*-* ========================================================
The projection is made from the channels along the Y axis
ranging from firstybin to lastybin included.

*-*-*-*-*Project a 2-D histogram into a profile histogram along Y*-*-*-*-*-*
*-* ========================================================
The projection is made from the channels along the X axis
ranging from firstxbin to lastxbin included.

*-*-*-*-*Project a 2-D histogram into a 1-D histogram along X*-*-*-*-*-*-*
*-* ====================================================
The projection is always of the type TH1D.
The projection is made from the channels along the Y axis
ranging from firstybin to lastybin included.
if option "E" is specified, the errors are computed.

*-*-*-*-*Project a 2-D histogram into a 1-D histogram along Y*-*-*-*-*-*-*
*-* ====================================================
The projection is always of the type TH1D.
The projection is made from the channels along the X axis
ranging from firstxbin to lastxbin included.
if option "E" is specified, the errors are computed.

*-*-*-*-*Project a 3-D histogram into a 1-D histogram along Z*-*-*-*-*-*-*
*-* ====================================================
The projection is always of the type TH1D.
The projection is made from the cells along the X axis
ranging from ixmin to ixmax and iymin to iymax included.
if option "E" is specified, the errors are computed.
code from Paola Collins & Hans Dijkstra

*-*-*-*-*Rebin this histogram grouping ngroup bins together*-*-*-*-*-*-*-*-*
*-* ==================================================
if newname is not blank a new temporary histogram hnew is created.
else the current histogram is modified (default)
The parameter ngroup indicates how many bins of this have to me merged
into one bin of hnew
If the original histogram has errors stored (via Sumw2), the resulting
histograms has new errors correctly calculated.
examples: if h1 is an existing TH1F histogram with 100 bins
h1->Rebin(); //merges two bins in one in h1: previous contents of h1 are lost
h1->Rebin(5); //merges five bins in one in h1
TH1F *hnew = h1->Rebin(5,"hnew"); // creates a new histogram hnew
//merging 5 bins of h1 in one bin
NOTE: This function is currently implemented only for 1-D histograms

Histogram is resized along ax such that x is in the axis range.
The new axis limits are recomputed by doubling iteratively
the current axis range until the specified value x is within the limits.
The algorithm makes a copy of the histogram, then loops on all bins
of the old histogram to fill the rebinned histogram.
Takes into account errors (Sumw2) if any.
The algorithm works for 1-d, 2-d and 3-d histograms.
The bit kCanRebin must be set before invoking this function.
Ex: h->SetBit(TH1::kCanRebin);

*-*-*-*-*Multiply this histogram by a constant c1*-*-*-*-*-*-*-*-*
*-* ========================================
this = c1*this
Note that both contents and errors(if any) are scaled.
This function uses the services of TH1::Add

return the median of a vector a in monotonic order with length n
where median is a number which divides sequence of n numbers
into 2 halves. When n is odd, the median is kth element k = (n + 1) / 2.
when n is even the median is a mean of the elements k = n/2 and k = n/2 + 1.

fill the array stats from the contents of this histogram
The array stats must be correctly dimensionned in the calling program.
stats[0] = sumw
stats[1] = sumw2
stats[2] = sumwx
stats[3] = sumwx2
stats[4] = sumwy if 2-d or 3-d
stats[5] = sumwy2
stats[6] = sumwxy
stats[7] = sumwz if 3-d
stats[8] = sumwz2
If no axis-subrange is specified (via TAxis::SetRange), the array stats
is simply a copy of the statistics quantities computed at filling time.
If a sub-range is specified, the function recomputes these quantities
from the bin contents in the current axis range.

*-*-*-*-*-*-*-*Return contour values into array levels*-*-*-*-*-*-*-*-*-*
*-* =======================================
*-*
*-* The number of contour levels can be returned by TH1::GetContourLevel
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*-*-*-*Set the number and values of contour levels*-*-*-*-*-*-*-*-*
*-* ===========================================
By default the number of contour levels is set to 20.
if argument levels = 0 or issing, equidistant contours are computed

*-*-*-*-*-*-*-*-*Redefine x axis parameters*-*-*-*-*-*-*-*-*-*-*-*
*-* ===========================
The X axis parameters are modified.
The bins content array is resized
if errors (Sumw2) the errors array is resized
The previous bin contents are lost
To change only the axis limits, see TAxis::SetRange

*-*-*-*-*-*-*-*-*Redefine x and y axis parameters*-*-*-*-*-*-*-*-*-*-*-*
*-* =================================
The X and Y axis parameters are modified.
The bins content array is resized
if errors (Sumw2) the errors array is resized
The previous bin contents are lost
To change only the axis limits, see TAxis::SetRange

*-*-*-*-*-*-*-*-*Redefine x, y and z axis parameters*-*-*-*-*-*-*-*-*-*-*-*
*-* ====================================
The X, Y and Z axis parameters are modified.
The bins content array is resized
if errors (Sumw2) the errors array is resized
The previous bin contents are lost
To change only the axis limits, see TAxis::SetRange

*-*-*-*-*-*-*-*-*Set the maximum value for the Y axis*-*-*-*-*-*-*-*-*-*-*-*
*-* ====================================
By default the maximum value is automatically set to the maximum
bin content plus a margin of 10 per cent.
Use TH1::GetMaximum to find the maximum value of an histogram
Use TH1::GetMaximumBin to find the bin with the maximum value of an histogram

*-*-*-*-*-*-*-*-*Set the minimum value for the Y axis*-*-*-*-*-*-*-*-*-*-*-*
*-* ====================================
By default the minimum value is automatically set to zero if all bin contents
are positive or the minimum - 10 per cent otherwise.
Use TH1::GetMinimum to find the minimum value of an histogram
Use TH1::GetMinimumBin to find the bin with the minimum value of an histogram

By default when an histogram is created, it is added to the list
of histogram objects in the current directory in memory.
Remove reference to this histogram from current directory and add
reference to new directory dir. dir can be 0 in which case the
histogram does not belong to any directory.

*-*-*-*-*-*-*-*-*Set statistics option on/off
*-* ============================
By default, the statistics box is drawn.
The paint options can be selected via gStyle->SetOptStats.
This function sets/resets the kNoStats bin in the histogram object.
It has priority over the Style option.

*-*-*-*-*Create structure to store sum of squares of weights*-*-*-*-*-*-*-*
*-* ===================================================
*-*
*-* if histogram is already filled, the sum of squares of weights
*-* is filled with the existing bin contents
*-*
*-* The error per bin will be computed as sqrt(sum of squares of weight)
*-* for each bin.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*-*-*-*-*Return pointer to function with name*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ===================================
Functions such as TH1::Fit store the fitted function in the list of
functions of this histogram.

*-*-*-*-*-*-*Return value of error associated to bin number bin*-*-*-*-*
*-* ==================================================
*-*
*-* if the sum of squares of weights has been defined (via Sumw2),
*-* this function returns the sqrt(sum of w2).
*-* otherwise it returns the sqrt(contents) for this bin.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.