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

The 3-D histogram classes derived from the 1-D histogram classes.

All operations are supported (fill, fit). Drawing is currently restricted to one single option. A cloud of points is drawn. The number of points is proportional to cell content.

  • TH3C a 3-D histogram with one byte per cell (char). Maximum bin content = 127
  • TH3S a 3-D histogram with two bytes per cell (short integer). Maximum bin content = 32767
  • TH3I a 3-D histogram with four bytes per cell (32 bit integer). Maximum bin content = INT_MAX (*)
  • TH3L a 3-D histogram with eight bytes per cell (64 bit integer). Maximum bin content = LLONG_MAX (**)
  • TH3F a 3-D histogram with four bytes per cell (float). Maximum precision 7 digits, maximum integer bin content = +/-16777216 (***)
  • TH3D a 3-D histogram with eight bytes per cell (double). Maximum precision 14 digits, maximum integer bin content = +/-9007199254740992 (****)

(*) INT_MAX = 2147483647 is the maximum value for a variable of type int.
(**) LLONG_MAX = 9223372036854775807 is the maximum value for a variable of type long64.
(***) 2^24 = 16777216 is the maximum integer that can be properly represented by a float32 with 23-bit mantissa.
(****) 2^53 = 9007199254740992 is the maximum integer that can be properly represented by a double64 with 52-bit mantissa.

Definition at line 31 of file TH3.h.

Public Member Functions

 ~TH3 () override
 Destructor.
 
void AddBinContent (Int_t bin) override
 Increment bin content by 1.
 
void AddBinContent (Int_t bin, Double_t w) override
 Increment bin content by a weight w.
 
virtual void AddBinContent (Int_t binx, Int_t biny, Int_t binz)
 Increment 3D bin content by 1.
 
virtual void AddBinContent (Int_t binx, Int_t biny, Int_t binz, Double_t w)
 Increment 3D bin content by a weight w.
 
Int_t BufferEmpty (Int_t action=0) override
 Fill histogram with all entries in the buffer.
 
void Copy (TObject &hnew) const override
 Copy.
 
virtual Int_t Fill (const char *namex, const char *namey, const char *namez, Double_t w)
 Increment cell defined by namex,namey,namez by a weight w.
 
virtual Int_t Fill (const char *namex, const char *namey, Double_t z, Double_t w)
 Increment cell defined by namex,namey,z by a weight w.
 
virtual Int_t Fill (const char *namex, Double_t y, const char *namez, Double_t w)
 Increment cell defined by namex,y,namez by a weight w.
 
virtual Int_t Fill (const char *namex, Double_t y, Double_t z, Double_t w)
 Increment cell defined by namex , y ,z by a weight w.
 
virtual Int_t Fill (Double_t x, const char *namey, const char *namez, Double_t w)
 Increment cell defined by x,namey,namez by a weight w.
 
virtual Int_t Fill (Double_t x, const char *namey, Double_t z, Double_t w)
 Increment cell defined by x,namey,z by a weight w.
 
virtual Int_t Fill (Double_t x, Double_t y, const char *namez, Double_t w)
 Increment cell defined by x,y,namez by a weight w.
 
virtual Int_t Fill (Double_t x, Double_t y, Double_t z)
 Increment cell defined by x,y,z by 1 .
 
virtual Int_t Fill (Double_t x, Double_t y, Double_t z, Double_t w)
 Increment cell defined by x,y,z by a weight w.
 
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 FitSlicesZ (TF1 *f1=nullptr, Int_t binminx=1, Int_t binmaxx=0, Int_t binminy=1, Int_t binmaxy=0, Int_t cut=0, Option_t *option="QNR")
 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.
 
Int_t GetBin (Int_t binx, Int_t biny, Int_t binz) const override
 See comments in TH1::GetBin.
 
virtual Double_t GetBinContent (Int_t bin) const
 Return content of bin number bin.
 
virtual Double_t GetBinContent (Int_t bin, Int_t) const
 
virtual Double_t GetBinContent (Int_t bin, Int_t, Int_t) const
 
Double_t GetBinContent (Int_t binx, Int_t biny, Int_t binz) const override
 
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, Int_t binz)
 
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, Int_t binz)
 
virtual Double_t GetBinWithContent3 (Double_t c, Int_t &binx, Int_t &biny, Int_t &binz, Int_t firstx=0, Int_t lastx=0, Int_t firsty=0, Int_t lasty=0, Int_t firstz=0, Int_t lastz=0, Double_t maxdiff=0) const
 Compute first cell (binx,biny,binz) in the range [firstx,lastx](firsty,lasty][firstz,lastz] 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,binz.
 
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 GetRandom3 (Double_t &x, Double_t &y, Double_t &, TRandom *rng=nullptr)
 Return 3 random numbers along axis x , y and z distributed according to the cell-contents of this 3-dim histogram.
 
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.
 
virtual Double_t Integral (Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Int_t binz1, Int_t binz2, Option_t *option="") const
 Return integral of bin contents in range [binx1,binx2],[biny1,biny2],[binz1,binz2] for a 3-D histogram By default the integral is computed as the sum of bin contents in the range.
 
Double_t Integral (Option_t *option="") const override
 Return integral of bin contents.
 
virtual Double_t IntegralAndError (Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Int_t binz1, Int_t binz2, Double_t &err, Option_t *option="") const
 Return integral of bin contents in range [binx1,binx2],[biny1,biny2],[binz1,binz2] for a 3-D histogram.
 
Double_t Interpolate (Double_t x, Double_t y, Double_t z) const override
 Given a point P(x,y,z), Interpolate approximates the value via trilinear interpolation based on the 8 nearest bin center points (corner of the cube surrounding the points) The Algorithm is described in http://en.wikipedia.org/wiki/Trilinear_interpolation The given values (x,y,z) must be between first bin center and last bin center for each coordinate:
 
TClassIsA () const override
 
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.
 
virtual TH1Project3D (Option_t *option="x") const
 Project a 3-d histogram into 1 or 2-d histograms depending on the option parameter, which may contain a combination of the characters x,y,z,e.
 
virtual TProfile2DProject3DProfile (Option_t *option="xy") const
 Project a 3-d histogram into a 2-d profile histograms depending on the option parameter option may contain a combination of the characters x,y,z option = "xy" return the x versus y projection into a TProfile2D histogram option = "yx" return the y versus x projection into a TProfile2D histogram option = "xz" return the x versus z projection into a TProfile2D histogram option = "zx" return the z versus x projection into a TProfile2D histogram option = "yz" return the y versus z projection into a TProfile2D histogram option = "zy" return the z versus y projection into a TProfile2D histogram NB: the notation "a vs b" means "a" vertical and "b" horizontal.
 
virtual TH1DProjectionX (const char *name="_px", Int_t iymin=0, Int_t iymax=-1, Int_t izmin=0, Int_t izmax=-1, Option_t *option="") const
 Project a 3-D histogram into a 1-D histogram along X.
 
virtual TH1DProjectionY (const char *name="_py", Int_t ixmin=0, Int_t ixmax=-1, Int_t izmin=0, Int_t izmax=-1, Option_t *option="") const
 Project a 3-D histogram into a 1-D histogram along Y.
 
virtual TH1DProjectionZ (const char *name="_pz", Int_t ixmin=0, Int_t ixmax=-1, Int_t iymin=0, Int_t iymax=-1, Option_t *option="") const
 Project a 3-D histogram into a 1-D histogram along Z.
 
void PutStats (Double_t *stats) override
 Replace current statistics with the values in array stats.
 
