ROOT  6.06/09
Reference Guide
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Friends | List of all members
TProfile2D Class Reference

Profile2D histograms are used to display the mean value of Z and its RMS for each cell in X,Y.

Profile2D histograms are in many cases an elegant replacement of three-dimensional histograms : the inter-relation of three measured quantities X, Y and Z can always be visualized by a three-dimensional histogram or scatter-plot; its representation on the line-printer is not particularly satisfactory, except for sparse data. If Z is an unknown (but single-valued) approximate function of X,Y this function is displayed by a profile2D 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)  =  sum Z                  E(I,J)  =  sum Z
  l(I,J)  =  sum l                  L(I,J)  =  sum l
  h(I,J)  =  H(I,J)/L(I,J)          s(I,J)  =  sqrt(E(I,J)/L(I,J)- h(I,J)**2)
  e(I,J)  =  s(I,J)/sqrt(L(I,J))

In the special case where s(I,J) is zero (eg, case of 1 entry only in one cell) the bin error e(I,J) is computed from the average of the s(I,J) for all cells if the static function TProfile2D::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 profile2D histogram

{
TCanvas *c1 = new TCanvas("c1","Profile histogram example",200,10,700,500);
hprof2d = new TProfile2D("hprof2d","Profile of pz versus px and py",40,-4,4,40,-4,4,0,20);
Float_t px, py, pz;
for ( Int_t i=0; i<25000; i++) {
gRandom->Rannor(px,py);
pz = px*px + py*py;
hprof2d->Fill(px,py,pz,1);
}
hprof2d->Draw();
}

Definition at line 31 of file TProfile2D.h.

Public Member Functions

 TProfile2D ()
 
 TProfile2D (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup, Double_t zlow, Double_t zup, Option_t *option="")
 Constructor for Profile2D histograms with range in z The first eight parameters are similar to TH2D::TH2D. More...
 
 TProfile2D (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup, Option_t *option="")
 Normal Constructor for Profile histograms -*. More...
 
 TProfile2D (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, Double_t ylow, Double_t yup, Option_t *option="")
 Create a 2-D Profile with variable bins in X and fix bins in Y. More...
 
 TProfile2D (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, const Double_t *ybins, Option_t *option="")
 Create a 2-D Profile with fix bins in X and variable bins in Y. More...
 
 TProfile2D (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, const Double_t *ybins, Option_t *option="")
 Create a 2-D Profile with variable bins in X and variable bins in Y. More...
 
 TProfile2D (const TProfile2D &profile)
 Copy constructor. More...
 
virtual ~TProfile2D ()
 Default destructor for Profile2D histograms. More...
 
virtual Bool_t Add (TF1 *h1, Double_t c1=1, Option_t *option="")
 Performs the operation: this = this + c1*f1. More...
 
virtual Bool_t Add (const TH1 *h1, Double_t c1=1)
 Performs the operation: this = this + c1*h1. More...
 
virtual Bool_t Add (const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1)
 Replace contents of this profile2D by the addition of h1 and h2*. More...
 
void BuildOptions (Double_t zmin, Double_t zmax, Option_t *option)
 Set Profile2D histogram structure and options. More...
 
virtual Int_t BufferEmpty (Int_t action=0)
 Fill histogram with all entries in the buffer. More...
 
virtual void Copy (TObject &hnew) const
 Copy a Profile2D histogram to a new profile2D histogram*. More...
 
virtual Bool_t Divide (TF1 *h1, Double_t c1=1)
 Performs the operation: this = this/(c1*f1) This function is not implemented. More...
 
virtual Bool_t Divide (const TH1 *h1)
 Divide this profile2D by h1. More...
 
virtual 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. More...
 
virtual void ExtendAxis (Double_t x, TAxis *axis)
 Profile histogram is resized along axis such that x is in the axis range. More...
 
Int_t Fill (Double_t x, Double_t y, Double_t z)
 Fill a Profile2D histogram (no weights) *-* =======================================. More...
 
virtual Int_t Fill (Double_t x, const char *namey, Double_t z)
 Fill a Profile2D histogram (no weights) More...
 
virtual Int_t Fill (const char *namex, Double_t y, Double_t z)
 Fill a Profile2D histogram (no weights) More...
 
virtual Int_t Fill (const char *namex, const char *namey, Double_t z)
 Fill a Profile2D histogram (no weights) More...
 
virtual Int_t Fill (Double_t x, Double_t y, Double_t z, Double_t w)
 Fill a Profile2D histogram with weights. More...
 
virtual Double_t GetBinContent (Int_t bin) const
 Return bin content of a Profile2D histogram. More...
 
virtual Double_t GetBinContent (Int_t binx, Int_t biny) const
 
virtual Double_t GetBinContent (Int_t binx, Int_t biny, Int_t) const
 
virtual Double_t GetBinError (Int_t bin) const
 -*Return bin error of a Profile2D histogram More...
 
virtual Double_t GetBinError (Int_t binx, Int_t biny) const
 
virtual Double_t GetBinError (Int_t binx, Int_t biny, Int_t) const
 
virtual Double_t GetBinEntries (Int_t bin) const
 Return bin entries of a Profile2D histogram. More...
 
virtual Double_t GetBinEffectiveEntries (Int_t bin)
 Return bin effective entries for a weighted filled Profile histogram. More...
 
virtual TArrayDGetBinSumw2 ()
 
virtual const TArrayDGetBinSumw2 () const
 
Option_tGetErrorOption () const
 -*Return option to compute profile2D errors *-* ========================================= More...
 
virtual 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. More...
 
virtual Double_t GetZmin () const
 
virtual Double_t GetZmax () const
 
virtual void LabelsDeflate (Option_t *axis="X")
 Reduce the number of bins for this axis to the number of bins having a label. More...
 
virtual void LabelsInflate (Option_t *axis="X")
 Double the number of bins for axis. More...
 
virtual void LabelsOption (Option_t *option="h", Option_t *axis="X")
 Set option(s) to draw axis with labels option = "a" sort by alphabetic order = ">" sort by decreasing values = "<" sort by increasing values = "h" draw labels horizonthal = "v" draw labels vertical = "u" draw labels up (end of label right adjusted) = "d" draw labels down (start of label left adjusted) More...
 
virtual Long64_t Merge (TCollection *list)
 Merge all histograms in the collection in this histogram. More...
 
virtual Bool_t Multiply (TF1 *h1, Double_t c1=1)
 Performs the operation: this = this*c1*f1. More...
 
virtual Bool_t Multiply (const TH1 *h1)
 Multiply this profile2D by h1 - *-* =============================. More...
 
virtual 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*-* *-* ================================================================ More...
 
TH2DProjectionXY (const char *name="_pxy", Option_t *option="e") const
 *-*Project this profile2D into a 2-D histogram along X,Y -* *-* ===================================================== More...
 
