# class TProfile3D: public TH3D

```
Profile3D histograms are used to display the mean
value of T and its RMS for each cell in X,Y,Z.
Profile3D histograms are in many cases an
The inter-relation of three measured quantities X, Y, Z and T can always
be visualized by a four-dimensional histogram or scatter-plot;
its representation on the line-printer is not particularly
satisfactory, except for sparse data. If T is an unknown (but single-valued)
approximate function of X,Y,Z this function is displayed by a profile3D histogram with
much better precision than by a scatter-plot.

The following formulae show the cumulated contents (capital letters) and the values
displayed by the printing or plotting routines (small letters) of the elements for cell I, J.

2
H(I,J,K)  =  sum T                      E(I,J,K)  =  sum T
l(I,J,K)  =  sum l                      L(I,J,K)  =  sum l
h(I,J,K)  =  H(I,J,K)/L(I,J,K)          s(I,J,K)  =  sqrt(E(I,J,K)/L(I,J,K)- h(I,J,K)**2)
e(I,J,K)  =  s(I,J,K)/sqrt(L(I,J,K))

In the special case where s(I,J,K) is zero (eg, case of 1 entry only in one cell)
e(I,J,K) is computed from the average of the s(I,J,K) for all cells,
if the static function TProfile3D::Approximate has been called.
This simple/crude approximation was suggested in order to keep the cell
during a fit operation. But note that this approximation is not the default behaviour.

Example of a profile3D histogram
{
TCanvas *c1 = new TCanvas("c1","Profile histogram example",200,10,700,500);
hprof3d  = new TProfile3D("hprof3d","Profile of pt versus px, py and pz",40,-4,4,40,-4,4,40,0,20);
Double_t px, py, pz, pt;
TRandom3 r(0);
for ( Int_t i=0; i<25000; i++) {
r.Rannor(px,py);
pz = px*px + py*py;
pt = r.Landau(0,1);
hprof3d->Fill(px,py,pz,pt,1);
}
hprof3d->Draw();
}

NOTE: A TProfile3D is drawn as it was a simple TH3
```

## Function Members (Methods)

public:
protected:
 Bool_t TArray::BoundsOk(const char* where, Int_t at) const virtual Int_t BufferFill(Double_t, Double_t) virtual Int_t BufferFill(Double_t, Double_t, Double_t) virtual Int_t BufferFill(Double_t, Double_t, Double_t, Double_t) virtual Int_t BufferFill(Double_t x, Double_t y, Double_t z, Double_t t, Double_t w) static bool TH1::CheckAxisLimits(const TAxis* a1, const TAxis* a2) static bool TH1::CheckBinLabels(const TAxis* a1, const TAxis* a2) static bool TH1::CheckBinLimits(const TAxis* a1, const TAxis* a2) static bool TH1::CheckConsistency(const TH1* h1, const TH1* h2) static bool TH1::CheckConsistentSubAxes(const TAxis* a1, Int_t firstBin1, Int_t lastBin1, const TAxis* a2, Int_t firstBin2 = 0, Int_t lastBin2 = 0) static bool TH1::CheckEqualAxes(const TAxis* a1, const TAxis* a2) virtual void TObject::DoError(int level, const char* location, const char* fmt, va_list va) const virtual void TH1::DoFillN(Int_t ntimes, const Double_t* x, const Double_t* w, Int_t stride = 1) 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 virtual Double_t TH1::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 virtual TH1D* TH3::DoProject1D(const char* name, const char* title, const TAxis* projAxis, bool computeErrors, bool originalRange, bool useUF, bool useOF) const static TH1D* TH3::DoProject1D(const TH3& h, const char* name, const char* title, const TAxis* projX, bool computeErrors, bool originalRange, bool useUF, bool useOF) virtual 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 virtual TH2D* TH3::DoProject2D(const char* name, const char* title, const TAxis* projX, const TAxis* projY, bool computeErrors, bool originalRange, bool useUF, bool useOF) const static 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) virtual TProfile2D* DoProjectProfile2D(const char* name, const char* title, const TAxis* projX, const TAxis* projY, bool originalRange, bool useUF, bool useOF) const Int_t Fill(const Double_t* v) virtual Int_t Fill(Double_t, Double_t, Double_t) virtual Int_t Fill(const char*, const char*, const char*, Double_t) virtual Int_t Fill(const char*, Double_t, const char*, Double_t) virtual Int_t Fill(const char*, const char*, Double_t, Double_t) virtual Int_t Fill(Double_t, const char*, const char*, Double_t) virtual Int_t Fill(Double_t, const char*, Double_t, Double_t) virtual Int_t Fill(Double_t, Double_t, const char*, Double_t) virtual Bool_t TH1::FindNewAxisLimits(const TAxis* axis, const Double_t point, Double_t& newMin, Double_t& newMax) virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const void TObject::MakeZombie() Bool_t TArray::OutOfBoundsError(const char* where, Int_t i) const static Bool_t TH1::RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxis) virtual Double_t RetrieveBinContent(Int_t bin) const static Bool_t TH1::SameLimitsAndNBins(const TAxis& axis1, const TAxis& axis2) virtual void TH1::SavePrimitiveHelp(ostream& out, const char* hname, Option_t* option = "") void SetBins(const Int_t* nbins, const Double_t* range) virtual void TH3D::UpdateBinContent(Int_t bin, Double_t content)