virtual TH3Rebin3D (Int_t nxgroup=2, Int_t nygroup=2, Int_t nzgroup=2, const char *newname="")
 Rebin this histogram grouping nxgroup/nygroup/nzgroup bins along the xaxis/yaxis/zaxis together.
 
TH3RebinX (Int_t ngroup=2, const char *newname="") override
 Rebin only the X axis see Rebin3D.
 
virtual TH3RebinY (Int_t ngroup=2, const char *newname="")
 Rebin only the Y axis see Rebin3D.
 
virtual TH3RebinZ (Int_t ngroup=2, const char *newname="")
 Rebin only the Z axis see Rebin3D.
 
void Reset (Option_t *option="") override
 Reset this histogram: contents, errors, etc.
 
void SetBinContent (Int_t bin, Double_t content) override
 Set bin content.
 
void SetBinContent (Int_t bin, Int_t, Double_t content) override
 
void SetBinContent (Int_t binx, Int_t biny, Int_t binz, Double_t content) override
 
virtual void SetShowProjection (const char *option="xy", Int_t nbins=1)
 When the mouse is moved in a pad containing a 3-d view of this histogram a second canvas shows a projection type given as option.
 
void Streamer (TBuffer &) override
 Stream an object of class TH3.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TH1
 ~TH1 () override
 Histogram default destructor.
 
virtual Bool_t Add (const TH1 *h, const TH1 *h2, Double_t c1=1, Double_t c2=1)
 Replace contents of this histogram by the addition of h1 and h2.
 
virtual Bool_t Add (const TH1 *h1, Double_t c1=1)
 Performs the operation: this = this + c1*h1 If errors are defined (see TH1::Sumw2), errors are also recalculated.
 
virtual Bool_t Add (TF1 *h1, Double_t c1=1, Option_t *option="")
 Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2), errors are also recalculated.
 
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.
 
TObjectClone (const char *newname="") const override
 Make a complete copy of the underlying object.
 
virtual Double_t ComputeIntegral (Bool_t onlyPositive=false)
 Compute integral (normalized cumulative sum of bins) w/o under/overflows The result is stored in fIntegral and used by the GetRandom functions.
 
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.
 
virtual Bool_t Divide (TF1 *f1, Double_t c1=1)
 Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2), errors are also recalculated.
 
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 TH1FFT (TH1 *h_output, Option_t *option)
 This function allows to do discrete Fourier transforms of TH1 and TH2.
 
virtual void FillN (Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1)
 Fill this histogram with an array x and weights w.
 
virtual void FillN (Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t)
 
virtual Int_t FindBin (Double_t x, Double_t y=0, Double_t z=0)
 Return Global bin number corresponding to x,y,z.
 
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 Double_t GetBinError (Int_t bin) const
 Return value of error associated to bin number bin.
 
virtual Double_t GetBinError (Int_t binx, Int_t biny) const
 
virtual Double_t GetBinError (Int_t binx, Int_t biny, Int_t binz) const
 
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 Double_t GetMaximum (Double_t maxval=FLT_MAX) const
 Return maximum value smaller than maxval of bins in the range, unless the value has been overridden by TH1::SetMaximum, in which case it returns that value.
 
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 Double_t GetMinimum (Double_t minval=-FLT_MAX) const
 Return minimum value larger than minval of bins in the range, unless the value has been overridden by TH1::SetMinimum, in which case it returns that value.
 
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.
 
virtual Long64_t Merge (TCollection *list)
 
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.
 
virtual Bool_t Multiply (TF1 *f1, Double_t c1=1)
 Performs the operation:
 
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 TH1Rebin (Int_t ngroup=2, const char *newname="", const Double_t *xbins=nullptr)
 Rebin 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.
 
void SaveAs (const char *filename="hist", Option_t *option="") const override
 Save the histogram as .csv, .tsv or .txt.
 
void SavePrimitive (std::ostream &out, Option_t *option="") override
 Save primitive as a C++ statement(s) on output stream out.
 
virtual void Scale (Double_t c1=1, Option_t *option="")
 Multiply this histogram by a constant c1.
 
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 SetBinError (Int_t bin, Double_t error)
 Set the bin Error Note that this resets the bin eror option to be of Normal Type and for the non-empty bin the bin error is set by default to the square root of their content.
 
virtual void SetBinError (Int_t binx, Int_t biny, Double_t error)
 See convention for numbering bins in TH1::GetBin.
 
virtual void SetBinError (Int_t binx, Int_t biny, Int_t binz, Double_t error)
 See convention for numbering bins in TH1::GetBin.
 
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 SetColors (Color_t linecolor=-1, Color_t markercolor=-1, Color_t fillcolor=-1)
 Shortcut to set the three histogram colors with a single call.
 
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)
 
virtual TH1ShowBackground (Int_t niter=20, Option_t *option="same")
 This function calculates the background spectrum in this histogram.
 
virtual Int_t ShowPeaks (Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
 Interface to TSpectrum::Search.
 
virtual void Smooth (Int_t ntimes=1, Option_t *option="")
 Smooth bin contents of this histogram.
 
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)
 
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)
 
- Public Member Functions inherited from TAtt3D
 TAtt3D ()
 
virtual ~TAtt3D ()
 
virtual void Sizeof3D () const
 Set total size of this 3D object (used by X3D interface).
 
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 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.
 
- Static Public Member Functions inherited from TAtt3D
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Member Functions

 TH3 ()
 Default constructor.
 
 TH3 (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, const Double_t *ybins, Int_t nbinsz, const Double_t *zbins)
 Constructor for variable bin size (along X, Y and Z axis) 3-D histograms using input arrays of type double.
 
 TH3 (const char *name, const char *title, Int_t nbinsx, const Float_t *xbins, Int_t nbinsy, const Float_t *ybins, Int_t nbinsz, const Float_t *zbins)
 Constructor for variable bin size (along X, Y and Z axis) 3-D histograms using input arrays of type float.
 
 TH3 (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup, Int_t nbinsz, Double_t zlow, Double_t zup)
 Constructor for fix bin size 3-D histograms.
 
virtual Int_t BufferFill (Double_t x, Double_t y, Double_t z, Double_t w)
 Accumulate arguments in buffer.
 
Int_t BufferFill (Double_t, Double_t) override
 accumulate arguments in buffer.
 
virtual Int_t BufferFill (Double_t, Double_t, Double_t)
 
void DoFillProfileProjection (TProfile2D *p2, const TAxis &a1, const TAxis &a2, const TAxis &a3, Int_t bin1, Int_t bin2, Int_t bin3, Int_t inBin, Bool_t useWeights) const
 internal function to fill the bins of the projected profile 2D histogram called from DoProjectProfile2D
 
virtual TH1DDoProject1D (const char *name, const char *title, const TAxis *projAxis, const TAxis *axis1, const TAxis *axis2, bool computeErrors, bool originalRange, bool useUF, bool useOF) const
 internal methdod performing the projection to 1D histogram called from other TH3::DoProject1D
 
virtual TH1DDoProject1D (const char *name, const char *title, int imin1, int imax1, int imin2, int imax2, const TAxis *projAxis, const TAxis *axis1, const TAxis *axis2, Option_t *option) const
 internal method performing the projection to 1D histogram called from TH3::Project3D
 
virtual TH2DDoProject2D (const char *name, const char *title, const TAxis *projX, const TAxis *projY, bool computeErrors, bool originalRange, bool useUF, bool useOF) const
 internal method performing the projection to a 2D histogram called from TH3::Project3D
 
