GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
GCubeF Class Reference

Detailed Description

Definition at line 124 of file GCube.h.

Public Member Functions

 GCubeF ()
 
 GCubeF (const char *name, const char *title, Int_t nbins, const Double_t *bins)
 
 GCubeF (const char *name, const char *title, Int_t nbins, const Float_t *bins)
 
 GCubeF (const char *name, const char *title, Int_t nbins, Double_t low, Double_t up)
 
 GCubeF (const GCubeF &)
 
 GCubeF (GCubeF &&) noexcept
 
 ~GCubeF ()
 
void AddBinContent (Int_t bin) override
 
void AddBinContent (Int_t bin, Double_t w) override
 
Int_t BufferEmpty (Int_t action=0) override
 
virtual Int_t BufferFill (Double_t x, Double_t y, Double_t z, Double_t w)
 
Int_t BufferFill (Double_t, Double_t) override
 
void Copy (TObject &rh) const override
 
void Draw (Option_t *option="") override
 
TH1 * DrawCopy (Option_t *option="", const char *name_postfix="_copy") const override
 
virtual Int_t Fill (const char *, const char *, Double_t)
 
Int_t Fill (const char *, Double_t) override
 
virtual Int_t Fill (const char *, Double_t, Double_t)
 
virtual Int_t Fill (const char *namex, const char *namey, const char *namez, Double_t w)
 
virtual Int_t Fill (Double_t x, Double_t y, Double_t z)
 
virtual Int_t Fill (Double_t x, Double_t y, Double_t z, Double_t w)
 
Int_t Fill (Double_t) override
 
virtual Int_t Fill (Double_t, const char *, Double_t)
 
Int_t Fill (Double_t, Double_t) override
 
void FillRandom (const char *fname, Int_t ntimes=5000, TRandom *rng=nullptr) override
 
void FillRandom (TH1 *h, Int_t ntimes=5000, TRandom *rng=nullptr) override
 
Int_t FindFirstBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const override
 
Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const override
 
virtual void FitSlicesZ (TF1 *f1=nullptr, Int_t binminx=0, Int_t binmaxx=-1, Int_t binminy=0, Int_t binmaxy=-1, Int_t cut=0, Option_t *option="QNR")
 
Int_t GetBin (Int_t binx, Int_t biny=0, Int_t binz=0) const override
 
Double_t GetBinContent (Int_t bin) const override
 
Double_t GetBinContent (Int_t bin, Int_t) const override
 
Double_t GetBinContent (Int_t binx, Int_t biny, Int_t binz) const override
 
virtual Double_t GetBinWithContent2 (Double_t c, Int_t &binx, Int_t &biny, Int_t &binz, Int_t firstxbin=1, Int_t lastxbin=-1, Int_t firstybin=1, Int_t lastybin=-1, Int_t firstzbin=1, Int_t lastzbin=-1, Double_t maxdiff=0) const
 
virtual Double_t GetCorrelationFactor (Int_t axis1=1, Int_t axis2=2) const
 
virtual Double_t GetCovariance (Int_t axis1=1, Int_t axis2=2) const
 
TH2F * GetMatrix (bool force=false)
 
virtual void GetRandom3 (Double_t &x, Double_t &y, Double_t &z)
 
void GetStats (Double_t *stats) const override
 
virtual Double_t Integral (Int_t firstxbin, Int_t lastxbin, Int_t firstybin, Int_t lastybin, Int_t firstzbin, Int_t lastzbin, Option_t *option="") const
 
Double_t Integral (Option_t *option="") const override
 
virtual Double_t IntegralAndError (Int_t firstxbin, Int_t lastxbin, Int_t firstybin, Int_t lastybin, Int_t firstzbin, Int_t lastzbin, Double_t &error, Option_t *option="") const
 
Double_t Interpolate (Double_t) const override
 
Double_t Interpolate (Double_t, Double_t) const override
 
Double_t Interpolate (Double_t, Double_t, Double_t) const override
 
Double_t KolmogorovTest (const TH1 *h2, Option_t *option="") const override
 
Long64_t Merge (TCollection *list) override
 
GCubeFoperator= (const GCubeF &h1)
 
GCubeFoperator= (GCubeF &&) noexcept
 
virtual TH1D * Projection (const char *name="_pr", Int_t firstBiny=0, Int_t lastBiny=-1, Int_t firstBinz=0, Int_t lastBinz=-1, Option_t *option="") const
 
void PutStats (Double_t *stats) override
 