private:
 Double_t* GetB() Double_t* GetB2() Double_t* GetW() Double_t* GetW2() virtual void SetBins(Int_t, const Double_t*) virtual void SetBins(Int_t, Double_t, Double_t) virtual void SetBins(Int_t, const Double_t*, Int_t, const Double_t*) virtual void SetBins(Int_t, Double_t, Double_t, Int_t, Double_t, Double_t)

## Data Members

public:
 Double_t* TArrayD::fArray [fN] Array of fN doubles Int_t TArray::fN Number of array elements static TH1::(anonymous) TH1::kAllAxes static TObject::(anonymous) TObject::kBitMask static TObject::EStatusBits TObject::kCanDelete static TH1::(anonymous) TH1::kCanRebin static TObject::EStatusBits TObject::kCannotPick static TObject::EStatusBits TObject::kHasUUID static TObject::EStatusBits TObject::kInvalidObject static TH1::(anonymous) TH1::kIsAverage static TH1::(anonymous) TH1::kIsNotW static TObject::(anonymous) TObject::kIsOnHeap static TObject::EStatusBits TObject::kIsReferenced static TH1::(anonymous) TH1::kIsZoomed static TH1::(anonymous) TH1::kLogX static TObject::EStatusBits TObject::kMustCleanup static TH1::(anonymous) TH1::kNoAxis static TObject::EStatusBits TObject::kNoContextMenu static TH1::(anonymous) TH1::kNoStats static TH1::(anonymous) TH1::kNoTitle static TH1::EBinErrorOpt TH1::kNormal static TObject::(anonymous) TObject::kNotDeleted static TH1::(anonymous) TH1::kNstat static TObject::EStatusBits TObject::kObjInCanvas static TObject::(anonymous) TObject::kOverwrite static TH1::EBinErrorOpt TH1::kPoisson static TH1::EBinErrorOpt TH1::kPoisson2 static TObject::(anonymous) TObject::kSingleKey static TH1::(anonymous) TH1::kUserContour static TObject::(anonymous) TObject::kWriteDelete static TH1::(anonymous) TH1::kXaxis static TH1::(anonymous) TH1::kYaxis static TH1::(anonymous) TH1::kZaxis static TObject::(anonymous) TObject::kZombie