virtual TProfile2DDoProjectProfile2D (const char *name, const char *title, const TAxis *projX, const TAxis *projY, bool originalRange, bool useUF, bool useOF) const
 internal method to project to a 2D Profile called from TH3::Project3DProfile
 
Int_t Fill (const char *, const char *, Double_t)
 
Int_t Fill (const char *, Double_t) override
 Increment bin with namex with a weight w.
 
Int_t Fill (const char *, Double_t, Double_t)
 
Int_t Fill (Double_t) override
 Invalid Fill method.
 
Int_t Fill (Double_t, const char *, Double_t)
 
Int_t Fill (Double_t, Double_t) override
 Increment bin with abscissa X with a weight w.
 
Double_t Interpolate (Double_t x) const override
 Not yet implemented.
 
Double_t Interpolate (Double_t x, Double_t y) const override
 Not yet implemented.
 
- 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 )
 
int LoggedInconsistency (const char *name, const TH1 *h1, const TH1 *h2, bool useMerge=false) const
 
virtual Double_t RetrieveBinContent (Int_t bin) const
 Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::GetBin.
 
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.
 
virtual void UpdateBinContent (Int_t bin, Double_t content)
 Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin.
 
- 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 ()
 

Static Protected Member Functions

static TH1DDoProject1D (const TH3 &h, const char *name, const char *title, const TAxis *projX, bool computeErrors, bool originalRange, bool useUF, bool useOF)
 static methdod performing the projection to 1D histogram
 
static TH2DDoProject2D (const TH3 &h, const char *name, const char *title, const TAxis *projX, const TAxis *projY, bool computeErrors, bool originalRange, bool useUF, bool useOF)
 static methdod performing the projection to 2D histogram
 
- 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 int 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.
 

Protected Attributes

Double_t fTsumwxy
 Total Sum of weight*X*Y.
 
Double_t fTsumwxz
 Total Sum of weight*X*Z.
 
Double_t fTsumwy
 Total Sum of weight*Y.
 
Double_t fTsumwy2
 Total Sum of weight*Y*Y.
 
Double_t fTsumwyz
 Total Sum of weight*Y*Z.
 
Double_t fTsumwz
 Total Sum of weight*Z.
 
Double_t fTsumwz2
 Total Sum of weight*Z*Z.
 
- 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.
 

Private Member Functions

 TH3 (const TH3 &)=delete
 
virtual Double_t Integral (Int_t binx1, Int_t binx2, Option_t *option="") const
 Return integral of bin contents in range [binx1,binx2].
 
virtual Double_t Integral (Option_t *option="") const
 Return integral of bin contents.
 
virtual Double_t IntegralAndError (Int_t binx1, Int_t binx2, Double_t &err, Option_t *option="") const
 Return integral of bin contents in range [binx1,binx2] and its error.
 
TH3operator= (const TH3 &)=delete
 

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 ))
}
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 
- 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 <TH3.h>

Inheritance diagram for TH3:
[legend]

Constructor & Destructor Documentation

◆ TH3() [1/5]

TH3::TH3 ( )
protected

Default constructor.

Definition at line 74 of file TH3.cxx.

◆ TH3() [2/5]

TH3::TH3 ( const char *  name,
const char *  title,
Int_t  nbinsx,
Double_t  xlow,
Double_t  xup,
Int_t  nbinsy,
Double_t  ylow,
Double_t  yup,
Int_t  nbinsz,
Double_t  zlow,
Double_t  zup 
)
protected

Constructor for fix bin size 3-D histograms.

Creates the main histogram structure.

Parameters
[in]namename of histogram (avoid blanks)
[in]titlehistogram title. If title is of the form stringt;stringx;stringy;stringz, the histogram title is set to stringt, the x axis title to stringx, the y axis title to stringy, etc.
[in]nbinsxnumber of bins along the X axis
[in]xlowlow edge of the X axis first bin
[in]xupupper edge of the X axis last bin (not included in last bin)
[in]nbinsynumber of bins along the Y axis
[in]ylowlow edge of the Y axis first bin
[in]yupupper edge of the Y axis last bin (not included in last bin)
[in]nbinsznumber of bins along the Z axis
[in]zlowlow edge of the Z axis first bin
[in]zupupper edge of the Z axis last bin (not included in last bin)

Definition at line 101 of file TH3.cxx.

◆ TH3() [3/5]

TH3::TH3 ( const char *  name,
const char *  title,
Int_t  nbinsx,
const Float_t xbins,
Int_t  nbinsy,
const Float_t ybins,
Int_t  nbinsz,
const Float_t zbins 
)
protected

Constructor for variable bin size (along X, Y and Z axis) 3-D histograms using input arrays of type float.

Parameters
[in]namename of histogram (avoid blanks)
[in]titlehistogram title. If title is of the form stringt;stringx;stringy;stringz the histogram title is set to stringt, the x axis title to stringx, the y axis title to stringy, etc.
[in]nbinsxnumber of bins
[in]xbinsarray of low-edges for each bin. This is an array of type float and size nbinsx+1
[in]nbinsynumber of bins
[in]ybinsarray of low-edges for each bin. This is an array of type float and size nbinsy+1
[in]nbinsznumber of bins
[in]zbinsarray of low-edges for each bin. This is an array of type float and size nbinsz+1

Definition at line 142 of file TH3.cxx.

◆ TH3() [4/5]

TH3::TH3 ( const char *  name,
const char *  title,
Int_t  nbinsx,
const Double_t xbins,
Int_t  nbinsy,
const Double_t ybins,
Int_t  nbinsz,
const Double_t zbins 
)
protected

Constructor for variable bin size (along X, Y and Z axis) 3-D histograms using input arrays of type double.

Parameters
[in]namename of histogram (avoid blanks)
[in]titlehistogram title. If title is of the form stringt;stringx;stringy;stringz the histogram title is set to stringt, the x axis title to stringx, the y axis title to stringy, etc.
[in]nbinsxnumber of bins
[in]xbinsarray of low-edges for each bin. This is an array of type double and size nbinsx+1
[in]nbinsynumber of bins
[in]ybinsarray of low-edges for each bin. This is an array of type double and size nbinsy+1
[in]nbinsznumber of bins
[in]zbinsarray of low-edges for each bin. This is an array of type double and size nbinsz+1

Definition at line 179 of file TH3.cxx.

◆ TH3() [5/5]

TH3::TH3 ( const TH3 )
privatedelete

◆ ~TH3()

TH3::~TH3 ( )
override

Destructor.

Definition at line 200 of file TH3.cxx.

Member Function Documentation

◆ AddBinContent() [1/4]

void TH3::AddBinContent ( Int_t  bin)
overridevirtual

Increment bin content by 1.

Passing an out-of-range bin leads to undefined behavior

Reimplemented from TH1.

Reimplemented in TH3C, TH3S, TH3I, TH3L, TH3F, and TH3D.

Definition at line 224 of file TH3.cxx.

◆ AddBinContent() [2/4]

void TH3::AddBinContent ( Int_t  bin,
Double_t  w 
)
overridevirtual

Increment bin content by a weight w.

Passing an out-of-range bin leads to undefined behavior

Reimplemented from TH1.

Reimplemented in TH3C, TH3S, TH3I, TH3L, TH3F, and TH3D.

Definition at line 233 of file TH3.cxx.

◆ AddBinContent() [3/4]

void TH3::AddBinContent ( Int_t  binx,
Int_t  biny,
Int_t  binz 
)
virtual

Increment 3D bin content by 1.

Passing an out-of-range bin leads to undefined behavior