virtual GCubeRebin3D (Int_t ngroup=2, const char *newname="")
 
void Reset (Option_t *option="") override
 
Double_t RetrieveBinContent (Int_t bin) const override
 
void SetBinContent (Int_t bin, Double_t content) override
 
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
 
void SetBinsLength (Int_t n=-1) override
 
virtual void SetShowProjection (const char *option="xy", Int_t nbins=1)
 
TH1 * ShowBackground (Int_t niter=20, Option_t *option="same") override
 
Int_t ShowPeaks (Double_t sigma=2, Option_t *option="", Double_t threshold=0.05) override
 
void Smooth (Int_t ntimes=1, Option_t *option="") override
 
void UpdateBinContent (Int_t bin, Double_t content) override
 

Protected Member Functions

Double_t DoIntegral (Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Int_t binz1, Int_t binz2, Double_t &error, Option_t *option, Bool_t doError=kFALSE) const override
 
TH2 * Matrix ()
 
void Matrix (TH2 *val)
 

Private Attributes

TH2 * fMatrix {nullptr}
 
Double_t fTsumwxy {0}
 
Double_t fTsumwxz {0}
 
Double_t fTsumwy {0}
 
Double_t fTsumwy2 {0}
 
Double_t fTsumwyz {0}
 
Double_t fTsumwz {0}
 
Double_t fTsumwz2 {0}
 

Friends

GCubeF operator* (Float_t c1, GCubeF &h1)
 
GCubeF operator* (GCubeF &h1, Float_t c1)
 
GCubeF operator* (GCubeF &h1, GCubeF &h2)
 
GCubeF operator+ (GCubeF &h1, GCubeF &h2)
 
GCubeF operator- (GCubeF &h1, GCubeF &h2)
 
GCubeF operator/ (GCubeF &h1, GCubeF &h2)
 
+ Inheritance diagram for GCubeF:
+ Collaboration diagram for GCubeF:

Constructor & Destructor Documentation

◆ GCubeF() [1/6]

GCubeF::GCubeF ( )

Definition at line 2629 of file GCube.cxx.

References SetBinsLength().

◆ GCubeF() [2/6]

GCubeF::GCubeF ( const char * name,
const char * title,
Int_t nbins,
Double_t low,
Double_t up )

Definition at line 2637 of file GCube.cxx.

◆ GCubeF() [3/6]

GCubeF::GCubeF ( const char * name,
const char * title,
Int_t nbins,
const Double_t * bins )

Definition at line 2650 of file GCube.cxx.

◆ GCubeF() [4/6]

GCubeF::GCubeF ( const char * name,
const char * title,
Int_t nbins,
const Float_t * bins )

Definition at line 2658 of file GCube.cxx.

◆ GCubeF() [5/6]

GCubeF::GCubeF ( const GCubeF & rhs)

Definition at line 2666 of file GCube.cxx.

References Copy().

◆ GCubeF() [6/6]

GCubeF::GCubeF ( GCubeF && rhs)
noexcept

Definition at line 2672 of file GCube.cxx.

References GCube::Copy().

◆ ~GCubeF()

GCubeF::~GCubeF ( )
default

Member Function Documentation

◆ AddBinContent() [1/2]

void GCubeF::AddBinContent ( Int_t bin)
inlineoverride

Definition at line 136 of file GCube.h.

◆ AddBinContent() [2/2]

void GCubeF::AddBinContent ( Int_t bin,
Double_t w )
inlineoverride

Definition at line 137 of file GCube.h.

◆ BufferEmpty()

Int_t GCube::BufferEmpty ( Int_t action = 0)
overrideinherited

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

Definition at line 70 of file GCube.cxx.

References GCube::Fill(), and GCube::Reset().

Referenced by GCube::BufferFill(), GCubeD::GetBinContent(), GetBinContent(), GCube::GetStats(), and GCube::Merge().

◆ BufferFill() [1/2]

Int_t GCube::BufferFill ( Double_t x,
Double_t y,
Double_t z,
Double_t w )
virtualinherited

Definition at line 182 of file GCube.cxx.

References GCube::BufferEmpty(), GCube::Fill(), and GCube::Reset().

◆ BufferFill() [2/2]

Int_t GCube::BufferFill ( Double_t ,
Double_t  )
inlineoverrideinherited

Definition at line 27 of file GCube.h.

Referenced by GCube::Fill(), and GCube::Fill().

◆ Copy()