protected:
 Short_t TH1::fBarOffset (1000*offset) for bar charts or legos Short_t TH1::fBarWidth (1000*width) for bar charts or legos TArrayD fBinEntries number of entries per bin TH1::EBinErrorOpt TH1::fBinStatErrOpt option for bin statistical errors TArrayD fBinSumw2 Array of sum of squares of weights per bin Double_t* TH1::fBuffer [fBufferSize] entry buffer Int_t TH1::fBufferSize fBuffer size TArrayD TH1::fContour Array to display contour levels Int_t TH1::fDimension !Histogram dimension (1, 2 or 3 dim) TDirectory* TH1::fDirectory !Pointer to directory holding this histogram Double_t TH1::fEntries Number of entries EErrorType fErrorMode Option to compute errors Color_t TAttFill::fFillColor fill area color Style_t TAttFill::fFillStyle fill area style TList* TH1::fFunctions ->Pointer to list of functions (fits and user) Double_t* TH1::fIntegral !Integral of bins used by GetRandom Color_t TAttLine::fLineColor line color Style_t TAttLine::fLineStyle line style Width_t TAttLine::fLineWidth line width Color_t TAttMarker::fMarkerColor Marker color index Size_t TAttMarker::fMarkerSize Marker size Style_t TAttMarker::fMarkerStyle Marker style Double_t TH1::fMaximum Maximum value for plotting Double_t TH1::fMinimum Minimum value for plotting TString TNamed::fName object identifier Int_t TH1::fNcells number of bins(1D), cells (2D) +U/Overflows Double_t TH1::fNormFactor Normalization factor TString TH1::fOption histogram options TVirtualHistPainter* TH1::fPainter !pointer to histogram painter Bool_t fScaling !True when TProfile3D::Scale is called TArrayD TH1::fSumw2 Array of sum of squares of weights TString TNamed::fTitle object title Double_t fTmax Upper limit in T (if set) Double_t fTmin Lower limit in T (if set) Double_t TH1::fTsumw Total Sum of weights Double_t TH1::fTsumw2 Total Sum of squares of weights Double_t fTsumwt Total Sum of weight*T Double_t fTsumwt2 Total Sum of weight*T*T Double_t TH1::fTsumwx Total Sum of weight*X Double_t TH1::fTsumwx2 Total Sum of weight*X*X Double_t TH3::fTsumwxy Total Sum of weight*X*Y Double_t TH3::fTsumwxz Total Sum of weight*X*Z Double_t TH3::fTsumwy Total Sum of weight*Y Double_t TH3::fTsumwy2 Total Sum of weight*Y*Y Double_t TH3::fTsumwyz Total Sum of weight*Y*Z Double_t TH3::fTsumwz Total Sum of weight*Z Double_t TH3::fTsumwz2 Total Sum of weight*Z*Z TAxis TH1::fXaxis X axis descriptor TAxis TH1::fYaxis Y axis descriptor TAxis TH1::fZaxis Z axis descriptor static Bool_t TH1::fgAddDirectory !flag to add histograms to the directory static Bool_t fgApproximate bin error approximation option static Int_t TH1::fgBufferSize !default buffer size for automatic histograms static Bool_t TH1::fgDefaultSumw2 !flag to call TH1::Sumw2 automatically at histogram creation time static Bool_t TH1::fgStatOverflows !flag to use under/overflows in statistics

## Function documentation

```Default constructor for Profile3D histograms*-*-*-
*-*        ============================================
```

```Default destructor for Profile3D histograms*-*-*-
*-*        ===========================================
```
TProfile3D(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, Option_t* option = "")
```Normal Constructor for Profile histograms*-*-*-*-
*-*        ==========================================

The first eleven parameters are similar to TH3D::TH3D.
All values of t are accepted at filling time.
To fill a profile3D histogram, one must use TProfile3D::Fill function.

Note that when filling the profile histogram the function Fill
checks if the variable t is betyween fTmin and fTmax.
If a minimum or maximum value is set for the T scale before filling,
then all values below tmin or above tmax will be discarded.
Setting the minimum or maximum value for the T scale before filling
has the same effect as calling the special TProfile3D constructor below
where tmin and tmax are specified.

H(I,J,K) is printed as the cell contents. The errors computed are s(I,J,K) if CHOPT='S'
(spread option), or e(I,J,K) if CHOPT=' ' (error on mean).

See TProfile3D::BuildOptions for explanation of parameters

see other constructors below with all possible combinations of
fix and variable bin size like in TH3D.
```
TProfile3D(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, Option_t* option = "")
```  Create a 3-D Profile with variable bins in X , Y and Z
```
void BuildOptions(Double_t tmin, Double_t tmax, Option_t* option)
```Set Profile3D histogram structure and options*-*-
*-*          =============================================

tmin:  minimum value allowed for t
tmax:  maximum value allowed for t
if (tmin = tmax = 0) there are no limits on the allowed t values (tmin = -inf, tmax = +inf)

option:  this is the option for the computation of the t error of the profile ( TProfile3D::GetBinError )
possible values for the options are documented in TProfile3D::SetErrorOption

```
TProfile3D(const TProfile3D& profile)
```copy constructor
```
Bool_t Add(TF1* h1, Double_t c1 = 1, Option_t* option = "")
``` Performs the operation: this = this + c1*f1
```
Bool_t Add(const TH1* h1, Double_t c1 = 1)
``` Performs the operation: this = this + c1*h1
```
Bool_t Add(const TH1* h1, const TH1* h2, Double_t c1 = 1, Double_t c2 = 1)
```-*-*Replace contents of this profile3D by the addition of h1 and h2
*-*      ===============================================================

this = c1*h1 + c2*h2

```
void Approximate(Bool_t approx = kTRUE)
```     static function
set the fgApproximate flag. When the flag is true, the function GetBinError
will approximate the bin error with the average profile error on all bins
in the following situation only
- the number of bins in the profile3D is less than 10404 (eg 100x100x100)
- the bin number of entries is small ( <5)
- the estimated bin error is extremely small compared to the bin content
(see TProfile3D::GetBinError)
```
Int_t BufferEmpty(Int_t action = 0)
``` 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
```