Reimplemented in TH3C, TH3S, TH3I, TH3L, TH3F, and TH3D.

Definition at line 242 of file TH3.cxx.

◆ AddBinContent() [4/4]

void TH3::AddBinContent ( Int_t  binx,
Int_t  biny,
Int_t  binz,
Double_t  w 
)
virtual

Increment 3D bin content by a weight w.

Passing an out-of-range bin leads to undefined behavior

Reimplemented in TH3C, TH3S, TH3I, TH3L, TH3F, and TH3D.

Definition at line 251 of file TH3.cxx.

◆ BufferEmpty()

Int_t TH3::BufferEmpty ( Int_t  action = 0)
overridevirtual

Fill histogram with all entries in the buffer.

action = -1 histogram is reset and refilled from the buffer (called by THistPainter::Paint) action = 0 histogram is filled from the buffer action = 1 histogram is filled and buffer is deleted The buffer is automatically deleted when the number of entries in the buffer is greater than the number of entries in the histogram

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 264 of file TH3.cxx.

◆ BufferFill() [1/3]

Int_t TH3::BufferFill ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  w 
)
protectedvirtual

Accumulate arguments in buffer.

When buffer is full, empty the buffer

  • fBuffer[0] = number of entries in buffer
  • fBuffer[1] = w of first entry
  • fBuffer[2] = x of first entry
  • fBuffer[3] = y of first entry
  • fBuffer[4] = z of first entry

Reimplemented in TProfile3D.

Definition at line 339 of file TH3.cxx.

◆ BufferFill() [2/3]

Int_t TH3::BufferFill ( Double_t  x,
Double_t  w 
)
inlineoverrideprotectedvirtual

accumulate arguments in buffer.

When buffer is full, empty the buffer

  • fBuffer[0] = number of entries in buffer
  • fBuffer[1] = w of first entry
  • fBuffer[2] = x of first entry

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 56 of file TH3.h.

◆ BufferFill() [3/3]

virtual Int_t TH3::BufferFill ( Double_t  ,
Double_t  ,
Double_t   
)
inlineprotectedvirtual

Reimplemented in TProfile3D.

Definition at line 57 of file TH3.h.

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

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

Definition at line 152 of file TH3.h.

◆ Copy()

void TH3::Copy ( TObject hnew) const
overridevirtual

Copy.

Reimplemented from TH1.

Reimplemented in TH3C, TH3S, TH3I, TH3L, TH3F, TH3D, and TProfile3D.

Definition at line 208 of file TH3.cxx.

◆ DeclFileName()

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

Definition at line 152 of file TH3.h.

◆ DoFillProfileProjection()

void TH3::DoFillProfileProjection ( TProfile2D p2,
const TAxis a1,
const TAxis a2,
const TAxis a3,
Int_t  bin1,
Int_t  bin2,
Int_t  bin3,
Int_t  inBin,
Bool_t  useWeights 
) const
protected

internal function to fill the bins of the projected profile 2D histogram called from DoProjectProfile2D

Definition at line 2550 of file TH3.cxx.

◆ DoProject1D() [1/3]

TH1D * TH3::DoProject1D ( const char *  name,
const char *  title,
const TAxis projAxis,
const TAxis axis1,
const TAxis axis2,
bool  computeErrors,
bool  originalRange,
bool  useUF,
bool  useOF 
) const
protectedvirtual

internal methdod performing the projection to 1D histogram called from other TH3::DoProject1D

Definition at line 1889 of file TH3.cxx.

◆ DoProject1D() [2/3]

TH1D * TH3::DoProject1D ( const char *  name,
const char *  title,
int  imin1,
int  imax1,
int  imin2,
int  imax2,
const TAxis projAxis,
const TAxis axis1,
const TAxis axis2,
Option_t option 
) const
protectedvirtual

internal method performing the projection to 1D histogram called from TH3::Project3D

Definition at line 1829 of file TH3.cxx.

◆ DoProject1D() [3/3]

TH1D * TH3::DoProject1D ( const TH3 h,
const char *  name,
const char *  title,
const TAxis projX,
bool  computeErrors,
bool  originalRange,
bool  useUF,
bool  useOF 
)
staticprotected

static methdod performing the projection to 1D histogram

Definition at line 3504 of file TH3.cxx.

◆ DoProject2D() [1/2]

TH2D * TH3::DoProject2D ( const char *  name,
const char *  title,
const TAxis projX,
const TAxis projY,
bool  computeErrors,
bool  originalRange,
bool  useUF,
bool  useOF 
) const
protectedvirtual

internal method performing the projection to a 2D histogram called from TH3::Project3D

Definition at line 2103 of file TH3.cxx.

◆ DoProject2D() [2/2]

TH2D * TH3::DoProject2D ( const TH3 h,
const char *  name,
const char *  title,
const TAxis projX,
const TAxis projY,
bool  computeErrors,
bool  originalRange,
bool  useUF,
bool  useOF 
)
staticprotected

static methdod performing the projection to 2D histogram

Definition at line 3513 of file TH3.cxx.

◆ DoProjectProfile2D()

TProfile2D * TH3::DoProjectProfile2D ( const char *  name,
const char *  title,
const TAxis projX,
const TAxis projY,
bool  originalRange,
bool  useUF,
bool  useOF 
) const
protectedvirtual

internal method to project to a 2D Profile called from TH3::Project3DProfile

Reimplemented in TProfile3D.

Definition at line 2576 of file TH3.cxx.

◆ Fill() [1/15]

Int_t TH3::Fill ( const char *  ,
const char *  ,
Double_t   
)
inlineprotected

Definition at line 63 of file TH3.h.

◆ Fill() [2/15]

Int_t TH3::Fill ( const char *  namex,
Double_t  w 
)
inlineoverrideprotectedvirtual

Increment bin with namex with a weight w.

if x is less than the low-edge of the first bin, the Underflow bin is incremented if x is equal to or greater than the upper edge of last bin, the Overflow bin is incremented

If the weight is not equal to 1, the storage of the sum of squares of weights is automatically triggered and the sum of the squares of weights is incremented by \( w^2 \) in the bin corresponding to x.

The function returns the corresponding bin number which has its content incremented by w.

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 60 of file TH3.h.

◆ Fill() [3/15]

Int_t TH3::Fill ( const char *  ,
Double_t  ,
Double_t   
)
inlineprotected

Definition at line 62 of file TH3.h.

◆ Fill() [4/15]

Int_t TH3::Fill ( const char *  namex,
const char *  namey,
const char *  namez,
Double_t  w 
)
virtual

Increment cell defined by namex,namey,namez by a weight w.

If the weight is not equal to 1, the storage of the sum of squares of weights is automatically triggered and the sum of the squares of weights is incremented by w^2 in the corresponding cell. The function returns the corresponding global bin number which has its content incremented by w

Reimplemented in TProfile3D, and TProfile3D.

Definition at line 476 of file TH3.cxx.

◆ Fill() [5/15]

Int_t TH3::Fill ( const char *  namex,
const char *  namey,
Double_t  z,
Double_t  w 
)
virtual

Increment cell defined by namex,namey,z by a weight w.

If the weight is not equal to 1, the storage of the sum of squares of weights is automatically triggered and the sum of the squares of weights is incremented by w^2 in the corresponding cell. The function returns the corresponding global bin number which has its content incremented by w

Reimplemented in TProfile3D, and TProfile3D.

Definition at line 572 of file TH3.cxx.

◆ Fill() [6/15]

Int_t TH3::Fill ( const char *  namex,
Double_t  y,
const char *  namez,
Double_t  w 
)
virtual