void GCubeF::Copy ( TObject & rh) const
override

Definition at line 2701 of file GCube.cxx.

References GCube::Copy().

Referenced by GCubeF(), and operator=().

◆ DoIntegral()

Double_t GCube::DoIntegral ( Int_t binx1,
Int_t binx2,
Int_t biny1,
Int_t biny2,
Int_t binz1,
Int_t binz2,
Double_t & error,
Option_t * option,
Bool_t doError = kFALSE ) const
overrideprotectedinherited

Definition at line 223 of file GCube.cxx.

References GCube::GetBin().

Referenced by GCube::Integral(), and GCube::IntegralAndError().

◆ Draw()

void GCubeF::Draw ( Option_t * option = "")
inlineoverride

Definition at line 139 of file GCube.h.

References GetMatrix().

◆ DrawCopy()

TH1 * GCubeF::DrawCopy ( Option_t * option = "",
const char * name_postfix = "_copy" ) const
override

Definition at line 2706 of file GCube.cxx.

◆ Fill() [1/9]

virtual Int_t GCube::Fill ( const char * ,
const char * ,
Double_t  )
inlinevirtualinherited

Definition at line 35 of file GCube.h.

References GCube::Fill().

Referenced by GCube::Fill().

◆ Fill() [2/9]

Int_t GCube::Fill ( const char * ,
Double_t  )
inlineoverrideinherited

Definition at line 32 of file GCube.h.

References GCube::Fill().

Referenced by GCube::Fill().

◆ Fill() [3/9]

virtual Int_t GCube::Fill ( const char * ,
Double_t ,
Double_t  )
inlinevirtualinherited

Definition at line 34 of file GCube.h.

References GCube::Fill().

Referenced by GCube::Fill().

◆ Fill() [4/9]

Int_t GCube::Fill ( const char * namex,
const char * namey,
const char * namez,
Double_t w )
virtualinherited

◆ Fill() [5/9]

Int_t GCube::Fill ( Double_t x,
Double_t y,
Double_t z )
virtualinherited

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

Definition at line 316 of file GCube.cxx.

References GCube::BufferFill(), GCube::fTsumwxy, GCube::fTsumwxz, GCube::fTsumwy, GCube::fTsumwy2, GCube::fTsumwyz, GCube::fTsumwz, and GCube::fTsumwz2.

◆ Fill() [6/9]

Int_t GCube::Fill ( Double_t x,
Double_t y,
Double_t z,
Double_t w )
virtualinherited

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

Definition at line 407 of file GCube.cxx.

References GCube::BufferFill(), GCube::fTsumwxy, GCube::fTsumwxz, GCube::fTsumwy, GCube::fTsumwy2, GCube::fTsumwyz, GCube::fTsumwz, and GCube::fTsumwz2.

◆ Fill() [7/9]

Int_t GCube::Fill ( Double_t )
overrideinherited

Definition at line 309 of file GCube.cxx.

Referenced by GCube::BufferEmpty(), GCube::BufferFill(), GCube::FillRandom(), and GCube::Merge().

◆ Fill() [8/9]

virtual Int_t GCube::Fill ( Double_t ,
const char * ,
Double_t  )
inlinevirtualinherited

Definition at line 33 of file GCube.h.

References GCube::Fill().

Referenced by GCube::Fill().

◆ Fill() [9/9]

Int_t GCube::Fill ( Double_t ,
Double_t  )
inlineoverrideinherited

Definition at line 31 of file GCube.h.

References GCube::Fill().

Referenced by GCube::Fill().

◆ FillRandom() [1/2]

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

Definition at line 558 of file GCube.cxx.

References GCube::Fill().

◆ FillRandom() [2/2]

void GCube::FillRandom ( TH1 * h,
Int_t ntimes = 5000,
TRandom * rng = nullptr )
overrideinherited

Definition at line 638 of file GCube.cxx.

◆ FindFirstBinAbove()

Int_t GCube::FindFirstBinAbove ( Double_t threshold = 0,
Int_t axis = 1,
Int_t firstBin = 1,
Int_t lastBin = -1 ) const
overrideinherited

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.

Definition at line 682 of file GCube.cxx.

◆ FindLastBinAbove()

Int_t GCube::FindLastBinAbove ( Double_t threshold = 0,
Int_t axis = 1,
Int_t firstBin = 1,
Int_t lastBin = -1 ) const
overrideinherited

Definition at line 731 of file GCube.cxx.

◆ FitSlicesZ()