``` 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
fBuffer[5] = t of first entry
```
void Copy(TObject& hnew) const
```-*-*-*-*Copy a Profile3D histogram to a new profile2D histogram
*-*            =======================================================
```
Bool_t Divide(TF1* h1, Double_t c1 = 1)
``` Performs the operation: this = this/(c1*f1)
This function is not implemented
```
Bool_t Divide(const TH1* h1)
```Divide this profile2D by h1*-*-
*-*                  ===========================

this = this/h1

This function return kFALSE if the divide operation failed
```
Bool_t Divide(const TH1* h1, const TH1* h2, Double_t c1 = 1, Double_t c2 = 1, Option_t* option = "")
```-*-*Replace contents of this profile2D by the division of h1 by h2
*-*      ==============================================================

this = c1*h1/(c2*h2)

This function return kFALSE if the divide operation failed
```

```-*-*-*Fill a Profile3D histogram (no weights)
*-*                  =======================================
```

```-*-*-*Fill a Profile3D histogram with weights
*-*                  =======================================
```
Double_t GetBinContent(Int_t bin) const
```Return bin content of a Profile3D histogram*-*-
*-*          ===========================================
```
Double_t GetBinEntries(Int_t bin) const
```Return bin entries of a Profile3D histogram*-*-
*-*          ===========================================
```