Increment cell defined by namex,y,namez by a weight w.

If the weight is not equal to 1, the storage of the sum of squares of weights is automatically triggered and the sum of the squares of weights is incremented by w^2 in the corresponding cell. The function returns the corresponding global bin number which has its content incremented by w

Reimplemented in TProfile3D, and TProfile3D.

Definition at line 524 of file TH3.cxx.

◆ Fill() [7/15]

Int_t TH3::Fill ( const char *  namex,
Double_t  y,
Double_t  z,
Double_t  w 
)
virtual

Increment cell defined by namex , y ,z by a weight w.

If the weight is not equal to 1, the storage of the sum of squares of weights is automatically triggered and the sum of the squares of weights is incremented by w^2 in the corresponding cell. The function returns the corresponding global bin number which has its content incremented by w

Reimplemented in TProfile3D.

Definition at line 668 of file TH3.cxx.

◆ Fill() [8/15]

Int_t TH3::Fill ( Double_t  x,
const char *  namey,
const char *  namez,
Double_t  w 
)
virtual

Increment cell defined by x,namey,namez by a weight w.

If the weight is not equal to 1, the storage of the sum of squares of weights is automatically triggered and the sum of the squares of weights is incremented by w^2 in the corresponding cell. The function returns the corresponding global bin number which has its content incremented by w

Reimplemented in TProfile3D, and TProfile3D.

Definition at line 620 of file TH3.cxx.

◆ Fill() [9/15]

Int_t TH3::Fill ( Double_t  x,
const char *  namey,
Double_t  z,
Double_t  w 
)
virtual

Increment cell defined by x,namey,z by a weight w.

If the weight is not equal to 1, the storage of the sum of squares of weights is automatically triggered and the sum of the squares of weights is incremented by w^2 in the corresponding cell. The function returns the corresponding global bin number which has its content incremented by w

Reimplemented in TProfile3D, and TProfile3D.

Definition at line 722 of file TH3.cxx.

◆ Fill() [10/15]

Int_t TH3::Fill ( Double_t  x,
Double_t  y,
const char *  namez,
Double_t  w 
)
virtual

Increment cell defined by x,y,namez by a weight w.

If the weight is not equal to 1, the storage of the sum of squares of weights is automatically triggered and the sum of the squares of weights is incremented by w^2 in the corresponding cell. The function returns the corresponding global bin number which has its content incremented by w

Reimplemented in TProfile3D, and TProfile3D.

Definition at line 771 of file TH3.cxx.

◆ Fill() [11/15]

Int_t TH3::Fill ( Double_t  x,
Double_t  y,
Double_t  z 
)
virtual

Increment cell defined by x,y,z by 1 .

The function returns the corresponding global bin number which has its content incremented by 1

Reimplemented in TProfile3D, and TProfile3D.

Definition at line 381 of file TH3.cxx.

◆ Fill() [12/15]

Int_t TH3::Fill ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  w 
)
virtual

Increment cell defined by x,y,z by a weight w.

If the weight is not equal to 1, the storage of the sum of squares of weights is automatically triggered and the sum of the squares of weights is incremented by w^2 in the cell corresponding to x,y,z.

The function returns the corresponding global bin number which has its content incremented by w

Reimplemented in TProfile3D, and TProfile3D.

Definition at line 429 of file TH3.cxx.

◆ Fill() [13/15]

Int_t TH3::Fill ( Double_t  )
overrideprotectedvirtual

Invalid Fill method.

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 368 of file TH3.cxx.

◆ Fill() [14/15]

Int_t TH3::Fill ( Double_t  ,
const char *  ,
Double_t   
)
inlineprotected

Definition at line 61 of file TH3.h.

◆ Fill() [15/15]

Int_t TH3::Fill ( Double_t  x,
Double_t  w 
)
inlineoverrideprotectedvirtual

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 equal to or greater than the upper edge of last bin, the Overflow bin is incremented

If the weight is not equal to 1, the storage of the sum of squares of weights is automatically triggered and the sum of the squares of weights is incremented by \( w^2 \) in the bin corresponding to x.

The function returns the corresponding bin number which has its content incremented by w

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 59 of file TH3.h.

◆ FillRandom() [1/2]

void TH3::FillRandom ( const char *  fname,
Int_t  ntimes = 5000,
TRandom rng = nullptr 
)
overridevirtual

Fill histogram following distribution in function fname.

Parameters
fname: Function name used for filling the historam
ntimes: number of times the histogram is filled
rng: (optional) Random number generator used to sample

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

N.B. By dfault this methods approximates the integral of the function in each bin with the function value at the center of the bin, mutiplied by the bin width

One can also call TF1::GetRandom to get a random variate from a function.

Reimplemented from TH1.

Definition at line 833 of file TH3.cxx.

◆ FillRandom() [2/2]

void TH3::FillRandom ( TH1 h,
Int_t  ntimes = 5000,
TRandom rng = nullptr 
)
overridevirtual

Fill histogram following distribution in histogram h.

Parameters
h: Histogram pointer used for smpling random number
ntimes: number of times the histogram is filled
rng: (optional) Random number generator used for sampling

The distribution contained in the histogram h (TH3) 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

Reimplemented from TH1.

Definition at line 928 of file TH3.cxx.

◆ FitSlicesZ()

void TH3::FitSlicesZ ( TF1 f1 = nullptr,
Int_t  binminx = 1,
Int_t  binmaxx = 0,
Int_t  binminy = 1,
Int_t  binmaxy = 0,
Int_t  cut = 0,
Option_t option = "QNR" 
)
virtual

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

Note that the generated histograms are added to the list of objects in the current directory. It is the user's responsibility to delete these histograms.

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(StdDev) 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.

NOTE: To access the generated histograms in the current directory, do eg: TH2D h3_1 = (TH2D)gDirectory->Get("h3_1");

Definition at line 978 of file TH3.cxx.

◆ GetBin()

Int_t TH3::GetBin ( Int_t  binx,
Int_t  biny,
Int_t  binz 
) const
overridevirtual

See comments in TH1::GetBin.

Reimplemented from TH1.

Definition at line 1117 of file TH3.cxx.

◆ GetBinContent() [1/4]

Double_t TH1::GetBinContent ( Int_t  bin) const
virtual

Return content of bin number bin.

Implemented in TH1C,S,F,D

Convention for numbering bins

For all histogram types: nbins, xlow, xup

  • bin = 0; underflow bin
  • bin = 1; first bin with low-edge xlow INCLUDED
  • bin = nbins; last bin with upper-edge xup EXCLUDED
  • bin = nbins+1; overflow bin

In case of 2-D or 3-D histograms, a "global bin" number is defined. For example, assuming a 3-D histogram with binx,biny,binz, the function

Int_t bin = h->GetBin(binx,biny,binz);
#define h(i)
Definition RSha256.hxx:106

returns a global/linearized bin number. This global bin is useful to access the bin information independently of the dimension.

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 265 of file TH1.cxx.

◆ GetBinContent() [2/4]

virtual Double_t TH1::GetBinContent ( Int_t  bin,
Int_t   
) const
inlinevirtual

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 266 of file TH1.h.

◆ GetBinContent() [3/4]

virtual Double_t TH1::GetBinContent ( Int_t  bin,
Int_t  ,
Int_t   
) const
inlinevirtual

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 267 of file TH1.h.

◆ GetBinContent() [4/4]

Double_t TH3::GetBinContent ( Int_t  binx,
Int_t  biny,
Int_t  binz 
) const
inlineoverridevirtual

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 101 of file TH3.h.

