Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TH2Poly Class Reference

2D Histogram with Polygonal Bins

Overview

TH2Poly is a 2D Histogram class (TH2) allowing to define polygonal bins of arbitrary shape.

Each bin in the TH2Poly histogram is a TH2PolyBin object. TH2PolyBin is a very simple class containing the vertices (stored as TGraphs or TMultiGraphs ) and contents of the polygonal bin as well as several related functions.

Essentially, a TH2Poly is a TList of TH2PolyBin objects with methods to manipulate them.

Bins are defined using one of the AddBin() methods. The bin definition should be done before filling.

The histogram can be filled with Fill(Double_t x, Double_t y, Double_t w) . w is the weight. If no weight is specified, it is assumed to be 1.

Not all histogram's area need to be binned. Filling an area without bins, will falls into the overflows. Adding a bin is not retroactive; it doesn't affect previous fillings. A Fill() call, that was previously ignored due to the lack of a bin at the specified location, is not reconsidered when that location is binned later.

If there are two overlapping bins, the first one in the list will be incremented by Fill().

The histogram may automatically extends its limits if a bin outside the histogram limits is added. This is done when the default constructor (with no arguments) is used. It generates a histogram with no limits along the X and Y axis. Adding bins to it will extend it up to a proper size.

TH2Poly implements a partitioning algorithm to speed up bins' filling (see the "Partitioning Algorithm" section for details). The partitioning algorithm divides the histogram into regions called cells. The bins that each cell intersects are recorded in an array of TLists. When a coordinate in the histogram is to be filled; the method (quickly) finds which cell the coordinate belongs. It then only loops over the bins intersecting that cell to find the bin the input coordinate corresponds to. The partitioning of the histogram is updated continuously as each bin is added. The default number of cells on each axis is 25. This number could be set to another value in the constructor or adjusted later by calling the ChangePartition(Int_t, Int_t) method. The partitioning algorithm is considerably faster than the brute force algorithm (i.e. checking if each bin contains the input coordinates), especially if the histogram is to be filled many times.

The following very simple macro shows how to build and fill a TH2Poly:

{
auto h2p = new TH2Poly();
Double_t x1[] = {0, 5, 6};
Double_t y1[] = {0, 0, 5};
Double_t x2[] = {0, -1, -1, 0};
Double_t y2[] = {0, 0, -1, 3};
Double_t x3[] = {4, 3, 0, 1, 2.4};
Double_t y3[] = {4, 3.7, 1, 3.7, 2.5};
h2p->AddBin(3, x1, y1);
h2p->AddBin(4, x2, y2);
h2p->AddBin(5, x3, y3);
h2p->Fill(0.1, 0.01, 3);
h2p->Fill(-0.5, -0.5, 7);
h2p->Fill(-0.7, -0.5, 1);
h2p->Fill(1, 3, 1.5);
}
double Double_t
Definition RtypesCore.h:59
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char y1
TH2Poly()
Default Constructor. No boundaries specified.
Definition TH2Poly.cxx:147

More examples can be found in th2polyBoxes.C, th2polyEurope.C, th2polyHoneycomb.C and th2polyUSA.C.

Partitioning Algorithm

The partitioning algorithm forms an essential part of the TH2Poly class. It is implemented to speed up the filling of bins.

With the brute force approach, the filling is done in the following way: An iterator loops over all bins in the TH2Poly and invokes the method IsInside() for each of them. This method checks if the input location is in that bin. If the filling coordinate is inside, the bin is filled. Looping over all the bin is very slow.

The alternative is to divide the histogram into virtual rectangular regions called "cells". Each cell stores the pointers of the bins intersecting it. When a coordinate is to be filled, the method finds which cell the coordinate falls into. Since the cells are rectangular, this can be done very quickly. It then only loops over the bins associated with that cell and calls IsInside() only on that bins. This reduces considerably the number of bins on which IsInside() is called and therefore speed up by a huge factor the filling compare to the brute force approach where IsInside() is called for all bins.

The addition of bins to the appropriate cells is done when the bin is added to the histogram. To do this, AddBin() calls the AddBinToPartition() method. This method adds the input bin to the partitioning matrix.

The number of partition cells per axis can be specified in the constructor. If it is not specified, the default value of 25 along each axis will be assigned. This value was chosen because it is small enough to avoid slowing down AddBin(), while being large enough to enhance Fill() by a considerable amount. Regardless of how it is initialized at construction time, it can be changed later with the ChangePartition() method. ChangePartition() deletes the old partition matrix and generates a new one with the specified number of cells on each axis.

The optimum number of partition cells per axis changes with the number of times Fill() will be called. Although partitioning greatly speeds up filling, it also adds a constant time delay into the code. When Fill() is to be called many times, it is more efficient to divide the histogram into a large number cells. However, if the histogram is to be filled only a few times, it is better to divide into a small number of cells.

Definition at line 66 of file TH2Poly.h.

Public Member Functions

 TH2Poly ()
 Default Constructor. No boundaries specified.
 
 TH2Poly (const char *name, const char *title, Double_t xlow, Double_t xup, Double_t ylow, Double_t yup)
 Constructor with specified name and boundaries, but no partition cell number.
 
 TH2Poly (const char *name, const char *title, Int_t nX, Double_t xlow, Double_t xup, Int_t nY, Double_t ylow, Double_t yup)
 Constructor with specified name and boundaries and partition cell number.
 
 TH2Poly (const TH2Poly &rhs)
 Copy constructor.
 
 ~TH2Poly () override
 Destructor.
 
Bool_t Add (const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1) override
 NOT IMPLEMENTED for TH2Poly.
 
Bool_t Add (const TH1 *h1, Double_t c1) override
 Performs the operation: this = this + c1*h1.
 
Bool_t Add (TF1 *h1, Double_t c1=1, Option_t *option="") override
 NOT IMPLEMENTED for TH2Poly.
 
Int_t AddBin (Double_t x1, Double_t y1, Double_t x2, Double_t y2)
 Add a new bin to the histogram.
 
Int_t AddBin (Int_t n, const Double_t *x, const Double_t *y)
 Adds a new bin to the histogram.
 
virtual Int_t AddBin (TObject *poly)
 Adds a new bin to the histogram.
 
void ChangePartition (Int_t n, Int_t m)
 Changes the number of partition cells in the histogram.
 
void ClearBinContents ()
 Clears the contents of all bins in the histogram.
 
TObjectClone (const char *newname="") const override
 Make a complete copy of the underlying object.
 
Double_t ComputeIntegral (Bool_t) override
 NOT IMPLEMENTED for TH2Poly.
 
void Copy (TObject &newth2p) const override
 Copy function for TH2Poly.
 
virtual TH2PolyBinCreateBin (TObject *poly)
 Create appropriate histogram bin.
 
Bool_t Divide (TF1 *, Double_t) override
 NOT IMPLEMENTED for TH2Poly.
 
TH1FFT (TH1 *, Option_t *) override
 NOT IMPLEMENTED for TH2Poly.
 
Int_t Fill (const char *name, Double_t w) override
 Increment the bin named "name" by w.
 
Int_t Fill (Double_t x, Double_t y) override
 Increment the bin containing (x,y) by 1.
 
Int_t Fill (Double_t x, Double_t y, Double_t w) override
 Increment the bin containing (x,y) by w.
 
void FillN (Int_t ntimes, const Double_t *x, const Double_t *y, const Double_t *w, Int_t stride=1) override
 Fills a 2-D histogram with an array of values and weights.
 
Int_t FindBin (Double_t x, Double_t y, Double_t z=0) override
 Returns the bin number of the bin at the given coordinate.
 
virtual TH1GetAsymmetry (TH1 *, Double_t, Double_t)
 NOT IMPLEMENTED for TH2Poly.
 
Double_t GetBinContent (Int_t bin) const override
 Returns the content of the input bin Bin numbers are from [1,nbins] and for the overflow/underflow/sea bins the range is [-9,-1]:
 
Bool_t GetBinContentChanged () const
 
Double_t GetBinError (Int_t bin) const override
 Returns the value of error associated to bin number bin.
 
const char * GetBinName (Int_t bin) const
 Returns the bin name.
 
TListGetBins ()
 Returns the TList of all bins in the histogram.
 
const char * GetBinTitle (Int_t bin) const
 Returns the bin title.
 
Bool_t GetFloat ()
 
Double_t GetMaximum () const
 Returns the maximum value of the histogram.
 
Double_t GetMaximum (Double_t maxval) const override
 Returns the maximum value of the histogram that is less than maxval.
 
Double_t GetMinimum () const
 Returns the minimum value of the histogram.
 
Double_t GetMinimum (Double_t minval) const override
 Returns the minimum value of the histogram that is greater than minval.
 
Bool_t GetNewBinAdded () const
 
Int_t GetNumberOfBins () const
 Return the number of bins : it should be the size of the bin list.
 
void GetStats (Double_t *stats) const override
 Fill the array stats from the contents of this histogram The array stats must be correctly dimensioned in the calling program.
 
void Honeycomb (Double_t xstart, Double_t ystart, Double_t a, Int_t k, Int_t s, Option_t *option="v")
 Bins the histogram using a honeycomb structure If the option "v" is specified, the hexagons are drawn "vertically" (default).
 
Double_t Integral (Option_t *option="") const override
 Returns the integral of bin contents.
 
Double_t Interpolate (Double_t x) const override
 illegal for a TH2
 
Double_t Interpolate (Double_t x, Double_t y) const override
 Given a point P(x,y), Interpolate approximates the value via bilinear interpolation based on the four nearest bin centers see Wikipedia, Bilinear Interpolation Andy Mastbaum 10/8/2008 vaguely based on R.Raja 6-Sep-2008.
 
Double_t Interpolate (Double_t x, Double_t y, Double_t z) const override
 illegal for a TH2
 
virtual Double_t Interpolate (Double_t, Double_t)
 NOT IMPLEMENTED for TH2Poly.
 
TClassIsA () const override
 