```            Return bin effective entries for a weighted filled Profile histogram.
In case of an unweighted profile, it is equivalent to the number of entries per bin
The effective entries is defined as the square of the sum of the weights divided by the
sum of the weights square.
TProfile::Sumw2() must be called before filling the profile with weights.
Only by calling this method the  sum of the square of the weights per bin is stored.

*-*          =========================================
```
Double_t GetBinError(Int_t bin) const
``` *-*-*-*-*-*-*Return bin error of a Profile3D histogram*-*-*-*-*-*-*-*-*

Computing errors: A moving field

The computation of errors for a TProfile3D has evolved with the versions
of ROOT. The difficulty is in computing errors for bins with low statistics.
- prior to version 3.10, we had no special treatment of low statistic bins.
As a result, these bins had huge errors. The reason is that the
expression eprim2 is very close to 0 (rounding problems) or 0.
- The algorithm is modified/protected for the case
when a TProfile3D is projected (ProjectionX). The previous algorithm
generated a N^2 problem when projecting a TProfile3D with a large number of
bins (eg 100000).
- in version 3.10/02, a new static function TProfile::Approximate
is introduced to enable or disable (default) the approximation.
```
Option_t * GetErrorOption() const
```-*-*Return option to compute profile2D errors
*-*                =========================================
```
void GetStats(Double_t* stats) const
``` fill the array stats from the contents of this profile
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
stats[11]= sumwt
stats[12]= sumwt2

If no axis-subrange is specified (via TAxis::SetRange), the array stats
is simply a copy of the statistics quantities computed at filling time.
If a sub-range is specified, the function recomputes these quantities
from the bin contents in the current axis range.
```
Long64_t Merge(TCollection* list)
```Merge all histograms in the collection in 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.
```
Bool_t Multiply(TF1* h1, Double_t c1 = 1)
``` Performs the operation: this = this*c1*f1
```
Bool_t Multiply(const TH1* h1)
```Multiply this profile2D by h1*-
*-*                  =============================

this = this*h1

```
Bool_t Multiply(const TH1* h1, const TH1* h2, Double_t c1 = 1, Double_t c2 = 1, Option_t* option = "")
```-*-*-*Replace contents of this profile2D by multiplication of h1 by h2
*-*      ================================================================

this = (c1*h1)*(c2*h2)

```
TH3D * ProjectionXYZ(const char* name = "_pxyz", Option_t* option = "e") const
```Project this profile3D into a 3-D histogram along X,Y,Z*-*-
*-*      =====================================================

The projection is always of the type TH3D.

if option "E" is specified, the errors are computed. (default)
if option "B" is specified, the content of bin of the returned histogram
will be equal to the GetBinEntries(bin) of the profile,
if option "C=E" the bin contents of the projection are set to the
bin errors of the profile
if option "E" is specified  the errors of the projected histogram are computed and set
to be equal to the errors of the profile.
Option "E" is defined as the default one in the header file.
if option "" is specified the histogram errors are simply the sqrt of its content
if option "B" is specified, the content of bin of the returned histogram
will be equal to the GetBinEntries(bin) of the profile,
if option "C=E" the bin contents of the projection are set to the
bin errors of the profile
if option "W" is specified the bin content of the projected histogram  is set to the
product of the bin content of the profile and the entries.
With this option the returned histogram will be equivalent to the one obtained by
filling directly a TH2D using the 3-rd value as a weight.
This option makes sense only for profile filled with all weights =1.
When the profile is weighted (filled with weights different than 1) the
bin error of the projected histogram (obtained using this option "W") cannot be
correctly computed from the information stored in the profile. In that case the
obtained histogram contains as bin error square the weighted sum of the square of the
profiled observable (TProfile2D::fSumw2[bin] )
```
TProfile2D * Project3DProfile(Option_t* option = "xy") const
``` *-*-*-*-*Project a 3-D profile into a 2D-profile histogram 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" horizontalalong X*-*-*-*-*-*

The resulting profile contains the combination of all the considered bins along X
By default, all bins are included considering also underflow/overflows

The option can also be used to specify the projected profile error type.
Values which can be used are 's', 'i', or 'g'. See TProfile::BuildOptions for details

To select a bin range along an axis, use TAxis::SetRange, eg
h3.GetYaxis()->SetRange(23,56);

```
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 but re-implemented in case of the TPRofile3D since what is done is different
```
void PutStats(Double_t* stats)
``` Replace current statistics with the values in array stats
```
void Reset(Option_t* option = "")
```-*-*Reset contents of a Profile3D histogram
*-*                =======================================
```
void ExtendAxis(Double_t x, TAxis* axis)
``` Profile histogram is resized along axis such that x is in the axis range.
The new axis limits are recomputed by doubling iteratively
the current axis range until the specified value x is within the limits.
The algorithm makes a copy of the histogram, then loops on all bins
of the old histogram to fill the rebinned histogram.
Takes into account errors (Sumw2) if any.
The axis must be rebinnable before invoking this function.
Ex: h->GetXaxis()->SetCanExtend(kTRUE)
```
void SavePrimitive(ostream& out, Option_t* option = "")
``` Save primitive as a C++ statement(s) on output stream out
```
void Scale(Double_t c1 = 1, Option_t* option = "")
``` *-*-*-*-*Multiply this profile2D by a constant c1*-*-*-*-*-*-*-*-*
*-*      ========================================

this = c1*this

This function uses the services of TProfile3D::Add