◆ GetBinErrorLow() [1/2]

Double_t TH1::GetBinErrorLow ( Int_t  bin) const
virtual

Return lower error associated to bin number bin.

The error will depend on the statistic option used will return the binContent - lower interval value

Reimplemented from TH1.

Definition at line 271 of file TH1.cxx.

◆ GetBinErrorLow() [2/2]

virtual Double_t TH3::GetBinErrorLow ( Int_t  binx,
Int_t  biny,
Int_t  binz 
)
inlinevirtual

Definition at line 104 of file TH3.h.

◆ GetBinErrorUp() [1/2]

Double_t TH1::GetBinErrorUp ( Int_t  bin) const
virtual

Return upper error associated to bin number bin.

The error will depend on the statistic option used will return the binContent - upper interval value

Reimplemented from TH1.

Definition at line 272 of file TH1.cxx.

◆ GetBinErrorUp() [2/2]

virtual Double_t TH3::GetBinErrorUp ( Int_t  binx,
Int_t  biny,
Int_t  binz 
)
inlinevirtual

Definition at line 105 of file TH3.h.

◆ GetBinWithContent3()

Double_t TH3::GetBinWithContent3 ( Double_t  c,
Int_t binx,
Int_t biny,
Int_t binz,
Int_t  firstx = 0,
Int_t  lastx = 0,
Int_t  firsty = 0,
Int_t  lasty = 0,
Int_t  firstz = 0,
Int_t  lastz = 0,
Double_t  maxdiff = 0 
) const
virtual

Compute first cell (binx,biny,binz) in the range [firstx,lastx](firsty,lasty][firstz,lastz] 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,binz.

In case several cells in the specified range satisfy diff <=maxdiff the cell with the smallest difference is returned in binx,biny,binz. In all cases the function returns the smallest difference.

