#define ClassDefOverride(name, id)
Array of chars or bytes (8 bits per element).
Array of doubles (64 bits per element).
Array of floats (32 bits per element).
Array of integers (32 bits per element).
Array of long64s (64 bits per element).
Array of shorts (16 bits per element).
1-D histogram with a double per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual Double_t 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.
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
2-D histogram with a byte per channel (see TH1 documentation)
void Reset(Option_t *option="") override
Reset this histogram: contents, errors, etc.
friend TH2C operator-(TH2C &h1, TH2C &h2)
Operator -.
friend TH2C operator+(TH2C &h1, TH2C &h2)
Operator +.
void AddBinContent(Int_t binx, Int_t biny, Double_t w) override
Increment 2D bin content by a weight w.
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
friend TH2C operator/(TH2C &h1, TH2C &h2)
Operator /.
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
void AddBinContent(Int_t binx, Int_t biny) override
Increment 2D bin content by 1.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
TH2C & operator=(const TH2C &h1)
Operator =.
~TH2C() override
Destructor.
void Copy(TObject &hnew) const override
Copy.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
friend TH2C operator*(Float_t c1, TH2C &h1)
Operator *.
friend TH2C operator*(TH2C &h1, Float_t c1)
2-D histogram with a double per channel (see TH1 documentation)
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
friend TH2D operator-(TH2D &h1, TH2D &h2)
Operator -.
friend TH2D operator*(Float_t c1, TH2D &h1)
Operator *.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
void AddBinContent(Int_t binx, Int_t biny, Double_t w) override
Increment 2D bin content by a weight w.
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
~TH2D() override
Destructor.
friend TH2D operator/(TH2D &h1, TH2D &h2)
Operator /.
void AddBinContent(Int_t bin, Double_t w) override
Increment bin content by a weight w Passing an out-of-range bin leads to undefined behavior.
void Copy(TObject &hnew) const override
Copy.
friend TH2D operator+(TH2D &h1, TH2D &h2)
Operator +.
void AddBinContent(Int_t binx, Int_t biny) override
Increment 2D bin content by 1.
friend TH2D operator*(TH2D &h1, Float_t c1)
TH2D & operator=(const TH2D &h1)
Operator =.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
2-D histogram with a float per channel (see TH1 documentation)
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.
friend TH2F operator*(Float_t c1, TH2F &h1)
Operator *.
TH2F & operator=(const TH2F &h1)
Operator =.
~TH2F() override
Destructor.
void AddBinContent(Int_t binx, Int_t biny) override
Increment 2D bin content by 1.
void Copy(TObject &hnew) const override
Copy.
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
void AddBinContent(Int_t binx, Int_t biny, Double_t w) override
Increment 2D bin content by a weight w.
friend TH2F operator-(TH2F &h1, TH2F &h2)
Operator -.
friend TH2F operator/(TH2F &h1, TH2F &h2)
Operator /.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
friend TH2F operator+(TH2F &h1, TH2F &h2)
Operator +.
2-D histogram with an int per channel (see TH1 documentation)
friend TH2I operator/(TH2I &h1, TH2I &h2)
Operator /.
friend TH2I operator-(TH2I &h1, TH2I &h2)
Operator -.
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
friend TH2I operator*(TH2I &h1, Float_t c1)
friend TH2I operator*(Float_t c1, TH2I &h1)
Operator *.
void Copy(TObject &hnew) const override
Copy.
void AddBinContent(Int_t binx, Int_t biny) override
Increment 2D bin content by 1.
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
void AddBinContent(Int_t bin) override
Increment bin content by 1.
friend TH2I operator+(TH2I &h1, TH2I &h2)
Operator +.
void AddBinContent(Int_t binx, Int_t biny, Double_t w) override
Increment 2D bin content by a weight w.
~TH2I() override
Destructor.
TH2I & operator=(const TH2I &h1)
Operator =.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
2-D histogram with a long64 per channel (see TH1 documentation)
friend TH2L operator/(TH2L &h1, TH2L &h2)
Operator /.
void AddBinContent(Int_t binx, Int_t biny) override
Increment 2D bin content by 1.
TH2L & operator=(const TH2L &h1)
Operator =.
friend TH2L operator*(TH2L &h1, Float_t c1)
void AddBinContent(Int_t binx, Int_t biny, Double_t w) override
Increment 2D bin content by a weight w.
friend TH2L operator*(Float_t c1, TH2L &h1)
Operator *.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
friend TH2L operator+(TH2L &h1, TH2L &h2)
Operator +.
~TH2L() override
Destructor.
void Copy(TObject &hnew) const override
Copy.
friend TH2L operator-(TH2L &h1, TH2L &h2)
Operator -.
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
void AddBinContent(Int_t bin) override
Increment bin content by 1.
2-D histogram with a short per channel (see TH1 documentation)
void AddBinContent(Int_t binx, Int_t biny, Double_t w) override
Increment 2D bin content by a weight w.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
~TH2S() override
Destructor.
TH2S & operator=(const TH2S &h1)
Operator =.
friend TH2S operator+(TH2S &h1, TH2S &h2)
Operator +.
void Copy(TObject &hnew) const override
Copy.
friend TH2S operator-(TH2S &h1, TH2S &h2)
Operator -.
friend TH2S operator*(Float_t c1, TH2S &h1)
Operator *.
friend TH2S operator/(TH2S &h1, TH2S &h2)
Operator /.
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
void AddBinContent(Int_t binx, Int_t biny) override
Increment 2D bin content by 1.
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
friend TH2S operator*(TH2S &h1, Float_t c1)
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
Service class for 2-D histogram classes.
TH1D * ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along Y.
void GetStats(Double_t *stats) const override
Fill the array stats from the contents of this histogram The array stats must be correctly dimensione...
Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05) override
Interface to TSpectrum2::Search the function finds peaks in this histogram where the width is > sigma...
virtual Double_t GetCorrelationFactor(Int_t axis1=1, Int_t axis2=2) const
Return correlation factor between axis1 and axis2.
virtual TProfile * DoProfile(bool onX, const char *name, Int_t firstbin, Int_t lastbin, Option_t *option) const
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 void FitSlicesY(TF1 *f1=nullptr, Int_t firstxbin=0, Int_t lastxbin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=nullptr)
Project slices along Y in case of a 2-D histogram, then fit each slice with function f1 and make a hi...
virtual Double_t GetBinWithContent2(Double_t c, Int_t &binx, Int_t &biny, Int_t firstxbin=1, Int_t lastxbin=-1, Int_t firstybin=1, Int_t lastybin=-1, Double_t maxdiff=0) const
compute first cell (binx,biny) in the range [firstxbin,lastxbin][firstybin,lastybin] for which diff =...
TProfile * ProfileX(const char *name="_pfx", Int_t firstybin=1, Int_t lastybin=-1, Option_t *option="") const
Project a 2-D histogram into a profile histogram along X.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
TH2 * Rebin(Int_t ngroup=2, const char *newname="", const Double_t *xbins=nullptr) override
Override TH1::Rebin as TH2::RebinX Rebinning in variable binning as for TH1 is not allowed If a non-n...
void FillN(Int_t, const Double_t *, const Double_t *, Int_t) override
Fill this histogram with an array x and weights w.
Int_t BufferFill(Double_t, Double_t) override
accumulate arguments in buffer.
TH1D * QuantilesY(Double_t prob=0.5, const char *name="_qy") const
Compute the Y distribution of quantiles in the other variable X name is the name of the returned hist...
TProfile * ProfileY(const char *name="_pfy", Int_t firstxbin=1, Int_t lastxbin=-1, Option_t *option="") const
Project a 2-D histogram into a profile histogram along Y.
void Copy(TObject &hnew) const override
Copy.
virtual TH1D * DoQuantiles(bool onX, const char *name, Double_t prob) const
Implementation of quantiles for x or y.
Double_t fTsumwxy
Total Sum of weight*X*Y.
void SetBinContent(Int_t bin, Double_t content) override
Set bin content.
Int_t Fill(const char *, Double_t) override
Increment bin with namex with a weight w.
Int_t BufferEmpty(Int_t action=0) override
Fill histogram with all entries in the buffer.
virtual Double_t Integral(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Option_t *="") const
virtual void DoFitSlices(bool onX, TF1 *f1, Int_t firstbin, Int_t lastbin, Int_t cut, Option_t *option, TObjArray *arr)
TH1D * QuantilesX(Double_t prob=0.5, const char *name="_qx") const
Compute the X distribution of quantiles in the other variable Y name is the name of the returned hist...
virtual void SetShowProjectionY(Int_t nbins=1)
When the mouse is moved in a pad containing a 2-d view of this histogram a second canvas shows the pr...
void SetBinContent(Int_t binx, Int_t biny, Int_t, Double_t content) override
void FillRandom(const char *fname, Int_t ntimes=5000, TRandom *rng=nullptr) override
Fill histogram following distribution in function fname.
virtual Double_t GetBinErrorUp(Int_t binx, Int_t biny)
void Reset(Option_t *option="") override
Reset this histogram: contents, errors, etc.
Double_t fScalefactor
Scale factor.
virtual TH1D * DoProjection(bool onX, const char *name, Int_t firstbin, Int_t lastbin, Option_t *option) const
Internal (protected) method for performing projection on the X or Y axis called by ProjectionX or Pro...
TH2 * RebinX(Int_t ngroup=2, const char *newname="") override
Rebin only the X axis see Rebin2D.
Double_t fTsumwy2
Total Sum of weight*Y*Y.
virtual void GetRandom2(Double_t &x, Double_t &y, TRandom *rng=nullptr)
Return 2 random numbers along axis x and y distributed according to the cell-contents of this 2-D his...
void SetBinContent(Int_t binx, Int_t biny, Double_t content) override
virtual Double_t GetCovariance(Int_t axis1=1, Int_t axis2=2) const
Return covariance between axis1 and axis2.
Int_t GetBin(Int_t binx, Int_t biny, Int_t binz=0) const override
Return Global bin number corresponding to binx,y,z.
Double_t GetBinContent(Int_t binx, Int_t biny, Int_t) const override
TH1D * ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along X.
void Smooth(Int_t ntimes=1, Option_t *option="") override
Smooth bin contents of this 2-d histogram using kernel algorithms similar to the ones used in the ras...
~TH2() override
Destructor.
Double_t GetBinContent(Int_t binx, Int_t biny) const override
virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Double_t &err, Option_t *option="") const
Return integral of bin contents in range [firstxbin,lastxbin],[firstybin,lastybin] for a 2-D histogra...
Double_t fTsumwy
Total Sum of weight*Y.
TH2()
2-D histogram default constructor.
TH2 & operator=(const TH2 &)=delete
TH1 * ShowBackground(Int_t niter=20, Option_t *option="same") override
This function calculates the background spectrum in this histogram.
virtual void SetShowProjectionX(Int_t nbins=1)
When the mouse is moved in a pad containing a 2-d view of this histogram a second canvas shows the pr...
Int_t Fill(Double_t) override
Invalid Fill method.
virtual Double_t GetBinErrorLow(Int_t binx, Int_t biny)
virtual TH2 * Rebin2D(Int_t nxgroup=2, Int_t nygroup=2, const char *newname="")
Rebin this histogram grouping nxgroup/nygroup bins along the xaxis/yaxis together.
virtual void FitSlicesX(TF1 *f1=nullptr, Int_t firstybin=0, Int_t lastybin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=nullptr)
Project slices along X in case of a 2-D histogram, then fit each slice with function f1 and make a hi...
virtual Int_t BufferFill(Double_t x, Double_t y, Double_t w)
accumulate arguments in buffer.
virtual void SetShowProjectionXY(Int_t nbinsY=1, Int_t nbinsX=1)
When the mouse is moved in a pad containing a 2-d view of this histogram two canvases show the projec...
Double_t Integral(Option_t *option="") const override
Return integral of bin contents.
void PutStats(Double_t *stats) override
Replace current statistics with the values in array stats.
virtual TH2 * RebinY(Int_t ngroup=2, const char *newname="")
Rebin only the Y axis see Rebin2D.
Mother of all ROOT objects.
This is the base class for the ROOT Random number generators.
#define Interpolate(a, x, b, y)