111 Warning(
"TH3",
"nbinsy is <=0 - set to nbinsy = 1");
115 Warning(
"TH3",
"nbinsz is <=0 - set to nbinsz = 1");
239 if (
action == 0)
return 0;
263 if (z < zmin) zmin = z;
264 if (z > zmax) zmax = z;
284 Fill(buffer[4*i+2],buffer[4*i+3],buffer[4*i+4],buffer[4*i+1]);
337 Error(
"Fill",
"Invalid signature - do nothing");
433#ifdef __cpp_lib_atomic_ref
447 throw std::logic_error(
"TH3 cannot be filled atomically when buffer is active.");
449 throw std::logic_error(
450 "Weighted filling 'Sumw2()' needs to be activated before FillThreadSafe is called with weights");
465 std::atomic_ref{
fArray[bin]} +=
w;
858 if (!
f1) {
Error(
"FillRandom",
"Function: %s is not a TF3, is a %s",
fobj->GetName(),
fobj->IsA()->GetName());
return; }
868 Info(
"FillRandom",
"Using function axis and range ([%g,%g],[%g,%g],[%g,%g])",
xmin,
xmax,
ymin,
ymax,zmin,zmax);
903 if (integral[nbins] == 0 ) {
905 Error(
"FillRandom",
"Integral = zero");
return;
907 for (bin=1;bin<=nbins;bin++) integral[bin] /= integral[nbins];
912 for (loop=0;loop<
ntimes;loop++) {
947 if (!
h) {
Error(
"FillRandom",
"Null histogram");
return; }
949 Error(
"FillRandom",
"Histograms with different dimensions");
return;
952 if (
h->ComputeIntegral() == 0)
return;
957 for (loop=0;loop<
ntimes;loop++) {
958 h3->GetRandom3(
x,
y,z,
rng);
1042 if (
f1 ==
nullptr) {
1059 for (ipar=0;ipar<=
npar;ipar++) {
1067 title =
"chisquare";
1069 if (xbins->fN == 0 &&
ybins->fN == 0) {
1073 }
else if (xbins->fN > 0 &&
ybins->fN > 0 ) {
1100 Info(
"FitSlicesZ",
"Slice (%d,%d) skipped, the number of entries is zero or smaller than the given cut value, n=%f",
binx,
biny,
nentries);
1114 for (ipar=0;ipar<
npar;ipar++) {
1122 Info(
"FitSlicesZ",
"Fitted slice (%d,%d) skipped, the number of fitted points is too small, n=%d",
binx,
biny,
npfits);
1178 Error(
"GetBinWithContent3",
"function is only valid for 3-D histograms");
1211 Error(
"GetCorrelationFactor",
"Wrong parameters");
1229 Error(
"GetCovariance",
"Wrong parameters");
1245 if (
sumw == 0)
return 0;
1291 if (integral == 0 ) {
x = 0;
y = 0; z = 0;
return;}
1332 for (bin=0;bin<11;bin++)
stats[bin] = 0;
1372 stats[1] += err*err;
1450 Error(
"Interpolate",
"This function must be called with 3 arguments for a TH3");
1460 Error(
"Interpolate",
"This function must be called with 3 arguments for a TH3");
1494 Error(
"Interpolate",
"Cannot interpolate outside histogram domain.");
1556 if (h2 ==
nullptr)
return 0;
1572 Error(
"KolmogorovTest",
"Histograms must be 3-D\n");
1578 Error(
"KolmogorovTest",
"Number of channels in X is different, %d and %d\n",
ncx1,
ncx2);
1582 Error(
"KolmogorovTest",
"Number of channels in Y is different, %d and %d\n",
ncy1,
ncy2);
1586 Error(
"KolmogorovTest",
"Number of channels in Z is different, %d and %d\n",
ncz1,
ncz2);
1597 Error(
"KolmogorovTest",
"histograms with different binning along X");
1603 Error(
"KolmogorovTest",
"histograms with different binning along Y");
1609 Error(
"KolmogorovTest",
"histograms with different binning along Z");
1629 sum2 += h2->GetBinContent(bin);
1641 Error(
"KolmogorovTest",
"Integral is zero for h1=%s\n",
h1->
GetName());
1645 Error(
"KolmogorovTest",
"Integral is zero for h2=%s\n",h2->GetName());
1663 Error(
"KolmogorovTest",
"Errors are zero for both histograms\n");
1669 int order[3] = {0,1,2};
1683 for (i =
binbeg[order[0] ]; i <=
binend[order[0] ]; i++) {
1685 for ( k =
binbeg[order[2] ]; k <=
binend[order[2] ]; k++) {
1686 ibin[ order[0] ] = i;
1687 ibin[ order[1] ] =
j;
1688 ibin[ order[2] ] = k;
1691 rsum2 +=
s2*h2->GetBinContent(bin);
1729 printf(
" Kolmo Prob h2 = %s, sum2=%g\n",h2->GetName(),
sum2);
1732 printf(
" Kolmo Probabil = %f for shape alone, =%f for normalisation alone\n",
prb1,
prb2);
1736 if (
TMath::Abs(
rsum2-1) > 0.002)
Warning(
"KolmogorovTest",
"Numerical problems with h2=%s\n",h2->GetName());
1924 Error(
"DoProject1D",
"Histogram with name %s must be a TH1D and is a %s",
name,
h1obj->ClassName());
1933 if (bins->
fN == 0) {
1939 if (bins->
fN == 0) {
1951 if (bins->
fN == 0) {
1957 if (bins->
fN == 0) {
1987 if (
out1 ==
nullptr &&
out2 ==
nullptr) {
2074 double eps = 1.E-12;
2141 Error(
"DoProject2D",
"Histogram with name %s must be a TH2D and is a %s",
name,
h2obj->ClassName());
2156 h2->GetYaxis()->Set(
projX->GetNbins(),&xbins->fArray[
ixmin-1]);
2163 h2->GetYaxis()->Set(
nx,&xbins->fArray[
ixmin-1]);
2173 if (xbins->fN == 0 &&
ybins->fN == 0) {
2176 }
else if (
ybins->fN == 0) {
2179 }
else if (xbins->fN == 0) {
2186 if (xbins->fN == 0 &&
ybins->fN == 0) {
2189 }
else if (
ybins->fN == 0) {
2192 }
else if (xbins->fN == 0) {
2205 h2->GetXaxis()->ImportAttributes(
projY);
2206 h2->GetYaxis()->ImportAttributes(
projX);
2214 h2->GetXaxis()->SetBinLabel(i,
lb->String().Data());
2223 h2->GetYaxis()->SetBinLabel(i,
lb->String().Data());
2233 if ( computeErrors && (h2->GetSumw2N() != h2->GetNcells()) ) h2->Sumw2();
2236 const TAxis* out =
nullptr;
2293 h2->SetBinContent(iy , ix,
cont);
2304 double eps = 1.E-12;
2353 h2->PutStats(
stats);
2363 Double_t entries = h2->GetEffectiveEntries();
2365 h2->SetEntries( entries );
2450 Error(
"Project3D",
"No projection axis specified - return a NULL pointer");
2489 title +=
" "; title +=
ptype; title +=
" projection";
2613 Error(
"DoProjectProfile2D",
"Histogram with name %s must be a TProfile2D and is a %s",
name,
p2obj->ClassName());
2628 p2->GetYaxis()->Set(
projX->GetNbins(),&xbins->fArray[
ixmin-1]);
2635 p2->GetYaxis()->Set(
nx,&xbins->fArray[
ixmin-1]);
2643 if (xbins->fN == 0 &&
ybins->fN == 0) {
2646 }
else if (
ybins->fN == 0) {
2649 }
else if (xbins->fN == 0) {
2656 if (xbins->fN == 0 &&
ybins->fN == 0) {
2659 }
else if (
ybins->fN == 0) {
2662 }
else if (xbins->fN == 0) {
2672 p2->GetXaxis()->ImportAttributes(
projY);
2673 p2->GetYaxis()->ImportAttributes(
projX);
2680 p2->GetXaxis()->SetBinLabel(i,
lb->String().Data());
2690 p2->GetYaxis()->SetBinLabel(i,
lb->String().Data());
2708 if (
useWeights && (
p2->GetBinSumw2()->fN !=
p2->GetNcells() ) )
p2->Sumw2();
2749 if (!
cont)
continue;
2773 entries =
p2->GetEffectiveEntries();
2775 p2->SetEntries( entries );
2778 p2->SetEntries(entries);
2836 Error(
"Project3D",
"No projection axis specified - return a NULL pointer");
2863 title +=
" profile "; title +=
ptype; title +=
" projection";
3111 for (i = 0; i <
nxgroup; i++) {
3115 for (k =0; k <
nzgroup; k++) {
3454 hnew->SetEntries(entries);
3489 if (bin < 0)
return;
3500 if (
R__b.IsReading()) {
3569 :
TH3(
name,title,
nbinsx,xlow,xup,
nbinsy,ylow,yup,
nbinsz,
zlow,
zup)
3612 h3c.TH3C::Copy(*
this);
3706 if (
R__b.IsReading()) {
3708 if (
R__b.GetParent() &&
R__b.GetVersionOwner() < 22300)
return;
3740 h3c.TH3C::Copy(*
this);
3752 hnew.SetDirectory(
nullptr);
3764 hnew.SetDirectory(
nullptr);
3776 hnew.SetDirectory(
nullptr);
3788 hnew.SetDirectory(
nullptr);
3800 hnew.SetDirectory(
nullptr);
3838 :
TH3(
name,title,
nbinsx,xlow,xup,
nbinsy,ylow,yup,
nbinsz,
zlow,
zup)
3881 h3s.TH3S::Copy(*
this);
3946 if (
R__b.IsReading()) {
3948 if (
R__b.GetParent() &&
R__b.GetVersionOwner() < 22300)
return;
3980 h3s.TH3S::Copy(*
this);
3992 hnew.SetDirectory(
nullptr);
4004 hnew.SetDirectory(
nullptr);
4016 hnew.SetDirectory(
nullptr);
4028 hnew.SetDirectory(
nullptr);
4040 hnew.SetDirectory(
nullptr);
4078 :
TH3(
name,title,
nbinsx,xlow,xup,
nbinsy,ylow,yup,
nbinsz,
zlow,
zup)
4121 h3i.TH3I::Copy(*
this);
4187 h3i.TH3I::Copy(*
this);
4199 hnew.SetDirectory(
nullptr);
4211 hnew.SetDirectory(
nullptr);
4223 hnew.SetDirectory(
nullptr);
4235 hnew.SetDirectory(
nullptr);
4247 hnew.SetDirectory(
nullptr);
4285 :
TH3(
name,title,
nbinsx,xlow,xup,
nbinsy,ylow,yup,
nbinsz,
zlow,
zup)
4328 h3l.TH3L::Copy(*
this);
4394 h3l.TH3L::Copy(*
this);
4406 hnew.SetDirectory(
nullptr);
4418 hnew.SetDirectory(
nullptr);
4430 hnew.SetDirectory(
nullptr);
4442 hnew.SetDirectory(
nullptr);
4454 hnew.SetDirectory(
nullptr);
4492 :
TH3(
name,title,
nbinsx,xlow,xup,
nbinsy,ylow,yup,
nbinsz,
zlow,
zup)
4535 h3f.TH3F::Copy(*
this);
4576 if (
R__b.IsReading()) {
4578 if (
R__b.GetParent() &&
R__b.GetVersionOwner() < 22300)
return;
4610 h3f.TH3F::Copy(*
this);
4622 hnew.SetDirectory(
nullptr);
4634 hnew.SetDirectory(
nullptr);
4646 hnew.SetDirectory(
nullptr);
4658 hnew.SetDirectory(
nullptr);
4670 hnew.SetDirectory(
nullptr);
4708 :
TH3(
name,title,
nbinsx,xlow,xup,
nbinsy,ylow,yup,
nbinsz,
zlow,
zup)
4793 if (
R__b.IsReading()) {
4795 if (
R__b.GetParent() &&
R__b.GetVersionOwner() < 22300)
return;
4840 hnew.SetDirectory(
nullptr);
4852 hnew.SetDirectory(
nullptr);
4864 hnew.SetDirectory(
nullptr);
4876 hnew.SetDirectory(
nullptr);
4888 hnew.SetDirectory(
nullptr);
short Style_t
Style number (short)
int Int_t
Signed integer 4 bytes (int)
short Color_t
Color number (short)
short Version_t
Class version identifier (short)
char Char_t
Character 1 byte (char)
float Float_t
Float 4 bytes (float)
short Short_t
Signed Short integer 2 bytes (short)
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
TH3C operator-(TH3C const &h1, TH3C const &h2)
Operator -.
TH3C operator+(TH3C const &h1, TH3C const &h2)
Operator +.
TH3C operator/(TH3C const &h1, TH3C const &h2)
Operator /.
TH3C operator*(Float_t c1, TH3C const &h3c)
Operator *.
R__EXTERN TRandom * gRandom
Array of chars or bytes (8 bits per element).
void Streamer(TBuffer &) override
Stream a TArrayC object.
void Set(Int_t n) override
Set size of this array to n chars.
Array of doubles (64 bits per element).
void Streamer(TBuffer &) override
Stream a TArrayD object.
void Set(Int_t n) override
Set size of this array to n doubles.
Array of floats (32 bits per element).
void Set(Int_t n) override
Set size of this array to n floats.
void Streamer(TBuffer &) override
Stream a TArrayF object.
Array of integers (32 bits per element).
void Set(Int_t n) override
Set size of this array to n ints.
Array of long64s (64 bits per element).
void Set(Int_t n) override
Set size of this array to n long64s.
Array of shorts (16 bits per element).
void Set(Int_t n) override
Set size of this array to n shorts.
void Streamer(TBuffer &) override
Stream a TArrayS object.
virtual void Set(Int_t n)=0
virtual void Streamer(TBuffer &)
virtual Color_t GetTitleColor() const
virtual Color_t GetLabelColor() const
virtual Int_t GetNdivisions() const
virtual Color_t GetAxisColor() const
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
virtual Style_t GetTitleFont() const
virtual Float_t GetLabelOffset() const
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels.
virtual Style_t GetLabelFont() const
virtual void SetTitleFont(Style_t font=62)
Set the title font.
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
virtual void SetLabelFont(Style_t font=62)
Set labels' font.
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title.
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
virtual Float_t GetTitleSize() const
virtual Float_t GetLabelSize() const
virtual Float_t GetTickLength() const
virtual Float_t GetTitleOffset() const
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length.
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
Class to manage histogram axis.
virtual void SetBinLabel(Int_t bin, const char *label)
Set label for bin.
Bool_t IsAlphanumeric() const
const char * GetTitle() const override
Returns title of object.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
const TArrayD * GetXbins() const
void SetCanExtend(Bool_t canExtend)
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual void Set(Int_t nbins, Double_t xmin, Double_t xmax)
Initialize axis with fix bins.
virtual Int_t FindFixBin(Double_t x) const
Find bin number corresponding to abscissa x
Int_t GetLast() const
Return last bin on the axis i.e.
virtual void ImportAttributes(const TAxis *axis)
Copy axis attributes to this.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Int_t GetFirst() const
Return first bin on the axis i.e.
Buffer base class used for serializing objects.
virtual TH1 * GetHistogram() const
Return a pointer to the histogram used to visualise the function Note that this histogram is managed ...
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
Double_t GetChisquare() const
Return the Chisquare after fitting. See ROOT::Fit::FitResult::Chi2()
virtual void SetRange(Double_t xmin, Double_t xmax)
Initialize the upper and lower bounds to draw the function.
virtual Int_t GetNpar() const
virtual Int_t GetNumberFitPoints() const
virtual Double_t * GetParameters() const
virtual void GetRange(Double_t *xmin, Double_t *xmax) const
Return range of a generic N-D function.
virtual const char * GetParName(Int_t ipar) const
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=nullptr)
Evaluate function with given coordinates and parameters.
virtual void SetParameters(const Double_t *params)
virtual Double_t GetParameter(Int_t ipar) const
A 3-Dim function with parameters.
1-D histogram with a double per channel (see TH1 documentation)
void Reset(Option_t *option="") override
Reset.
TH1 is the base class of all histogram classes in ROOT.
Double_t * fBuffer
[fBufferSize] entry buffer
virtual Double_t GetEffectiveEntries() const
Number of effective entries of the histogram.
Int_t fNcells
Number of bins(1D), cells (2D) +U/Overflows.
void Copy(TObject &hnew) const override
Copy this histogram structure to newth1.
Double_t fTsumw
Total Sum of weights.
Double_t fTsumw2
Total Sum of squares of weights.
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 n...
Double_t fTsumwx2
Total Sum of weight*X*X.
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
virtual Int_t GetNbinsY() const
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual Int_t GetNbinsZ() const
virtual Int_t GetDimension() const
void Streamer(TBuffer &) override
Stream a class object.
@ kIsNotW
Histogram is forced to be not weighted even when the histogram is filled with weighted.
virtual Bool_t CanExtendAllAxes() const
Returns true if all axes are extendable.
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
virtual Int_t GetNcells() const
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
TVirtualHistPainter * GetPainter(Option_t *option="")
Return pointer to painter.
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
virtual Int_t GetNbinsX() const
Int_t fBufferSize
fBuffer size
Int_t fDimension
! Histogram dimension (1, 2 or 3 dim)
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-empt...
static Int_t fgBufferSize
! Default buffer size for automatic histograms
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetBuffer(Int_t bufsize, Option_t *option="")
Set the maximum number of entries to be kept in the buffer.
UInt_t GetAxisLabelStatus() const
Internal function used in TH1::Fill to see which axis is full alphanumeric, i.e.
Double_t * fIntegral
! Integral of bins used by GetRandom
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
virtual Double_t RetrieveBinContent(Int_t bin) const =0
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
void Paint(Option_t *option="") override
Control routine to paint any kind of histograms.
virtual void ResetStats()
Reset the statistics including the number of entries and replace with values calculated from bin cont...
@ kNstat
Size of statistics data (up to TProfile3D)
Double_t fEntries
Number of entries.
TAxis fZaxis
Z axis descriptor.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
TAxis fXaxis
X axis descriptor.
virtual void ExtendAxis(Double_t x, TAxis *axis)
Histogram is resized along axis such that x is in the axis range.
TArrayD fSumw2
Array of sum of squares of weights.
virtual Int_t GetSumw2N() const
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
Bool_t GetStatOverflowsBehaviour() const
TObject * Clone(const char *newname="") const override
Make a complete copy of the underlying object.
TAxis fYaxis
Y axis descriptor.
TVirtualHistPainter * fPainter
! Pointer to histogram painter
virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax)
Redefine x axis parameters.
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
virtual void SetEntries(Double_t n)
static Bool_t fgDefaultSumw2
! Flag to call TH1::Sumw2 automatically at histogram creation time
virtual void UpdateBinContent(Int_t bin, Double_t content)=0
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
Double_t fTsumwx
Total Sum of weight*X.
virtual Double_t ComputeIntegral(Bool_t onlyPositive=false)
Compute integral (normalized cumulative sum of bins) w/o under/overflows The result is stored in fInt...
2-D histogram with a double per channel (see TH1 documentation)
3-D histogram with a byte per channel (see TH1 documentation)
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
TClass * IsA() const override
~TH3C() override
Destructor.
void Reset(Option_t *option="") override
Reset this histogram: contents, errors, etc.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
TH3C & operator=(const TH3C &h1)
Operator =.
void Streamer(TBuffer &) override
Stream an object of class TH3C.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
3-D histogram with a double per channel (see TH1 documentation)
TClass * IsA() const override
void Streamer(TBuffer &) override
Stream an object of class TH3D.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH3D() override
Destructor.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
TH3D & operator=(const TH3D &h1)
Operator =.
3-D histogram with a float per channel (see TH1 documentation)
TH3F & operator=(const TH3F &h1)
Operator =.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH3F() override
Destructor.
void Streamer(TBuffer &) override
Stream an object of class TH3F.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
TClass * IsA() const override
3-D histogram with an int per channel (see TH1 documentation)
TH3I & operator=(const TH3I &h1)
Operator =.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH3I() override
Destructor.
3-D histogram with a long64 per channel (see TH1 documentation)
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
TH3L & operator=(const TH3L &h1)
Operator =.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH3L() override
Destructor.
3-D histogram with a short per channel (see TH1 documentation)
void Streamer(TBuffer &) override
Stream an object of class TH3S.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
~TH3S() override
Destructor.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
TClass * IsA() const override
TH3S & operator=(const TH3S &h1)
Operator =.
The 3-D histogram classes derived from the 1-D histogram classes.
virtual TH3 * Rebin3D(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.
Int_t BufferEmpty(Int_t action=0) override
Fill histogram with all entries in the buffer.
Double_t fTsumwy
Total Sum of weight*Y.
Double_t fTsumwy2
Total Sum of weight*Y*Y.
virtual Double_t GetCovariance(Int_t axis1=1, Int_t axis2=2) const
Return covariance between axis1 and axis2.
void GetStats(Double_t *stats) const override
Fill the array stats from the contents of this histogram The array stats must be correctly dimensione...
void Copy(TObject &hnew) const override
Copy.
virtual TH2D * DoProject2D(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
Double_t fTsumwxz
Total Sum of weight*X*Z.
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 TH1D * 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
Project a 3-D histogram into a 1-D histogram along Y.
Double_t Interpolate(Double_t x, Double_t y) const override
Not yet implemented.
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-d...
void AddBinContent(Int_t binx, Int_t biny, Int_t binz)
Increment 3D bin content by 1.
void Reset(Option_t *option="") override
Reset this histogram: contents, errors, etc.
~TH3() override
Destructor.
Int_t Fill(Double_t) override
Invalid Fill method.
virtual TH3 * RebinY(Int_t ngroup=2, const char *newname="")
Rebin only the Y axis see Rebin3D.
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 histogra...
virtual TH1D * 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
Project a 3-D histogram into a 1-D histogram along Z.
virtual TH1D * 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
Project a 3-D histogram into a 1-D histogram along X.
virtual TProfile2D * Project3DProfile(Option_t *option="xy") const
Project a 3-d histogram into a 2-d profile histograms depending on the option parameter option may co...
Double_t fTsumwz2
Total Sum of weight*Z*Z.
Double_t fTsumwxy
Total Sum of weight*X*Y.
virtual TH1 * Project3D(Option_t *option="x") const
Project a 3-d histogram into 1 or 2-d histograms depending on the option parameter,...
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,...
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 DoProjectProfile...
virtual TH3 * RebinZ(Int_t ngroup=2, const char *newname="")
Rebin only the Z axis see Rebin3D.
void Streamer(TBuffer &) override
Stream an object of class TH3.
Double_t Integral(Option_t *option="") const override
Return integral of bin contents.
virtual Int_t BufferFill(Double_t x, Double_t y, Double_t z, Double_t w)
Accumulate arguments in buffer.
void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr) override
Fill histogram following distribution in function fname.
TClass * IsA() const 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 proj...
TH3 * RebinX(Int_t ngroup=2, const char *newname="") override
Rebin only the X axis see Rebin3D.
virtual Double_t GetCorrelationFactor(Int_t axis1=1, Int_t axis2=2) const
Return correlation factor between axis1 and axis2.
virtual TH1D * 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
internal method performing the projection to 1D histogram called from TH3::Project3D
Double_t fTsumwz
Total Sum of weight*Z.
Double_t GetBinContent(Int_t binx, Int_t biny, Int_t binz) const override
void SetBinContent(Int_t bin, Double_t content) override
Set bin content.
Double_t fTsumwyz
Total Sum of weight*Y*Z.
TH3()
Default constructor.
Int_t GetBin(Int_t binx, Int_t biny, Int_t binz) const override
See comments in TH1::GetBin.
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-...
virtual TProfile2D * DoProjectProfile2D(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
void PutStats(Double_t *stats) override
Replace current statistics with the values in array stats.
static THLimitsFinder * GetLimitsFinder()
Return pointer to the current finder.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Collectable string class.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Profile2D histograms are used to display the mean value of Z and its error for each cell in X,...
This is the base class for the ROOT Random number generators.
Double_t Rndm() override
Machine independent random number generator.
void ToLower()
Change string to lower-case.
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
void ToUpper()
Change string to upper case.
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual void SetShowProjection(const char *option, Int_t nbins)=0
small helper class to store/restore gPad context in TPad methods
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
Bool_t Permute(Int_t n, Int_t *a)
Simple recursive algorithm to find the permutations of n natural numbers, not necessarily all distinc...
Double_t QuietNaN()
Returns a quiet NaN as defined by IEEE 754.
Double_t Floor(Double_t x)
Rounds x downward, returning the largest integral value that is not greater than x.
Double_t Log(Double_t x)
Returns the natural logarithm of x.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Mean(Long64_t n, const T *a, const Double_t *w=nullptr)
Returns the weighted mean of an array a with length n.
Double_t KolmogorovProb(Double_t z)
Calculates the Kolmogorov distribution function,.
Long64_t BinarySearch(Long64_t n, const T *array, T value)
Binary search in an array of n values to locate value.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.