NOTE1: if firstx <= 0, firstx is set to bin 1 if (lastx < firstx then firstx is set to the number of bins in X ie if firstx=0 and lastx=0 (default) the search is on all bins in X. if firsty <= 0, firsty is set to bin 1 if (lasty < firsty then firsty is set to the number of bins in Y ie if firsty=0 and lasty=0 (default) the search is on all bins in Y. if firstz <= 0, firstz is set to bin 1 if (lastz < firstz then firstz is set to the number of bins in Z ie if firstz=0 and lastz=0 (default) the search is on all bins in Z. NOTE2: if maxdiff=0 (default), the first cell with content=c is returned.

Definition at line 1151 of file TH3.cxx.

◆ GetCorrelationFactor()

Double_t TH3::GetCorrelationFactor ( Int_t  axis1 = 1,
Int_t  axis2 = 2 
) const
virtual

Return correlation factor between axis1 and axis2.

Definition at line 1191 of file TH3.cxx.

◆ GetCovariance()

Double_t TH3::GetCovariance ( Int_t  axis1 = 1,
Int_t  axis2 = 2 
) const
virtual

Return covariance between axis1 and axis2.

Definition at line 1209 of file TH3.cxx.

◆ GetRandom3()

void TH3::GetRandom3 ( Double_t x,
Double_t y,
Double_t z,
TRandom rng = nullptr 
)
virtual

Return 3 random numbers along axis x , y and z distributed according to the cell-contents of this 3-dim histogram.

Parameters
[out]xreference to random generated x value
[out]yreference to random generated y value
[out]zreference to random generated z value
[in]rng(optional) Random number generator pointer used (default is gRandom)

Definition at line 1259 of file TH3.cxx.

◆ GetStats()

void TH3::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 stats[7] = sumwz stats[8] = sumwz2 stats[9] = sumwxz stats[10]= sumwyz

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 1307 of file TH3.cxx.

◆ Integral() [1/4]

Double_t TH3::Integral ( Int_t  binx1,
Int_t  binx2,
Int_t  biny1,
Int_t  biny2,
Int_t  binz1,
Int_t  binz2,
Option_t option = "" 
) const
virtual

Return integral of bin contents in range [binx1,binx2],[biny1,biny2],[binz1,binz2] for a 3-D histogram By default the integral is computed as the sum of bin contents in the range.

if option "width" is specified, the integral is the sum of the bin contents multiplied by the bin width in x, y and in z.

Definition at line 1405 of file TH3.cxx.

◆ Integral() [2/4]

Double_t TH1::Integral ( Int_t  binx1,
Int_t  binx2,
Option_t option = "" 
) const
privatevirtual

Return integral of bin contents in range [binx1,binx2].

By default the integral is computed as the sum of bin contents in the range. if option "width" is specified, the integral is the sum of the bin contents multiplied by the bin width in x.

Reimplemented from TH1.

Definition at line 331 of file TH1.cxx.

◆ Integral() [3/4]

Double_t TH1::Integral ( Option_t option = "") const
privatevirtual

Return integral of bin contents.

Only bins in the bins range are considered.

By default the integral is computed as the sum of bin contents in the range. if option "width" is specified, the integral is the sum of the bin contents multiplied by the bin width in x.

Reimplemented from TH1.

Definition at line 330 of file TH1.cxx.

◆ Integral() [4/4]

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

Return integral of bin contents.

Only bins in the bins range are considered. By default the integral is computed as the sum of bin contents in the range. if option "width" is specified, the integral is the sum of the bin contents multiplied by the bin width in x, y and in z.

Reimplemented from TH1.

Definition at line 1390 of file TH3.cxx.

◆ IntegralAndError() [1/2]

Double_t TH1::IntegralAndError ( Int_t  binx1,
Int_t  binx2,
Double_t error,
Option_t option = "" 
) const
privatevirtual

Return integral of bin contents in range [binx1,binx2] and its error.

By default the integral is computed as the sum of bin contents in the range. if option "width" is specified, the integral is the sum of the bin contents multiplied by the bin width in x. the error is computed using error propagation from the bin errors assuming that all the bins are uncorrelated

Reimplemented from TH1.

Definition at line 332 of file TH1.cxx.

◆ IntegralAndError() [2/2]

Double_t TH3::IntegralAndError ( Int_t  binx1,
Int_t  binx2,
Int_t  biny1,
Int_t  biny2,
Int_t  binz1,
Int_t  binz2,
Double_t error,
Option_t option = "" 
) const
virtual

Return integral of bin contents in range [binx1,binx2],[biny1,biny2],[binz1,binz2] for a 3-D histogram.

Calculates also the integral error using error propagation from the bin errors assuming that all the bins are uncorrelated. By default the integral is computed as the sum of bin contents in the range. if option "width" is specified, the integral is the sum of the bin contents multiplied by the bin width in x, y and in z.

Definition at line 1421 of file TH3.cxx.

◆ Interpolate() [1/3]

Double_t TH3::Interpolate ( Double_t  x) const
overrideprotectedvirtual

Not yet implemented.

Reimplemented from TH1.

Definition at line 1431 of file TH3.cxx.

◆ Interpolate() [2/3]

Double_t TH3::Interpolate ( Double_t  x,
Double_t  y 
) const
overrideprotectedvirtual

Not yet implemented.

Reimplemented from TH1.

Definition at line 1441 of file TH3.cxx.

◆ Interpolate() [3/3]

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

Given a point P(x,y,z), Interpolate approximates the value via trilinear interpolation based on the 8 nearest bin center points (corner of the cube surrounding the points) The Algorithm is described in http://en.wikipedia.org/wiki/Trilinear_interpolation The given values (x,y,z) must be between first bin center and last bin center for each coordinate:

fXAxis.GetBinCenter(1) < x < fXaxis.GetBinCenter(nbinX) AND fYAxis.GetBinCenter(1) < y < fYaxis.GetBinCenter(nbinY) AND fZAxis.GetBinCenter(1) < z < fZaxis.GetBinCenter(nbinZ)

Reimplemented from TH1.

Definition at line 1458 of file TH3.cxx.

◆ IsA()

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

Reimplemented from TH1.

Reimplemented in TH3C, TH3S, TH3I, TH3L, TH3F, TH3D, and TProfile3D.

Definition at line 152 of file TH3.h.

◆ KolmogorovTest()

Double_t TH3::KolmogorovTest ( const TH1 h2,
Option_t option = "" 
) const
overridevirtual

Statistical test of compatibility in shape between THIS histogram and h2, using Kolmogorov test.

Default: Ignore under- and overflow bins in comparison

option is a character string to specify options "U" include Underflows in test "O" include Overflows "N" include comparison of normalizations "D" Put out a line of "Debug" printout "M" Return the Maximum Kolmogorov distance instead of prob

The returned function value is the probability of test (much less than one means NOT compatible)

The KS test uses the distance between the pseudo-CDF's obtained from the histogram. Since in more than 1D the order for generating the pseudo-CDF is arbitrary, we use the pseudo-CDF's obtained from all the possible 6 combinations of the 3 axis. The average of all the maximum distances obtained is used in the tests.

Reimplemented from TH1.

Definition at line 1532 of file TH3.cxx.

◆ operator=()

TH3 & TH3::operator= ( const TH3 )
privatedelete

◆ Project3D()

TH1 * TH3::Project3D ( Option_t option = "x") const
virtual

Project a 3-d histogram into 1 or 2-d histograms depending on the option parameter, which may contain a combination of the characters x,y,z,e.

  • option = "x" return the x projection into a TH1D histogram
  • option = "y" return the y projection into a TH1D histogram
  • option = "z" return the z projection into a TH1D histogram
  • option = "xy" return the x versus y projection into a TH2D histogram
  • option = "yx" return the y versus x projection into a TH2D histogram
  • option = "xz" return the x versus z projection into a TH2D histogram
  • option = "zx" return the z versus x projection into a TH2D histogram
  • option = "yz" return the y versus z projection into a TH2D histogram
  • option = "zy" return the z versus y projection into a TH2D histogram

NB: the notation "a vs b" means "a" vertical and "b" horizontal

option = "o" original axis range of the target axes will be kept, but only bins inside the selected range will be filled.

If option contains the string "e", errors are computed

The projection is made for the selected bins only. To select a bin range along an axis, use TAxis::SetRange, eg h3.GetYaxis()->SetRange(23,56);

NOTE 1: The generated histogram is named th3name + option eg if the TH3* h histogram is named "myhist", then h->Project3D("xy"); produces a TH2D histogram named "myhist_xy" if a histogram of the same type already exists, it is overwritten. The following sequence h->Project3D("xy"); h->Project3D("xy2"); will generate two TH2D histograms named "myhist_xy" and "myhist_xy2" A different name can be generated by attaching a string to the option For example h->Project3D("name_xy") will generate an histogram with the name: h3dname_name_xy.

NOTE 2: If an histogram of the same type and with the same name already exists in current Directory, the histogram is reset and filled again with the projected contents of the TH3.

NOTE 3: The number of entries in the projected histogram is estimated from the number of effective entries for all the cells included in the projection.

NOTE 4: underflow/overflow are included by default in the projection To exclude underflow and/or overflow (for both axis in case of a projection to a 1D histogram) use option "NUF" and/or "NOF" With SetRange() you can have all bins except underflow/overflow only if you set the axis bit range as following after having called SetRange: axis->SetRange(1, axis->GetNbins());

NOTE 5: If TH1::AddDirectory is set to false, a new histogram is always created and the ownership of the returned pointer is delegated to the user. Be sure in this case to call delete on it after it's no longer needed, to avoid memory leaks.

Definition at line 2409 of file TH3.cxx.

◆ Project3DProfile()

TProfile2D * TH3::Project3DProfile ( Option_t option = "xy") const
virtual

Project a 3-d histogram into a 2-d profile histograms depending on the option parameter option may contain a combination of the characters x,y,z option = "xy" return the x versus y projection into a TProfile2D histogram option = "yx" return the y versus x projection into a TProfile2D histogram option = "xz" return the x versus z projection into a TProfile2D histogram option = "zx" return the z versus x projection into a TProfile2D histogram option = "yz" return the y versus z projection into a TProfile2D histogram option = "zy" return the z versus y projection into a TProfile2D histogram NB: the notation "a vs b" means "a" vertical and "b" horizontal.

option = "o" original axis range of the target axes will be kept, but only bins inside the selected range will be filled.

The projection is made for the selected bins only. To select a bin range along an axis, use TAxis::SetRange, eg h3.GetYaxis()->SetRange(23,56);

NOTE 1: The generated histogram is named th3name + "_p" + option eg if the TH3* h histogram is named "myhist", then h->Project3D("xy"); produces a TProfile2D histogram named "myhist_pxy". The following sequence h->Project3DProfile("xy"); h->Project3DProfile("xy2"); will generate two TProfile2D histograms named "myhist_pxy" and "myhist_pxy2" So, passing additional characters in the option string one can customize the name.

NOTE 2: If a profile of the same type already exists with compatible axes, the profile is reset and filled again with the projected contents of the TH3. In the case of axes incompatibility, an error is reported and a NULL pointer is returned.

NOTE 3: The number of entries in the projected profile is estimated from the number of effective entries for all the cells included in the projection.

NOTE 4: underflow/overflow are by default excluded from the projection (Note that this is a different default behavior compared to the projection to an histogram) To include the underflow and/or overflow use option "UF" and/or "OF"

Reimplemented in TProfile3D.

Definition at line 2806 of file TH3.cxx.

◆ ProjectionX()

TH1D * TH3::ProjectionX ( const char *  name = "_px",
Int_t  iymin = 0,
Int_t  iymax = -1,
Int_t  izmin = 0,
Int_t  izmax = -1,
Option_t option = "" 
) const
virtual

Project a 3-D histogram into a 1-D histogram along X.

The projection is always of the type TH1D. The projection is made from the cells along the X axis ranging from iymin to iymax and izmin to izmax included. By default, underflow and overflows are included in both the Y and Z axis. By Setting iymin=1 and iymax=NbinsY the underflow and/or overflow in Y will be excluded By setting izmin=1 and izmax=NbinsZ the underflow and/or overflow in Z will be excluded

if option "e" is specified, the errors are computed. if option "d" is specified, the projection is drawn in the current pad. if option "o" original axis range of the target axes will be kept, but only bins inside the selected range will be filled.

NOTE that if a TH1D named "name" exists in the current directory or pad the histogram is reset and filled again with the projected contents of the TH3.

implemented using Project3D

Definition at line 1747 of file TH3.cxx.

◆ ProjectionY()

TH1D * TH3::ProjectionY ( const char *  name = "_py",
Int_t  ixmin = 0,
Int_t  ixmax = -1,
Int_t  izmin = 0,
Int_t  izmax = -1,
Option_t option = "" 
) const
virtual

Project a 3-D histogram into a 1-D histogram along Y.

The projection is always of the type TH1D. The projection is made from the cells along the Y axis ranging from ixmin to ixmax and izmin to izmax included. By default, underflow and overflow are included in both the X and Z axis. By setting ixmin=1 and ixmax=NbinsX the underflow and/or overflow in X will be excluded By setting izmin=1 and izmax=NbinsZ the underflow and/or overflow in Z will be excluded

if option "e" is specified, the errors are computed. if option "d" is specified, the projection is drawn in the current pad. if option "o" original axis range of the target axes will be kept, but only bins inside the selected range will be filled.

NOTE that if a TH1D named "name" exists in the current directory or pad, the histogram is reset and filled again with the projected contents of the TH3.

implemented using Project3D

Definition at line 1780 of file TH3.cxx.

◆ ProjectionZ()

TH1D * TH3::ProjectionZ ( const char *  name = "_pz",
Int_t  ixmin = 0,
Int_t  ixmax = -1,
Int_t  iymin = 0,
Int_t  iymax = -1,
Option_t option = "" 
) const
virtual

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 Z axis ranging from ixmin to ixmax and iymin to iymax included. By default, bins 1 to nx and 1 to ny are included By default, underflow and overflow are included in both the X and Y axis. By Setting ixmin=1 and ixmax=NbinsX the underflow and/or overflow in X will be excluded By setting iymin=1 and/or iymax=NbinsY the underflow and/or overflow in Y will be excluded

if option "e" is specified, the errors are computed. if option "d" is specified, the projection is drawn in the current pad. if option "o" original axis range of the target axes will be kept, but only bins inside the selected range will be filled.

NOTE that if a TH1D named "name" exists in the current directory or pad, the histogram is reset and filled again with the projected contents of the TH3.

implemented using Project3D

Definition at line 1812 of file TH3.cxx.

◆ PutStats()

void TH3::PutStats ( Double_t stats)
overridevirtual

Replace current statistics with the values in array stats.

Reimplemented from TH1.

Reimplemented in TProfile3D.

Definition at line 2889 of file TH3.cxx.

◆ Rebin3D()

TH3 * TH3::Rebin3D ( Int_t  nxgroup = 2,
Int_t  nygroup = 2,
Int_t  nzgroup = 2,
const char *  newname = "" 
)
virtual

Rebin this histogram grouping nxgroup/nygroup/nzgroup bins along the xaxis/yaxis/zaxis together.

if newname is not blank a new temporary histogram hnew is created. else the current histogram is modified (default) The parameter nxgroup/nygroup indicate how many bins along the xaxis/yaxis 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 hpxpy is an existing TH3 histogram with 40 x 40 x 40 bins hpxpypz->Rebin3D(); // merges two bins along the xaxis and yaxis in one in hpxpypz // Carefull: previous contents of hpxpy are lost hpxpypz->RebinX(5); //merges five bins along the xaxis in one in hpxpypz TH3 *hnew = hpxpypz->RebinY(5,"hnew"); // creates a new histogram hnew // merging 5 bins of h1 along the yaxis in one bin

NOTE : If nxgroup/nygroup is not an exact divider of the number of bins, along the xaxis/yaxis the top limit(s) of the rebinned histogram is changed to the upper edge of the xbin=newxbins*nxgroup resp. ybin=newybins*nygroup and the corresponding bins are added to the overflow bin. Statistics will be recomputed from the new bin contents.

Definition at line 2957 of file TH3.cxx.

◆ RebinX()

TH3 * TH3::RebinX ( Int_t  ngroup = 2,
const char *  newname = "" 
)
overridevirtual

Rebin only the X axis see Rebin3D.

Reimplemented from TH1.

Definition at line 2906 of file TH3.cxx.

◆ RebinY()

TH3 * TH3::RebinY ( Int_t  ngroup = 2,
const char *  newname = "" 
)
virtual

Rebin only the Y axis see Rebin3D.

Definition at line 2916 of file TH3.cxx.

◆ RebinZ()

TH3 * TH3::RebinZ ( Int_t  ngroup = 2,
const char *  newname = "" 
)
virtual

Rebin only the Z axis see Rebin3D.

Definition at line 2926 of file TH3.cxx.

◆ Reset()

void TH3::Reset ( Option_t option = "")
overridevirtual

Reset this histogram: contents, errors, etc.

Reimplemented from TH1.

Reimplemented in TH3C, TH3S, TH3I, TH3L, TH3F, TH3D, and TProfile3D.

Definition at line 3449 of file TH3.cxx.

◆ SetBinContent() [1/3]

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

Set bin content.

Reimplemented from TH1.

Definition at line 3468 of file TH3.cxx.

◆ SetBinContent() [2/3]

void TH3::SetBinContent ( Int_t  bin,
Int_t  ,
Double_t  content 
)
inlineoverridevirtual

Reimplemented from TH1.

Definition at line 131 of file TH3.h.

◆ SetBinContent() [3/3]

void TH3::SetBinContent ( Int_t  binx,
Int_t  biny,
Int_t  binz,
Double_t  content 
)
inlineoverridevirtual

Reimplemented from TH1.

Definition at line 132 of file TH3.h.

◆ SetShowProjection()

void TH3::SetShowProjection ( const char *  option = "xy",
Int_t  nbins = 1 
)
virtual

When the mouse is moved in a pad containing a 3-d view of this histogram a second canvas shows a projection type given as option.

To stop the generation of the projections, delete the canvas containing the projection. option may contain a combination of the characters x,y,z,e option = "x" return the x projection into a TH1D histogram option = "y" return the y projection into a TH1D histogram option = "z" return the z projection into a TH1D histogram option = "xy" return the x versus y projection into a TH2D histogram option = "yx" return the y versus x projection into a TH2D histogram option = "xz" return the x versus z projection into a TH2D histogram option = "zx" return the z versus x projection into a TH2D histogram option = "yz" return the y versus z projection into a TH2D histogram option = "zy" return the z versus y projection into a TH2D histogram option can also include the drawing option for the projection, eg to draw the xy projection using the draw option "box" do myhist.SetShowProjection("xy box"); This function is typically called from the context menu. NB: the notation "a vs b" means "a" vertical and "b" horizontal

Definition at line 3676 of file TH3.cxx.

◆ Streamer()

void TH3::Streamer ( TBuffer R__b)
overridevirtual

Stream an object of class TH3.

Reimplemented from TH1.

Reimplemented in TH3C, TH3S, TH3I, TH3L, TH3F, TH3D, and TProfile3D.

Definition at line 3481 of file TH3.cxx.

◆ StreamerNVirtual()

void TH3::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 152 of file TH3.h.

Member Data Documentation

◆ fTsumwxy

Double_t TH3::fTsumwxy
protected

Total Sum of weight*X*Y.

Definition at line 36 of file TH3.h.

◆ fTsumwxz

Double_t TH3::fTsumwxz
protected

Total Sum of weight*X*Z.

Definition at line 39 of file TH3.h.

◆ fTsumwy

Double_t TH3::fTsumwy
protected

Total Sum of weight*Y.

Definition at line 34 of file TH3.h.

◆ fTsumwy2

Double_t TH3::fTsumwy2
protected

Total Sum of weight*Y*Y.

Definition at line 35 of file TH3.h.

◆ fTsumwyz

Double_t TH3::fTsumwyz
protected

Total Sum of weight*Y*Z.

Definition at line 40 of file TH3.h.

◆ fTsumwz

Double_t TH3::fTsumwz
protected

Total Sum of weight*Z.

Definition at line 37 of file TH3.h.

◆ fTsumwz2

Double_t TH3::fTsumwz2
protected

Total Sum of weight*Z*Z.

Definition at line 38 of file TH3.h.

Libraries for TH3:

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