void GCube::FitSlicesZ ( TF1 * f1 = nullptr,
Int_t binminx = 0,
Int_t binmaxx = -1,
Int_t binminy = 0,
Int_t binmaxy = -1,
Int_t cut = 0,
Option_t * option = "QNR" )
virtualinherited

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 responsability 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 812 of file GCube.cxx.

References GCube::GetBin().

◆ GetBin()

Int_t GCube::GetBin ( Int_t binx,
Int_t biny = 0,
Int_t binz = 0 ) const
overrideinherited

◆ GetBinContent() [1/3]

Double_t GCubeF::GetBinContent ( Int_t bin) const
override

Definition at line 2723 of file GCube.cxx.

References GCube::BufferEmpty().

Referenced by GetBinContent(), and GetMatrix().

◆ GetBinContent() [2/3]

Double_t GCubeF::GetBinContent ( Int_t bin,
Int_t  ) const
inlineoverride

Definition at line 142 of file GCube.h.

References GetBinContent().

Referenced by GetBinContent().

◆ GetBinContent() [3/3]

Double_t GCubeF::GetBinContent ( Int_t binx,
Int_t biny,
Int_t binz ) const
inlineoverride

Definition at line 143 of file GCube.h.

References GCube::GetBin(), and GetBinContent().

◆ GetBinWithContent2()

Double_t GCube::GetBinWithContent2 ( Double_t c,
Int_t & binx,
Int_t & biny,
Int_t & binz,
Int_t firstxbin = 1,
Int_t lastxbin = -1,
Int_t firstybin = 1,
Int_t lastybin = -1,
Int_t firstzbin = 1,
Int_t lastzbin = -1,
Double_t maxdiff = 0 ) const
virtualinherited

Definition at line 946 of file GCube.cxx.

◆ GetCorrelationFactor()

Double_t GCube::GetCorrelationFactor ( Int_t axis1 = 1,
Int_t axis2 = 2 ) const
virtualinherited

Definition at line 1020 of file GCube.cxx.

References GCube::GetCovariance().

◆ GetCovariance()

Double_t GCube::GetCovariance ( Int_t axis1 = 1,
Int_t axis2 = 2 ) const
virtualinherited

Definition at line 1042 of file GCube.cxx.

References GCube::GetStats().

Referenced by GCube::GetCorrelationFactor().

◆ GetMatrix()

TH2F * GCubeF::GetMatrix ( bool force = false)

Definition at line 2680 of file GCube.cxx.

References GetBinContent(), and GCube::Matrix().

Referenced by Draw().

◆ GetRandom3()

void GCube::GetRandom3 ( Double_t & x,
Double_t & y,
Double_t & z )
virtualinherited

Definition at line 1089 of file GCube.cxx.

◆ GetStats()

void GCube::GetStats ( Double_t * stats) const
overrideinherited

fill the array stats from the contents of this histogram The array stats must be correctly dimensionned in the calling program. stats[0] = sumw stats[1] = sumw2 stats[2] = sumwx stats[3] = sumwx2 stats[4] = sumwy stats[5] = sumwy2 stats[6] = sumwxy stats[7] = sumwz stats[8] = sumwz2 stats[9] = sumwxz stats[10] = sumwyz

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

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

Definition at line 1138 of file GCube.cxx.

References GCube::BufferEmpty(), GCube::fTsumwxy, GCube::fTsumwxz, GCube::fTsumwy, GCube::fTsumwy2, GCube::fTsumwyz, GCube::fTsumwz, GCube::fTsumwz2, and GCube::GetBin().

Referenced by GCube::GetCovariance(), GCube::Merge(), GCube::Projection(), and GCube::Rebin3D().

◆ Integral() [1/2]

Double_t GCube::Integral ( Int_t firstxbin,
Int_t lastxbin,
Int_t firstybin,
Int_t lastybin,
Int_t firstzbin,
Int_t lastzbin,
Option_t * option = "" ) const
virtualinherited

Definition at line 1258 of file GCube.cxx.

References GCube::DoIntegral().

◆ Integral() [2/2]

Double_t GCube::Integral ( Option_t * option = "") const
overrideinherited

Definition at line 1247 of file GCube.cxx.

References GCube::Integral().

Referenced by GCube::Integral().

◆ IntegralAndError()

Double_t GCube::IntegralAndError ( Int_t firstxbin,
Int_t lastxbin,
Int_t firstybin,
Int_t lastybin,
Int_t firstzbin,
Int_t lastzbin,
Double_t & error,
Option_t * option = "" ) const
virtualinherited