```
void SetBinEntries(Int_t bin, Double_t w)
```Set the number of entries in bin*-*-*-
*-*              ================================
```
void SetBins(Int_t nbinsx, Double_t xmin, Double_t xmax, Int_t nbinsy, Double_t ymin, Double_t ymax, Int_t nbinsz, Double_t zmin, Double_t zmax)
```   -*-*-*-*-*-*-*Redefine  x, y and z axis parameters*-*-*-*-*-*-*-*-*-*-*-*
*-*              ===========================
```
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 *-*-*-*-*-*-*-*-*

```
void SetBinsLength(Int_t n = -1)
``` Set total number of bins including under/overflow
Reallocate bin contents array
```
void SetBuffer(Int_t buffersize, Option_t* opt = "")
``` set the buffer size in units of 8 bytes (double)
```
void SetErrorOption(Option_t* option = "")
```-*-*Set option to compute profile3D errors
*-*                =======================================

The computation of the bin errors is based on the parameter option:
option:
' '  (Default) The bin errors are the standard error on the mean of the bin profiled values (T),
i.e. the standard error of the bin contents.
Note that if TProfile3D::Approximate()  is called, an approximation is used when
the spread in T is 0 and the number of bin entries  is > 0

's'            The bin errors are the standard deviations of the T bin values
Note that if TProfile3D::Approximate()  is called, an approximation is used when
the spread in T is 0 and the number of bin entries is > 0

'i'            Errors are as in default case (standard errors of the bin contents)
The only difference is for the case when the spread in T is zero.
In this case for N > 0 the error is  1./SQRT(12.*N)

'g'            Errors are 1./SQRT(W)  for W not equal to 0 and 0 for W = 0.
W is the sum in the bin of the weights of the profile.
This option is for combining measurements t +/- dt,
and  the profile is filled with values t and weights w = 1/dt**2

See TProfile::BuildOptions for explanation of all options
```
void Sumw2(Bool_t flag = kTRUE)
``` Create/Delete structure to store sum of squares of weights per bin  *-*-*-*-*-*-*-*
This is needed to compute  the correct statistical quantities
of a profile filled with weights

This function is automatically called when the histogram is created
if the static function TH1::SetDefaultSumw2 has been called before.
If flag = false the structure is deleted
```

`{return -2;}`

`{return -2;}`

`{return -2;}`
void SetBins(const Int_t* nbins, const Double_t* range)
``` helper methods for the Merge unification in TProfileHelper
```
Int_t Fill(const Double_t* v)
`{ return Fill(v[0], v[1], v[2], v[3], v[4]); }`

`{return TH3::Fill(0); }`
Int_t Fill(const char* , const char* , const char* , Double_t )
`{return TH3::Fill(0); }`
Int_t Fill(const char* , Double_t , const char* , Double_t )
`{return TH3::Fill(0); }`
Int_t Fill(const char* , const char* , Double_t , Double_t )
`{return TH3::Fill(0); }`
Int_t Fill(Double_t , const char* , const char* , Double_t )
`{return TH3::Fill(0); }`
Int_t Fill(Double_t , const char* , Double_t , Double_t )
`{return TH3::Fill(0); }`
Int_t Fill(Double_t , Double_t , const char* , Double_t )
`{return TH3::Fill(0); }`
Double_t RetrieveBinContent(Int_t bin) const
```virtual void     UpdateBinContent(Int_t bin, Double_t content);
```
`{ return (fBinEntries.fArray[bin] > 0) ? fArray[bin]/fBinEntries.fArray[bin] : 0; }`
Double_t GetBinErrorSqUnchecked(Int_t bin) const
`{ Double_t err = GetBinError(bin); return err*err; }`
Double_t * GetB()
`{return &fBinEntries.fArray[0];}`

`{return (fBinSumw2.fN ? &fBinSumw2.fArray[0] : 0 ); }`
Double_t * GetW()
`{return &fArray[0];}`

`{return &fSumw2.fArray[0];}`
void SetBins(Int_t , Double_t , Double_t )
`{ MayNotUse("SetBins(Int_t, Double_t, Double_t"); }`
void SetBins(Int_t , const Double_t* )
`{ MayNotUse("SetBins(Int_t, const Double_t*"); }`

`{ MayNotUse("SetBins(Int_t, Double_t, Double_t, Int_t, Double_t, Double_t"); }`
void SetBins(Int_t , const Double_t* , Int_t , const Double_t* )
`{ MayNotUse("SetBins(Int_t, const Double_t*, Int_t, const Double_t*"); }`
Double_t GetBinContent(Int_t bin) const
Double_t GetBinContent(Int_t , Int_t ) const
`{ MayNotUse("GetBinContent(Int_t, Int_t"); return -1; }`
Double_t GetBinError(Int_t bin) const
Double_t GetBinError(Int_t , Int_t ) const
`{ MayNotUse("GetBinError(Int_t, Int_t"); return -1; }`

`{return &fBinSumw2;}`
const TArrayD * GetBinSumw2() const
`{return &fBinSumw2;}`
Double_t GetTmin() const
`{return fTmin;}`
Double_t GetTmax() const
`{return fTmax;}`