Bool_t IsInsideBin (Int_t binnr, Double_t x, Double_t y)
 Return "true" if the point (x,y) is inside the bin of binnr.
 
Long64_t Merge (TCollection *) override
 Merge TH2Polys Given the special nature of the TH2Poly, the merge is implemented in terms of subsequent TH2Poly::Add calls.
 
Bool_t Multiply (TF1 *, Double_t) override
 NOT IMPLEMENTED for TH2Poly.
 
TH2Polyoperator= (const TH2Poly &rhs)
 Assignment operator.
 
void Reset (Option_t *option) override
 Reset this histogram: contents, errors, etc.
 
void SavePrimitive (std::ostream &out, Option_t *option="") override
 Save primitive as a C++ statement(s) on output stream out.
 
void Scale (Double_t c1=1, Option_t *option="") override
 Multiply this histogram by a constant c1.
 
void SetBinContent (Int_t bin, Double_t content) override
 Sets the contents of the input bin to the input content Negative values between -1 and -9 are for the overflows and the sea.
 
void SetBinContentChanged (Bool_t flag)
 
void SetBinError (Int_t bin, Double_t error) override
 Set the bin Error.
 
void SetFloat (Bool_t flag=true)
 When set to kTRUE, allows the histogram to expand if a bin outside the limits is added.
 
void SetNewBinAdded (Bool_t flag)
 
void Streamer (TBuffer &) override
 Stream an object of class TH2.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TH2
 ~TH2 () override
 Destructor.
 
Int_t BufferEmpty (Int_t action=0) override
 Fill histogram with all entries in the buffer.
 
void FillRandom (const char *fname, Int_t ntimes=5000, TRandom *rng=nullptr) override
 Fill histogram following distribution in function fname.
 
void FillRandom (TH1 *h, Int_t ntimes=5000, TRandom *rng=nullptr) override
 Fill histogram following distribution in histogram h.
 
virtual void FitSlicesX (TF1 *f1=nullptr, Int_t firstybin=0, Int_t lastybin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=nullptr)
 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 firstybin and lastybin are considered.
 
virtual void FitSlicesY (TF1 *f1=nullptr, Int_t firstxbin=0, Int_t lastxbin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=nullptr)
 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 firstxbin and lastxbin are considered.
 
Int_t GetBin (Int_t binx, Int_t biny, Int_t binz=0) const override
 Return Global bin number corresponding to binx,y,z.
 
virtual Double_t GetBinErrorLow (Int_t bin) const
 Return lower error associated to bin number bin.
 
virtual Double_t GetBinErrorLow (Int_t binx, Int_t biny)
 
virtual Double_t GetBinErrorUp (Int_t bin) const
 Return upper error associated to bin number bin.
 
virtual Double_t GetBinErrorUp (Int_t binx, Int_t biny)
 
virtual Double_t GetBinWithContent2 (Double_t c, Int_t &binx, Int_t &biny, Int_t firstxbin=1, Int_t lastxbin=-1, Int_t firstybin=1, Int_t lastybin=-1, Double_t maxdiff=0) const
 compute first cell (binx,biny) in the range [firstxbin,lastxbin][firstybin,lastybin] for which diff = abs(cell_content-c) <= maxdiff In case several cells in the specified range with diff=0 are found the first cell found is returned in binx,biny.
 
virtual Double_t GetCorrelationFactor (Int_t axis1=1, Int_t axis2=2) const
 Return correlation factor between axis1 and axis2.
 
virtual Double_t GetCovariance (Int_t axis1=1, Int_t axis2=2) const
 Return covariance between axis1 and axis2.
 
virtual void GetRandom2 (Double_t &x, Double_t &y, TRandom *rng=nullptr)
 Return 2 random numbers along axis x and y distributed according to the cell-contents of this 2-D histogram return a NaN if the histogram has a bin with negative content.
 
virtual Double_t Integral (Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Option_t *option="") const
 Return integral of bin contents in range [firstxbin,lastxbin],[firstybin,lastybin] for a 2-D histogram By default the integral is computed as the sum of bin contents in the range.
 
virtual Double_t Integral (Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Option_t *="") const
 
virtual Double_t IntegralAndError (Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Double_t &err, Option_t *option="") const
 Return integral of bin contents in range [firstxbin,lastxbin],[firstybin,lastybin] for a 2-D histogram.
 
Double_t KolmogorovTest (const TH1 *h2, Option_t *option="") const override
 Statistical test of compatibility in shape between THIS histogram and h2, using Kolmogorov test.
 
TProfileProfileX (const char *name="_pfx", Int_t firstybin=1, Int_t lastybin=-1, Option_t *option="") const
 Project a 2-D histogram into a profile histogram along X.
 
TProfileProfileY (const char *name="_pfy", Int_t firstxbin=1, Int_t lastxbin=-1, Option_t *option="") const
 Project a 2-D histogram into a profile histogram along Y.
 