Definition at line 1270 of file GCube.cxx.

References GCube::DoIntegral().

◆ Interpolate() [1/3]

Double_t GCube::Interpolate ( Double_t ) const
overrideinherited

Definition at line 1286 of file GCube.cxx.

◆ Interpolate() [2/3]

Double_t GCube::Interpolate ( Double_t ,
Double_t  ) const
overrideinherited

Definition at line 1297 of file GCube.cxx.

◆ Interpolate() [3/3]

Double_t GCube::Interpolate ( Double_t x,
Double_t y,
Double_t z ) const
overrideinherited

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 surronding 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)

Definition at line 1308 of file GCube.cxx.

◆ KolmogorovTest()

Double_t GCube::KolmogorovTest ( const TH1 * h2,
Option_t * option = "" ) const
overrideinherited

Statistical test of compatibility in shape between THIS histogram and h3, 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 combinatons of the 3 axis. The average of all the maximum distances obtained is used in the tests.

Code adapted by Rene Brun from original HBOOK routine HDIFF

Definition at line 1369 of file GCube.cxx.

◆ Matrix() [1/2]

TH2 * GCube::Matrix ( )
inlineprotectedinherited

Definition at line 107 of file GCube.h.

References GCube::fMatrix.

Referenced by GCubeD::GetMatrix(), GetMatrix(), and GCube::Reset().

◆ Matrix() [2/2]

void GCube::Matrix ( TH2 * val)
inlineprotectedinherited

Definition at line 106 of file GCube.h.

References GCube::fMatrix.

◆ Merge()

Long64_t GCube::Merge ( TCollection * list)
overrideinherited

Add all histograms in the collection to this histogram. This function computes the min/max for the axes, compute a new number of bins, if necessary, add bin contents, errors and statistics. If overflows are present and limits are different the function will fail. The function returns the total number of entries in the result histogram if the merge is successfull, -1 otherwise.

IMPORTANT remark. The 2 axis x and y may have different number of bins and different limits, BUT the largest bin width must be a multiple of the smallest bin width and the upper limit must also be a multiple of the bin width.

Definition at line 1581 of file GCube.cxx.

References GCube::BufferEmpty(), GCube::Copy(), GCube::Fill(), GCube::GetBin(), GCube::GetStats(), GCube::PutStats(), and GCube::Reset().

◆ operator=() [1/2]

GCubeF & GCubeF::operator= ( const GCubeF & h1)

Definition at line 2777 of file GCube.cxx.

References Copy().

◆ operator=() [2/2]

GCubeF & GCubeF::operator= ( GCubeF && h1)
noexcept

Definition at line 2787 of file GCube.cxx.

◆ Projection()

TH1D * GCube::Projection ( const char * name = "_pr",
Int_t firstBiny = 0,
Int_t lastBiny = -1,
Int_t firstBinz = 0,
Int_t lastBinz = -1,
Option_t * option = "" ) const
virtualinherited

method for performing projection

Definition at line 1832 of file GCube.cxx.

References GCube::GetStats().

◆ PutStats()

void GCube::PutStats ( Double_t * stats)
overrideinherited

◆ Rebin3D()

GCube * GCube::Rebin3D ( Int_t ngroup = 2,
const char * newname = "" )
virtualinherited

-*-*-*Rebin this histogram grouping ngroup/ngroup 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 ngroup indicates how many bins along the xaxis/yaxis/zaxis 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 GCube histogram with 40 x 40 x 40 bins hpxpy->Rebin3D(); // merges two bins along the xaxis, yaxis, and zaxis in one in hpxpy // Carefull: previous contents of hpxpy are lost hpxpy->Rebin3D(5); //merges five bins along the xaxis, yaxis, and zaxis in one in hpxpy GCube* hnew = hpxpy->Rebin3D(5,"hnew"); // creates a new histogram hnew // merging 5 bins of h1 along the xaxis, yaxis, and zaxis in one bin

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

Definition at line 2097 of file GCube.cxx.

References GCube::GetBin(), GCube::GetStats(), and GCube::PutStats().

◆ Reset()

void GCubeF::Reset ( Option_t * option = "")
override

Definition at line 2742 of file GCube.cxx.

References GCube::Reset().

◆ RetrieveBinContent()

Double_t GCubeF::RetrieveBinContent ( Int_t bin) const
inlineoverride