TProfileProfileX (const char *name="_pfx", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
 *-*Project a 2-D histogram into a profile histogram along X *-* ======================================================== More...
 
TProfileProfileY (const char *name="_pfy", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
 *-*Project a 2-D histogram into a profile histogram along X *-* ======================================================== More...
 
virtual void PutStats (Double_t *stats)
 Replace current statistics with the values in array stats. More...
 
virtual void Reset (Option_t *option="")
 -*Reset contents of a Profile2D histogram *-* ======================================= More...
 
virtual TProfile2DRebin2D (Int_t nxgroup=2, Int_t nygroup=2, const char *newname="")
 Rebin this histogram grouping nxgroup/nygroup bins along the xaxis/yaxis together. More...
 
virtual TProfile2DRebinX (Int_t ngroup=2, const char *newname="")
 Rebin only the X axis see Rebin2D. More...
 
virtual TProfile2DRebinY (Int_t ngroup=2, const char *newname="")
 Rebin only the Y axis see Rebin2D. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save primitive as a C++ statement(s) on output stream out. More...
 
virtual void Scale (Double_t c1=1, Option_t *option="")
 Multiply this profile2D by a constant c1. More...
 
virtual void SetBinEntries (Int_t bin, Double_t w)
 Set the number of entries in bin -. More...
 
virtual void SetBins (Int_t nbinsx, Double_t xmin, Double_t xmax, Int_t nbinsy, Double_t ymin, Double_t ymax)
 Redefine x and y axis parameters -. More...
 
virtual void SetBins (Int_t nx, const Double_t *xBins, Int_t ny, const Double_t *yBins)
 Redefine x and y axis parameters for variable bin sizes - -*. More...
 
virtual void SetBinsLength (Int_t n=-1)
 Set total number of bins including under/overflow Reallocate bin contents array. More...
 
virtual void SetBuffer (Int_t buffersize, Option_t *option="")
 set the buffer size in units of 8 bytes (double) More...
 
virtual void SetErrorOption (Option_t *option="")
 Set option to compute profile2D errors The computation of the bin errors is based on the parameter option: More...
 
virtual 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. More...
 
- Public Member Functions inherited from TH2D
 TH2D ()
 
 TH2D (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup)
 Constructor. More...
 
 TH2D (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, Double_t ylow, Double_t yup)
 Constructor. More...
 
 TH2D (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, const Double_t *ybins)
 Constructor. More...
 
 TH2D (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, const Double_t *ybins)
 Constructor. More...
 
 TH2D (const char *name, const char *title, Int_t nbinsx, const Float_t *xbins, Int_t nbinsy, const Float_t *ybins)
 Constructor. More...
 
 TH2D (const TMatrixDBase &m)
 Constructor. More...
 
 TH2D (const TH2D &h2d)
 Copy constructor. More...
 
virtual ~TH2D ()
 Destructor. More...
 
virtual void AddBinContent (Int_t bin)
 Increment bin content by 1. More...
 
virtual void AddBinContent (Int_t bin, Double_t w)
 Increment bin content by a weight w. More...
 
TH2Doperator= (const TH2D &h1)
 Operator =. More...
 
- Public Member Functions inherited from TH2
virtual ~TH2 ()
 Destructor. More...
 
virtual void FillN (Int_t, const Double_t *, const Double_t *, Int_t)
 Fill this histogram with an array x and weights w. More...
 
virtual void FillN (Int_t ntimes, const Double_t *x, const Double_t *y, const Double_t *w, Int_t stride=1)
 Fill a 2-D histogram with an array of values and weights. More...
 
virtual void FillRandom (const char *fname, Int_t ntimes=5000)
 Fill histogram following distribution in function fname. More...
 
virtual void FillRandom (TH1 *h, Int_t ntimes=5000)
 Fill histogram following distribution in histogram h. More...
 
virtual Int_t FindFirstBinAbove (Double_t threshold=0, Int_t axis=1) const
 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. More...
 
virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) const
 Find last bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold is found the function returns -1. More...
 
virtual void FitSlicesX (TF1 *f1=0, Int_t firstybin=0, Int_t lastybin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=0)
 Project slices along X in case of a 2-D histogram, then fit each slice with function f1 and make a histogram for each fit parameter Only bins along Y between firstybin and lastybin are considered. More...
 
virtual void FitSlicesY (TF1 *f1=0, Int_t firstxbin=0, Int_t lastxbin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=0)
 Project slices along Y in case of a 2-D histogram, then fit each slice with function f1 and make a histogram for each fit parameter Only bins along X between firstxbin and lastxbin are considered. More...
 
virtual Int_t GetBin (Int_t binx, Int_t biny, Int_t binz=0) const
 Return Global bin number corresponding to binx,y,z. More...
 
virtual Double_t GetBinWithContent2 (Double_t c, Int_t &binx, Int_t &biny, Int_t firstxbin=1, Int_t lastxbin=-1, Int_t firstybin=1, Int_t lastybin=-1, Double_t maxdiff=0) const
 compute first cell (binx,biny) in the range [firstxbin,lastxbin][firstybin,lastybin] for which diff = abs(cell_content-c) <= maxdiff In case several cells in the specified range with diff=0 are found the first cell found is returned in binx,biny. More...
 
virtual Double_t GetBinErrorLow (Int_t binx, Int_t biny)
 
virtual Double_t GetBinErrorUp (Int_t binx, Int_t biny)
 
virtual Double_t GetCorrelationFactor (Int_t axis1=1, Int_t axis2=2) const
 Return correlation factor between axis1 and axis2. More...
 
virtual Double_t GetCovariance (Int_t axis1=1, Int_t axis2=2) const
 Return covariance between axis1 and axis2. More...
 
virtual void GetRandom2 (Double_t &x, Double_t &y)
 Return 2 random numbers along axis x and y distributed according the cellcontents of a 2-dim histogram return a NaN if the histogram has a bin with negative content. More...
 
virtual Double_t Integral (Option_t *option="") const
 Return integral of bin contents. More...
 
virtual Double_t Integral (Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Option_t *option="") const
 Return integral of bin contents in range [firstxbin,lastxbin],[firstybin,lastybin] for a 2-D histogram By default the integral is computed as the sum of bin contents in the range. More...
 
virtual Double_t Integral (Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Option_t *="") const
 
virtual Double_t IntegralAndError (Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Double_t &err, Option_t *option="") const
 Return integral of bin contents in range [firstxbin,lastxbin],[firstybin,lastybin] for a 2-D histogram. More...
 
virtual Double_t Interpolate (Double_t x)
 illegal for a TH2 More...
 
virtual Double_t Interpolate (Double_t x, Double_t y)
 Given a point P(x,y), Interpolate approximates the value via bilinear interpolation based on the four nearest bin centers see Wikipedia, Bilinear Interpolation Andy Mastbaum 10/8/2008 vaguely based on R.Raja 6-Sep-2008. More...
 
virtual Double_t Interpolate (Double_t x, Double_t y, Double_t z)
 illegal for a TH2 More...
 
virtual Double_t KolmogorovTest (const TH1 *h2, Option_t *option="") const
 Statistical test of compatibility in shape between THIS histogram and h2, using Kolmogorov test. More...
 
TProfileProfileX (const char *name="_pfx", Int_t firstybin=1, Int_t lastybin=-1, Option_t *option="") const
 Project a 2-D histogram into a profile histogram along X. More...
 
TProfileProfileY (const char *name="_pfy", Int_t firstxbin=1, Int_t lastxbin=-1, Option_t *option="") const
 Project a 2-D histogram into a profile histogram along Y. More...
 
TH1DProjectionX (const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
 Project a 2-D histogram into a 1-D histogram along X. More...
 
TH1DProjectionY (const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
 Project a 2-D histogram into a 1-D histogram along Y. More...
 
TH1DQuantilesX (Double_t prob=0.5, const char *name="_qx") const
 Compute the X distribution of quantiles in the other variable Y name is the name of the returned histogram prob is the probability content for the quantile (0.5 is the default for the median) An approximate error for the quantile is computed assuming that the distribution in the other variable is normal. More...
 
TH1DQuantilesY (Double_t prob=0.5, const char *name="_qy") const
 Compute the Y distribution of quantiles in the other variable X name is the name of the returned histogram prob is the probability content for the quantile (0.5 is the default for the median) An approximate error for the quantile is computed assuming that the distribution in the other variable is normal. More...
 
virtual void SetBinContent (Int_t bin, Double_t content)
 Set bin content. More...
 
virtual void SetBinContent (Int_t binx, Int_t biny, Double_t content)
 
virtual void SetBinContent (Int_t binx, Int_t biny, Int_t, Double_t content)
 
virtual void SetShowProjectionX (Int_t nbins=1)
 When the mouse is moved in a pad containing a 2-d view of this histogram a second canvas shows the projection along X corresponding to the mouse position along Y. More...
 
virtual void SetShowProjectionY (Int_t nbins=1)
 When the mouse is moved in a pad containing a 2-d view of this histogram a second canvas shows the projection along Y corresponding to the mouse position along X. More...
 
virtual TH1ShowBackground (Int_t niter=20, Option_t *option="same")
 This function calculates the background spectrum in this histogram. More...
 
virtual Int_t ShowPeaks (Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
 Interface to TSpectrum2::Search the function finds peaks in this histogram where the width is > sigma and the peak maximum greater than threshold*maximum bin content of this. More...
 
virtual void Smooth (Int_t ntimes=1, Option_t *option="")
 Smooth bin contents of this 2-d histogram using kernel algorithms similar to the ones used in the raster graphics community. More...
 
- Public Member Functions inherited from TH1
virtual ~TH1 ()
 Histogram default destructor. More...
 
virtual void Browse (TBrowser *b)
 Browe the Histogram object. More...
 
virtual Bool_t CanExtendAllAxes () const
 returns true if all axes are extendable More...
 
virtual Double_t Chi2Test (const TH1 *h2, Option_t *option="UU", Double_t *res=0) const
 chi^{2} test for comparing weighted and unweighted histograms More...
 
virtual Double_t Chi2TestX (const TH1 *h2, Double_t &chi2, Int_t &ndf, Int_t &igood, Option_t *option="UU", Double_t *res=0) const
 The computation routine of the Chisquare test. More...
 
virtual Double_t Chisquare (TF1 *f1, Option_t *option="") const
 Compute and return the chisquare of this histogram with respect to a function The chisquare is computed by weighting each histogram point by the bin error By default the full range of the histogram is used. More...
 
virtual void ClearUnderflowAndOverflow ()
 Remove all the content from the underflow and overflow bins, without changing the number of entries After calling this method, every undeflow and overflow bins will have content 0.0 The Sumw2 is also cleared, since there is no more content in the bins. More...
 
virtual Double_t ComputeIntegral (Bool_t onlyPositive=false)
 Compute integral (cumulative sum of bins) The result stored in fIntegral is used by the GetRandom functions. More...
 
TObjectClone (const char *newname=0) const
 Make a complete copy of the underlying object. More...
 
virtual void DirectoryAutoAdd (TDirectory *)
 Perform the automatic addition of the histogram to the given directory. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Compute distance from point px,py to a line. More...
 
virtual void Draw (Option_t *option="")
 Draw this histogram with options. More...
 
virtual TH1DrawCopy (Option_t *option="", const char *name_postfix="_copy") const
 Copy this histogram and Draw in the current pad. More...
 
virtual TH1DrawNormalized (Option_t *option="", Double_t norm=1) const
 Draw a normalized copy of this histogram. More...
 
virtual void DrawPanel ()
 Display a panel with all histogram drawing options. More...
 
virtual void Eval (TF1 *f1, Option_t *option="")
 Evaluate function f1 at the center of bins of this histogram. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to one event. More...
 
virtual TH1FFT (TH1 *h_output, Option_t *option)
 This function allows to do discrete Fourier transforms of TH1 and TH2. More...
 
virtual Int_t FindBin (Double_t x, Double_t y=0, Double_t z=0)
 Return Global bin number corresponding to x,y,z. More...
 
virtual Int_t FindFixBin (Double_t x, Double_t y=0, Double_t z=0) const
 Return Global bin number corresponding to x,y,z. More...
 
virtual TObjectFindObject (const char *name) const
 search object named name in the list of functions More...
 
virtual TObjectFindObject (const TObject *obj) const
 search object obj in the list of functions More...
 
virtual TFitResultPtr Fit (const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
 Fit histogram with function fname. More...
 
virtual TFitResultPtr Fit (TF1 *f1, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
 Fit histogram with function f1. More...
 
virtual void FitPanel ()
 Display a panel with all histogram fit options. More...
 
TH1GetAsymmetry (TH1 *h2, Double_t c2=1, Double_t dc2=0)
 Return an histogram containing the asymmetry of this histogram with h2, where the asymmetry is defined as: More...
 
Int_t GetBufferLength () const
 
Int_t GetBufferSize () const
 
const Double_tGetBuffer () const
 
virtual Double_tGetIntegral ()
 Return a pointer to the array of bins integral. More...
 
TH1GetCumulative (Bool_t forward=kTRUE, const char *suffix="_cumulative") const
 Return a pointer to an histogram containing the cumulative The cumulative can be computed both in the forward (default) or backward direction; the name of the new histogram is constructed from the name of this histogram with the suffix suffix appended. More...
 
TListGetListOfFunctions () const
 
virtual Int_t GetNdivisions (Option_t *axis="X") const
 Return the number of divisions for "axis". More...
 
virtual Color_t GetAxisColor (Option_t *axis="X") const
 Return the number of divisions for "axis". More...
 
virtual Color_t GetLabelColor (Option_t *axis="X") const
 Return the "axis" label color. More...
 
virtual Style_t GetLabelFont (Option_t *axis="X") const
 Return the "axis" label font. More...
 
virtual Float_t GetLabelOffset (Option_t *axis="X") const
 Return the "axis" label offset. More...
 
virtual Float_t GetLabelSize (Option_t *axis="X") const
 Return the "axis" label size. More...
 
virtual Style_t GetTitleFont (Option_t *axis="X") const
 Return the "axis" title font. More...
 
virtual Float_t GetTitleOffset (Option_t *axis="X") const
 Return the "axis" title offset. More...
 
virtual Float_t GetTitleSize (Option_t *axis="X") const
 Return the "axis" title size. More...
 
virtual Float_t GetTickLength (Option_t *axis="X") const
 Return the "axis" tick length. More...
 
virtual Float_t GetBarOffset () const
 
virtual Float_t GetBarWidth () const
 
virtual Int_t GetContour (Double_t *levels=0)
 Return contour values into array levels if pointer levels is non zero. More...
 
virtual Double_t GetContourLevel (Int_t level) const
 Return value of contour number level use GetContour to return the array of all contour levels. More...
 
virtual Double_t GetContourLevelPad (Int_t level) const
 Return the value of contour number "level" in Pad coordinates ie: if the Pad is in log scale along Z it returns le log of the contour level value. More...
 
virtual void GetBinXYZ (Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const
 return binx, biny, binz corresponding to the global bin number globalbin see TH1::GetBin function above More...
 
virtual Double_t GetBinCenter (Int_t bin) const
 return bin center for 1D historam Better to use h1.GetXaxis().GetBinCenter(bin) More...
 
virtual Double_t GetBinErrorLow (Int_t bin) const
 Return lower error associated to bin number bin. More...
 
virtual Double_t GetBinErrorUp (Int_t bin) const
 Return upper error associated to bin number bin. More...
 
virtual EBinErrorOpt GetBinErrorOption () const
 
virtual Double_t GetBinLowEdge (Int_t bin) const
 return bin lower edge for 1D historam Better to use h1.GetXaxis().GetBinLowEdge(bin) More...
 
virtual Double_t GetBinWidth (Int_t bin) const
 return bin width for 1D historam Better to use h1.GetXaxis().GetBinWidth(bin) More...
 
virtual Double_t GetBinWithContent (Double_t c, Int_t &binx, Int_t firstx=0, Int_t lastx=0, Double_t maxdiff=0) const
 compute first binx in the range [firstx,lastx] for which diff = abs(bin_content-c) <= maxdiff In case several bins in the specified range with diff=0 are found the first bin found is returned in binx. More...
 
virtual void GetCenter (Double_t *center) const
 Fill array with center of bins for 1D histogram Better to use h1.GetXaxis().GetCenter(center) More...
 
TDirectoryGetDirectory () const
 
virtual Double_t GetEntries () const
 return the current number of entries More...
 
virtual Double_t GetEffectiveEntries () const
 number of effective entries of the histogram, neff = (Sum of weights )^2 / (Sum of weight^2 ) In case of an unweighted histogram this number is equivalent to the number of entries of the histogram. More...
 
virtual TF1GetFunction (const char *name) const
 Return pointer to function with name. More...
 
virtual Int_t GetDimension () const
 
virtual Double_t GetKurtosis (Int_t axis=1) const
 For axis =1, 2 or 3 returns kurtosis of the histogram along x, y or z axis. More...
 
virtual void GetLowEdge (Double_t *edge) const
 Fill array with low edge of bins for 1D histogram Better to use h1.GetXaxis().GetLowEdge(edge) More...
 
virtual Double_t GetMaximum (Double_t maxval=FLT_MAX) const
 Return maximum value smaller than maxval of bins in the range, unless the value has been overridden by TH1::SetMaximum, in which case it returns that value. More...
 
virtual Int_t GetMaximumBin () const
 Return location of bin with maximum value in the range. More...
 
virtual Int_t GetMaximumBin (Int_t &locmax, Int_t &locmay, Int_t &locmaz) const
 Return location of bin with maximum value in the range. More...
 
virtual Double_t GetMaximumStored () const
 
virtual Double_t GetMinimum (Double_t minval=-FLT_MAX) const
 Return minimum value larger than minval of bins in the range, unless the value has been overridden by TH1::SetMinimum, in which case it returns that value. More...
 
virtual Int_t GetMinimumBin () const
 Return location of bin with minimum value in the range. More...
 
virtual Int_t GetMinimumBin (Int_t &locmix, Int_t &locmiy, Int_t &locmiz) const
 Return location of bin with minimum value in the range. More...
 
virtual Double_t GetMinimumStored () const
 
virtual Double_t GetMean (Int_t axis=1) const
 For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis. More...
 
virtual Double_t GetMeanError (Int_t axis=1) const
 Return standard error of mean of this histogram along the X axis. More...
 
virtual Int_t GetNbinsX () const
 
virtual Int_t GetNbinsY () const
 
virtual Int_t GetNbinsZ () const
 
virtual Int_t GetNcells () const
 
virtual Double_t GetNormFactor () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Redefines TObject::GetObjectInfo. More...
 
Option_tGetOption () const
 
TVirtualHistPainterGetPainter (Option_t *option="")
 return pointer to painter if painter does not exist, it is created More...
 
virtual Int_t GetQuantiles (Int_t nprobSum, Double_t *q, const Double_t *probSum=0)
 Compute Quantiles for this histogram Quantile x_q of a probability distribution Function F is defined as. More...
 
virtual Double_t GetRandom () const
 return a random number distributed according the histogram bin contents. More...
 
virtual Double_t GetStdDev (Int_t axis=1) const
 Returns the Standard Deviation (Sigma). More...
 
virtual Double_t GetStdDevError (Int_t axis=1) const
 Return error of standard deviation estimation for Normal distribution. More...
 
virtual Double_t GetSumOfWeights () const
 Return the sum of weights excluding under/overflows. More...
 
virtual TArrayDGetSumw2 ()
 
virtual const TArrayDGetSumw2 () const
 
virtual Int_t GetSumw2N () const
 
Double_t GetRMS (Int_t axis=1) const
 
Double_t GetRMSError (Int_t axis=1) const
 
virtual Double_t GetSkewness (Int_t axis=1) const
 For axis = 1, 2 or 3 returns skewness of the histogram along x, y or z axis. More...
 
TAxisGetXaxis ()
 
TAxisGetYaxis ()
 
TAxisGetZaxis ()
 
const TAxisGetXaxis () const
 
const TAxisGetYaxis () const
 
const TAxisGetZaxis () const
 
virtual Double_t Integral (Int_t binx1, Int_t binx2, Option_t *option="") const
 Return integral of bin contents in range [binx1,binx2] By default the integral is computed as the sum of bin contents in the range. More...
 
virtual Double_t IntegralAndError (Int_t binx1, Int_t binx2, Double_t &err, Option_t *option="") const
 Return integral of bin contents in range [binx1,binx2] and its error By default the integral is computed as the sum of bin contents in the range. More...
 
Bool_t IsBinOverflow (Int_t bin) const
 
Bool_t IsBinUnderflow (Int_t bin) const
 
virtual Double_t AndersonDarlingTest (const TH1 *h2, Option_t *option="") const
 Statistical test of compatibility in shape between this histogram and h2, using the Anderson-Darling 2 sample test. More...
 
virtual Double_t AndersonDarlingTest (const TH1 *h2, Double_t &advalue) const
 Same funciton as above but returning also the test statistic value. More...
 
virtual void Paint (Option_t *option="")
 Control routine to paint any kind of histograms. More...
 
virtual void Print (Option_t *option="") const
 Print some global quantities for this histogram. More...
 
virtual TH1Rebin (Int_t ngroup=2, const char *newname="", const Double_t *xbins=0)
 Rebin this histogram. More...
 
virtual void Rebuild (Option_t *option="")
 Using the current bin info, recompute the arrays for contents and errors. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove object from the list of functions. More...
 
virtual void ResetStats ()
 Reset the statistics including the number of entries and replace with values calculates from bin content The number of entries is set to the total bin content or (in case of weighted histogram) to number of effective entries. More...
 
virtual void SetAxisColor (Color_t color=1, Option_t *axis="X")
 Set color to draw the axis line and tick marks. More...
 
virtual void SetAxisRange (Double_t xmin, Double_t xmax, Option_t *axis="X")
 Set the "axis" range. More...
 
virtual void SetBarOffset (Float_t offset=0.25)
 
virtual void SetBarWidth (Float_t width=0.5)
 
virtual void SetBinError (Int_t bin, Double_t error)
 see convention for numbering bins in TH1::GetBin More...
 
virtual void SetBinError (Int_t binx, Int_t biny, Double_t error)
 see convention for numbering bins in TH1::GetBin More...
 
virtual void SetBinError (Int_t binx, Int_t biny, Int_t binz, Double_t error)
 see convention for numbering bins in TH1::GetBin More...
 
virtual void SetBinErrorOption (EBinErrorOpt type)
 
virtual UInt_t SetCanExtend (UInt_t extendBitMask)
 make the histogram axes extendable / not extendable according to the bit mask returns the previous bit mask specifying which axes are extendable More...
 
virtual void SetContent (const Double_t *content)
 Replace bin contents by the contents of array content. More...
 
virtual void SetContour (Int_t nlevels, const Double_t *levels=0)
 Set the number and values of contour levels. More...
 
virtual void SetContourLevel (Int_t level, Double_t value)
 Set value for one contour level. More...
 
virtual void SetDirectory (TDirectory *dir)
 By default when an histogram is created, it is added to the list of histogram objects in the current directory in memory. More...
 
virtual void SetEntries (Double_t n)
 
virtual void SetError (const Double_t *error)
 Replace bin errors by values in array error. More...
 
virtual void SetLabelColor (Color_t color=1, Option_t *axis="X")
 Set axis labels color. More...
 
virtual void SetLabelFont (Style_t font=62, Option_t *axis="X")
 Set font number used to draw axis labels. More...
 
virtual void SetLabelOffset (Float_t offset=0.005, Option_t *axis="X")
 Set offset between axis and axis' labels. More...
 
virtual void SetLabelSize (Float_t size=0.02, Option_t *axis="X")
 Set size of axis' labels. More...
 
virtual void SetMaximum (Double_t maximum=-1111)
 
virtual void SetMinimum (Double_t minimum=-1111)
 
virtual void SetName (const char *name)
 Change the name of this histogram. More...
 
virtual void SetNameTitle (const char *name, const char *title)
 Change the name and title of this histogram. More...
 
virtual void SetNdivisions (Int_t n=510, Option_t *axis="X")
 Set the number of divisions to draw an axis. More...
 
virtual void SetNormFactor (Double_t factor=1)
 
virtual void SetStats (Bool_t stats=kTRUE)
 Set statistics option on/off. More...
 
virtual void SetOption (Option_t *option=" ")
 
virtual void SetTickLength (Float_t length=0.02, Option_t *axis="X")
 Set the axis' tick marks length. More...
 
virtual void SetTitleFont (Style_t font=62, Option_t *axis="X")
 The the axis' title font. More...
 
virtual void SetTitleOffset (Float_t offset=1, Option_t *axis="X")
 Specify a parameter offset to control the distance between the axis and the axis' title. More...
 
virtual void SetTitleSize (Float_t size=0.02, Option_t *axis="X")
 The the axis' title size. More...
 
virtual void SetTitle (const char *title)
 Change (i.e. More...
 
virtual void SetXTitle (const char *title)
 
virtual void SetYTitle (const char *title)
 
virtual void SetZTitle (const char *title)
 
void UseCurrentStyle ()
 Copy current attributes from/to current style. More...
 
virtual Double_t GetCellContent (Int_t binx, Int_t biny) const
 
virtual Double_t GetCellError (Int_t binx, Int_t biny) const
 
virtual void RebinAxis (Double_t x, TAxis *axis)
 
virtual void SetCellContent (Int_t binx, Int_t biny, Double_t content)
 
virtual void SetCellError (Int_t binx, Int_t biny, Double_t content)
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TString &name, const TString &title)
 
 TNamed (const TNamed &named)
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator. More...
 
virtual ~TNamed ()
 
virtual void Clear (Option_t *option="")
 Set name and title to empty strings (""). More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare two TNamed objects. More...
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t IsSortable () const
 
virtual void ls (Option_t *option="") const
 List TNamed name and title. More...
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
Bool_t IsOnHeap () const
 
Bool_t IsZombie () const
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 
voidoperator new (size_t sz)
 
voidoperator new[] (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
void ResetBit (UInt_t f)
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
void InvertBit (UInt_t f)
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
- Public Member Functions inherited from TAttLine
 TAttLine ()
 AttLine default constructor. More...
 
 TAttLine (Color_t lcolor, Style_t lstyle, Width_t lwidth)
 AttLine normal constructor. More...
 
virtual ~TAttLine ()
 AttLine destructor. More...
 
void Copy (TAttLine &attline) const
 Copy this line attributes to a new TAttLine. More...
 
Int_t DistancetoLine (Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
 Compute distance from point px,py to a line. More...
 
virtual Color_t GetLineColor () const
 
virtual Style_t GetLineStyle () const
 
virtual Width_t GetLineWidth () const
 
virtual void Modify ()
 Change current line attributes if necessary. More...
 
virtual void ResetAttLine (Option_t *option="")
 Reset this line attributes to default values. More...
 
virtual void SaveLineAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
 Save line attributes as C++ statement(s) on output stream out. More...
 
virtual void SetLineAttributes ()
 Invoke the DialogCanvas Line attributes. More...
 
virtual void SetLineColor (Color_t lcolor)
 
virtual void SetLineColorAlpha (Color_t lcolor, Float_t lalpha)
 Set a transparent line color. More...
 
virtual void SetLineStyle (Style_t lstyle)
 
virtual void SetLineWidth (Width_t lwidth)
 
 ClassDef (TAttLine, 2)
 
- Public Member Functions inherited from TAttFill
 TAttFill ()
 
 TAttFill (Color_t fcolor, Style_t fstyle)
 AttFill normal constructor. More...
 
virtual ~TAttFill ()
 AttFill destructor. More...
 
void Copy (TAttFill &attfill) const
 Copy this fill attributes to a new TAttFill. More...
 
virtual Color_t GetFillColor () const
 
virtual Style_t GetFillStyle () const
 
virtual Bool_t IsTransparent () const
 
virtual void Modify ()
 Change current fill area attributes if necessary. More...
 
virtual void ResetAttFill (Option_t *option="")
 Reset this fill attributes to default values. More...
 
virtual void SaveFillAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
 Save fill attributes as C++ statement(s) on output stream out. More...
 
virtual void SetFillAttributes ()
 Invoke the DialogCanvas Fill attributes. More...
 
virtual void SetFillColor (Color_t fcolor)
 
virtual void SetFillColorAlpha (Color_t fcolor, Float_t falpha)
 Set a transparent fill color. More...
 
virtual void SetFillStyle (Style_t fstyle)
 
- Public Member Functions inherited from TAttMarker
 TAttMarker ()
 
 TAttMarker (Color_t color, Style_t style, Size_t msize)
 TAttMarker normal constructor. More...
 
virtual ~TAttMarker ()
 TAttMarker destructor. More...
 
void Copy (TAttMarker &attmarker) const
 Copy this marker attributes to a new TAttMarker. More...
 
virtual Color_t GetMarkerColor () const
 
virtual Style_t GetMarkerStyle () const
 
virtual Size_t GetMarkerSize () const
 
virtual void Modify ()
 Change current marker attributes if necessary. More...
 
virtual void ResetAttMarker (Option_t *toption="")
 Reset this marker attributes to the default values. More...
 
virtual void SaveMarkerAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
 Save line attributes as C++ statement(s) on output stream out. More...
 
virtual void SetMarkerAttributes ()
 Invoke the DialogCanvas Marker attributes. More...
 
virtual void SetMarkerColor (Color_t mcolor=1)
 
virtual void SetMarkerColorAlpha (Color_t mcolor, Float_t malpha)
 Set a transparent marker color. More...
 
virtual void SetMarkerStyle (Style_t mstyle=1)
 
virtual void SetMarkerSize (Size_t msize=1)
 
 ClassDef (TAttMarker, 2)
 
- Public Member Functions inherited from TArrayD
 TArrayD ()
 
 TArrayD (Int_t n)
 Create TArrayD object and set array size to n doubles. More...
 
 TArrayD (Int_t n, const Double_t *array)
 Create TArrayD object and initialize it with values of array. More...
 
 TArrayD (const TArrayD &array)
 Copy constructor. More...
 
TArrayDoperator= (const TArrayD &rhs)
 TArrayD assignment operator. More...
 
virtual ~TArrayD ()
 Delete TArrayD object. More...
 
void Adopt (Int_t n, Double_t *array)
 Adopt array arr into TArrayD, i.e. More...
 
void AddAt (Double_t c, Int_t i)
 Add double c at position i. Check for out of bounds. More...
 
Double_t At (Int_t i) const
 
void Copy (TArrayD &array) const
 
const Double_tGetArray () const
 
Double_tGetArray ()
 
Double_t GetAt (Int_t i) const
 
Stat_t GetSum () const
 
void Reset ()
 
void Reset (Double_t val)
 
void Set (Int_t n)
 Set size of this array to n doubles. More...
 
void Set (Int_t n, const Double_t *array)
 Set size of this array to n doubles and set the contents This function should not be called if the array was declared via Adopt. More...
 
void SetAt (Double_t v, Int_t i)
 
Double_toperator[] (Int_t i)
 
Double_t operator[] (Int_t i) const
 
- Public Member Functions inherited from TArray
 TArray ()
 
 TArray (Int_t n)
 
 TArray (const TArray &a)
 
TArrayoperator= (const TArray &rhs)
 
virtual ~TArray ()
 
Int_t GetSize () const
 

Static Public Member Functions

static void Approximate (Bool_t approx=kTRUE)
 static function set the fgApproximate flag. More...
 
- Static Public Member Functions inherited from TH1
static Int_t FitOptionsMake (Option_t *option, Foption_t &Foption)
 flag to call TH1::Sumw2 automatically at histogram creation time More...
 
static void AddDirectory (Bool_t add=kTRUE)
 Sets the flag controlling the automatic add of histograms in memory. More...
 
static Bool_t AddDirectoryStatus ()
 static function: cannot be inlined on Windows/NT More...
 
static Int_t GetDefaultBufferSize ()
 static function return the default buffer size for automatic histograms the parameter fgBufferSize may be changed via SetDefaultBufferSize More...
 
static Bool_t GetDefaultSumw2 ()
 return kTRUE if TH1::Sumw2 must be called when creating new histograms. More...
 
static void SetDefaultBufferSize (Int_t buffersize=1000)
 static function to set the default buffer size for automatic histograms. More...
 
static void SetDefaultSumw2 (Bool_t sumw2=kTRUE)
 static function. More...
 
static void SmoothArray (Int_t NN, Double_t *XX, Int_t ntimes=1)
 smooth array xx, translation of Hbook routine hsmoof.F based on algorithm 353QH twice presented by J. More...
 
static void StatOverflows (Bool_t flag=kTRUE)
 if flag=kTRUE, underflows and overflows are used by the Fill functions in the computation of statistics (mean value, StdDev). More...
 
static TH1TransformHisto (TVirtualFFT *fft, TH1 *h_output, Option_t *option)
 For a given transform (first parameter), fills the histogram (second parameter) with the transform output data, specified in the third parameter If the 2nd parameter h_output is empty, a new histogram (TH1D or TH2D) is created and the user is responsible for deleting it. More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 
- Static Public Member Functions inherited from TArray
static TArrayReadArray (TBuffer &b, const TClass *clReq)
 Read TArray object from buffer. More...
 
static void WriteArray (TBuffer &b, const TArray *a)
 Write TArray object to buffer. More...
 

Protected Member Functions

virtual Int_t BufferFill (Double_t, Double_t)
 accumulate arguments in buffer. More...
 
virtual Int_t BufferFill (Double_t, Double_t, Double_t)
 accumulate arguments in buffer. More...
 
virtual Int_t BufferFill (Double_t x, Double_t y, Double_t z, Double_t w)
 accumulate arguments in buffer. More...
 
void SetBins (const Int_t *nbins, const Double_t *range)
 
Int_t Fill (const Double_t *v)
 
virtual TProfileDoProfile (bool onX, const char *name, Int_t firstbin, Int_t lastbin, Option_t *option) const
 implementation of ProfileX or ProfileY for a TProfile2D Do correctly the combination of the bin averages when doing the projection More...
 
Int_t Fill (Double_t, Double_t)
 Increment cell defined by x,y by 1. More...
 
virtual Double_t RetrieveBinContent (Int_t bin) const
 
virtual Double_t GetBinErrorSqUnchecked (Int_t bin) const
 
- Protected Member Functions inherited from TH2D
virtual void UpdateBinContent (Int_t bin, Double_t content)
 raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin More...
 
- Protected Member Functions inherited from TH2
 TH2 ()
 
 TH2 (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup)
 See comments in the TH1 base class constructors. More...
 
 TH2 (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, Double_t ylow, Double_t yup)
 See comments in the TH1 base class constructors. More...
 
 TH2 (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, const Double_t *ybins)
 See comments in the TH1 base class constructors. More...
 
 TH2 (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Int_t nbinsy, const Double_t *ybins)
 See comments in the TH1 base class constructors. More...
 
 TH2 (const char *name, const char *title, Int_t nbinsx, const Float_t *xbins, Int_t nbinsy, const Float_t *ybins)
 See comments in the TH1 base class constructors. More...
 
virtual TH1DDoProjection (bool onX, const char *name, Int_t firstbin, Int_t lastbin, Option_t *option) const
 Internal (protected) method for performing projection on the X or Y axis called by ProjectionX or ProjectionY. More...
 
virtual TH1DDoQuantiles (bool onX, const char *name, Double_t prob) const
 Implementation of quantiles for x or y. More...
 
virtual void DoFitSlices (bool onX, TF1 *f1, Int_t firstbin, Int_t lastbin, Int_t cut, Option_t *option, TObjArray *arr)
 
Int_t Fill (Double_t)
 Invalid Fill method. More...
 
Int_t Fill (const char *, Double_t)
 Increment bin with namex with a weight w. More...
 
- Protected Member Functions inherited from TH1
 TH1 ()
 
 TH1 (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup)
 Normal constructor for fix bin size histograms. More...
 
 TH1 (const char *name, const char *title, Int_t nbinsx, const Float_t *xbins)
 Normal constructor for variable bin size histograms. More...
 
 TH1 (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins)
 Normal constructor for variable bin size histograms. More...
 
virtual Bool_t FindNewAxisLimits (const TAxis *axis, const Double_t point, Double_t &newMin, Double_t &newMax)
 finds new limits for the axis so that point is within the range and the limits are compatible with the previous ones (see TH1::Merge). More...
 
virtual void SavePrimitiveHelp (std::ostream &out, const char *hname, Option_t *option="")
 helper function for the SavePrimitive functions from TH1 or classes derived from TH1, eg TProfile, TProfile2D. More...
 
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 number values working for all histograms (1D, 2D and 3D) More...
 
virtual void DoFillN (Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1)
 internal method to fill histogram content from a vector called directly by TH1::BufferEmpty More...
 
- Protected Member Functions inherited from TObject
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
- Protected Member Functions inherited from TArray
Bool_t BoundsOk (const char *where, Int_t at) const
 
Bool_t OutOfBoundsError (const char *where, Int_t i) const
 

Protected Attributes

TArrayD fBinEntries
 
EErrorType fErrorMode
 
Double_t fZmin
 
Double_t fZmax
 
Bool_t fScaling
 
Double_t fTsumwz
 True when TProfile2D::Scale is called. More...
 
Double_t fTsumwz2
 
TArrayD fBinSumw2
 
- Protected Attributes inherited from TH2
Double_t fScalefactor
 
Double_t fTsumwy
 
Double_t fTsumwy2
 
Double_t fTsumwxy
 
- Protected Attributes inherited from TH1
Int_t fNcells
 
TAxis fXaxis
 
TAxis fYaxis
 
TAxis fZaxis
 
Short_t fBarOffset
 
Short_t fBarWidth
 
Double_t fEntries
 
Double_t fTsumw
 
Double_t fTsumw2
 
Double_t fTsumwx
 
Double_t fTsumwx2
 
Double_t fMaximum
 
Double_t fMinimum
 
Double_t fNormFactor
 
TArrayD fContour
 
TArrayD fSumw2
 
TString fOption
 
TListfFunctions
 
Int_t fBufferSize
 
Double_tfBuffer
 
TDirectoryfDirectory
 
Int_t fDimension
 Pointer to directory holding this histogram. More...
 
Double_tfIntegral
 Histogram dimension (1, 2 or 3 dim) More...
 
TVirtualHistPainterfPainter
 Integral of bins used by GetRandom. More...
 
EBinErrorOpt fBinStatErrOpt
 pointer to histogram painter More...
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 
- Protected Attributes inherited from TAttLine
Color_t fLineColor
 
Style_t fLineStyle
 
Width_t fLineWidth
 
- Protected Attributes inherited from TAttFill
Color_t fFillColor
 
Style_t fFillStyle
 
- Protected Attributes inherited from TAttMarker
Color_t fMarkerColor
 
Style_t fMarkerStyle
 
Size_t fMarkerSize
 

Static Protected Attributes

static Bool_t fgApproximate = kFALSE
 
- Static Protected Attributes inherited from TH1
static Int_t fgBufferSize = 1000
 
static Bool_t fgAddDirectory = kTRUE
 default buffer size for automatic histograms More...
 
static Bool_t fgStatOverflows = kFALSE
 flag to add histograms to the directory More...
 
static Bool_t fgDefaultSumw2 = kFALSE
 flag to use under/overflows in statistics More...
 

Private Member Functions

Double_tGetB ()
 
Double_tGetB2 ()
 
Double_tGetW ()
 
Double_tGetW2 ()
 
void SetBins (Int_t, Double_t, Double_t)
 Redefine x axis parameters. More...
 
void SetBins (Int_t, const Double_t *)
 Redefine x axis parameters with variable bin sizes. More...
 
void SetBins (Int_t, Double_t, Double_t, Int_t, Double_t, Double_t, Int_t, Double_t, Double_t)
 Redefine x, y and z axis parameters. More...
 
void SetBins (Int_t, const Double_t *, Int_t, const Double_t *, Int_t, const Double_t *)
 Redefine x, y and z axis parameters with variable bin sizes. More...
 

Friends

class TProfileHelper
 

Additional Inherited Members

- Public Types inherited from TH1
enum  EBinErrorOpt { kNormal = 0, kPoisson = 1, kPoisson2 = 2 }
 
enum  {
  kNoAxis = 0, kXaxis = BIT(0), kYaxis = BIT(1), kZaxis = BIT(2),
  kAllAxes = kXaxis | kYaxis | kZaxis
}
 
enum  {
  kNoStats = BIT(9), kUserContour = BIT(10), kLogX = BIT(15), kIsZoomed = BIT(16),
  kNoTitle = BIT(17), kIsAverage = BIT(18), kIsNotW = BIT(19)
}
 
enum  { kNstat = 13 }
 
- Public Types inherited from TObject
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 
- Public Attributes inherited from TArrayD
Double_tfArray
 
- Public Attributes inherited from TArray
Int_t fN
 
- Static Protected Member Functions inherited from TH1
static Bool_t RecomputeAxisLimits (TAxis &destAxis, const TAxis &anAxis)
 Finds new limits for the axis for the Merge function. More...
 
static Bool_t SameLimitsAndNBins (const TAxis &axis1, const TAxis &axis2)
 Same limits and bins. More...
 
static bool CheckAxisLimits (const TAxis *a1, const TAxis *a2)
 Check that the axis limits of the histograms are the same if a first and last bin is passed the axis is compared between the given range. More...
 
static bool CheckBinLimits (const TAxis *a1, const TAxis *a2)
 
static bool CheckBinLabels (const TAxis *a1, const TAxis *a2)
 check that axis have same labels More...
 
static bool CheckEqualAxes (const TAxis *a1, const TAxis *a2)
 Check that the axis are the same. More...
 
static bool CheckConsistentSubAxes (const TAxis *a1, Int_t firstBin1, Int_t lastBin1, const TAxis *a2, Int_t firstBin2=0, Int_t lastBin2=0)
 Check that two sub axis are the same the limits are defined by first bin and last bin N.B. More...
 
static bool CheckConsistency (const TH1 *h1, const TH1 *h2)
 Check histogram compatibility. More...
 

#include <TProfile2D.h>

+ Inheritance diagram for TProfile2D:
+ Collaboration diagram for TProfile2D:

Constructor & Destructor Documentation

TProfile2D::TProfile2D ( )
TProfile2D::TProfile2D ( const char *  name,
const char *  title,
Int_t  nx,
Double_t  xlow,
Double_t  xup,
Int_t  ny,
Double_t  ylow,
Double_t  yup,
Double_t  zlow,
Double_t  zup,
Option_t option = "" 
)

Constructor for Profile2D histograms with range in z The first eight parameters are similar to TH2D::TH2D.

Only the values of Z between ZMIN and ZMAX will be considered at filling time. zmin and zmax will also be the maximum and minimum values on the z scale when drawing the profile2D.

See TProfile2D::BuildOptions for more explanations on errors

Definition at line 154 of file TProfile2D.cxx.

TProfile2D::TProfile2D ( const char *  name,
const char *  title,
Int_t  nx,
Double_t  xlow,
Double_t  xup,
Int_t  ny,
Double_t  ylow,
Double_t  yup,
Option_t option = "" 
)

Normal Constructor for Profile histograms -*.

The first eight parameters are similar to TH2D::TH2D. All values of z are accepted at filling time. To fill a profile2D histogram, one must use TProfile2D::Fill function.

Note that when filling the profile histogram the function Fill checks if the variable z is betyween fZmin and fZmax. If a minimum or maximum value is set for the Z scale before filling, then all values below zmin or above zmax will be discarded. Setting the minimum or maximum value for the Z scale before filling has the same effect as calling the special TProfile2D constructor below where zmin and zmax are specified.

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

See TProfile2D::BuildOptions for explanation of parameters

see other constructors below with all possible combinations of fix and variable bin size like in TH2D.

Definition at line 109 of file TProfile2D.cxx.

TProfile2D::TProfile2D ( const char *  name,
const char *  title,
Int_t  nbinsx,
const Double_t xbins,
Int_t  nbinsy,
Double_t  ylow,
Double_t  yup,
Option_t option = "" 
)

Create a 2-D Profile with variable bins in X and fix bins in Y.

Definition at line 119 of file TProfile2D.cxx.

TProfile2D::TProfile2D ( const char *  name,
const char *  title,
Int_t  nbinsx,
Double_t  xlow,
Double_t  xup,
Int_t  nbinsy,
const Double_t ybins,
Option_t option = "" 
)

Create a 2-D Profile with fix bins in X and variable bins in Y.

Definition at line 128 of file TProfile2D.cxx.

TProfile2D::TProfile2D ( const char *  name,
const char *  title,
Int_t  nbinsx,
const Double_t xbins,
Int_t  nbinsy,
const Double_t ybins,
Option_t option = "" 
)

Create a 2-D Profile with variable bins in X and variable bins in Y.

Definition at line 137 of file TProfile2D.cxx.

TProfile2D::TProfile2D ( const TProfile2D profile)

Copy constructor.

Definition at line 192 of file TProfile2D.cxx.

TProfile2D::~TProfile2D ( )
virtual

Default destructor for Profile2D histograms.

Definition at line 82 of file TProfile2D.cxx.

Member Function Documentation

Bool_t TProfile2D::Add ( TF1 h1,
Double_t  c1 = 1,
Option_t option = "" 
)
virtual

Performs the operation: this = this + c1*f1.

Reimplemented from TH1.

Definition at line 201 of file TProfile2D.cxx.

Referenced by TProofDrawProfile2D::SlaveBegin().

Bool_t TProfile2D::Add ( const TH1 h1,
Double_t  c1 = 1 
)
virtual

Performs the operation: this = this + c1*h1.

Reimplemented from TH1.

Definition at line 211 of file TProfile2D.cxx.

Bool_t TProfile2D::Add ( const TH1 h1,
const TH1 h2,
Double_t  c1 = 1,
Double_t  c2 = 1 
)
virtual

Replace contents of this profile2D by the addition of h1 and h2*.

this = c1*h1 + c2*h2

Reimplemented from TH1.

Definition at line 230 of file TProfile2D.cxx.

void TProfile2D::Approximate ( Bool_t  approx = kTRUE)
static

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 profile2D is less than 10404 (eg 100x100)
  • the bin number of entries is small ( <5)
  • the estimated bin error is extremely small compared to the bin content (see TProfile2D::GetBinError)

Definition at line 258 of file TProfile2D.cxx.

Int_t TProfile2D::BufferEmpty ( Int_t  action = 0)
virtual

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

Reimplemented from TH2.

Definition at line 272 of file TProfile2D.cxx.

Referenced by BufferFill(), Divide(), and SetBuffer().

virtual Int_t TProfile2D::BufferFill ( Double_t  x,
Double_t  w 
)
inlineprotectedvirtual

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

Reimplemented from TH2.

Definition at line 47 of file TProfile2D.h.

Referenced by Fill().

virtual Int_t TProfile2D::BufferFill ( Double_t  x,
Double_t  y,
Double_t  w 
)
inlineprotectedvirtual

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

Reimplemented from TH2.

Definition at line 48 of file TProfile2D.h.

Int_t TProfile2D::BufferFill ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  w 
)
protectedvirtual

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

Definition at line 336 of file TProfile2D.cxx.

void TProfile2D::BuildOptions ( Double_t  zmin,
Double_t  zmax,
Option_t option 
)

Set Profile2D histogram structure and options.

zmin: minimum value allowed for z zmax: maximum value allowed for z if (zmin = zmax = 0) there are no limits on the allowed z values (zmin = -inf, zmax = +inf)

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

Definition at line 172 of file TProfile2D.cxx.

Referenced by TProfile2D().

void TProfile2D::Copy ( TObject hnew) const
virtual

Copy a Profile2D histogram to a new profile2D histogram*.

Reimplemented from TH2D.

Definition at line 364 of file TProfile2D.cxx.

Bool_t TProfile2D::Divide ( TF1 h1,
Double_t  c1 = 1 
)
virtual

Performs the operation: this = this/(c1*f1) This function is not implemented.

Reimplemented from TH1.

Definition at line 394 of file TProfile2D.cxx.

Bool_t TProfile2D::Divide ( const TH1 h1)
virtual

Divide this profile2D by h1.

this = this/h1

This function return kFALSE if the divide operation failed

Reimplemented from TH1.

Definition at line 407 of file TProfile2D.cxx.

Bool_t TProfile2D::Divide ( const TH1 h1,
const TH1 h2,
Double_t  c1 = 1,
Double_t  c2 = 1,
Option_t option = "" 
)
virtual

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

Reimplemented from TH1.

Definition at line 491 of file TProfile2D.cxx.

TProfile * TProfile2D::DoProfile ( bool  onX,
const char *  name,
Int_t  firstbin,
Int_t  lastbin,
Option_t option 
) const
protectedvirtual

implementation of ProfileX or ProfileY for a TProfile2D Do correctly the combination of the bin averages when doing the projection

Reimplemented from TH2.

Definition at line 1307 of file TProfile2D.cxx.

Referenced by ProfileX(), and ProfileY().

void TProfile2D::ExtendAxis ( Double_t  x,
TAxis axis 
)
virtual

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 extended histogram. Takes into account errors (Sumw2) if any. The axis must be extendable before invoking this function. Ex: h->GetXaxis()->SetCanExtend(kTRUE)

Reimplemented from TH1.

Definition at line 1421 of file TProfile2D.cxx.

Referenced by BufferEmpty().

Int_t TProfile2D::Fill ( const Double_t v)
inlineprotected
Int_t TProfile2D::Fill ( Double_t  x,
Double_t  y 
)
inlineprotectedvirtual

Increment cell defined by x,y by 1.

if x or/and y is less than the low-edge of the corresponding axis first bin, the Underflow cell is incremented. if x or/and y is greater than the upper edge of corresponding axis last bin, the Overflow cell is incremented.

If the storage of the sum of squares of weights has been triggered, via the function Sumw2, then the sum of the squares of weights is incremented by 1 in the cell corresponding to x,y.

The function returns the corresponding global bin number which has its content incremented by 1

Reimplemented from TH2.

Definition at line 59 of file TProfile2D.h.

Int_t TProfile2D::Fill ( Double_t  x,
Double_t  y,
Double_t  z 
)
virtual

Fill a Profile2D histogram (no weights) *-* =======================================.

Reimplemented from TH2.

Definition at line 589 of file TProfile2D.cxx.

Int_t TProfile2D::Fill ( Double_t  x,
const char *  namey,
Double_t  z 
)
virtual

Fill a Profile2D histogram (no weights)

Reimplemented from TH2.

Definition at line 630 of file TProfile2D.cxx.

Int_t TProfile2D::Fill ( const char *  namex,
Double_t  y,
Double_t  z 
)
virtual

Fill a Profile2D histogram (no weights)

Reimplemented from TH2.

Definition at line 705 of file TProfile2D.cxx.

Int_t TProfile2D::Fill ( const char *  namex,
const char *  namey,
Double_t  z 
)
virtual

Fill a Profile2D histogram (no weights)

Reimplemented from TH2.

Definition at line 668 of file TProfile2D.cxx.

Int_t TProfile2D::Fill ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  w 
)
virtual

Fill a Profile2D histogram with weights.

Definition at line 742 of file TProfile2D.cxx.

Double_t* TProfile2D::GetB ( )
inlineprivate

Definition at line 66 of file TProfile2D.h.

Referenced by Divide(), and Rebin2D().

Double_t* TProfile2D::GetB2 ( )
inlineprivate

Definition at line 67 of file TProfile2D.h.

Referenced by Rebin2D().

Double_t TProfile2D::GetBinContent ( Int_t  bin) const
virtual

Return bin content of a Profile2D histogram.

Reimplemented from TH2.

Definition at line 784 of file TProfile2D.cxx.

Referenced by ProjectionXY().

virtual Double_t TProfile2D::GetBinContent ( Int_t  binx,
Int_t  biny 
) const
inlinevirtual

Reimplemented from TH2.

Definition at line 111 of file TProfile2D.h.

Referenced by GetBinContent().

virtual Double_t TProfile2D::GetBinContent ( Int_t  binx,
Int_t  biny,
Int_t   
) const
inlinevirtual

Reimplemented from TH2.

Definition at line 112 of file TProfile2D.h.

Referenced by GetBinContent().

Double_t TProfile2D::GetBinEffectiveEntries ( Int_t  bin)
virtual

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.

*-* =========================================

Definition at line 815 of file TProfile2D.cxx.

Double_t TProfile2D::GetBinEntries ( Int_t  bin) const
virtual

Return bin entries of a Profile2D histogram.

Definition at line 797 of file TProfile2D.cxx.

Referenced by THistPainter::GetObjectInfo(), THistPainter::PaintColorLevels(), ProjectionXY(), and SavePrimitive().

Double_t TProfile2D::GetBinError ( Int_t  bin) const
virtual

-*Return bin error of a Profile2D histogram

Computing errors: A moving field

The computation of errors for a TProfile2D 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 TProfile2D is projected (ProjectionX). The previous algorithm generated a N^2 problem when projecting a TProfile2D 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. (see also comments in TProfile::GetBinError)

Reimplemented from TH1.

Definition at line 838 of file TProfile2D.cxx.

Referenced by GetBinErrorSqUnchecked(), and ProjectionXY().

virtual Double_t TProfile2D::GetBinError ( Int_t  binx,
Int_t  biny 
) const
inlinevirtual

Reimplemented from TH1.

Definition at line 114 of file TProfile2D.h.

Referenced by GetBinError().

virtual Double_t TProfile2D::GetBinError ( Int_t  binx,
Int_t  biny,
Int_t   
) const
inlinevirtual

Reimplemented from TH1.

Definition at line 115 of file TProfile2D.h.

Referenced by GetBinError().

virtual Double_t TProfile2D::GetBinErrorSqUnchecked ( Int_t  bin) const
inlineprotectedvirtual

Reimplemented from TH1.

Definition at line 63 of file TProfile2D.h.

virtual TArrayD* TProfile2D::GetBinSumw2 ( )
inlinevirtual
virtual const TArrayD* TProfile2D::GetBinSumw2 ( ) const
inlinevirtual

Definition at line 119 of file TProfile2D.h.

Option_t * TProfile2D::GetErrorOption ( ) const

-*Return option to compute profile2D errors *-* =========================================

Definition at line 847 of file TProfile2D.cxx.

void TProfile2D::GetStats ( Double_t stats) const
virtual

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

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.

Reimplemented from TH2.

Definition at line 873 of file TProfile2D.cxx.

Double_t* TProfile2D::GetW ( )
inlineprivate

Definition at line 68 of file TProfile2D.h.

Referenced by Divide(), and Rebin2D().

Double_t* TProfile2D::GetW2 ( )
inlineprivate

Definition at line 69 of file TProfile2D.h.

Referenced by Divide(), and Rebin2D().

virtual Double_t TProfile2D::GetZmax ( ) const
inlinevirtual

Definition at line 123 of file TProfile2D.h.

virtual Double_t TProfile2D::GetZmin ( ) const
inlinevirtual

Definition at line 122 of file TProfile2D.h.

void TProfile2D::LabelsDeflate ( Option_t axis = "X")
virtual

Reduce the number of bins for this axis to the number of bins having a label.

Reimplemented from TH1.

Definition at line 933 of file TProfile2D.cxx.

void TProfile2D::LabelsInflate ( Option_t ax = "X")
virtual

Double the number of bins for axis.

Refill histogram This function is called by TAxis::FindBin(const char *label)

Reimplemented from TH1.

Definition at line 943 of file TProfile2D.cxx.

void TProfile2D::LabelsOption ( Option_t option = "h",
Option_t axis = "X" 
)
virtual

Set option(s) to draw axis with labels option = "a" sort by alphabetic order = ">" sort by decreasing values = "<" sort by increasing values = "h" draw labels horizonthal = "v" draw labels vertical = "u" draw labels up (end of label right adjusted) = "d" draw labels down (start of label left adjusted)

Reimplemented from TH1.

Definition at line 958 of file TProfile2D.cxx.

Long64_t TProfile2D::Merge ( TCollection li)
virtual

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.

Reimplemented from TH2.

Definition at line 1125 of file TProfile2D.cxx.

Bool_t TProfile2D::Multiply ( TF1 h1,
Double_t  c1 = 1 
)
virtual

Performs the operation: this = this*c1*f1.

Reimplemented from TH1.

Definition at line 1133 of file TProfile2D.cxx.

Bool_t TProfile2D::Multiply ( const TH1 h1)
virtual

Multiply this profile2D by h1 - *-* =============================.

this = this*h1

Reimplemented from TH1.

Definition at line 1146 of file TProfile2D.cxx.

Bool_t TProfile2D::Multiply ( const TH1 h1,
const TH1 h2,
Double_t  c1 = 1,
Double_t  c2 = 1,
Option_t option = "" 
)
virtual

*-*Replace contents of this profile2D by multiplication of h1 by h2*-* *-* ================================================================

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

Reimplemented from TH1.

Definition at line 1160 of file TProfile2D.cxx.

TProfile * TProfile2D::ProfileX ( const char *  name = "_pfx",
Int_t  firstybin = 0,
Int_t  lastybin = -1,
Option_t option = "" 
) const

*-*Project a 2-D histogram into a profile histogram along X *-* ========================================================

The projection is made from the channels along the Y axis ranging from firstybin to lastybin included. The result is a 1D profile which contains the combination of all the considered bins along Y By default, bins 1 to ny are included When all bins are included, the number of entries in the projection is set to the number of entries of the 2-D histogram, otherwise the number of entries is incremented by 1 for all non empty cells.

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

Definition at line 1275 of file TProfile2D.cxx.

TProfile * TProfile2D::ProfileY ( const char *  name = "_pfy",
Int_t  firstxbin = 0,
Int_t  lastxbin = -1,
Option_t option = "" 
) const

*-*Project a 2-D histogram into a profile histogram along X *-* ========================================================

The projection is made from the channels along the X axis ranging from firstybin to lastybin included. The result is a 1D profile which contains the combination of all the considered bins along X By default, bins 1 to ny are included When all bins are included, the number of entries in the projection is set to the number of entries of the 2-D histogram, otherwise the number of entries is incremented by 1 for all non empty cells.

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

Definition at line 1298 of file TProfile2D.cxx.

TH2D * TProfile2D::ProjectionXY ( const char *  name = "_pxy",
Option_t option = "e" 
) const

*-*Project this profile2D into a 2-D histogram along X,Y -* *-* =====================================================

The projection is always of the type TH2D.

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

Definition at line 1191 of file TProfile2D.cxx.

Referenced by DoProfile().

void TProfile2D::PutStats ( Double_t stats)
virtual

Replace current statistics with the values in array stats.

Reimplemented from TH2.

Definition at line 1382 of file TProfile2D.cxx.

Referenced by TH3::DoProjectProfile2D().

TProfile2D * TProfile2D::Rebin2D ( Int_t  nxgroup = 2,
Int_t  nygroup = 2,
const char *  newname = "" 
)
virtual

Rebin this histogram grouping nxgroup/nygroup bins along the xaxis/yaxis together.

if newname is not blank a new profile hnew is created. else the current histogram is modified (default) The parameter nxgroup/nygroup indicate how many bins along the xaxis/yaxis of this have to be merged into one bin of hnew If the original profile has errors stored (via Sumw2), the resulting profile has new errors correctly calculated.

examples: if hpxpy is an existing TProfile2D profile with 40 x 40 bins hpxpy->Rebin2D(); // merges two bins along the xaxis and yaxis in one // Carefull: previous contents of hpxpy are lost hpxpy->Rebin2D(3,5); // merges 3 bins along the xaxis and 5 bins along the yaxis in one // Carefull: previous contents of hpxpy are lost hpxpy->RebinX(5); //merges five bins along the xaxis in one in hpxpy TProfile2D *hnew = hpxpy->RebinY(5,"hnew"); // creates a new profile hnew // merging 5 bins of hpxpy along the yaxis in one bin

NOTE : If nxgroup/nygroup is not an exact divider of the number of bins, along the xaxis/yaxis the top limit(s) of the rebinned profile is changed to the upper edge of the xbin=newxbins*nxgroup resp. ybin=newybins*nygroup and the remaining bins are added to the overflow bin. Statistics will be recomputed from the new bin contents.

Reimplemented from TH2.

Definition at line 1456 of file TProfile2D.cxx.

Referenced by RebinX(), and RebinY().

TProfile2D * TProfile2D::RebinX ( Int_t  ngroup = 2,
const char *  newname = "" 
)
virtual

Rebin only the X axis see Rebin2D.

Reimplemented from TH2.

Definition at line 1741 of file TProfile2D.cxx.

TProfile2D * TProfile2D::RebinY ( Int_t  ngroup = 2,
const char *  newname = "" 
)
virtual

Rebin only the Y axis see Rebin2D.

Reimplemented from TH2.

Definition at line 1749 of file TProfile2D.cxx.

void TProfile2D::Reset ( Option_t option = "")
virtual

-*Reset contents of a Profile2D histogram *-* =======================================

Reimplemented from TH2D.

Definition at line 1399 of file TProfile2D.cxx.

Referenced by TProofDrawProfile2D::Begin(), TH3::DoProjectProfile2D(), and TProofDrawProfile2D::Terminate().

virtual Double_t TProfile2D::RetrieveBinContent ( Int_t  bin) const
inlineprotectedvirtual

Reimplemented from TH2D.

Definition at line 61 of file TProfile2D.h.

void TProfile2D::SavePrimitive ( std::ostream &  out,
Option_t option = "" 
)
virtual

Save primitive as a C++ statement(s) on output stream out.

Reimplemented from TH1.

Definition at line 1756 of file TProfile2D.cxx.

void TProfile2D::Scale ( Double_t  c1 = 1,
Option_t option = "" 
)
virtual

Multiply this profile2D by a constant c1.

this = c1*this

This function uses the services of TProfile2D::Add

Reimplemented from TH1.

Definition at line 1815 of file TProfile2D.cxx.

void TProfile2D::SetBinEntries ( Int_t  bin,
Double_t  w 
)
virtual

Set the number of entries in bin -.

Definition at line 1823 of file TProfile2D.cxx.

Referenced by TProfile3D::DoProjectProfile2D().

void TProfile2D::SetBins ( const Int_t nbins,
const Double_t range 
)
inlineprotected

Definition at line 52 of file TProfile2D.h.

Referenced by TH3::DoProjectProfile2D(), Rebin2D(), and SetBins().

void TProfile2D::SetBins ( Int_t  nx,
Double_t  xmin,
Double_t  xmax 
)
inlineprivatevirtual

Redefine x axis parameters.

The X axis parameters are modified. The bins content array is resized if errors (Sumw2) the errors array is resized The previous bin contents are lost To change only the axis limits, see TAxis::SetRange

Reimplemented from TH1.

Definition at line 70 of file TProfile2D.h.

void TProfile2D::SetBins ( Int_t  nx,
const Double_t xBins 
)
inlineprivatevirtual

Redefine x axis parameters with variable bin sizes.

The X axis parameters are modified. The bins content array is resized if errors (Sumw2) the errors array is resized The previous bin contents are lost To change only the axis limits, see TAxis::SetRange xBins is supposed to be of length nx+1

Reimplemented from TH1.

Definition at line 72 of file TProfile2D.h.

void TProfile2D::SetBins ( Int_t  nx,
Double_t  xmin,
Double_t  xmax,
Int_t  ny,
Double_t  ymin,
Double_t  ymax,
Int_t  nz,
Double_t  zmin,
Double_t  zmax 
)
inlineprivatevirtual

Redefine x, y and z axis parameters.

The X, Y and Z axis parameters are modified. The bins content array is resized if errors (Sumw2) the errors array is resized The previous bin contents are lost To change only the axis limits, see TAxis::SetRange

Reimplemented from TH1.

Definition at line 74 of file TProfile2D.h.

void TProfile2D::SetBins ( Int_t  nx,
const Double_t xBins,
Int_t  ny,
const Double_t yBins,
Int_t  nz,
const Double_t zBins 
)
inlineprivatevirtual

Redefine x, y and z axis parameters with variable bin sizes.

The X, Y and Z axis parameters are modified. The bins content array is resized if errors (Sumw2) the errors array is resized The previous bin contents are lost To change only the axis limits, see TAxis::SetRange xBins is supposed to be of length nx+1, yBins is supposed to be of length ny+1, zBins is supposed to be of length nz+1

Reimplemented from TH1.

Definition at line 76 of file TProfile2D.h.

void TProfile2D::SetBins ( Int_t  nbinsx,
Double_t  xmin,
Double_t  xmax,
Int_t  nbinsy,
Double_t  ymin,
Double_t  ymax 
)
virtual

Redefine x and y axis parameters -.

Reimplemented from TH1.

Definition at line 1831 of file TProfile2D.cxx.

void TProfile2D::SetBins ( Int_t  nx,
const Double_t xBins,
Int_t  ny,
const Double_t yBins 
)
virtual

Redefine x and y axis parameters for variable bin sizes - -*.

Reimplemented from TH1.

Definition at line 1841 of file TProfile2D.cxx.

void TProfile2D::SetBinsLength ( Int_t  n = -1)
virtual

Set total number of bins including under/overflow Reallocate bin contents array.

Reimplemented from TH2D.

Definition at line 1852 of file TProfile2D.cxx.

void TProfile2D::SetBuffer ( Int_t  buffersize,
Option_t option = "" 
)
virtual

set the buffer size in units of 8 bytes (double)

Reimplemented from TH1.

Definition at line 1861 of file TProfile2D.cxx.

Referenced by TProofDrawProfile2D::SlaveBegin(), and TProfile2D().

void TProfile2D::SetErrorOption ( Option_t option = "")
virtual

Set option to compute profile2D errors The computation of the bin errors is based on the parameter option:

  • ' ' (Default) The bin errors are the standard error on the mean of the bin profiled values (Z), i.e. the standard error of the bin contents. Note that if TProfile::Approximate() is called, an approximation is used when the spread in Z is 0 and the number of bin entries is > 0
  • 's' The bin errors are the standard deviations of the Z bin values Note that if TProfile::Approximate() is called, an approximation is used when the spread in Z 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 Z 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 z +/- dz, and the profile is filled with values y and weights z = 1/dz**2

See TProfile::BuildOptions for a detailed explanation of all options

Definition at line 1898 of file TProfile2D.cxx.

Referenced by BuildOptions().

void TProfile2D::Sumw2 ( Bool_t  flag = kTRUE)
virtual

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 is false the structure is deleted

Reimplemented from TH1.

Definition at line 1946 of file TProfile2D.cxx.

Referenced by TProfile3D::DoProjectProfile2D(), TH3::DoProjectProfile2D(), and Fill().

Friends And Related Function Documentation

friend class TProfileHelper
friend

Definition at line 34 of file TProfile2D.h.

Member Data Documentation

TArrayD TProfile2D::fBinEntries
protected
TArrayD TProfile2D::fBinSumw2
protected
EErrorType TProfile2D::fErrorMode
protected

Definition at line 38 of file TProfile2D.h.

Referenced by Copy(), and GetErrorOption().

Bool_t TProfile2D::fgApproximate = kFALSE
staticprotected

Definition at line 45 of file TProfile2D.h.

Referenced by Approximate().

Bool_t TProfile2D::fScaling
protected

Definition at line 41 of file TProfile2D.h.

Referenced by BuildOptions(), and Copy().

Double_t TProfile2D::fTsumwz
protected

True when TProfile2D::Scale is called.

Definition at line 42 of file TProfile2D.h.

Referenced by BuildOptions(), Copy(), Divide(), ExtendAxis(), Fill(), GetStats(), PutStats(), and Reset().

Double_t TProfile2D::fTsumwz2
protected

Definition at line 43 of file TProfile2D.h.

Referenced by BuildOptions(), Copy(), Divide(), ExtendAxis(), Fill(), GetStats(), PutStats(), and Reset().

Double_t TProfile2D::fZmax
protected

Definition at line 40 of file TProfile2D.h.

Referenced by BuildOptions(), Copy(), Fill(), GetZmax(), and SavePrimitive().

Double_t TProfile2D::fZmin
protected

Definition at line 39 of file TProfile2D.h.

Referenced by BuildOptions(), Copy(), Fill(), GetZmin(), and SavePrimitive().


The documentation for this class was generated from the following files: