Definition at line 13 of file GCube.h.
|
| GCube ()=default |
|
| GCube (const char *name, const char *title, Int_t nbins, const Double_t *bins) |
|
| GCube (const char *name, const char *title, Int_t nbins, const Float_t *bins) |
|
| GCube (const char *name, const char *title, Int_t nbins, Double_t low, Double_t up) |
|
| GCube (const GCube &) |
|
| GCube (GCube &&) noexcept |
|
| ~GCube ()=default |
|
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 &obj) 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 |
|
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 |
|
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 |
|
GCube & | operator= (const GCube &) |
|
GCube & | operator= (GCube &&) 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 GCube * | Rebin3D (Int_t ngroup=2, const char *newname="") |
|
void | Reset (Option_t *option="") 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 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" ) |
|
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 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 GetBin().
void GCube::GetStats |
( |
Double_t * | stats | ) |
const |
|
override |
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 BufferEmpty(), fTsumwxy, fTsumwxz, fTsumwy, fTsumwy2, fTsumwyz, fTsumwz, fTsumwz2, and GetBin().
Referenced by GetCovariance(), Merge(), Projection(), and Rebin3D().
GCube * GCube::Rebin3D |
( |
Int_t | ngroup = 2, |
|
|
const char * | newname = "" ) |
|
virtual |
-*-*-*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 GetBin(), GetStats(), and PutStats().