Definition at line 148 of file GCube.h.

◆ SetBinContent() [1/3]

void GCubeF::SetBinContent ( Int_t bin,
Double_t content )
override

Definition at line 2751 of file GCube.cxx.

Referenced by SetBinContent().

◆ SetBinContent() [2/3]

void GCubeF::SetBinContent ( Int_t bin,
Int_t ,
Double_t content )
inlineoverride

Definition at line 150 of file GCube.h.

References SetBinContent().

Referenced by SetBinContent().

◆ SetBinContent() [3/3]

void GCubeF::SetBinContent ( Int_t binx,
Int_t biny,
Int_t binz,
Double_t content )
inlineoverride

Definition at line 151 of file GCube.h.

References GCube::GetBin(), and SetBinContent().

◆ SetBinsLength()

void GCubeF::SetBinsLength ( Int_t n = -1)
override

Definition at line 2765 of file GCube.cxx.

Referenced by GCubeF().

◆ SetShowProjection()

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

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 2459 of file GCube.cxx.

◆ ShowBackground()

TH1 * GCube::ShowBackground ( Int_t niter = 20,
Option_t * option = "same" )
overrideinherited

Definition at line 2487 of file GCube.cxx.

◆ ShowPeaks()

Int_t GCube::ShowPeaks ( Double_t sigma = 2,
Option_t * option = "",
Double_t threshold = 0.05 )
overrideinherited

Definition at line 2497 of file GCube.cxx.

◆ Smooth()

void GCube::Smooth ( Int_t ntimes = 1,
Option_t * option = "" )
overrideinherited

Definition at line 2510 of file GCube.cxx.

References GCube::GetBin().

◆ UpdateBinContent()

void GCubeF::UpdateBinContent ( Int_t bin,
Double_t content )
inlineoverride

Definition at line 156 of file GCube.h.

Friends And Related Symbol Documentation

◆ operator* [1/3]

GCubeF operator* ( Float_t c1,
GCubeF & h1 )
friend

Definition at line 2797 of file GCube.cxx.

◆ operator* [2/3]

GCubeF operator* ( GCubeF & h1,
Float_t c1 )
friend

Definition at line 160 of file GCube.h.

◆ operator* [3/3]

GCubeF operator* ( GCubeF & h1,
GCubeF & h2 )
friend

Definition at line 2827 of file GCube.cxx.

◆ operator+

GCubeF operator+ ( GCubeF & h1,
GCubeF & h2 )
friend

Definition at line 2807 of file GCube.cxx.

◆ operator-

GCubeF operator- ( GCubeF & h1,
GCubeF & h2 )
friend

Definition at line 2817 of file GCube.cxx.

◆ operator/

GCubeF operator/ ( GCubeF & h1,
GCubeF & h2 )
friend

Definition at line 2837 of file GCube.cxx.

Member Data Documentation

◆ fMatrix

TH2* GCube::fMatrix {nullptr}
privateinherited

! Transient pointer to the 2D-Matrix used in Draw() or GetMatrix()

Definition at line 117 of file GCube.h.

Referenced by GCube::Copy(), GCube::Matrix(), and GCube::Matrix().

◆ fTsumwxy

Double_t GCube::fTsumwxy {0}
privateinherited

◆ fTsumwxz

Double_t GCube::fTsumwxz {0}
privateinherited

Definition at line 115 of file GCube.h.

Referenced by GCube::Fill(), GCube::Fill(), GCube::Fill(), GCube::GetStats(), and GCube::PutStats().

◆ fTsumwy

Double_t GCube::fTsumwy {0}
privateinherited

◆ fTsumwy2

Double_t GCube::fTsumwy2 {0}
privateinherited

◆ fTsumwyz

Double_t GCube::fTsumwyz {0}
privateinherited

Definition at line 116 of file GCube.h.

Referenced by GCube::Fill(), GCube::Fill(), GCube::Fill(), GCube::GetStats(), and GCube::PutStats().

◆ fTsumwz

Double_t GCube::fTsumwz {0}
privateinherited

Definition at line 113 of file GCube.h.

Referenced by GCube::Fill(), GCube::Fill(), GCube::Fill(), GCube::GetStats(), and GCube::PutStats().

◆ fTsumwz2

Double_t GCube::fTsumwz2 {0}
privateinherited

Definition at line 114 of file GCube.h.

Referenced by GCube::Fill(), GCube::Fill(), GCube::Fill(), GCube::GetStats(), and GCube::PutStats().