TH1DProjectionX (const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
 Project a 2-D histogram into a 1-D histogram along X.
 
TH1DProjectionY (const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
 Project a 2-D histogram into a 1-D histogram along Y.
 
void PutStats (Double_t *stats) override
 Replace current statistics with the values in array stats.
 
TH1DQuantilesX (Double_t prob=0.5, const char *name="_qx") const
 Compute the X distribution of quantiles in the other variable Y name is the name of the returned histogram prob is the probability content for the quantile (0.5 is the default for the median) An approximate error for the quantile is computed assuming that the distribution in the other variable is normal.
 
TH1DQuantilesY (Double_t prob=0.5, const char *name="_qy") const
 Compute the Y distribution of quantiles in the other variable X name is the name of the returned histogram prob is the probability content for the quantile (0.5 is the default for the median) An approximate error for the quantile is computed assuming that the distribution in the other variable is normal.
 
TH2Rebin (Int_t ngroup=2, const char *newname="", const Double_t *xbins=nullptr) override
 Override TH1::Rebin as TH2::RebinX Rebinning in variable binning as for TH1 is not allowed If a non-null pointer is given an error is flagged see RebinX and Rebin2D.
 
virtual TH2Rebin2D (Int_t nxgroup=2, Int_t nygroup=2, const char *newname="")
 Rebin this histogram grouping nxgroup/nygroup bins along the xaxis/yaxis together.
 
TH2RebinX (Int_t ngroup=2, const char *newname="") override
 Rebin only the X axis see Rebin2D.
 
virtual TH2RebinY (Int_t ngroup=2, const char *newname="")
 Rebin only the Y axis see Rebin2D.
 
virtual void SetShowProjectionX (Int_t nbins=1)
 When the mouse is moved in a pad containing a 2-d view of this histogram a second canvas shows the projection along X corresponding to the mouse position along Y.
 
virtual void SetShowProjectionXY (Int_t nbinsY=1, Int_t nbinsX=1)
 When the mouse is moved in a pad containing a 2-d view of this histogram two canvases show the projection along X and Y corresponding to the mouse position along Y and X, respectively.
 
virtual void SetShowProjectionY (Int_t nbins=1)
 When the mouse is moved in a pad containing a 2-d view of this histogram a second canvas shows the projection along Y corresponding to the mouse position along X.
 
TH1ShowBackground (Int_t niter=20, Option_t *option="same") override
 This function calculates the background spectrum in this histogram.
 
Int_t ShowPeaks (Double_t sigma=2, Option_t *option="", Double_t threshold=0.05) override
 Interface to TSpectrum2::Search the function finds peaks in this histogram where the width is > sigma and the peak maximum greater than threshold*maximum bin content of this.
 
void Smooth (Int_t ntimes=1, Option_t *option="") override
 Smooth bin contents of this 2-d histogram using kernel algorithms similar to the ones used in the raster graphics community.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TH1
 ~TH1 () override
 Histogram default destructor.
 
virtual void AddBinContent (Int_t bin)
 Increment bin content by 1.
 
virtual void AddBinContent (Int_t bin, Double_t w)
 Increment bin content by a weight w.
 
virtual Double_t AndersonDarlingTest (const TH1 *h2, Double_t &advalue) const
 Same function as above but returning also the test statistic value.
 
virtual Double_t AndersonDarlingTest (const TH1 *h2, Option_t *option="") const
 Statistical test of compatibility in shape between this histogram and h2, using the Anderson-Darling 2 sample test.
 
void Browse (TBrowser *b) override
 Browse the Histogram object.
 
virtual Bool_t CanExtendAllAxes () const
 Returns true if all axes are extendable.
 
virtual Double_t Chi2Test (const TH1 *h2, Option_t *option="UU", Double_t *res=nullptr) const
 \( \chi^{2} \) test for comparing weighted and unweighted histograms
 
virtual Double_t Chi2TestX (const TH1 *h2, Double_t &chi2, Int_t &ndf, Int_t &igood, Option_t *option="UU", Double_t *res=nullptr) const
 The computation routine of the Chisquare test.
 
virtual Double_t Chisquare (TF1 *f1, Option_t *option="") const
 Compute and return the chisquare of this histogram with respect to a function The chisquare is computed by weighting each histogram point by the bin error By default the full range of the histogram is used.
 
virtual void ClearUnderflowAndOverflow ()
 Remove all the content from the underflow and overflow bins, without changing the number of entries After calling this method, every undeflow and overflow bins will have content 0.0 The Sumw2 is also cleared, since there is no more content in the bins.
 
virtual void DirectoryAutoAdd (TDirectory *)
 Perform the automatic addition of the histogram to the given directory.
 
Int_t DistancetoPrimitive (Int_t px, Int_t py) override
 Compute distance from point px,py to a line.
 
virtual Bool_t Divide (const TH1 *h1)
 Divide this histogram by h1.
 
virtual Bool_t Divide (const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option="")
 Replace contents of this histogram by the division of h1 by h2.
 
void Draw (Option_t *option="") override
 Draw this histogram with options.
 
virtual TH1DrawCopy (Option_t *option="", const char *name_postfix="_copy") const
 Copy this histogram and Draw in the current pad.
 
virtual TH1DrawNormalized (Option_t *option="", Double_t norm=1) const
 Draw a normalized copy of this histogram.
 
virtual void DrawPanel ()
 Display a panel with all histogram drawing options.
 
virtual void Eval (TF1 *f1, Option_t *option="")
 Evaluate function f1 at the center of bins of this histogram.
 
void ExecuteEvent (Int_t event, Int_t px, Int_t py) override
 Execute action corresponding to one event.
 
virtual void ExtendAxis (Double_t x, TAxis *axis)
 Histogram is resized along axis such that x is in the axis range.
 
virtual Int_t FindFirstBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
 Find first bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold is found the function returns -1.
 
virtual Int_t FindFixBin (Double_t x, Double_t y=0, Double_t z=0) const
 Return Global bin number corresponding to x,y,z.
 
virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
 Find last bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold is found the function returns -1.
 
TObjectFindObject (const char *name) const override
 Search object named name in the list of functions.
 
TObjectFindObject (const TObject *obj) const override
 Search object obj in the list of functions.
 
virtual TFitResultPtr Fit (const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
 Fit histogram with function fname.
 
virtual TFitResultPtr Fit (TF1 *f1, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
 Fit histogram with the function pointer f1.
 
virtual void FitPanel ()
 Display a panel with all histogram fit options.
 
TH1GetAsymmetry (TH1 *h2, Double_t c2=1, Double_t dc2=0)
 Return a histogram containing the asymmetry of this histogram with h2, where the asymmetry is defined as:
 
virtual Color_t GetAxisColor (Option_t *axis="X") const
 Return the number of divisions for "axis".
 
virtual Float_t GetBarOffset () const
 
virtual Float_t GetBarWidth () const
 
virtual Double_t GetBinCenter (Int_t bin) const
 Return bin center for 1D histogram.
 
virtual EBinErrorOpt GetBinErrorOption () const
 
virtual Double_t GetBinLowEdge (Int_t bin) const
 Return bin lower edge for 1D histogram.
 
virtual Double_t GetBinWidth (Int_t bin) const
 Return bin width for 1D histogram.
 
virtual Double_t GetBinWithContent (Double_t c, Int_t &binx, Int_t firstx=0, Int_t lastx=0, Double_t maxdiff=0) const
 Compute first binx in the range [firstx,lastx] for which diff = abs(bin_content-c) <= maxdiff.
 
virtual void GetBinXYZ (Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const
 Return binx, biny, binz corresponding to the global bin number globalbin see TH1::GetBin function above.
 
const Double_tGetBuffer () const
 
Int_t GetBufferLength () const
 
Int_t GetBufferSize () const
 
virtual Double_t GetCellContent (Int_t binx, Int_t biny) const
 
virtual Double_t GetCellError (Int_t binx, Int_t biny) const
 
virtual void GetCenter (Double_t *center) const
 Fill array with center of bins for 1D histogram Better to use h1.GetXaxis()->GetCenter(center)
 
virtual Int_t GetContour (Double_t *levels=nullptr)
 Return contour values into array levels if pointer levels is non zero.
 
virtual Double_t GetContourLevel (Int_t level) const
 Return value of contour number level.
 
virtual Double_t GetContourLevelPad (Int_t level) const
 Return the value of contour number "level" in Pad coordinates.
 
TH1GetCumulative (Bool_t forward=kTRUE, const char *suffix="_cumulative") const
 Return a pointer to a histogram containing the cumulative content.
 
virtual Int_t GetDimension () const
 
TDirectoryGetDirectory () const
 
virtual Double_t GetEffectiveEntries () const
 Number of effective entries of the histogram.
 
virtual Double_t GetEntries () const
 Return the current number of entries.
 
virtual TF1GetFunction (const char *name) const
 Return pointer to function with name.
 
virtual Double_tGetIntegral ()
 Return a pointer to the array of bins integral.
 
virtual Double_t GetKurtosis (Int_t axis=1) const
 
virtual Color_t GetLabelColor (Option_t *axis="X") const
 Return the "axis" label color.
 
virtual Style_t GetLabelFont (Option_t *axis="X") const
 Return the "axis" label font.
 
virtual Float_t GetLabelOffset (Option_t *axis="X") const
 Return the "axis" label offset.
 
virtual Float_t GetLabelSize (Option_t *axis="X") const
 Return the "axis" label size.
 
TListGetListOfFunctions () const
 
virtual void GetLowEdge (Double_t *edge) const
 Fill array with low edge of bins for 1D histogram Better to use h1.GetXaxis()->GetLowEdge(edge)
 
virtual Int_t GetMaximumBin () const
 Return location of bin with maximum value in the range.
 
virtual Int_t GetMaximumBin (Int_t &locmax, Int_t &locmay, Int_t &locmaz) const
 Return location of bin with maximum value in the range.
 
virtual Double_t GetMaximumStored () const
 
virtual Double_t GetMean (Int_t axis=1) const
 For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis.
 
virtual Double_t GetMeanError (Int_t axis=1) const
 Return standard error of mean of this histogram along the X axis.
 
virtual void GetMinimumAndMaximum (Double_t &min, Double_t &max) const
 Retrieve the minimum and maximum values in the histogram.
 
virtual Int_t GetMinimumBin () const
 Return location of bin with minimum value in the range.
 
virtual Int_t GetMinimumBin (Int_t &locmix, Int_t &locmiy, Int_t &locmiz) const
 Return location of bin with minimum value in the range.
 
virtual Double_t GetMinimumStored () const
 
virtual Int_t GetNbinsX () const
 
virtual Int_t GetNbinsY () const
 
virtual Int_t GetNbinsZ () const
 
virtual Int_t GetNcells () const
 
virtual Int_t GetNdivisions (Option_t *axis="X") const
 Return the number of divisions for "axis".
 
virtual Double_t GetNormFactor () const
 
char * GetObjectInfo (Int_t px, Int_t py) const override
 Redefines TObject::GetObjectInfo.
 
Option_tGetOption () const override
 
TVirtualHistPainterGetPainter (Option_t *option="")
 Return pointer to painter.
 
virtual Int_t GetQuantiles (Int_t nprobSum, Double_t *q, const Double_t *probSum=nullptr)
 Compute Quantiles for this histogram Quantile x_q of a probability distribution Function F is defined as.
 
virtual Double_t GetRandom (TRandom *rng=nullptr) const
 Return a random number distributed according the histogram bin contents.
 
Double_t GetRMS (Int_t axis=1) const
 This function returns the Standard Deviation (Sigma) of the distribution not the Root Mean Square (RMS).
 
Double_t GetRMSError (Int_t axis=1) const
 
virtual Double_t GetSkewness (Int_t axis=1) const
 
EStatOverflows GetStatOverflows () const
 Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more information.
 
virtual Double_t GetStdDev (Int_t axis=1) const
 Returns the Standard Deviation (Sigma).
 
virtual Double_t GetStdDevError (Int_t axis=1) const
 Return error of standard deviation estimation for Normal distribution.
 
virtual Double_t GetSumOfWeights () const
 Return the sum of weights excluding under/overflows.
 
virtual TArrayDGetSumw2 ()
 
virtual const TArrayDGetSumw2 () const
 
virtual Int_t GetSumw2N () const
 
virtual Float_t GetTickLength (Option_t *axis="X") const
 Return the "axis" tick length.
 
virtual Style_t GetTitleFont (Option_t *axis="X") const
 Return the "axis" title font.
 
virtual Float_t GetTitleOffset (Option_t *axis="X") const
 Return the "axis" title offset.
 
virtual Float_t GetTitleSize (Option_t *axis="X") const
 Return the "axis" title size.
 
TAxisGetXaxis ()
 
const TAxisGetXaxis () const
 
TAxisGetYaxis ()
 
const TAxisGetYaxis () const
 
TAxisGetZaxis ()
 
const TAxisGetZaxis () const
 
Bool_t IsBinOverflow (Int_t bin, Int_t axis=0) const
 Return true if the bin is overflow.
 
Bool_t IsBinUnderflow (Int_t bin, Int_t axis=0) const
 Return true if the bin is underflow.
 
virtual Bool_t IsHighlight () const
 
virtual void LabelsDeflate (Option_t *axis="X")
 Reduce the number of bins for the axis passed in the option to the number of bins having a label.
 
virtual void LabelsInflate (Option_t *axis="X")
 Double the number of bins for axis.
 
virtual void LabelsOption (Option_t *option="h", Option_t *axis="X")
 Sort bins with labels or set option(s) to draw axis with labels.
 
Long64_t Merge (TCollection *list, Option_t *option)
 Add all histograms in the collection to this histogram.
 
virtual Bool_t Multiply (const TH1 *h1)
 Multiply this histogram by h1.
 
virtual Bool_t Multiply (const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option="")
 Replace contents of this histogram by multiplication of h1 by h2.
 
void Paint (Option_t *option="") override
 Control routine to paint any kind of histograms.
 
void Print (Option_t *option="") const override
 Print some global quantities for this histogram.
 
virtual void RebinAxis (Double_t x, TAxis *axis)
 
virtual void Rebuild (Option_t *option="")
 Using the current bin info, recompute the arrays for contents and errors.
 
void RecursiveRemove (TObject *obj) override
 Recursively remove object from the list of functions.
 
virtual void ResetStats ()
 Reset the statistics including the number of entries and replace with values calculated from bin content.
 
virtual void SetAxisColor (Color_t color=1, Option_t *axis="X")
 Set color to draw the axis line and tick marks.
 
virtual void SetAxisRange (Double_t xmin, Double_t xmax, Option_t *axis="X")
 Set the "axis" range.
 
virtual void SetBarOffset (Float_t offset=0.25)
 Set the bar offset as fraction of the bin width for drawing mode "B".
 
virtual void SetBarWidth (Float_t width=0.5)
 Set the width of bars as fraction of the bin width for drawing mode "B".
 
virtual void SetBinErrorOption (EBinErrorOpt type)
 
virtual void SetBins (Int_t nx, const Double_t *xBins)
 Redefine x axis parameters with variable bin sizes.
 
virtual void SetBins (Int_t nx, const Double_t *xBins, Int_t ny, const Double_t *yBins)
 Redefine x and y axis parameters with variable bin sizes.
 
virtual void SetBins (Int_t nx, const Double_t *xBins, Int_t ny, const Double_t *yBins, Int_t nz, const Double_t *zBins)
 Redefine x, y and z axis parameters with variable bin sizes.
 
virtual void SetBins (Int_t nx, Double_t xmin, Double_t xmax)
 Redefine x axis parameters.
 
virtual void SetBins (Int_t nx, Double_t xmin, Double_t xmax, Int_t ny, Double_t ymin, Double_t ymax)
 Redefine x and y axis parameters.
 
virtual void SetBins (Int_t nx, Double_t xmin, Double_t xmax, Int_t ny, Double_t ymin, Double_t ymax, Int_t nz, Double_t zmin, Double_t zmax)
 Redefine x, y and z axis parameters.
 
virtual void SetBinsLength (Int_t=-1)
 
virtual void SetBuffer (Int_t buffersize, Option_t *option="")
 Set the maximum number of entries to be kept in the buffer.
 
virtual UInt_t SetCanExtend (UInt_t extendBitMask)
 Make the histogram axes extendable / not extendable according to the bit mask returns the previous bit mask specifying which axes are extendable.
 
virtual void SetCellContent (Int_t binx, Int_t biny, Double_t content)
 
virtual void SetCellError (Int_t binx, Int_t biny, Double_t content)
 
virtual void SetContent (const Double_t *content)
 Replace bin contents by the contents of array content.
 
virtual void SetContour (Int_t nlevels, const Double_t *levels=nullptr)
 Set the number and values of contour levels.
 
virtual void SetContourLevel (Int_t level, Double_t value)
 Set value for one contour level.
 
virtual void SetDirectory (TDirectory *dir)
 By default, when a histogram is created, it is added to the list of histogram objects in the current directory in memory.
 
virtual void SetEntries (Double_t n)
 
virtual void SetError (const Double_t *error)
 Replace bin errors by values in array error.
 
virtual void SetHighlight (Bool_t set=kTRUE)
 Set highlight (enable/disable) mode for the histogram by default highlight mode is disable.
 
virtual void SetLabelColor (Color_t color=1, Option_t *axis="X")
 Set axis labels color.
 
virtual void SetLabelFont (Style_t font=62, Option_t *axis="X")
 Set font number used to draw axis labels.
 
virtual void SetLabelOffset (Float_t offset=0.005, Option_t *axis="X")
 Set offset between axis and axis' labels.
 
virtual void SetLabelSize (Float_t size=0.02, Option_t *axis="X")
 Set size of axis' labels.
 
virtual void SetMaximum (Double_t maximum=-1111)
 
virtual void SetMinimum (Double_t minimum=-1111)
 
void SetName (const char *name) override
 Change the name of this histogram.
 
void SetNameTitle (const char *name, const char *title) override
 Change the name and title of this histogram.
 
virtual void SetNdivisions (Int_t n=510, Option_t *axis="X")
 Set the number of divisions to draw an axis.
 
virtual void SetNormFactor (Double_t factor=1)
 
virtual void SetOption (Option_t *option=" ")
 
void SetStatOverflows (EStatOverflows statOverflows)
 See GetStatOverflows for more information.
 
virtual void SetStats (Bool_t stats=kTRUE)
 Set statistics option on/off.
 
virtual void SetTickLength (Float_t length=0.02, Option_t *axis="X")
 Set the axis' tick marks length.
 
void SetTitle (const char *title) override
 Change/set the title.
 
virtual void SetTitleFont (Style_t font=62, Option_t *axis="X")
 Set the axis' title font.
 
virtual void SetTitleOffset (Float_t offset=1, Option_t *axis="X")
 Specify a parameter offset to control the distance between the axis and the axis' title.
 
virtual void SetTitleSize (Float_t size=0.02, Option_t *axis="X")
 Set the axis' title size.
 
virtual void SetXTitle (const char *title)
 
virtual void SetYTitle (const char *title)
 
virtual void SetZTitle (const char *title)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void Sumw2 (Bool_t flag=kTRUE)
 Create structure to store sum of squares of weights.
 
void UseCurrentStyle () override
 Copy current attributes from/to current style.
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 TNamed copy ctor.
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 TNamed destructor.
 
void Clear (Option_t *option="") override
 Set name and title to empty strings ("").
 
TObjectClone (const char *newname="") const override
 Make a clone of an object using the Streamer facility.
 
Int_t Compare (const TObject *obj) const override
 Compare two TNamed objects.
 
void Copy (TObject &named) const override
 Copy this to obj.
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer.
 
const char * GetName () const override
 Returns name of object.
 
const char * GetTitle () const override
 Returns title of object.
 
ULong_t Hash () const override
 Return hash value for this object.
 
TClassIsA () const override
 
Bool_t IsSortable () const override
 
void ls (Option_t *option="") const override
 List TNamed name and title.
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator.
 
void Print (Option_t *option="") const override
 Print TNamed name and title.
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject.
 
void Streamer (TBuffer &) override
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
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.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
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).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
 
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)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 
- Public Member Functions inherited from TAttLine
 TAttLine ()
 AttLine default constructor.
 
 TAttLine (Color_t lcolor, Style_t lstyle, Width_t lwidth)
 AttLine normal constructor.
 
virtual ~TAttLine ()
 AttLine destructor.
 
void Copy (TAttLine &attline) const
 Copy this line attributes to a new TAttLine.
 
Int_t DistancetoLine (Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
 Compute distance from point px,py to a line.
 
virtual Color_t GetLineColor () const
 Return the line color.
 
virtual Style_t GetLineStyle () const
 Return the line style.
 
virtual Width_t GetLineWidth () const
 Return the line width.
 
virtual void Modify ()
 Change current line attributes if necessary.
 
virtual void ResetAttLine (Option_t *option="")
 Reset this line attributes to default values.
 
virtual void SaveLineAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
 Save line attributes as C++ statement(s) on output stream out.
 
virtual void SetLineAttributes ()
 Invoke the DialogCanvas Line attributes.
 
virtual void SetLineColor (Color_t lcolor)
 Set the line color.
 
virtual void SetLineColorAlpha (Color_t lcolor, Float_t lalpha)
 Set a transparent line color.
 
virtual void SetLineStyle (Style_t lstyle)
 Set the line style.
 
virtual void SetLineWidth (Width_t lwidth)
 Set the line width.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TAttFill
 TAttFill ()
 AttFill default constructor.
 
 TAttFill (Color_t fcolor, Style_t fstyle)
 AttFill normal constructor.
 
virtual ~TAttFill ()
 AttFill destructor.
 
void Copy (TAttFill &attfill) const
 Copy this fill attributes to a new TAttFill.
 
virtual Color_t GetFillColor () const
 Return the fill area color.
 
virtual Style_t GetFillStyle () const
 Return the fill area style.
 
virtual Bool_t IsTransparent () const
 
virtual void Modify ()
 Change current fill area attributes if necessary.
 
virtual void ResetAttFill (Option_t *option="")
 Reset this fill attributes to default values.
 
virtual void SaveFillAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
 Save fill attributes as C++ statement(s) on output stream out.
 
virtual void SetFillAttributes ()
 Invoke the DialogCanvas Fill attributes.
 
virtual void SetFillColor (Color_t fcolor)
 Set the fill area color.
 
virtual void SetFillColorAlpha (Color_t fcolor, Float_t falpha)
 Set a transparent fill color.
 
virtual void SetFillStyle (Style_t fstyle)
 Set the fill area style.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TAttMarker
 TAttMarker ()
 TAttMarker default constructor.
 
 TAttMarker (Color_t color, Style_t style, Size_t msize)
 TAttMarker normal constructor.
 
virtual ~TAttMarker ()
 TAttMarker destructor.
 
void Copy (TAttMarker &attmarker) const
 Copy this marker attributes to a new TAttMarker.
 
virtual Color_t GetMarkerColor () const
 Return the marker color.
 
virtual Size_t GetMarkerSize () const
 Return the marker size.
 
virtual Style_t GetMarkerStyle () const
 Return the marker style.
 
virtual void Modify ()
 Change current marker attributes if necessary.
 
virtual void ResetAttMarker (Option_t *toption="")
 Reset this marker attributes to the default values.
 
virtual void SaveMarkerAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
 Save line attributes as C++ statement(s) on output stream out.
 
virtual void SetMarkerAttributes ()
 Invoke the DialogCanvas Marker attributes.
 
virtual void SetMarkerColor (Color_t mcolor=1)
 Set the marker color.
 
virtual void SetMarkerColorAlpha (Color_t mcolor, Float_t malpha)
 Set a transparent marker color.
 
virtual void SetMarkerSize (Size_t msize=1)
 Set the marker size.
 
virtual void SetMarkerStyle (Style_t mstyle=1)
 Set the marker style.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TH2
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TH1
static void AddDirectory (Bool_t add=kTRUE)
 Sets the flag controlling the automatic add of histograms in memory.
 
static Bool_t AddDirectoryStatus ()
 Static function: cannot be inlined on Windows/NT.
 
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Int_t FitOptionsMake (Option_t *option, Foption_t &Foption)
 Decode string choptin and fill fitOption structure.
 
static Int_t GetDefaultBufferSize ()
 Static function return the default buffer size for automatic histograms the parameter fgBufferSize may be changed via SetDefaultBufferSize.
 
static Bool_t GetDefaultSumw2 ()
 Return kTRUE if TH1::Sumw2 must be called when creating new histograms.
 
static void SetDefaultBufferSize (Int_t buffersize=1000)
 Static function to set the default buffer size for automatic histograms.
 
static void SetDefaultSumw2 (Bool_t sumw2=kTRUE)
 When this static function is called with sumw2=kTRUE, all new histograms will automatically activate the storage of the sum of squares of errors, ie TH1::Sumw2 is automatically called.
 
static void SmoothArray (Int_t NN, Double_t *XX, Int_t ntimes=1)
 Smooth array xx, translation of Hbook routine hsmoof.F.
 
static void StatOverflows (Bool_t flag=kTRUE)
 if flag=kTRUE, underflows and overflows are used by the Fill functions in the computation of statistics (mean value, StdDev).
 
static TH1TransformHisto (TVirtualFFT *fft, TH1 *h_output, Option_t *option)
 For a given transform (first parameter), fills the histogram (second parameter) with the transform output data, specified in the third parameter If the 2nd parameter h_output is empty, a new histogram (TH1D or TH2D) is created and the user is responsible for deleting it.
 
- Static Public Member Functions inherited from TNamed
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 
- Static Public Member Functions inherited from TAttLine
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TAttFill
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TAttMarker
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Width_t GetMarkerLineWidth (Style_t style)
 Internal helper function that returns the line width of the given marker style (0 = filled marker)
 
static Style_t GetMarkerStyleBase (Style_t style)
 Internal helper function that returns the corresponding marker style with line width 1 for the given style.
 

Protected Types

enum  { kNOverflow = 9 }
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 

Protected Member Functions

void AddBinToPartition (TH2PolyBin *bin)
 Adds the input bin into the partition cell matrix.
 
Int_t Fill (const char *, const char *, Double_t) override
 NOT IMPLEMENTED for TH2Poly.
 
Int_t Fill (const char *, Double_t, Double_t) override
 NOT IMPLEMENTED for TH2Poly.
 
Int_t Fill (Double_t) override
 NOT IMPLEMENTED for TH2Poly.
 
Int_t Fill (Double_t, const char *, Double_t) override
 NOT IMPLEMENTED for TH2Poly.
 
void FillN (Int_t, const Double_t *, const Double_t *, Int_t) override
 NOT IMPLEMENTED for TH2Poly.
 
Double_t GetBinContent (Int_t, Int_t) const override
 NOT IMPLEMENTED for TH2Poly.
 
Double_t GetBinContent (Int_t, Int_t, Int_t) const override
 NOT IMPLEMENTED for TH2Poly.
 
Double_t GetBinError (Int_t, Int_t) const override
 NOT IMPLEMENTED for TH2Poly.
 
Double_t GetBinError (Int_t, Int_t, Int_t) const override
 NOT IMPLEMENTED for TH2Poly.
 
void Initialize (Double_t xlow, Double_t xup, Double_t ylow, Double_t yup, Int_t n, Int_t m)
 Initializes the TH2Poly object. This method is called by the constructor.
 
Double_t Integral (Int_t, Int_t, const Option_t *) const override
 NOT IMPLEMENTED for TH2Poly.
 
Double_t Integral (Int_t, Int_t, Int_t, Int_t, const Option_t *) const override
 NOT IMPLEMENTED for TH2Poly.
 
Double_t Integral (Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, const Option_t *) const override
 NOT IMPLEMENTED for TH2Poly.
 
Bool_t IsIntersecting (TH2PolyBin *bin, Double_t xclipl, Double_t xclipr, Double_t yclipb, Double_t yclipt)
 Returns kTRUE if the input bin is intersecting with the input rectangle (xclipl, xclipr, yclipb, yclipt)
 
Bool_t IsIntersectingPolygon (Int_t bn, Double_t *x, Double_t *y, Double_t xclipl, Double_t xclipr, Double_t yclipb, Double_t yclipt)
 Returns kTRUE if the input polygon (bn, x, y) is intersecting with the input rectangle (xclipl, xclipr, yclipb, yclipt)
 
Double_t RetrieveBinContent (Int_t bin) const override
 Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::GetBin.
 
void SetBinContent (Int_t, Int_t, Double_t) override
 NOT IMPLEMENTED for TH2Poly.
 
void SetBinContent (Int_t, Int_t, Int_t, Double_t) override
 NOT IMPLEMENTED for TH2Poly.
 
void SetBinError (Int_t, Int_t, Double_t) override
 NOT IMPLEMENTED for TH2Poly.
 
void SetBinError (Int_t, Int_t, Int_t, Double_t) override
 NOT IMPLEMENTED for TH2Poly.
 
void UpdateBinContent (Int_t bin, Double_t content) override
 Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin.
 
- Protected Member Functions inherited from TH2
 TH2 ()
 2-D histogram default constructor.
 
 TH2 (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, const Double_t *ybins)
 Constructor for Double_t variable bin size 2-D histograms.
 
 TH2 (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, Double_t ylow, Double_t yup)
 Constructor for variable bin size (along X axis) 2-D histograms using an input array of type double.
 
 TH2 (const char *name, const char *title, Int_t nbinsx, const Float_t *xbins, Int_t nbinsy, const Float_t *ybins)
 Constructor for variable bin size (along X and Y axis) 2-D histograms using input arrays of type float.
 
 TH2 (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, const Double_t *ybins)
 Constructor for Double_t variable bin size (along Y axis) 2-D histograms.
 
 TH2 (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup)
 Constructor for fix bin size 2-D histograms.
 
virtual Int_t BufferFill (Double_t x, Double_t y, Double_t w)
 accumulate arguments in buffer.
 
Int_t BufferFill (Double_t, Double_t) override
 accumulate arguments in buffer.
 
virtual void DoFitSlices (bool onX, TF1 *f1, Int_t firstbin, Int_t lastbin, Int_t cut, Option_t *option, TObjArray *arr)
 
virtual TProfileDoProfile (bool onX, const char *name, Int_t firstbin, Int_t lastbin, Option_t *option) const
 
virtual TH1DDoProjection (bool onX, const char *name, Int_t firstbin, Int_t lastbin, Option_t *option) const
 Internal (protected) method for performing projection on the X or Y axis called by ProjectionX or ProjectionY.
 
virtual TH1DDoQuantiles (bool onX, const char *name, Double_t prob) const
 Implementation of quantiles for x or y.
 
- Protected Member Functions inherited from TH1
 TH1 ()
 Histogram default constructor.
 
 TH1 (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins)
 Constructor for variable bin size histograms using an input array of type double.
 
 TH1 (const char *name, const char *title, Int_t nbinsx, const Float_t *xbins)
 Constructor for variable bin size histograms using an input array of type float.
 
 TH1 (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup)
 Constructor for fix bin size histograms.
 
virtual Int_t AutoP2FindLimits (Double_t min, Double_t max)
 Buffer-based estimate of the histogram range using the power of 2 algorithm.
 
Int_t AxisChoice (Option_t *axis) const
 Choose an axis according to "axis".
 
virtual void DoFillN (Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1)
 Internal method to fill histogram content from a vector called directly by TH1::BufferEmpty.
 
virtual Double_t DoIntegral (Int_t ix1, Int_t ix2, Int_t iy1, Int_t iy2, Int_t iz1, Int_t iz2, Double_t &err, Option_t *opt, Bool_t doerr=kFALSE) const
 Internal function compute integral and optionally the error between the limits specified by the bin number values working for all histograms (1D, 2D and 3D)
 
virtual Bool_t FindNewAxisLimits (const TAxis *axis, const Double_t point, Double_t &newMin, Double_t &newMax)
 finds new limits for the axis so that point is within the range and the limits are compatible with the previous ones (see TH1::Merge).
 
UInt_t GetAxisLabelStatus () const
 Internal function used in TH1::Fill to see which axis is full alphanumeric, i.e.
 
virtual Double_t GetBinErrorSqUnchecked (Int_t bin) const
 
Bool_t GetStatOverflowsBehaviour () const
 
Bool_t IsEmpty () const
 Check if a histogram is empty (this is a protected method used mainly by TH1Merger )
 
virtual void SavePrimitiveHelp (std::ostream &out, const char *hname, Option_t *option="")
 Helper function for the SavePrimitive functions from TH1 or classes derived from TH1, eg TProfile, TProfile2D.
 
- 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).
 
void MakeZombie ()
 

Protected Attributes

Bool_t fBinContentChanged
 !For the 3D Painter
 
TListfBins
 List of bins. The list owns the contained objects.
 
TListfCells
 [fNCells] The array of TLists that store the bins that intersect with each cell. List do not own the contained objects
 
Int_t fCellX
 Number of partition cells in the x-direction of the histogram.
 
Int_t fCellY
 Number of partition cells in the y-direction of the histogram.
 
Bool_tfCompletelyInside
 [fNCells] The array that returns true if the cell at the given coordinate is completely inside a bin
 
Bool_t fFloat
 When set to kTRUE, allows the histogram to expand if a bin outside the limits is added.
 
Bool_tfIsEmpty
 [fNCells] The array that returns true if the cell at the given coordinate is empty
 
Int_t fNCells
 Number of partition cells: fCellX*fCellY.
 
Bool_t fNewBinAdded
 !For the 3D Painter
 
Double_t fOverflow [kNOverflow]
 Overflow bins.
 
Double_t fStepX
 
Double_t fStepY
 Dimensions of a partition cell.
 
- Protected Attributes inherited from TH2
Double_t fScalefactor
 Scale factor.
 
Double_t fTsumwxy
 Total Sum of weight*X*Y.
 
Double_t fTsumwy
 Total Sum of weight*Y.
 
Double_t fTsumwy2
 Total Sum of weight*Y*Y.
 
- Protected Attributes inherited from TH1
Short_t fBarOffset
 (1000*offset) for bar charts or legos
 
Short_t fBarWidth
 (1000*width) for bar charts or legos
 
EBinErrorOpt fBinStatErrOpt
 Option for bin statistical errors.
 
Double_tfBuffer
 [fBufferSize] entry buffer
 
Int_t fBufferSize
 fBuffer size
 
TArrayD fContour
 Array to display contour levels.
 
Int_t fDimension
 ! Histogram dimension (1, 2 or 3 dim)
 
TDirectoryfDirectory
 ! Pointer to directory holding this histogram
 
Double_t fEntries
 Number of entries.
 
TListfFunctions
 ->Pointer to list of functions (fits and user)
 
Double_tfIntegral
 ! Integral of bins used by GetRandom
 
Double_t fMaximum
 Maximum value for plotting.
 
Double_t fMinimum
 Minimum value for plotting.
 
Int_t fNcells
 Number of bins(1D), cells (2D) +U/Overflows.
 
Double_t fNormFactor
 Normalization factor.
 
TString fOption
 Histogram options.
 
TVirtualHistPainterfPainter
 ! Pointer to histogram painter
 
EStatOverflows fStatOverflows
 Per object flag to use under/overflows in statistics.
 
TArrayD fSumw2
 Array of sum of squares of weights.
 
Double_t fTsumw
 Total Sum of weights.
 
Double_t fTsumw2
 Total Sum of squares of weights.
 
Double_t fTsumwx
 Total Sum of weight*X.
 
Double_t fTsumwx2
 Total Sum of weight*X*X.
 
TAxis fXaxis
 X axis descriptor.
 
TAxis fYaxis
 Y axis descriptor.
 
TAxis fZaxis
 Z axis descriptor.
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 
- Protected Attributes inherited from TAttLine
Color_t fLineColor
 Line color.
 
Style_t fLineStyle
 Line style.
 
Width_t fLineWidth
 Line width.
 
- Protected Attributes inherited from TAttFill
Color_t fFillColor
 Fill area color.
 
Style_t fFillStyle
 Fill area style.
 
- Protected Attributes inherited from TAttMarker
Color_t fMarkerColor
 Marker color.
 
Size_t fMarkerSize
 Marker size.
 
Style_t fMarkerStyle
 Marker style.
 

Additional Inherited Members

- Public Types inherited from TH1
enum  {
  kNoAxis = 0 , kXaxis = (1ULL << ( 0 )) , kYaxis = (1ULL << ( 1 )) , kZaxis = (1ULL << ( 2 )) ,
  kAllAxes = kXaxis | kYaxis | kZaxis
}
 Enumeration specifying which axes can be extended. More...
 
enum  { kNstat = 13 }
 Size of statistics data (size of array used in GetStats()/ PutStats ) More...
 
enum  EBinErrorOpt { kNormal = 0 , kPoisson = 1 , kPoisson2 = 2 }
 Enumeration specifying type of statistics for bin errors. More...
 
enum  EStatOverflows { kIgnore = 0 , kConsider = 1 , kNeutral = 2 }
 Enumeration specifying the way to treat statoverflow. More...
 
enum  EStatusBits {
  kNoStats = (1ULL << ( 9 )) , kUserContour = (1ULL << ( 10 )) , kLogX = (1ULL << ( 15 )) , kIsZoomed = (1ULL << ( 16 )) ,
  kNoTitle = (1ULL << ( 17 )) , kIsAverage = (1ULL << ( 18 )) , kIsNotW = (1ULL << ( 19 )) , kAutoBinPTwo = (1ULL << ( 20 )) ,
  kIsHighlight = (1ULL << ( 21 ))
}
 TH1 status bits. More...
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 
- Static Protected Member Functions inherited from TH1
static Int_t AutoP2GetBins (Int_t n)
 Auxiliary function to get the next power of 2 integer value larger then n.
 
static Double_t AutoP2GetPower2 (Double_t x, Bool_t next=kTRUE)
 Auxiliary function to get the power of 2 next (larger) or previous (smaller) a given x.
 
static bool CheckAxisLimits (const TAxis *a1, const TAxis *a2)
 Check that the axis limits of the histograms are the same.
 
static bool CheckBinLabels (const TAxis *a1, const TAxis *a2)
 Check that axis have same labels.
 
static bool CheckBinLimits (const TAxis *a1, const TAxis *a2)
 Check bin limits.
 
static bool CheckConsistency (const TH1 *h1, const TH1 *h2)
 Check histogram compatibility.
 
static bool CheckConsistentSubAxes (const TAxis *a1, Int_t firstBin1, Int_t lastBin1, const TAxis *a2, Int_t firstBin2=0, Int_t lastBin2=0)
 Check that two sub axis are the same.
 
static bool CheckEqualAxes (const TAxis *a1, const TAxis *a2)
 Check that the axis are the same.
 
static Bool_t RecomputeAxisLimits (TAxis &destAxis, const TAxis &anAxis)
 Finds new limits for the axis for the Merge function.
 
static Bool_t SameLimitsAndNBins (const TAxis &axis1, const TAxis &axis2)
 Same limits and bins.
 
- Static Protected Attributes inherited from TH1
static Bool_t fgAddDirectory = kTRUE
 ! Flag to add histograms to the directory
 
static Int_t fgBufferSize = 1000
 ! Default buffer size for automatic histograms
 
static Bool_t fgDefaultSumw2 = kFALSE
 ! Flag to call TH1::Sumw2 automatically at histogram creation time
 
static Bool_t fgStatOverflows = kFALSE
 ! Flag to use under/overflows in statistics
 

#include <TH2Poly.h>

Inheritance diagram for TH2Poly:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
kNOverflow 

Definition at line 156 of file TH2Poly.h.

Constructor & Destructor Documentation

◆ TH2Poly() [1/4]

TH2Poly::TH2Poly ( )

Default Constructor. No boundaries specified.

Definition at line 147 of file TH2Poly.cxx.

◆ TH2Poly() [2/4]

TH2Poly::TH2Poly ( const char *  name,
const char *  title,
Double_t  xlow,
Double_t  xup,
Double_t  ylow,
Double_t  yup 
)

Constructor with specified name and boundaries, but no partition cell number.

Definition at line 159 of file TH2Poly.cxx.

◆ TH2Poly() [3/4]

TH2Poly::TH2Poly ( const char *  name,
const char *  title,
Int_t  nX,
Double_t  xlow,
Double_t  xup,
Int_t  nY,
Double_t  ylow,
Double_t  yup 
)

Constructor with specified name and boundaries and partition cell number.

Definition at line 171 of file TH2Poly.cxx.

◆ ~TH2Poly()

TH2Poly::~TH2Poly ( )
override

Destructor.

Definition at line 191 of file TH2Poly.cxx.

◆ TH2Poly() [4/4]

TH2Poly::TH2Poly ( const TH2Poly rhs)

Copy constructor.

Definition at line 183 of file TH2Poly.cxx.

Member Function Documentation

◆ Add() [1/3]

Bool_t TH2Poly::Add ( const TH1 h1,
const TH1 h2,
Double_t  c1 = 1,
Double_t  c2 = 1 
)
overridevirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH1.

Definition at line 1704 of file TH2Poly.cxx.

◆ Add() [2/3]

Bool_t TH2Poly::Add ( const TH1 h1,
Double_t  c1 
)
overridevirtual

Performs the operation: this = this + c1*h1.

Reimplemented from TH1.

Definition at line 364 of file TH2Poly.cxx.

◆ Add() [3/3]

Bool_t TH2Poly::Add ( TF1 h1,
Double_t  c1 = 1,
Option_t option = "" 
)
overridevirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH1.

Definition at line 1696 of file TH2Poly.cxx.

◆ AddBin() [1/3]

Int_t TH2Poly::AddBin ( Double_t  x1,
Double_t  y1,
Double_t  x2,
Double_t  y2 
)

Add a new bin to the histogram.

The bin shape is a rectangle. It returns the bin number of the bin in the histogram.

Definition at line 352 of file TH2Poly.cxx.

◆ AddBin() [2/3]

Int_t TH2Poly::AddBin ( Int_t  n,
const Double_t x,
const Double_t y 
)

Adds a new bin to the histogram.

The number of vertices and their (x,y) coordinates are required as input. It returns the bin number in the histogram.

Definition at line 341 of file TH2Poly.cxx.

◆ AddBin() [3/3]

Int_t TH2Poly::AddBin ( TObject poly)
virtual

Adds a new bin to the histogram.

It can be any object having the method IsInside(). It returns the bin number in the histogram. It returns 0 if it failed to add. To allow the histogram limits to expand when a bin outside the limits is added, call SetFloat() before adding the bin.

Definition at line 296 of file TH2Poly.cxx.

◆ AddBinToPartition()

void TH2Poly::AddBinToPartition ( TH2PolyBin bin)
protected

Adds the input bin into the partition cell matrix.

This method is called in AddBin() and ChangePartition().

Definition at line 442 of file TH2Poly.cxx.

◆ ChangePartition()

void TH2Poly::ChangePartition ( Int_t  n,
Int_t  m 
)

Changes the number of partition cells in the histogram.

Deletes the old partition and constructs a new one.

Definition at line 514 of file TH2Poly.cxx.

◆ Class()

static TClass * TH2Poly::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TH2Poly::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TH2Poly::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 184 of file TH2Poly.h.

◆ ClearBinContents()

void TH2Poly::ClearBinContents ( )

Clears the contents of all bins in the histogram.

Definition at line 565 of file TH2Poly.cxx.

◆ Clone()

TObject * TH2Poly::Clone ( const char *  newname = "") const
overridevirtual

Make a complete copy of the underlying object.

If 'newname' is set, the copy's name will be set to that name.

Reimplemented from TH1.

Definition at line 553 of file TH2Poly.cxx.

◆ ComputeIntegral()

Double_t TH2Poly::ComputeIntegral ( Bool_t  )
overridevirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH1.

Definition at line 1727 of file TH2Poly.cxx.

◆ Copy()

void TH2Poly::Copy ( TObject newth2p) const
overridevirtual

Copy function for TH2Poly.

Reimplemented from TH2.

Definition at line 211 of file TH2Poly.cxx.

◆ CreateBin()

TH2PolyBin * TH2Poly::CreateBin ( TObject poly)
virtual

Create appropriate histogram bin.

e.g. TH2Poly creates TH2PolyBin, TProfile2Poly creates TProfile2PolyBin This is done so that TH2Poly::AddBin does not have to be duplicated, but only create needs to be reimplemented for additional histogram types

Reimplemented in TProfile2Poly.

Definition at line 274 of file TH2Poly.cxx.

◆ DeclFileName()

static const char * TH2Poly::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 184 of file TH2Poly.h.

◆ Divide()

Bool_t TH2Poly::Divide ( TF1 ,
Double_t   
)
overridevirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH1.

Definition at line 1712 of file TH2Poly.cxx.

◆ FFT()

TH1 * TH2Poly::FFT ( TH1 ,
Option_t  
)
overridevirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH1.

Definition at line 1734 of file TH2Poly.cxx.

◆ Fill() [1/7]

Int_t TH2Poly::Fill ( const char *  ,
const char *  ,
Double_t   
)
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 136 of file TH2Poly.h.

◆ Fill() [2/7]

Int_t TH2Poly::Fill ( const char *  ,
Double_t  ,
Double_t   
)
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 135 of file TH2Poly.h.

◆ Fill() [3/7]

Int_t TH2Poly::Fill ( const char *  name,
Double_t  w 
)
overridevirtual

Increment the bin named "name" by w.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 754 of file TH2Poly.cxx.

◆ Fill() [4/7]

Int_t TH2Poly::Fill ( Double_t  x,
Double_t  y 
)
overridevirtual

Increment the bin containing (x,y) by 1.

Uses the partitioning algorithm.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 663 of file TH2Poly.cxx.

◆ Fill() [5/7]

Int_t TH2Poly::Fill ( Double_t  x,
Double_t  y,
Double_t  w 
)
overridevirtual

Increment the bin containing (x,y) by w.

Uses the partitioning algorithm.

Reimplemented from TH2.

Reimplemented in TProfile2Poly, and TProfile2Poly.

Definition at line 672 of file TH2Poly.cxx.

◆ Fill() [6/7]

Int_t TH2Poly::Fill ( Double_t  )
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 133 of file TH2Poly.h.

◆ Fill() [7/7]

Int_t TH2Poly::Fill ( Double_t  ,
const char *  ,
Double_t   
)
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 134 of file TH2Poly.h.

◆ FillN() [1/2]

void TH2Poly::FillN ( Int_t  ntimes,
const Double_t x,
const Double_t y,
const Double_t w,
Int_t  stride = 1 
)
overridevirtual

Fills a 2-D histogram with an array of values and weights.

Parameters
[in]ntimesnumber of entries in arrays x and w (array size must be ntimes*stride)
[in]xarray of x values to be histogrammed
[in]yarray of y values to be histogrammed
[in]warray of weights
[in]stridestep size through arrays x, y and w

Reimplemented from TH2.

Definition at line 785 of file TH2Poly.cxx.

◆ FillN() [2/2]

void TH2Poly::FillN ( Int_t  ,
const Double_t ,
const Double_t ,
Int_t   
)
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH2.

Definition at line 137 of file TH2Poly.h.

◆ FindBin()

Int_t TH2Poly::FindBin ( Double_t  x,
Double_t  y,
Double_t  z = 0 
)
overridevirtual

Returns the bin number of the bin at the given coordinate.

-1 to -9 are the overflow and underflow bins. overflow bin -5 is the unbinned areas in the histogram (also called "the sea"). The third parameter can be left blank. The overflow/underflow bins are:

-1 | -2 | -3
-------------
-4 | -5 | -6
-------------
-7 | -8 | -9

where -5 means is the "sea" bin (i.e. unbinned areas)

Reimplemented from TH1.

Definition at line 620 of file TH2Poly.cxx.

◆ GetAsymmetry()

TH1 * TH2Poly::GetAsymmetry ( TH1 ,
Double_t  ,
Double_t   
)
virtual

NOT IMPLEMENTED for TH2Poly.

Definition at line 1741 of file TH2Poly.cxx.

◆ GetBinContent() [1/3]

Double_t TH2Poly::GetBinContent ( Int_t  bin) const
overridevirtual

Returns the content of the input bin Bin numbers are from [1,nbins] and for the overflow/underflow/sea bins the range is [-9,-1]:

-1 | -2 | -3
---+----+----
-4 | -5 | -6
---+----+----
-7 | -8 | -9

where -5 is the "sea" bin (i.e. unbinned areas)

Reimplemented from TH2.

Reimplemented in TProfile2Poly, and TProfile2Poly.

Definition at line 840 of file TH2Poly.cxx.

◆ GetBinContent() [2/3]

Double_t TH2Poly::GetBinContent ( Int_t  ,
Int_t   
) const
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 143 of file TH2Poly.h.

◆ GetBinContent() [3/3]

Double_t TH2Poly::GetBinContent ( Int_t  ,
Int_t  ,
Int_t   
) const
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 144 of file TH2Poly.h.

◆ GetBinContentChanged()

Bool_t TH2Poly::GetBinContentChanged ( ) const
inline

Definition at line 103 of file TH2Poly.h.

◆ GetBinError() [1/3]

Double_t TH2Poly::GetBinError ( Int_t  bin) const
overridevirtual

Returns the 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. Bins are in range [1:nbins] and for bin < 0 in range [-9:-1] it returns errors for overflow bins. See also TH2Poly::GetBinContent

Reimplemented from TH1.

Reimplemented in TProfile2Poly, and TProfile2Poly.

Definition at line 855 of file TH2Poly.cxx.

◆ GetBinError() [2/3]

Double_t TH2Poly::GetBinError ( Int_t  ,
Int_t   
) const
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH1.

Reimplemented in TProfile2Poly.

Definition at line 146 of file TH2Poly.h.

◆ GetBinError() [3/3]

Double_t TH2Poly::GetBinError ( Int_t  ,
Int_t  ,
Int_t   
) const
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH1.

Reimplemented in TProfile2Poly.

Definition at line 147 of file TH2Poly.h.

◆ GetBinName()

const char * TH2Poly::GetBinName ( Int_t  bin) const

Returns the bin name.

Definition at line 907 of file TH2Poly.cxx.

◆ GetBins()

TList * TH2Poly::GetBins ( )
inline

Returns the TList of all bins in the histogram.

Definition at line 101 of file TH2Poly.h.

◆ GetBinTitle()

const char * TH2Poly::GetBinTitle ( Int_t  bin) const

Returns the bin title.

Definition at line 917 of file TH2Poly.cxx.

◆ GetFloat()

Bool_t TH2Poly::GetFloat ( )
inline

Definition at line 107 of file TH2Poly.h.

◆ GetMaximum() [1/2]

Double_t TH2Poly::GetMaximum ( ) const

Returns the maximum value of the histogram.

Definition at line 927 of file TH2Poly.cxx.

◆ GetMaximum() [2/2]

Double_t TH2Poly::GetMaximum ( Double_t  maxval) const
overridevirtual

Returns the maximum value of the histogram that is less than maxval.

Reimplemented from TH1.

Definition at line 951 of file TH2Poly.cxx.

◆ GetMinimum() [1/2]

Double_t TH2Poly::GetMinimum ( ) const

Returns the minimum value of the histogram.

Definition at line 975 of file TH2Poly.cxx.

◆ GetMinimum() [2/2]

Double_t TH2Poly::GetMinimum ( Double_t  minval) const
overridevirtual

Returns the minimum value of the histogram that is greater than minval.

Reimplemented from TH1.

Definition at line 999 of file TH2Poly.cxx.

◆ GetNewBinAdded()

Bool_t TH2Poly::GetNewBinAdded ( ) const
inline

Definition at line 112 of file TH2Poly.h.

◆ GetNumberOfBins()

Int_t TH2Poly::GetNumberOfBins ( ) const

Return the number of bins : it should be the size of the bin list.

Definition at line 876 of file TH2Poly.cxx.

◆ GetStats()

void TH2Poly::GetStats ( Double_t stats) const
overridevirtual

Fill the array stats from the contents of this histogram The array stats must be correctly dimensioned in the calling program.

stats[0] = sumw
stats[1] = sumw2
stats[2] = sumwx
stats[3] = sumwx2
stats[4] = sumwy
stats[5] = sumwy2
stats[6] = sumwxy

If no axis-subranges are specified (via TAxis::SetRange), the array stats is simply a copy of the statistics quantities computed at filling time. If sub-ranges are specified, the function recomputes these quantities from the bin contents in the current axis ranges.

Note that the mean value/StdDev is computed using the bins in the currently defined ranges (see TAxis::SetRange). By default the ranges include all bins from 1 to nbins included, excluding underflows and overflows. To force the underflows and overflows in the computation, one must call the static function TH1::StatOverflows(kTRUE) before filling the histogram.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 1439 of file TH2Poly.cxx.

◆ Honeycomb()

void TH2Poly::Honeycomb ( Double_t  xstart,
Double_t  ystart,
Double_t  a,
Int_t  k,
Int_t  s,
Option_t option = "v" 
)

Bins the histogram using a honeycomb structure If the option "v" is specified, the hexagons are drawn "vertically" (default).

If the option "h" is selected they are drawn "horizontally".

Definition at line 1025 of file TH2Poly.cxx.

◆ Initialize()

void TH2Poly::Initialize ( Double_t  xlow,
Double_t  xup,
Double_t  ylow,
Double_t  yup,
Int_t  n,
Int_t  m 
)
protected

Initializes the TH2Poly object. This method is called by the constructor.

Definition at line 1112 of file TH2Poly.cxx.

◆ Integral() [1/4]

Double_t TH2Poly::Integral ( Int_t  ,
Int_t  ,
const Option_t  
) const
inlineoverrideprotected

NOT IMPLEMENTED for TH2Poly.

Definition at line 139 of file TH2Poly.h.

◆ Integral() [2/4]

Double_t TH2Poly::Integral ( Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
const Option_t  
) const
inlineoverrideprotected

NOT IMPLEMENTED for TH2Poly.

Definition at line 140 of file TH2Poly.h.

◆ Integral() [3/4]

Double_t TH2Poly::Integral ( Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
const Option_t  
) const
inlineoverrideprotected

NOT IMPLEMENTED for TH2Poly.

Definition at line 141 of file TH2Poly.h.

◆ Integral() [4/4]

Double_t TH2Poly::Integral ( Option_t option = "") const
overridevirtual

Returns the integral of bin contents.

By default the integral is computed as the sum of bin contents. If option "width" or "area" is specified, the integral is the sum of the bin contents multiplied by the area of the bin.

Reimplemented from TH2.

Definition at line 799 of file TH2Poly.cxx.

◆ Interpolate() [1/4]

Double_t TH2::Interpolate ( Double_t  x) const
overridevirtual

illegal for a TH2

Reimplemented from TH2.

Definition at line 60 of file TH2.cxx.

◆ Interpolate() [2/4]

Double_t TH2::Interpolate ( Double_t  x,
Double_t  y 
) const
overridevirtual

Given a point P(x,y), Interpolate approximates the value via bilinear interpolation based on the four nearest bin centers see Wikipedia, Bilinear Interpolation Andy Mastbaum 10/8/2008 vaguely based on R.Raja 6-Sep-2008.

Reimplemented from TH2.

Definition at line 104 of file TH2.cxx.

◆ Interpolate() [3/4]

Double_t TH2::Interpolate ( Double_t  x,
Double_t  y,
Double_t  z 
) const
overridevirtual

illegal for a TH2

Reimplemented from TH2.

Definition at line 105 of file TH2.cxx.

◆ Interpolate() [4/4]

Double_t TH2Poly::Interpolate ( Double_t  ,
Double_t   
)
virtual

NOT IMPLEMENTED for TH2Poly.

Definition at line 1748 of file TH2Poly.cxx.

◆ IsA()

TClass * TH2Poly::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 184 of file TH2Poly.h.

◆ IsInsideBin()

Bool_t TH2Poly::IsInsideBin ( Int_t  binnr,
Double_t  x,
Double_t  y 
)

Return "true" if the point (x,y) is inside the bin of binnr.

Definition at line 1431 of file TH2Poly.cxx.

◆ IsIntersecting()

Bool_t TH2Poly::IsIntersecting ( TH2PolyBin bin,
Double_t  xclipl,
Double_t  xclipr,
Double_t  yclipb,
Double_t  yclipt 
)
protected

Returns kTRUE if the input bin is intersecting with the input rectangle (xclipl, xclipr, yclipb, yclipt)

Definition at line 1163 of file TH2Poly.cxx.

◆ IsIntersectingPolygon()

Bool_t TH2Poly::IsIntersectingPolygon ( Int_t  bn,
Double_t x,
Double_t y,
Double_t  xclipl,
Double_t  xclipr,
Double_t  yclipb,
Double_t  yclipt 
)
protected

Returns kTRUE if the input polygon (bn, x, y) is intersecting with the input rectangle (xclipl, xclipr, yclipb, yclipt)

Definition at line 1204 of file TH2Poly.cxx.

◆ Merge()

Long64_t TH2Poly::Merge ( TCollection coll)
overridevirtual

Merge TH2Polys Given the special nature of the TH2Poly, the merge is implemented in terms of subsequent TH2Poly::Add calls.

Reimplemented from TH1.

Reimplemented in TProfile2Poly.

Definition at line 1318 of file TH2Poly.cxx.

◆ Multiply()

Bool_t TH2Poly::Multiply ( TF1 ,
Double_t   
)
overridevirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH1.

Definition at line 1720 of file TH2Poly.cxx.

◆ operator=()

TH2Poly & TH2Poly::operator= ( const TH2Poly rhs)

Assignment operator.

Definition at line 202 of file TH2Poly.cxx.

◆ Reset()

void TH2Poly::Reset ( Option_t option)
overridevirtual

Reset this histogram: contents, errors, etc.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

Definition at line 590 of file TH2Poly.cxx.

◆ RetrieveBinContent()

Double_t TH2Poly::RetrieveBinContent ( Int_t  bin) const
inlineoverrideprotectedvirtual

Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::GetBin.

Reimplemented from TH1.

Definition at line 177 of file TH2Poly.h.

◆ SavePrimitive()

void TH2Poly::SavePrimitive ( std::ostream &  out,
Option_t option = "" 
)
overridevirtual

Save primitive as a C++ statement(s) on output stream out.

Reimplemented from TH1.

Definition at line 1332 of file TH2Poly.cxx.

◆ Scale()

void TH2Poly::Scale ( Double_t  c1 = 1,
Option_t option = "" 
)
overridevirtual

Multiply this histogram by a constant c1.

Reimplemented from TH1.

Definition at line 1392 of file TH2Poly.cxx.

◆ SetBinContent() [1/3]

void TH2Poly::SetBinContent ( Int_t  bin,
Double_t  content 
)
overridevirtual

Sets the contents of the input bin to the input content Negative values between -1 and -9 are for the overflows and the sea.

Reimplemented from TH2.

Definition at line 1406 of file TH2Poly.cxx.

◆ SetBinContent() [2/3]

void TH2Poly::SetBinContent ( Int_t  ,
Int_t  ,
Double_t   
)
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH2.

Definition at line 149 of file TH2Poly.h.

◆ SetBinContent() [3/3]

void TH2Poly::SetBinContent ( Int_t  ,
Int_t  ,
Int_t  ,
Double_t   
)
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH2.

Definition at line 150 of file TH2Poly.h.

◆ SetBinContentChanged()

void TH2Poly::SetBinContentChanged ( Bool_t  flag)
inline

Definition at line 122 of file TH2Poly.h.

◆ SetBinError() [1/3]

void TH2Poly::SetBinError ( Int_t  bin,
Double_t  error 
)
overridevirtual

Set the bin Error.

Re-implementation for TH2Poly given the different bin indexing in the stored squared error array. See also notes in TH1::SetBinError

Bins are in range [1:nbins] and for bin < 0 in the range [-9:-1] the errors is set for the overflow bins

Reimplemented from TH1.

Definition at line 892 of file TH2Poly.cxx.

◆ SetBinError() [2/3]

void TH2Poly::SetBinError ( Int_t  ,
Int_t  ,
Double_t   
)
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH1.

Definition at line 151 of file TH2Poly.h.

◆ SetBinError() [3/3]

void TH2Poly::SetBinError ( Int_t  ,
Int_t  ,
Int_t  ,
Double_t   
)
inlineoverrideprotectedvirtual

NOT IMPLEMENTED for TH2Poly.

Reimplemented from TH1.

Definition at line 152 of file TH2Poly.h.

◆ SetFloat()

void TH2Poly::SetFloat ( Bool_t  flag = true)

When set to kTRUE, allows the histogram to expand if a bin outside the limits is added.

Definition at line 1423 of file TH2Poly.cxx.

◆ SetNewBinAdded()

void TH2Poly::SetNewBinAdded ( Bool_t  flag)
inline

Definition at line 124 of file TH2Poly.h.

◆ Streamer()

void TH2Poly::Streamer ( TBuffer R__b)
overridevirtual

Stream an object of class TH2.

Reimplemented from TH2.

Reimplemented in TProfile2Poly.

◆ StreamerNVirtual()

void TH2Poly::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 184 of file TH2Poly.h.

◆ UpdateBinContent()

void TH2Poly::UpdateBinContent ( Int_t  bin,
Double_t  content 
)
inlineoverrideprotectedvirtual

Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin.

Reimplemented from TH1.

Definition at line 180 of file TH2Poly.h.

Member Data Documentation

◆ fBinContentChanged

Bool_t TH2Poly::fBinContentChanged
protected

!For the 3D Painter

Definition at line 169 of file TH2Poly.h.

◆ fBins

TList* TH2Poly::fBins
protected

List of bins. The list owns the contained objects.

Definition at line 170 of file TH2Poly.h.

◆ fCells

TList* TH2Poly::fCells
protected

[fNCells] The array of TLists that store the bins that intersect with each cell. List do not own the contained objects

Definition at line 163 of file TH2Poly.h.

◆ fCellX

Int_t TH2Poly::fCellX
protected

Number of partition cells in the x-direction of the histogram.

Definition at line 160 of file TH2Poly.h.

◆ fCellY

Int_t TH2Poly::fCellY
protected

Number of partition cells in the y-direction of the histogram.

Definition at line 161 of file TH2Poly.h.

◆ fCompletelyInside

Bool_t* TH2Poly::fCompletelyInside
protected

[fNCells] The array that returns true if the cell at the given coordinate is completely inside a bin

Definition at line 166 of file TH2Poly.h.

◆ fFloat

Bool_t TH2Poly::fFloat
protected

When set to kTRUE, allows the histogram to expand if a bin outside the limits is added.

Definition at line 167 of file TH2Poly.h.

◆ fIsEmpty

Bool_t* TH2Poly::fIsEmpty
protected

[fNCells] The array that returns true if the cell at the given coordinate is empty

Definition at line 165 of file TH2Poly.h.

◆ fNCells

Int_t TH2Poly::fNCells
protected

Number of partition cells: fCellX*fCellY.

Definition at line 162 of file TH2Poly.h.

◆ fNewBinAdded

Bool_t TH2Poly::fNewBinAdded
protected

!For the 3D Painter

Definition at line 168 of file TH2Poly.h.

◆ fOverflow

Double_t TH2Poly::fOverflow[kNOverflow]
protected

Overflow bins.

Definition at line 159 of file TH2Poly.h.

◆ fStepX

Double_t TH2Poly::fStepX
protected

Definition at line 164 of file TH2Poly.h.

◆ fStepY

Double_t TH2Poly::fStepY
protected

Dimensions of a partition cell.

Definition at line 164 of file TH2Poly.h.

Libraries for TH2Poly:

The documentation for this class was generated from the following files: