204 TObject*
Clone(
const char *newname =
"")
const override;
418 void SetTitle(
const char *title)
override;
453 std::string printValue(
TH1 *val);
716 extern TH1 *
R__H(
const char *hname);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDefOverride(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
TH1C operator+(const TH1C &h1, const TH1C &h2)
Operator +.
TH1C operator-(const TH1C &h1, const TH1C &h2)
Operator -.
TH1C operator/(const TH1C &h1, const TH1C &h2)
Operator /.
TH1 * R__H(Int_t hid)
return pointer to histogram with name hid if id >=0 h_id if id <0
TH1C operator*(Double_t c1, const TH1C &h1)
Operator *.
R__EXTERN Foption_t Foption
Array of chars or bytes (8 bits per element).
Array of doubles (64 bits per element).
Array of floats (32 bits per element).
Array of integers (32 bits per element).
Array of long64s (64 bits per element).
Array of shorts (16 bits per element).
Fill Area Attributes class.
Class to manage histogram axis.
Using a TBrowser one can browse all ROOT objects.
Collection abstract base class.
Describe directory structure in memory.
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
1-D histogram with a byte per channel (see TH1 documentation)
~TH1C() override
Destructor.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
TH1C & operator=(const TH1C &h1)
Operator =.
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
void Copy(TObject &hnew) const override
Copy this to newth1.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
void Reset(Option_t *option="") override
Reset.
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
1-D histogram with a double per channel (see TH1 documentation)
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
~TH1D() override
Destructor.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
void Copy(TObject &hnew) const override
Copy this to newth1.
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
TH1D & operator=(const TH1D &h1)
Operator =.
void AddBinContent(Int_t bin, Double_t w) override
Increment bin content by a weight w Passing an out-of-range bin leads to undefined behavior.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
1-D histogram with a float per channel (see TH1 documentation)
void AddBinContent(Int_t bin, Double_t w) override
Increment bin content by a weight w.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
TH1F & operator=(const TH1F &h1)
Operator =.
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
void Copy(TObject &hnew) const override
Copy this to newth1.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH1F() override
Destructor.
1-D histogram with an int per channel (see TH1 documentation)
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
~TH1I() override
Destructor.
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
void Copy(TObject &hnew) const override
Copy this to newth1.
TH1I & operator=(const TH1I &h1)
Operator =.
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
1-D histogram with a long64 per channel (see TH1 documentation)
TH1L & operator=(const TH1L &h1)
Operator =.
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
void AddBinContent(Int_t bin) override
Increment bin content by 1.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH1L() override
Destructor.
void Copy(TObject &hnew) const override
Copy this to newth1.
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
1-D histogram with a short per channel (see TH1 documentation)
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
TH1S & operator=(const TH1S &h1)
Operator =.
void Copy(TObject &hnew) const override
Copy this to newth1.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH1S() override
Destructor.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
TH1 is the base class of all histogram classes in ROOT.
~TH1() override
Histogram default destructor.
virtual void SetLabelFont(Style_t font=62, Option_t *axis="X")
Set font number used to draw axis labels.
virtual void SetError(const Double_t *error)
Replace bin errors by values in array error.
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
virtual void FitPanel()
Display a panel with all histogram fit options.
Double_t * fBuffer
[fBufferSize] entry buffer
virtual Int_t AutoP2FindLimits(Double_t min, Double_t max)
Buffer-based estimate of the histogram range using the power of 2 algorithm.
void SetStatOverflows(EStatOverflows statOverflows)
See GetStatOverflows for more information.
virtual Double_t GetEffectiveEntries() const
Number of effective entries of the histogram.
char * GetObjectInfo(Int_t px, Int_t py) const override
Redefines TObject::GetObjectInfo.
virtual void Smooth(Int_t ntimes=1, Option_t *option="")
Smooth bin contents of this histogram.
virtual void SetNormFactor(Double_t factor=1)
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
virtual void Rebuild(Option_t *option="")
Using the current bin info, recompute the arrays for contents and errors.
virtual void SetBarOffset(Float_t offset=0.25)
Set the bar offset as fraction of the bin width for drawing mode "B".
virtual Color_t GetLabelColor(Option_t *axis="X") const
Return the "axis" label color.
static Bool_t fgStatOverflows
! Flag to use under/overflows in statistics
virtual Int_t FindLastBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
Find last bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold i...
virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Set the axis' title size.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a line.
virtual Bool_t Multiply(TF1 *f1, Double_t c1=1)
Performs the operation:
virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Set offset between axis and axis' labels.
@ kNoAxis
NOTE: Must always be 0 !!!
Int_t fNcells
Number of bins(1D), cells (2D) +U/Overflows.
virtual void GetStats(Double_t *stats) const
fill the array stats from the contents of this histogram The array stats must be correctly dimensione...
void Copy(TObject &hnew) const override
Copy this histogram structure to newth1.
virtual Double_t GetCellContent(Int_t binx, Int_t biny) const
void SetTitle(const char *title) override
Change/set the title.
virtual Double_t GetBinError(Int_t binx, Int_t biny) const
Double_t fTsumw
Total Sum of weights.
virtual EBinErrorOpt GetBinErrorOption() const
virtual Float_t GetBarWidth() const
Double_t fTsumw2
Total Sum of squares of weights.
static void StatOverflows(Bool_t flag=kTRUE)
if flag=kTRUE, underflows and overflows are used by the Fill functions in the computation of statisti...
TDirectory * GetDirectory() const
virtual Double_t GetMinimumStored() const
virtual Float_t GetBarOffset() const
TList * fFunctions
->Pointer to list of functions (fits and user)
virtual void RebinAxis(Double_t x, TAxis *axis)
EStatOverflows GetStatOverflows() const
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
static Bool_t fgAddDirectory
! Flag to add histograms to the directory
static int CheckConsistency(const TH1 *h1, const TH1 *h2)
Check histogram compatibility.
static Int_t GetDefaultBufferSize()
Static function return the default buffer size for automatic histograms the parameter fgBufferSize ma...
virtual Double_t DoIntegral(Int_t ix1, Int_t ix2, Int_t iy1, Int_t iy2, Int_t iz1, Int_t iz2, Double_t &err, Option_t *opt, Bool_t doerr=kFALSE) const
Internal function compute integral and optionally the error between the limits specified by the bin n...
Double_t fTsumwx2
Total Sum of weight*X*X.
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
TH1()
Histogram default constructor.
static TH1 * TransformHisto(TVirtualFFT *fft, TH1 *h_output, Option_t *option)
For a given transform (first parameter), fills the histogram (second parameter) with the transform ou...
void UseCurrentStyle() override
Copy current attributes from/to current style.
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X")
Sort bins with labels or set option(s) to draw axis with labels.
virtual Int_t GetNbinsY() const
Short_t fBarOffset
(1000*offset) for bar charts or legos
virtual Double_t Chi2TestX(const TH1 *h2, Double_t &chi2, Int_t &ndf, Int_t &igood, Option_t *option="UU", Double_t *res=nullptr) const
The computation routine of the Chisquare test.
static bool CheckBinLimits(const TAxis *a1, const TAxis *a2)
Check bin limits.
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption)
Decode string choptin and fill fitOption structure.
virtual Int_t GetNbinsZ() const
virtual Double_t GetNormFactor() 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.
virtual Double_t GetSkewness(Int_t axis=1) const
virtual void ClearUnderflowAndOverflow()
Remove all the content from the underflow and overflow bins, without changing the number of entries A...
virtual Double_t GetContourLevelPad(Int_t level) const
Return the value of contour number "level" in Pad coordinates.
virtual void SetXTitle(const char *title)
virtual TH1 * DrawNormalized(Option_t *option="", Double_t norm=1) const
Draw a normalized copy of this histogram.
EStatOverflows
Enumeration specifying the way to treat statoverflow.
@ kNeutral
Adapt to the global flag.
@ kIgnore
Override global flag ignoring the overflows.
@ kConsider
Override global flag considering the overflows.
virtual Int_t GetDimension() const
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
virtual Double_t GetBinContent(Int_t bin, Int_t) const
EStatusBits
TH1 status bits.
@ kLogX
X-axis in log scale.
@ kIsAverage
Bin contents are average (used by Add)
@ kNoTitle
Don't draw the histogram title.
@ kUserContour
User specified contour levels.
@ kNoStats
Don't draw stats box.
@ kIsZoomed
Bit set when zooming on Y axis.
@ kAutoBinPTwo
different than 1.
@ kIsNotW
Histogram is forced to be not weighted even when the histogram is filled with weighted.
@ kIsHighlight
bit set if histo is highlight
virtual void SetContourLevel(Int_t level, Double_t value)
Set value for one contour level.
virtual Bool_t CanExtendAllAxes() const
Returns true if all axes are extendable.
TDirectory * fDirectory
! Pointer to directory holding this histogram
Option_t * GetOption() const override
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
void SetNameTitle(const char *name, const char *title) override
Change the name and title of this histogram.
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 abo...
TH1 * GetCumulative(Bool_t forward=kTRUE, const char *suffix="_cumulative") const
Return a pointer to a histogram containing the cumulative content.
static Double_t AutoP2GetPower2(Double_t x, Bool_t next=kTRUE)
Auxiliary function to get the power of 2 next (larger) or previous (smaller) a given x.
virtual Int_t GetNcells() const
virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
Interface to TSpectrum::Search.
Int_t GetBufferLength() const
static Bool_t RecomputeAxisLimits(TAxis &destAxis, const TAxis &anAxis)
Finds new limits for the axis for the Merge function.
virtual Style_t GetTitleFont(Option_t *axis="X") const
Return the "axis" title font.
virtual void SetNdivisions(Int_t n=510, Option_t *axis="X")
Set the number of divisions to draw an axis.
virtual Style_t GetLabelFont(Option_t *axis="X") const
Return the "axis" label font.
virtual Float_t GetTickLength(Option_t *axis="X") const
Return the "axis" tick length.
Int_t GetBufferSize() const
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
TVirtualHistPainter * GetPainter(Option_t *option="")
Return pointer to painter.
TObject * FindObject(const char *name) const override
Search object named name in the list of functions.
virtual Float_t GetTitleSize(Option_t *axis="X") const
Return the "axis" title size.
virtual void FillRandom(const char *fname, Int_t ntimes=5000, TRandom *rng=nullptr)
Fill histogram following distribution in function fname.
void Print(Option_t *option="") const override
Print some global quantities for this histogram.
static Bool_t GetDefaultSumw2()
Return kTRUE if TH1::Sumw2 must be called when creating new histograms.
virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
Find first bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold ...
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.
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
virtual 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 b...
Double_t GetRMSError(Int_t axis=1) const
virtual Int_t GetNbinsX() const
virtual void SetMaximum(Double_t maximum=-1111)
virtual TH1 * FFT(TH1 *h_output, Option_t *option)
This function allows to do discrete Fourier transforms of TH1 and TH2.
virtual void LabelsInflate(Option_t *axis="X")
Double the number of bins for axis.
virtual TH1 * ShowBackground(Int_t niter=20, Option_t *option="same")
This function calculates the background spectrum in this histogram.
virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t)
static Bool_t SameLimitsAndNBins(const TAxis &axis1, const TAxis &axis2)
Same limits and bins.
virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="")
Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2),...
Double_t fMaximum
Maximum value for plotting.
Int_t fBufferSize
fBuffer size
virtual Double_t RetrieveBinContent(Int_t bin) const
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
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.
Int_t fDimension
! Histogram dimension (1, 2 or 3 dim)
virtual void SetBinError(Int_t bin, Double_t error)
Set the bin Error Note that this resets the bin eror option to be of Normal Type and for the non-empt...
EBinErrorOpt fBinStatErrOpt
Option for bin statistical errors.
static Int_t fgBufferSize
! Default buffer size for automatic histograms
virtual void SetBinsLength(Int_t=-1)
Double_t fNormFactor
Normalization factor.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
TArrayD fContour
Array to display contour levels.
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
virtual TH1 * RebinX(Int_t ngroup=2, const char *newname="")
void Browse(TBrowser *b) override
Browse the Histogram object.
virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const
virtual void SetContent(const Double_t *content)
Replace bin contents by the contents of array content.
virtual Float_t GetLabelSize(Option_t *axis="X") const
Return the "axis" label size.
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,...
Short_t fBarWidth
(1000*width) for bar charts or legos
virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const
virtual Double_t GetCellError(Int_t binx, Int_t biny) const
virtual Int_t GetNdivisions(Option_t *axis="X") const
Return the number of divisions for "axis".
Int_t AxisChoice(Option_t *axis) const
Choose an axis according to "axis".
virtual void SetMinimum(Double_t minimum=-1111)
Bool_t IsBinUnderflow(Int_t bin, Int_t axis=0) const
Return true if the bin is underflow.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content)
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check that axis have same labels.
static void SetDefaultSumw2(Bool_t sumw2=kTRUE)
When this static function is called with sumw2=kTRUE, all new histograms will automatically activate ...
Bool_t IsBinOverflow(Int_t bin, Int_t axis=0) const
Return true if the bin is overflow.
UInt_t GetAxisLabelStatus() const
Internal function used in TH1::Fill to see which axis is full alphanumeric, i.e.
Double_t GetRMS(Int_t axis=1) const
This function returns the Standard Deviation (Sigma) of the distribution not the Root Mean Square (RM...
Double_t * fIntegral
! Integral of bins used by GetRandom
Double_t fMinimum
Minimum value for plotting.
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
TH1 & operator=(const TH1 &)=delete
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
virtual void DirectoryAutoAdd(TDirectory *)
Perform the automatic addition of the histogram to the given directory.
virtual void GetLowEdge(Double_t *edge) const
Fill array with low edge of bins for 1D histogram Better to use h1.GetXaxis()->GetLowEdge(edge)
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
void Build()
Creates histogram basic data structure.
virtual Double_t GetEntries() const
Return the current number of entries.
const TAxis * GetZaxis() const
virtual void SetZTitle(const char *title)
virtual TF1 * GetFunction(const char *name) const
Return pointer to function with name.
virtual TH1 * Rebin(Int_t ngroup=2, const char *newname="", const Double_t *xbins=nullptr)
Rebin this histogram.
virtual Int_t BufferFill(Double_t x, Double_t w)
accumulate arguments in buffer.
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.
virtual UInt_t SetCanExtend(UInt_t extendBitMask)
Make the histogram axes extendable / not extendable according to the bit mask returns the previous bi...
TList * GetListOfFunctions() const
void SetName(const char *name) override
Change the name of this histogram.
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
virtual Float_t GetTitleOffset(Option_t *axis="X") const
Return the "axis" title offset.
Bool_t IsEmpty() const
Check if a histogram is empty (this is a protected method used mainly by TH1Merger )
virtual Double_t GetMeanError(Int_t axis=1) const
Return standard error of mean of this histogram along the X axis.
void Paint(Option_t *option="") override
Control routine to paint any kind of histograms.
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 ...
virtual void ResetStats()
Reset the statistics including the number of entries and replace with values calculated from bin cont...
virtual void SetBinContent(Int_t bin, Int_t, Int_t, Double_t content)
static void SetDefaultBufferSize(Int_t buffersize=1000)
Static function to set the default buffer size for automatic histograms.
virtual void SetBinErrorOption(EBinErrorOpt type)
virtual void SetBuffer(Int_t buffersize, Option_t *option="")
Set the maximum number of entries to be kept in the buffer.
virtual void DrawPanel()
Display a panel with all histogram drawing options.
virtual Double_t GetRandom(TRandom *rng=nullptr) const
Return a random number distributed according the histogram bin contents.
const TAxis * GetXaxis() const
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 comput...
virtual Double_t Chi2Test(const TH1 *h2, Option_t *option="UU", Double_t *res=nullptr) const
test for comparing weighted and unweighted histograms.
virtual Double_t GetMaximumStored() const
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.
virtual void GetMinimumAndMaximum(Double_t &min, Double_t &max) const
Retrieve the minimum and maximum values in the histogram.
@ kNstat
Size of statistics data (up to TProfile3D)
virtual const TArrayD * GetSumw2() const
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
static Int_t AutoP2GetBins(Int_t n)
Auxiliary function to get the next power of 2 integer value larger then n.
Double_t fEntries
Number of entries.
virtual Long64_t Merge(TCollection *list)
virtual void SetColors(Color_t linecolor=-1, Color_t markercolor=-1, Color_t fillcolor=-1)
Shortcut to set the three histogram colors with a single call.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
virtual Double_t * GetIntegral()
Return a pointer to the array of bins integral.
TAxis fZaxis
Z axis descriptor.
EStatOverflows fStatOverflows
Per object flag to use under/overflows in statistics.
virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1)
Fill this histogram with an array x and weights w.
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...
virtual Float_t GetLabelOffset(Option_t *axis="X") const
Return the "axis" label offset.
static bool CheckEqualAxes(const TAxis *a1, const TAxis *a2)
Check that the axis are the same.
EBinErrorOpt
Enumeration specifying type of statistics for bin errors.
@ kPoisson2
Errors from Poisson interval at 95% CL (~ 2 sigma)
@ kNormal
Errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
@ kPoisson
Errors from Poisson interval at 68.3% (1 sigma)
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual TArrayD * GetSumw2()
virtual Int_t GetContour(Double_t *levels=nullptr)
Return contour values into array levels if pointer levels is non zero.
TAxis fXaxis
X axis descriptor.
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.
const Double_t * GetBuffer() const
virtual Bool_t IsHighlight() const
virtual void SetLabelColor(Color_t color=1, Option_t *axis="X")
Set axis labels color.
virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const
virtual void ExtendAxis(Double_t x, TAxis *axis)
Histogram is resized along axis such that x is in the axis range.
virtual void SetAxisColor(Color_t color=1, Option_t *axis="X")
Set color to draw the axis line and tick marks.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
const TAxis * GetYaxis() const
TArrayD fSumw2
Array of sum of squares of weights.
virtual void SetOption(Option_t *option=" ")
TH1 * GetAsymmetry(TH1 *h2, Double_t c2=1, Double_t dc2=0)
Return a histogram containing the asymmetry of this histogram with h2, where the asymmetry is defined...
virtual Double_t GetContourLevel(Int_t level) const
Return value of contour number level.
virtual void SetContour(Int_t nlevels, const Double_t *levels=nullptr)
Set the number and values of contour levels.
virtual void SetHighlight(Bool_t set=kTRUE)
Set highlight (enable/disable) mode for the histogram by default highlight mode is disable.
virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X")
Set the "axis" range.
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
virtual void SetYTitle(const char *title)
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
virtual Int_t GetSumw2N() const
virtual void SetCellError(Int_t binx, Int_t biny, Double_t content)
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
Bool_t GetStatOverflowsBehaviour() const
void SaveAs(const char *filename="hist", Option_t *option="") const override
Save the histogram as .csv, .tsv or .txt.
virtual void SetTitleFont(Style_t font=62, Option_t *axis="X")
Set the axis' title font.
virtual Int_t GetQuantiles(Int_t n, Double_t *xp, const Double_t *p=nullptr)
Compute Quantiles for this histogram Quantile x_p := Q(p) is defined as the value x_p such that the c...
virtual Color_t GetAxisColor(Option_t *axis="X") const
Return the number of divisions for "axis".
TObject * Clone(const char *newname="") const override
Make a complete copy of the underlying object.
virtual Double_t GetStdDevError(Int_t axis=1) const
Return error of standard deviation estimation for Normal distribution.
virtual Bool_t Divide(TF1 *f1, Double_t c1=1)
Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2),...
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...
int LoggedInconsistency(const char *name, const TH1 *h1, const TH1 *h2, bool useMerge=false) const
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.
void RecursiveRemove(TObject *obj) override
Recursively remove object from the list of functions.
TAxis fYaxis
Y axis descriptor.
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.
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
static void SmoothArray(Int_t NN, Double_t *XX, Int_t ntimes=1)
Smooth array xx, translation of Hbook routine hsmoof.F.
virtual void GetCenter(Double_t *center) const
Fill array with center of bins for 1D histogram Better to use h1.GetXaxis()->GetCenter(center)
TVirtualHistPainter * fPainter
! Pointer to histogram painter
virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax)
Redefine x axis parameters.
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.
virtual void SetBinContent(Int_t bin, Int_t, Double_t content)
virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
Set size of axis' labels.
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
virtual void SetEntries(Double_t n)
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 th...
static bool CheckAxisLimits(const TAxis *a1, const TAxis *a2)
Check that the axis limits of the histograms are the same.
static Bool_t AddDirectoryStatus()
Static function: cannot be inlined on Windows/NT.
static Bool_t fgDefaultSumw2
! Flag to call TH1::Sumw2 automatically at histogram creation time
Double_t fTsumwx
Total Sum of weight*X.
virtual void LabelsDeflate(Option_t *axis="X")
Reduce the number of bins for the axis passed in the option to the number of bins having a label.
virtual Double_t ComputeIntegral(Bool_t onlyPositive=false)
Compute integral (normalized cumulative sum of bins) w/o under/overflows The result is stored in fInt...
TString fOption
Histogram options.
virtual void Eval(TF1 *f1, Option_t *option="")
Evaluate function f1 at the center of bins of this histogram.
virtual void SetBarWidth(Float_t width=0.5)
Set the width of bars as fraction of the bin width for drawing mode "B".
virtual Int_t BufferEmpty(Int_t action=0)
Fill histogram with all entries in the buffer.
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
virtual void SetTickLength(Float_t length=0.02, Option_t *axis="X")
Set the axis' tick marks length.
virtual Double_t GetKurtosis(Int_t axis=1) const
The TNamed class is the base class for all named ROOT classes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
This is the base class for the ROOT Random number generators.
const char * Data() const
TVirtualFFT is an interface class for Fast Fourier Transforms.
Abstract interface to a histogram painter.
#define Interpolate(a, x, b, y)