Logo ROOT  
Reference Guide
TH1.h
Go to the documentation of this file.
1// @(#)root/hist:$Id$
2// Author: Rene Brun 26/12/94
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TH1
13#define ROOT_TH1
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TH1 //
19// //
20// 1-Dim histogram base class. //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TAxis.h"
25
26#include "TAttLine.h"
27
28#include "TAttFill.h"
29
30#include "TAttMarker.h"
31
32#include "TArrayC.h"
33#include "TArrayS.h"
34#include "TArrayI.h"
35#include "TArrayF.h"
36#include "TArrayD.h"
37#include "Foption.h"
38
39#include "TVectorFfwd.h"
40#include "TVectorDfwd.h"
41
42#include "TFitResultPtr.h"
43
44#include <float.h>
45
46class TF1;
47class TH1D;
48class TBrowser;
49class TDirectory;
50class TList;
51class TCollection;
52class TVirtualFFT;
54
55
56class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
57
58public:
59
60 // enumeration specifying type of statistics for bin errors
62 kNormal = 0, ///< errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
63 kPoisson = 1 , ///< errors from Poisson interval at 68.3% (1 sigma)
64 kPoisson2 = 2 ///< errors from Poisson interval at 95% CL (~ 2 sigma)
65 };
66
67 // enumeration specifying which axes can be extended
68 enum {
69 kNoAxis = 0, ///< NOTE: Must always be 0 !!!
70 kXaxis = BIT(0),
71 kYaxis = BIT(1),
72 kZaxis = BIT(2),
74 };
75
76 /// Enumeration specifying the way to treat statoverflow
78 kIgnore = 0, ///< Override global flag ignoring the overflows
79 kConsider = 1, ///< Override global flag considering the overflows
80 kNeutral = 2, ///< Adapt to the global flag
81 };
82
83 friend class TH1Merger;
84
85protected:
86 Int_t fNcells; ///< number of bins(1D), cells (2D) +U/Overflows
87 TAxis fXaxis; ///< X axis descriptor
88 TAxis fYaxis; ///< Y axis descriptor
89 TAxis fZaxis; ///< Z axis descriptor
90 Short_t fBarOffset; ///< (1000*offset) for bar charts or legos
91 Short_t fBarWidth; ///< (1000*width) for bar charts or legos
92 Double_t fEntries; ///< Number of entries
93 Double_t fTsumw; ///< Total Sum of weights
94 Double_t fTsumw2; ///< Total Sum of squares of weights
95 Double_t fTsumwx; ///< Total Sum of weight*X
96 Double_t fTsumwx2; ///< Total Sum of weight*X*X
97 Double_t fMaximum; ///< Maximum value for plotting
98 Double_t fMinimum; ///< Minimum value for plotting
99 Double_t fNormFactor; ///< Normalization factor
100 TArrayD fContour; ///< Array to display contour levels
101 TArrayD fSumw2; ///< Array of sum of squares of weights
102 TString fOption; ///< histogram options
103 TList *fFunctions; ///<->Pointer to list of functions (fits and user)
104 Int_t fBufferSize; ///< fBuffer size
105 Double_t *fBuffer; ///<[fBufferSize] entry buffer
106 TDirectory *fDirectory; ///<!Pointer to directory holding this histogram
107 Int_t fDimension; ///<!Histogram dimension (1, 2 or 3 dim)
108 Double_t *fIntegral; ///<!Integral of bins used by GetRandom
109 TVirtualHistPainter *fPainter; ///<!pointer to histogram painter
110 EBinErrorOpt fBinStatErrOpt; ///< option for bin statistical errors
111 EStatOverflows fStatOverflows; ///< per object flag to use under/overflows in statistics
112 static Int_t fgBufferSize; ///<!default buffer size for automatic histograms
113 static Bool_t fgAddDirectory; ///<!flag to add histograms to the directory
114 static Bool_t fgStatOverflows; ///<!flag to use under/overflows in statistics
115 static Bool_t fgDefaultSumw2; ///<!flag to call TH1::Sumw2 automatically at histogram creation time
116
117public:
119
120private:
121 Int_t AxisChoice(Option_t *axis) const;
122 void Build();
123
124 TH1(const TH1&);
125 TH1& operator=(const TH1&); // Not implemented
126
127
128protected:
129 TH1();
130 TH1(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
131 TH1(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
132 TH1(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
133 virtual Int_t BufferFill(Double_t x, Double_t w);
134 virtual Bool_t FindNewAxisLimits(const TAxis* axis, const Double_t point, Double_t& newMin, Double_t &newMax);
135 virtual void SavePrimitiveHelp(std::ostream &out, const char *hname, Option_t *option = "");
136 static Bool_t RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxis);
137 static Bool_t SameLimitsAndNBins(const TAxis& axis1, const TAxis& axis2);
138 Bool_t IsEmpty() const;
139
140 inline static Double_t AutoP2GetPower2(Double_t x, Bool_t next = kTRUE);
141 inline static Int_t AutoP2GetBins(Int_t n);
142 virtual Int_t AutoP2FindLimits(Double_t min, Double_t max);
143
144 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,
145 Option_t * opt, Bool_t doerr = kFALSE) const;
146
147 virtual void DoFillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1);
148 Bool_t GetStatOverflowsBehaviour() const { return EStatOverflows::kNeutral == fStatOverflows ? fgStatOverflows : EStatOverflows::kConsider == fStatOverflows; }
149
150 static bool CheckAxisLimits(const TAxis* a1, const TAxis* a2);
151 static bool CheckBinLimits(const TAxis* a1, const TAxis* a2);
152 static bool CheckBinLabels(const TAxis* a1, const TAxis* a2);
153 static bool CheckEqualAxes(const TAxis* a1, const TAxis* a2);
154 static bool CheckConsistentSubAxes(const TAxis *a1, Int_t firstBin1, Int_t lastBin1, const TAxis *a2, Int_t firstBin2=0, Int_t lastBin2=0);
155 static bool CheckConsistency(const TH1* h1, const TH1* h2);
156
157public:
158 // TH1 status bits
160 kNoStats = BIT(9), ///< don't draw stats box
161 kUserContour = BIT(10), ///< user specified contour levels
162 // kCanRebin = BIT(11), ///< FIXME DEPRECATED - to be removed, replaced by SetCanExtend / CanExtendAllAxes
163 kLogX = BIT(15), ///< X-axis in log scale
164 kIsZoomed = BIT(16), ///< bit set when zooming on Y axis
165 kNoTitle = BIT(17), ///< don't draw the histogram title
166 kIsAverage = BIT(18), ///< Bin contents are average (used by Add)
167 kIsNotW = BIT(19), ///< Histogram is forced to be not weighted even when the histogram is filled with weighted
168 /// different than 1.
169 kAutoBinPTwo = BIT(20), ///< Use Power(2)-based algorithm for autobinning
170 kIsHighlight = BIT(21) ///< bit set if histo is highlight
171 };
172 // size of statistics data (size of array used in GetStats()/ PutStats )
173 // s[0] = sumw s[1] = sumw2
174 // s[2] = sumwx s[3] = sumwx2
175 // s[4] = sumwy s[5] = sumwy2 s[6] = sumwxy
176 // s[7] = sumwz s[8] = sumwz2 s[9] = sumwxz s[10] = sumwyz
177 // s[11] = sumwt s[12] = sumwt2 (11 and 12 used only by TProfile3D)
178 enum {
179 kNstat = 13 // size of statistics data (up to TProfile3D)
180 };
181
182
183 virtual ~TH1();
184
185 virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="");
186 virtual Bool_t Add(const TH1 *h1, Double_t c1=1);
187 virtual Bool_t Add(const TH1 *h, const TH1 *h2, Double_t c1=1, Double_t c2=1); // *MENU*
188 virtual void AddBinContent(Int_t bin);
189 virtual void AddBinContent(Int_t bin, Double_t w);
190 static void AddDirectory(Bool_t add=kTRUE);
191 static Bool_t AddDirectoryStatus();
192 virtual void Browse(TBrowser *b);
193 virtual Bool_t CanExtendAllAxes() const;
194 virtual Double_t Chi2Test(const TH1* h2, Option_t *option = "UU", Double_t *res = 0) const;
195 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;
196 virtual Double_t Chisquare(TF1 * f1, Option_t *option = "") const;
197 virtual void ClearUnderflowAndOverflow();
198 virtual Double_t ComputeIntegral(Bool_t onlyPositive = false);
199 TObject* Clone(const char* newname=0) const;
200 virtual void Copy(TObject &hnew) const;
201 virtual void DirectoryAutoAdd(TDirectory *);
202 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
203 virtual Bool_t Divide(TF1 *f1, Double_t c1=1);
204 virtual Bool_t Divide(const TH1 *h1);
205 virtual Bool_t Divide(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU*
206 virtual void Draw(Option_t *option="");
207 virtual TH1 *DrawCopy(Option_t *option="", const char * name_postfix = "_copy") const;
208 virtual TH1 *DrawNormalized(Option_t *option="", Double_t norm=1) const;
209 virtual void DrawPanel(); // *MENU*
210 virtual Int_t BufferEmpty(Int_t action=0);
211 virtual void Eval(TF1 *f1, Option_t *option="");
212 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
213 virtual void ExtendAxis(Double_t x, TAxis *axis);
214 virtual TH1 *FFT(TH1* h_output, Option_t *option);
215 virtual Int_t Fill(Double_t x);
216 virtual Int_t Fill(Double_t x, Double_t w);
217 virtual Int_t Fill(const char *name, Double_t w);
218 virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1);
219 virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t) {;}
220 virtual void FillRandom(const char *fname, Int_t ntimes=5000);
221 virtual void FillRandom(TH1 *h, Int_t ntimes=5000);
222 virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0);
223 virtual Int_t FindFixBin(Double_t x, Double_t y=0, Double_t z=0) const;
224 virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const;
225 virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const;
226 virtual TObject *FindObject(const char *name) const;
227 virtual TObject *FindObject(const TObject *obj) const;
228 virtual TFitResultPtr Fit(const char *formula ,Option_t *option="" ,Option_t *goption="", Double_t xmin=0, Double_t xmax=0); // *MENU*
229 virtual TFitResultPtr Fit(TF1 *f1 ,Option_t *option="" ,Option_t *goption="", Double_t xmin=0, Double_t xmax=0);
230 virtual void FitPanel(); // *MENU*
231 TH1 *GetAsymmetry(TH1* h2, Double_t c2=1, Double_t dc2=0);
232 Int_t GetBufferLength() const {return fBuffer ? (Int_t)fBuffer[0] : 0;}
233 Int_t GetBufferSize () const {return fBufferSize;}
234 const Double_t *GetBuffer() const {return fBuffer;}
236 virtual Double_t *GetIntegral();
237 TH1 *GetCumulative(Bool_t forward = kTRUE, const char* suffix = "_cumulative") const;
238
240
241 virtual Int_t GetNdivisions(Option_t *axis="X") const;
242 virtual Color_t GetAxisColor(Option_t *axis="X") const;
243 virtual Color_t GetLabelColor(Option_t *axis="X") const;
244 virtual Style_t GetLabelFont(Option_t *axis="X") const;
245 virtual Float_t GetLabelOffset(Option_t *axis="X") const;
246 virtual Float_t GetLabelSize(Option_t *axis="X") const;
247 virtual Style_t GetTitleFont(Option_t *axis="X") const;
248 virtual Float_t GetTitleOffset(Option_t *axis="X") const;
249 virtual Float_t GetTitleSize(Option_t *axis="X") const;
250 virtual Float_t GetTickLength(Option_t *axis="X") const;
251 virtual Float_t GetBarOffset() const {return Float_t(0.001*Float_t(fBarOffset));}
252 virtual Float_t GetBarWidth() const {return Float_t(0.001*Float_t(fBarWidth));}
253 virtual Int_t GetContour(Double_t *levels=0);
254 virtual Double_t GetContourLevel(Int_t level) const;
255 virtual Double_t GetContourLevelPad(Int_t level) const;
256
257 virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const;
258 virtual void GetBinXYZ(Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const;
259 virtual Double_t GetBinCenter(Int_t bin) const;
260 virtual Double_t GetBinContent(Int_t bin) const;
261 virtual Double_t GetBinContent(Int_t bin, Int_t) const { return GetBinContent(bin); }
262 virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const { return GetBinContent(bin); }
263 virtual Double_t GetBinError(Int_t bin) const;
264 virtual Double_t GetBinError(Int_t binx, Int_t biny) const { return GetBinError(GetBin(binx, biny)); } // for 2D histograms only
265 virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const { return GetBinError(GetBin(binx, biny, binz)); } // for 3D histograms only
266 virtual Double_t GetBinErrorLow(Int_t bin) const;
267 virtual Double_t GetBinErrorUp(Int_t bin) const;
269 virtual Double_t GetBinLowEdge(Int_t bin) const;
270 virtual Double_t GetBinWidth(Int_t bin) const;
271 virtual Double_t GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx=0, Int_t lastx=0,Double_t maxdiff=0) const;
272 virtual void GetCenter(Double_t *center) const;
273 static Bool_t GetDefaultSumw2();
275 virtual Double_t GetEntries() const;
276 virtual Double_t GetEffectiveEntries() const;
277 virtual TF1 *GetFunction(const char *name) const;
278 virtual Int_t GetDimension() const { return fDimension; }
279 virtual Double_t GetKurtosis(Int_t axis=1) const;
280 virtual void GetLowEdge(Double_t *edge) const;
281 virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const;
282 virtual Int_t GetMaximumBin() const;
283 virtual Int_t GetMaximumBin(Int_t &locmax, Int_t &locmay, Int_t &locmaz) const;
284 virtual Double_t GetMaximumStored() const {return fMaximum;}
285 virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const;
286 virtual Int_t GetMinimumBin() const;
287 virtual Int_t GetMinimumBin(Int_t &locmix, Int_t &locmiy, Int_t &locmiz) const;
288 virtual Double_t GetMinimumStored() const {return fMinimum;}
289 virtual void GetMinimumAndMaximum(Double_t& min, Double_t& max) const;
290 virtual Double_t GetMean(Int_t axis=1) const;
291 virtual Double_t GetMeanError(Int_t axis=1) const;
292 virtual Int_t GetNbinsX() const {return fXaxis.GetNbins();}
293 virtual Int_t GetNbinsY() const {return fYaxis.GetNbins();}
294 virtual Int_t GetNbinsZ() const {return fZaxis.GetNbins();}
295 virtual Int_t GetNcells() const {return fNcells; }
296 virtual Double_t GetNormFactor() const {return fNormFactor;}
297 virtual char *GetObjectInfo(Int_t px, Int_t py) const;
298 Option_t *GetOption() const {return fOption.Data();}
299
301
302 virtual Int_t GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum=0);
303 virtual Double_t GetRandom() const;
304 virtual void GetStats(Double_t *stats) const;
305 virtual Double_t GetStdDev(Int_t axis=1) const;
306 virtual Double_t GetStdDevError(Int_t axis=1) const;
307 virtual Double_t GetSumOfWeights() const;
308 virtual TArrayD *GetSumw2() {return &fSumw2;}
309 virtual const TArrayD *GetSumw2() const {return &fSumw2;}
310 virtual Int_t GetSumw2N() const {return fSumw2.fN;}
311 Double_t GetRMS(Int_t axis=1) const { return GetStdDev(axis); }
312 Double_t GetRMSError(Int_t axis=1) const { return GetStdDevError(axis); }
313
314 virtual Double_t GetSkewness(Int_t axis=1) const;
315 EStatOverflows GetStatOverflows() const {return fStatOverflows; }; ///< Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more information.
316 TAxis* GetXaxis() { return &fXaxis; }
317 TAxis* GetYaxis() { return &fYaxis; }
318 TAxis* GetZaxis() { return &fZaxis; }
319 const TAxis* GetXaxis() const { return &fXaxis; }
320 const TAxis* GetYaxis() const { return &fYaxis; }
321 const TAxis* GetZaxis() const { return &fZaxis; }
322 virtual Double_t Integral(Option_t *option="") const;
323 virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const;
324 virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Double_t & err, Option_t *option="") const;
325 virtual Double_t Interpolate(Double_t x) const;
326 virtual Double_t Interpolate(Double_t x, Double_t y) const;
327 virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z) const;
328 Bool_t IsBinOverflow(Int_t bin, Int_t axis = 0) const;
329 Bool_t IsBinUnderflow(Int_t bin, Int_t axis = 0) const;
330 virtual Bool_t IsHighlight() const { return TestBit(kIsHighlight); }
331 virtual Double_t AndersonDarlingTest(const TH1 *h2, Option_t *option="") const;
332 virtual Double_t AndersonDarlingTest(const TH1 *h2, Double_t &advalue) const;
333 virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const;
334 virtual void LabelsDeflate(Option_t *axis="X");
335 virtual void LabelsInflate(Option_t *axis="X");
336 virtual void LabelsOption(Option_t *option="h", Option_t *axis="X");
337 virtual Long64_t Merge(TCollection *list) { return Merge(list,""); }
338 Long64_t Merge(TCollection *list, Option_t * option);
339 virtual Bool_t Multiply(TF1 *f1, Double_t c1=1);
340 virtual Bool_t Multiply(const TH1 *h1);
341 virtual Bool_t Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU*
342 virtual void Paint(Option_t *option="");
343 virtual void Print(Option_t *option="") const;
344 virtual void PutStats(Double_t *stats);
345 virtual TH1 *Rebin(Int_t ngroup=2, const char*newname="", const Double_t *xbins=0); // *MENU*
346 virtual TH1 *RebinX(Int_t ngroup=2, const char*newname="") { return Rebin(ngroup,newname, (Double_t*) 0); }
347 virtual void Rebuild(Option_t *option="");
348 virtual void RecursiveRemove(TObject *obj);
349 virtual void Reset(Option_t *option="");
350 virtual void ResetStats();
351 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
352 virtual void Scale(Double_t c1=1, Option_t *option="");
353 virtual void SetAxisColor(Color_t color=1, Option_t *axis="X");
354 virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X");
355 virtual void SetBarOffset(Float_t offset=0.25) {fBarOffset = Short_t(1000*offset);}
356 virtual void SetBarWidth(Float_t width=0.5) {fBarWidth = Short_t(1000*width);}
357 virtual void SetBinContent(Int_t bin, Double_t content);
358 virtual void SetBinContent(Int_t bin, Int_t, Double_t content) { SetBinContent(bin, content); }
359 virtual void SetBinContent(Int_t bin, Int_t, Int_t, Double_t content) { SetBinContent(bin, content); }
360 virtual void SetBinError(Int_t bin, Double_t error);
361 virtual void SetBinError(Int_t binx, Int_t biny, Double_t error);
362 virtual void SetBinError(Int_t binx, Int_t biny, Int_t binz, Double_t error);
363 virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax);
364 virtual void SetBins(Int_t nx, const Double_t *xBins);
366 virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, const Double_t *yBins);
368 Int_t nz, Double_t zmin, Double_t zmax);
369 virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, const Double_t * yBins, Int_t nz,
370 const Double_t *zBins);
371 virtual void SetBinsLength(Int_t = -1) { } //redefined in derived classes
373 virtual void SetBuffer(Int_t buffersize, Option_t *option="");
374 virtual UInt_t SetCanExtend(UInt_t extendBitMask);
375 virtual void SetContent(const Double_t *content);
376 virtual void SetContour(Int_t nlevels, const Double_t *levels=0);
377 virtual void SetContourLevel(Int_t level, Double_t value);
378 static void SetDefaultBufferSize(Int_t buffersize=1000);
379 static void SetDefaultSumw2(Bool_t sumw2=kTRUE);
380 virtual void SetDirectory(TDirectory *dir);
381 virtual void SetEntries(Double_t n) {fEntries = n;};
382 virtual void SetError(const Double_t *error);
383 virtual void SetHighlight(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsHighlight
384 virtual void SetLabelColor(Color_t color=1, Option_t *axis="X");
385 virtual void SetLabelFont(Style_t font=62, Option_t *axis="X");
386 virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X");
387 virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X");
388
389 /*
390 * Set the minimum / maximum value for the Y axis (1-D histograms) or Z axis (2-D histograms)
391 * By default the maximum / minimum value used in drawing is the maximum / minimum value of the histogram
392 * plus a margin of 10%. If these functions are called, the values are used without any extra margin.
393 */
394 virtual void SetMaximum(Double_t maximum = -1111) { fMaximum = maximum; }; // *MENU*
395 virtual void SetMinimum(Double_t minimum = -1111) { fMinimum = minimum; }; // *MENU*
396
397 virtual void SetName(const char *name); // *MENU*
398 virtual void SetNameTitle(const char *name, const char *title);
399 virtual void SetNdivisions(Int_t n=510, Option_t *axis="X");
400 virtual void SetNormFactor(Double_t factor=1) {fNormFactor = factor;}
401 virtual void SetStats(Bool_t stats=kTRUE); // *MENU*
402 virtual void SetOption(Option_t *option=" ") {fOption = option;}
403 virtual void SetTickLength(Float_t length=0.02, Option_t *axis="X");
404 virtual void SetTitleFont(Style_t font=62, Option_t *axis="X");
405 virtual void SetTitleOffset(Float_t offset=1, Option_t *axis="X");
406 virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X");
407 void SetStatOverflows(EStatOverflows statOverflows) {fStatOverflows = statOverflows;}; ///< See GetStatOverflows for more information.
408 virtual void SetTitle(const char *title); // *MENU*
409 virtual void SetXTitle(const char *title) {fXaxis.SetTitle(title);}
410 virtual void SetYTitle(const char *title) {fYaxis.SetTitle(title);}
411 virtual void SetZTitle(const char *title) {fZaxis.SetTitle(title);}
412 virtual TH1 *ShowBackground(Int_t niter=20, Option_t *option="same"); // *MENU*
413 virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05); // *MENU*
414 virtual void Smooth(Int_t ntimes=1, Option_t *option=""); // *MENU*
415 static void SmoothArray(Int_t NN, Double_t *XX, Int_t ntimes=1);
416 static void StatOverflows(Bool_t flag=kTRUE);
417 virtual void Sumw2(Bool_t flag = kTRUE);
418 void UseCurrentStyle();
419 static TH1 *TransformHisto(TVirtualFFT *fft, TH1* h_output, Option_t *option);
420
421
422 // TODO: Remove obsolete methods in v6-04
423 virtual Double_t GetCellContent(Int_t binx, Int_t biny) const
424 { Obsolete("GetCellContent", "v6-00", "v6-04"); return GetBinContent(GetBin(binx, biny)); }
425 virtual Double_t GetCellError(Int_t binx, Int_t biny) const
426 { Obsolete("GetCellError", "v6-00", "v6-04"); return GetBinError(binx, biny); }
427 virtual void RebinAxis(Double_t x, TAxis *axis)
428 { Obsolete("RebinAxis", "v6-00", "v6-04"); ExtendAxis(x, axis); }
429 virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content)
430 { Obsolete("SetCellContent", "v6-00", "v6-04"); SetBinContent(GetBin(binx, biny), content); }
431 virtual void SetCellError(Int_t binx, Int_t biny, Double_t content)
432 { Obsolete("SetCellError", "v6-00", "v6-04"); SetBinError(binx, biny, content); }
433
434 ClassDef(TH1,8) //1-Dim histogram base class
435
436protected:
437 virtual Double_t RetrieveBinContent(Int_t bin) const;
438 virtual void UpdateBinContent(Int_t bin, Double_t content);
439 virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const { return fSumw2.fN ? fSumw2.fArray[bin] : RetrieveBinContent(bin); }
440};
441
442namespace cling {
443 std::string printValue(TH1 *val);
444}
445
446//________________________________________________________________________
447
448class TH1C : public TH1, public TArrayC {
449
450public:
451 TH1C();
452 TH1C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
453 TH1C(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
454 TH1C(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
455 TH1C(const TH1C &h1c);
456 TH1C& operator=(const TH1C &h1);
457 virtual ~TH1C();
458
459 virtual void AddBinContent(Int_t bin);
460 virtual void AddBinContent(Int_t bin, Double_t w);
461 virtual void Copy(TObject &hnew) const;
462 virtual void Reset(Option_t *option="");
463 virtual void SetBinsLength(Int_t n=-1);
464
465 ClassDef(TH1C,3) //1-Dim histograms (one char per channel)
466
467 friend TH1C operator*(Double_t c1, const TH1C &h1);
468 friend TH1C operator*(const TH1C &h1, Double_t c1);
469 friend TH1C operator+(const TH1C &h1, const TH1C &h2);
470 friend TH1C operator-(const TH1C &h1, const TH1C &h2);
471 friend TH1C operator*(const TH1C &h1, const TH1C &h2);
472 friend TH1C operator/(const TH1C &h1, const TH1C &h2);
473
474protected:
475 virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
476 virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Char_t (content); }
477};
478
480inline
482TH1C operator+(const TH1C &h1, const TH1C &h2);
483TH1C operator-(const TH1C &h1, const TH1C &h2);
484TH1C operator*(const TH1C &h1, const TH1C &h2);
485TH1C operator/(const TH1C &h1, const TH1C &h2);
486
487//________________________________________________________________________
488
489class TH1S : public TH1, public TArrayS {
490
491public:
492 TH1S();
493 TH1S(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
494 TH1S(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
495 TH1S(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
496 TH1S(const TH1S &h1s);
497 TH1S& operator=(const TH1S &h1);
498 virtual ~TH1S();
499
500 virtual void AddBinContent(Int_t bin);
501 virtual void AddBinContent(Int_t bin, Double_t w);
502 virtual void Copy(TObject &hnew) const;
503 virtual void Reset(Option_t *option="");
504 virtual void SetBinsLength(Int_t n=-1);
505
506 ClassDef(TH1S,3) //1-Dim histograms (one short per channel)
507
508 friend TH1S operator*(Double_t c1, const TH1S &h1);
509 friend TH1S operator*(const TH1S &h1, Double_t c1);
510 friend TH1S operator+(const TH1S &h1, const TH1S &h2);
511 friend TH1S operator-(const TH1S &h1, const TH1S &h2);
512 friend TH1S operator*(const TH1S &h1, const TH1S &h2);
513 friend TH1S operator/(const TH1S &h1, const TH1S &h2);
514
515protected:
516 virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
517 virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Short_t (content); }
518};
519
521inline
523TH1S operator+(const TH1S &h1, const TH1S &h2);
524TH1S operator-(const TH1S &h1, const TH1S &h2);
525TH1S operator*(const TH1S &h1, const TH1S &h2);
526TH1S operator/(const TH1S &h1, const TH1S &h2);
527
528//________________________________________________________________________
529
530class TH1I: public TH1, public TArrayI {
531
532public:
533 TH1I();
534 TH1I(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
535 TH1I(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
536 TH1I(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
537 TH1I(const TH1I &h1i);
538 TH1I& operator=(const TH1I &h1);
539 virtual ~TH1I();
540
541 virtual void AddBinContent(Int_t bin);
542 virtual void AddBinContent(Int_t bin, Double_t w);
543 virtual void Copy(TObject &hnew) const;
544 virtual void Reset(Option_t *option="");
545 virtual void SetBinsLength(Int_t n=-1);
546
547 ClassDef(TH1I,3) //1-Dim histograms (one 32 bits integer per channel)
548
549 friend TH1I operator*(Double_t c1, const TH1I &h1);
550 friend TH1I operator*(const TH1I &h1, Double_t c1);
551 friend TH1I operator+(const TH1I &h1, const TH1I &h2);
552 friend TH1I operator-(const TH1I &h1, const TH1I &h2);
553 friend TH1I operator*(const TH1I &h1, const TH1I &h2);
554 friend TH1I operator/(const TH1I &h1, const TH1I &h2);
555
556protected:
557 virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
558 virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Int_t (content); }
559};
560
562inline
564TH1I operator+(const TH1I &h1, const TH1I &h2);
565TH1I operator-(const TH1I &h1, const TH1I &h2);
566TH1I operator*(const TH1I &h1, const TH1I &h2);
567TH1I operator/(const TH1I &h1, const TH1I &h2);
568
569//________________________________________________________________________
570
571class TH1F : public TH1, public TArrayF {
572
573public:
574 TH1F();
575 TH1F(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
576 TH1F(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
577 TH1F(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
578 explicit TH1F(const TVectorF &v);
579 TH1F(const TH1F &h1f);
580 TH1F& operator=(const TH1F &h1);
581 virtual ~TH1F();
582
583 virtual void AddBinContent(Int_t bin) {++fArray[bin];}
584 virtual void AddBinContent(Int_t bin, Double_t w)
585 {fArray[bin] += Float_t (w);}
586 virtual void Copy(TObject &hnew) const;
587 virtual void Reset(Option_t *option="");
588 virtual void SetBinsLength(Int_t n=-1);
589
590 ClassDef(TH1F,3) //1-Dim histograms (one float per channel)
591
592 friend TH1F operator*(Double_t c1, const TH1F &h1);
593 friend TH1F operator*(const TH1F &h1, Double_t c1);
594 friend TH1F operator+(const TH1F &h1, const TH1F &h2);
595 friend TH1F operator-(const TH1F &h1, const TH1F &h2);
596 friend TH1F operator*(const TH1F &h1, const TH1F &h2);
597 friend TH1F operator/(const TH1F &h1, const TH1F &h2);
598
599protected:
600 virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
601 virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Float_t (content); }
602};
603
605inline
607TH1F operator+(const TH1F &h1, const TH1F &h2);
608TH1F operator-(const TH1F &h1, const TH1F &h2);
609TH1F operator*(const TH1F &h1, const TH1F &h2);
610TH1F operator/(const TH1F &h1, const TH1F &h2);
611
612//________________________________________________________________________
613
614class TH1D : public TH1, public TArrayD {
615
616public:
617 TH1D();
618 TH1D(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
619 TH1D(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
620 TH1D(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
621 explicit TH1D(const TVectorD &v);
622 TH1D(const TH1D &h1d);
623 TH1D& operator=(const TH1D &h1);
624 virtual ~TH1D();
625
626 virtual void AddBinContent(Int_t bin) {++fArray[bin];}
627 virtual void AddBinContent(Int_t bin, Double_t w)
628 {fArray[bin] += Double_t (w);}
629 virtual void Copy(TObject &hnew) const;
630 virtual void Reset(Option_t *option="");
631 virtual void SetBinsLength(Int_t n=-1);
632
633 ClassDef(TH1D,3) //1-Dim histograms (one double per channel)
634
635 friend TH1D operator*(Double_t c1, const TH1D &h1);
636 friend TH1D operator*(const TH1D &h1, Double_t c1);
637 friend TH1D operator+(const TH1D &h1, const TH1D &h2);
638 friend TH1D operator-(const TH1D &h1, const TH1D &h2);
639 friend TH1D operator*(const TH1D &h1, const TH1D &h2);
640 friend TH1D operator/(const TH1D &h1, const TH1D &h2);
641
642protected:
643 virtual Double_t RetrieveBinContent(Int_t bin) const { return fArray[bin]; }
644 virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = content; }
645};
646
648inline
650TH1D operator+(const TH1D &h1, const TH1D &h2);
651TH1D operator-(const TH1D &h1, const TH1D &h2);
652TH1D operator*(const TH1D &h1, const TH1D &h2);
653TH1D operator/(const TH1D &h1, const TH1D &h2);
654
655 extern TH1 *R__H(Int_t hid);
656 extern TH1 *R__H(const char *hname);
657
658#endif
#define b(i)
Definition: RSha256.hxx:100
#define c(i)
Definition: RSha256.hxx:101
#define h(i)
Definition: RSha256.hxx:106
int Int_t
Definition: RtypesCore.h:41
char Char_t
Definition: RtypesCore.h:29
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
short Short_t
Definition: RtypesCore.h:35
double Double_t
Definition: RtypesCore.h:55
short Color_t
Definition: RtypesCore.h:79
long long Long64_t
Definition: RtypesCore.h:69
short Style_t
Definition: RtypesCore.h:76
float Float_t
Definition: RtypesCore.h:53
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
#define BIT(n)
Definition: Rtypes.h:83
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
char name[80]
Definition: TGX11.cxx:109
int type
Definition: TGX11.cxx:120
TH1C operator+(const TH1C &h1, const TH1C &h2)
Operator +.
Definition: TH1.cxx:9048
TH1C operator-(const TH1C &h1, const TH1C &h2)
Operator -.
Definition: TH1.cxx:9059
TH1C operator/(const TH1C &h1, const TH1C &h2)
Operator /.
Definition: TH1.cxx:9081
TH1 * R__H(Int_t hid)
return pointer to histogram with name hid if id >=0 h_id if id <0
Definition: TH1.cxx:9815
TH1C operator*(Double_t c1, const TH1C &h1)
Operator *.
Definition: TH1.cxx:9037
float xmin
Definition: THbookFile.cxx:93
float * q
Definition: THbookFile.cxx:87
float ymin
Definition: THbookFile.cxx:93
float xmax
Definition: THbookFile.cxx:93
float ymax
Definition: THbookFile.cxx:93
R__EXTERN Foption_t Foption
Definition: TTreePlayer.cxx:90
Array of chars or bytes (8 bits per element).
Definition: TArrayC.h:27
Char_t * fArray
Definition: TArrayC.h:30
Array of doubles (64 bits per element).
Definition: TArrayD.h:27
Double_t * fArray
Definition: TArrayD.h:30
void Reset()
Definition: TArrayD.h:47
Array of floats (32 bits per element).
Definition: TArrayF.h:27
Float_t * fArray
Definition: TArrayF.h:30
void Reset()
Definition: TArrayF.h:47
Array of integers (32 bits per element).
Definition: TArrayI.h:27
Int_t * fArray
Definition: TArrayI.h:30
void Reset()
Definition: TArrayI.h:47
Array of shorts (16 bits per element).
Definition: TArrayS.h:27
void Reset()
Definition: TArrayS.h:47
Short_t * fArray
Definition: TArrayS.h:30
Int_t fN
Definition: TArray.h:38
Fill Area Attributes class.
Definition: TAttFill.h:19
Line Attributes class.
Definition: TAttLine.h:18
Marker Attributes class.
Definition: TAttMarker.h:19
Class to manage histogram axis.
Definition: TAxis.h:30
Int_t GetNbins() const
Definition: TAxis.h:121
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
Collection abstract base class.
Definition: TCollection.h:63
Describe directory structure in memory.
Definition: TDirectory.h:34
1-Dim function class
Definition: TF1.h:211
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
Definition: TFitResultPtr.h:31
1-D histogram with a byte per channel (see TH1 documentation)
Definition: TH1.h:448
friend TH1C operator+(const TH1C &h1, const TH1C &h2)
Operator +.
Definition: TH1.cxx:9048
friend TH1C operator-(const TH1C &h1, const TH1C &h2)
Operator -.
Definition: TH1.cxx:9059
friend TH1C operator/(const TH1C &h1, const TH1C &h2)
Operator /.
Definition: TH1.cxx:9081
TH1C & operator=(const TH1C &h1)
Operator =.
Definition: TH1.cxx:9028
TH1C()
Constructor.
Definition: TH1.cxx:8918
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...
Definition: TH1.h:476
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...
Definition: TH1.h:475
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9000
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9018
friend TH1C operator*(Double_t c1, const TH1C &h1)
Operator *.
Definition: TH1.cxx:9037
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:8981
virtual ~TH1C()
Destructor.
Definition: TH1.cxx:8966
virtual void Reset(Option_t *option="")
Reset.
Definition: TH1.cxx:9008
1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:614
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9721
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.h:626
virtual ~TH1D()
Destructor.
Definition: TH1.cxx:9706
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...
Definition: TH1.h:644
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9739
virtual void AddBinContent(Int_t bin, Double_t w)
Increment bin content by a weight w.
Definition: TH1.h:627
TH1D()
Constructor.
Definition: TH1.cxx:9641
TH1D & operator=(const TH1D &h1)
Operator =.
Definition: TH1.cxx:9749
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...
Definition: TH1.h:643
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:571
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...
Definition: TH1.h:600
virtual void AddBinContent(Int_t bin, Double_t w)
Increment bin content by a weight w.
Definition: TH1.h:584
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.h:583
virtual ~TH1F()
Destructor.
Definition: TH1.cxx:9535
TH1F & operator=(const TH1F &h1)
Operator =.
Definition: TH1.cxx:9570
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9560
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9542
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...
Definition: TH1.h:601
TH1F()
Constructor.
Definition: TH1.cxx:9462
1-D histogram with an int per channel (see TH1 documentation)}
Definition: TH1.h:530
friend TH1I operator-(const TH1I &h1, const TH1I &h2)
Operator -.
Definition: TH1.cxx:9422
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9362
friend TH1I operator+(const TH1I &h1, const TH1I &h2)
Operator +.
Definition: TH1.cxx:9411
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:9343
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9380
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...
Definition: TH1.h:557
friend TH1I operator/(const TH1I &h1, const TH1I &h2)
Operator /.
Definition: TH1.cxx:9444
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...
Definition: TH1.h:558
virtual ~TH1I()
Destructor.
Definition: TH1.cxx:9328
TH1I()
Constructor.
Definition: TH1.cxx:9280
TH1I & operator=(const TH1I &h1)
Operator =.
Definition: TH1.cxx:9390
friend TH1I operator*(Double_t c1, const TH1I &h1)
Operator *.
Definition: TH1.cxx:9400
1-D histogram with a short per channel (see TH1 documentation)
Definition: TH1.h:489
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:9162
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9199
virtual ~TH1S()
Destructor.
Definition: TH1.cxx:9147
friend TH1S operator*(Double_t c1, const TH1S &h1)
Operator *.
Definition: TH1.cxx:9218
friend TH1S operator-(const TH1S &h1, const TH1S &h2)
Operator -.
Definition: TH1.cxx:9240
TH1S & operator=(const TH1S &h1)
Operator =.
Definition: TH1.cxx:9209
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9181
friend TH1S operator+(const TH1S &h1, const TH1S &h2)
Operator +.
Definition: TH1.cxx:9229
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...
Definition: TH1.h:517
TH1S()
Constructor.
Definition: TH1.cxx:9099
friend TH1S operator/(const TH1S &h1, const TH1S &h2)
Operator /.
Definition: TH1.cxx:9262
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...
Definition: TH1.h:516
The TH1 histogram class.
Definition: TH1.h:56
virtual void SetLabelFont(Style_t font=62, Option_t *axis="X")
Set font number used to draw axis labels.
Definition: Haxis.cxx:249
virtual void SetError(const Double_t *error)
Replace bin errors by values in array error.
Definition: TH1.cxx:8395
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
Definition: TH1.cxx:8381
virtual void FitPanel()
Display a panel with all histogram fit options.
Definition: TH1.cxx:4155
Double_t * fBuffer
[fBufferSize] entry buffer
Definition: TH1.h:105
virtual Int_t AutoP2FindLimits(Double_t min, Double_t max)
Buffer-based estimate of the histogram range using the power of 2 algorithm.
Definition: TH1.cxx:1276
@ kXaxis
Definition: TH1.h:70
@ kAllAxes
Definition: TH1.h:73
@ kNoAxis
NOTE: Must always be 0 !!!
Definition: TH1.h:69
@ kZaxis
Definition: TH1.h:72
@ kYaxis
Definition: TH1.h:71
void SetStatOverflows(EStatOverflows statOverflows)
Definition: TH1.h:407
virtual Double_t GetEffectiveEntries() const
Number of effective entries of the histogram.
Definition: TH1.cxx:4319
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TH1.cxx:6777
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
Definition: TH1.cxx:6333
virtual void Smooth(Int_t ntimes=1, Option_t *option="")
Smooth bin contents of this histogram.
Definition: TH1.cxx:6500
virtual void SetNormFactor(Double_t factor=1)
Definition: TH1.h:400
virtual void Print(Option_t *option="") const
Print some global quantities for this histogram.
Definition: TH1.cxx:6630
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
Definition: TH1.cxx:8585
virtual void Rebuild(Option_t *option="")
Using the current bin info, recompute the arrays for contents and errors.
Definition: TH1.cxx:6708
virtual Color_t GetLabelColor(Option_t *axis="X") const
Return the "axis" label color.
Definition: Haxis.cxx:53
static Bool_t fgStatOverflows
!flag to use under/overflows in statistics
Definition: TH1.h:114
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...
Definition: TH1.cxx:3721
virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Set the axis' title size.
Definition: Haxis.cxx:365
TAxis * GetZaxis()
Definition: TH1.h:318
virtual Bool_t Multiply(TF1 *f1, Double_t c1=1)
Performs the operation:
Definition: TH1.cxx:5650
virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Set offset between axis and axis' labels.
Definition: Haxis.cxx:267
virtual void Browse(TBrowser *b)
Browse the Histogram object.
Definition: TH1.cxx:714
Int_t fNcells
number of bins(1D), cells (2D) +U/Overflows
Definition: TH1.h:86
virtual void GetStats(Double_t *stats) const
fill the array stats from the contents of this histogram The array stats must be correctly dimensione...
Definition: TH1.cxx:7333
virtual void FillRandom(const char *fname, Int_t ntimes=5000)
Fill histogram following distribution in function fname.
Definition: TH1.cxx:3445
virtual Double_t GetCellContent(Int_t binx, Int_t biny) const
Definition: TH1.h:423
virtual Double_t GetBinError(Int_t binx, Int_t biny) const
Definition: TH1.h:264
Double_t fTsumw
Total Sum of weights.
Definition: TH1.h:93
virtual EBinErrorOpt GetBinErrorOption() const
Definition: TH1.h:268
virtual Float_t GetBarWidth() const
Definition: TH1.h:252
Double_t fTsumw2
Total Sum of squares of weights.
Definition: TH1.h:94
static void StatOverflows(Bool_t flag=kTRUE)
if flag=kTRUE, underflows and overflows are used by the Fill functions in the computation of statisti...
Definition: TH1.cxx:6546
TDirectory * GetDirectory() const
Definition: TH1.h:274
virtual Double_t GetMinimumStored() const
Definition: TH1.h:288
virtual Float_t GetBarOffset() const
Definition: TH1.h:251
virtual ~TH1()
Histogram default destructor.
Definition: TH1.cxx:579
TList * fFunctions
->Pointer to list of functions (fits and user)
Definition: TH1.h:103
virtual void RebinAxis(Double_t x, TAxis *axis)
Definition: TH1.h:427
EStatOverflows GetStatOverflows() const
Definition: TH1.h:315
static Bool_t fgAddDirectory
!flag to add histograms to the directory
Definition: TH1.h:113
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...
Definition: TH1.cxx:4451
static Int_t GetDefaultBufferSize()
Static function return the default buffer size for automatic histograms the parameter fgBufferSize ma...
Definition: TH1.cxx:4277
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...
Definition: TH1.cxx:7474
Double_t fTsumwx2
Total Sum of weight*X*X.
Definition: TH1.h:96
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
Definition: TH1.cxx:7128
TH1()
Histogram default constructor.
Definition: TH1.cxx:551
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...
Definition: TH1.cxx:8764
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X")
Set option(s) to draw axis with labels.
Definition: TH1.cxx:5214
virtual Int_t GetNbinsY() const
Definition: TH1.h:293
Short_t fBarOffset
(1000*offset) for bar charts or legos
Definition: TH1.h:90
static bool CheckBinLimits(const TAxis *a1, const TAxis *a2)
Check bin limits.
Definition: TH1.cxx:1472
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:1201
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
Definition: TH1.cxx:8507
static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption)
Decode string choptin and fill fitOption structure.
Definition: TH1.cxx:4492
virtual Int_t GetNbinsZ() const
Definition: TH1.h:294
virtual Double_t GetNormFactor() const
Definition: TH1.h:296
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.
Definition: TH1.cxx:7074
virtual Double_t GetSkewness(Int_t axis=1) const
Definition: TH1.cxx:7180
virtual void ClearUnderflowAndOverflow()
Remove all the content from the underflow and overflow bins, without changing the number of entries A...
Definition: TH1.cxx:2456
virtual Double_t GetContourLevelPad(Int_t level) const
Return the value of contour number "level" in Pad coordinates.
Definition: TH1.cxx:7892
virtual void SetXTitle(const char *title)
Definition: TH1.h:409
virtual TH1 * DrawNormalized(Option_t *option="", Double_t norm=1) const
Draw a normalized copy of this histogram.
Definition: TH1.cxx:3075
EStatOverflows
Enumeration specifying the way to treat statoverflow.
Definition: TH1.h:77
@ kNeutral
Adapt to the global flag.
Definition: TH1.h:80
@ kIgnore
Override global flag ignoring the overflows.
Definition: TH1.h:78
@ kConsider
Override global flag considering the overflows.
Definition: TH1.h:79
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.
Definition: TH1.cxx:2009
virtual Int_t GetDimension() const
Definition: TH1.h:278
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
Definition: TH1.cxx:1226
virtual Double_t GetBinContent(Int_t bin, Int_t) const
Definition: TH1.h:261
@ kLogX
X-axis in log scale.
Definition: TH1.h:163
@ kIsAverage
Bin contents are average (used by Add)
Definition: TH1.h:166
@ kNoTitle
don't draw the histogram title
Definition: TH1.h:165
@ kUserContour
user specified contour levels
Definition: TH1.h:161
@ kNoStats
don't draw stats box
Definition: TH1.h:160
@ kIsZoomed
bit set when zooming on Y axis
Definition: TH1.h:164
@ kAutoBinPTwo
Use Power(2)-based algorithm for autobinning.
Definition: TH1.h:169
@ kIsNotW
Histogram is forced to be not weighted even when the histogram is filled with weighted different than...
Definition: TH1.h:167
@ kIsHighlight
bit set if histo is highlight
Definition: TH1.h:170
virtual Double_t GetRandom() const
Return a random number distributed according the histogram bin contents.
Definition: TH1.cxx:4848
virtual void SetContourLevel(Int_t level, Double_t value)
Set value for one contour level.
Definition: TH1.cxx:7974
virtual Bool_t CanExtendAllAxes() const
Returns true if all axes are extendable.
Definition: TH1.cxx:6266
TDirectory * fDirectory
!Pointer to directory holding this histogram
Definition: TH1.h:106
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
Definition: TH1.cxx:6724
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
Definition: TH1.h:316
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...
Definition: TH1.cxx:4814
TH1 * GetCumulative(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...
Definition: TH1.cxx:2545
void UseCurrentStyle()
Copy current attributes from/to current style.
Definition: TH1.cxx:7010
static Double_t AutoP2GetPower2(Double_t x, Bool_t next=kTRUE)
Auxilliary function to get the power of 2 next (larger) or previous (smaller) a given x.
Definition: TH1.cxx:1240
virtual Int_t GetNcells() const
Definition: TH1.h:295
virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
Interface to TSpectrum::Search.
Definition: TH1.cxx:8746
Int_t GetBufferLength() const
Definition: TH1.h:232
static Bool_t RecomputeAxisLimits(TAxis &destAxis, const TAxis &anAxis)
Finds new limits for the axis for the Merge function.
Definition: TH1.cxx:5509
virtual Style_t GetTitleFont(Option_t *axis="X") const
Return the "axis" title font.
Definition: Haxis.cxx:118
virtual void SetNdivisions(Int_t n=510, Option_t *axis="X")
Set the number of divisions to draw an axis.
Definition: Haxis.cxx:170
virtual Style_t GetLabelFont(Option_t *axis="X") const
Return the "axis" label font.
Definition: Haxis.cxx:66
virtual Float_t GetTickLength(Option_t *axis="X") const
Return the "axis" tick length.
Definition: Haxis.cxx:105
Int_t GetBufferSize() const
Definition: TH1.h:233
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
Definition: TH1.cxx:7384
TVirtualHistPainter * GetPainter(Option_t *option="")
Return pointer to painter.
Definition: TH1.cxx:4360
virtual Float_t GetTitleSize(Option_t *axis="X") const
Return the "axis" title size.
Definition: Haxis.cxx:144
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
Definition: TH1.cxx:2665
static Bool_t GetDefaultSumw2()
Return kTRUE if TH1::Sumw2 must be called when creating new histograms.
Definition: TH1.cxx:4286
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 ...
Definition: TH1.cxx:3658
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.
Definition: TH1.cxx:3808
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.
Definition: TH1.cxx:4801
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...
Definition: TH1.cxx:7994
Double_t GetRMSError(Int_t axis=1) const
Definition: TH1.h:312
virtual Int_t GetNbinsX() const
Definition: TH1.h:292
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:394
virtual TH1 * FFT(TH1 *h_output, Option_t *option)
This function allows to do discrete Fourier transforms of TH1 and TH2.
Definition: TH1.cxx:3215
virtual void LabelsInflate(Option_t *axis="X")
Double the number of bins for axis.
Definition: TH1.cxx:5153
virtual TH1 * ShowBackground(Int_t niter=20, Option_t *option="same")
This function calculates the background spectrum in this histogram.
Definition: TH1.cxx:8731
virtual Double_t Chi2Test(const TH1 *h2, Option_t *option="UU", Double_t *res=0) const
test for comparing weighted and unweighted histograms
Definition: TH1.cxx:1950
virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t)
Definition: TH1.h:219
static Bool_t SameLimitsAndNBins(const TAxis &axis1, const TAxis &axis2)
Same limits and bins.
Definition: TH1.cxx:5499
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),...
Definition: TH1.cxx:778
Double_t fMaximum
Maximum value for plotting.
Definition: TH1.h:97
Int_t fBufferSize
fBuffer size
Definition: TH1.h:104
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from the list of functions.
Definition: TH1.cxx:6206
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...
Definition: TH1.cxx:8884
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.
Definition: TH1.cxx:7465
Int_t fDimension
!Histogram dimension (1, 2 or 3 dim)
Definition: TH1.h:107
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...
Definition: TH1.cxx:8650
EBinErrorOpt fBinStatErrOpt
option for bin statistical errors
Definition: TH1.h:110
static Int_t fgBufferSize
!default buffer size for automatic histograms
Definition: TH1.h:112
virtual void SetBinsLength(Int_t=-1)
Definition: TH1.h:371
Double_t fNormFactor
Normalization factor.
Definition: TH1.h:99
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
Definition: TH1.cxx:3275
virtual TObject * FindObject(const char *name) const
Search object named name in the list of functions.
Definition: TH1.cxx:3781
TAxis * GetYaxis()
Definition: TH1.h:317
TArrayD fContour
Array to display contour levels.
Definition: TH1.h:100
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
Definition: TH1.cxx:8523
virtual TH1 * RebinX(Int_t ngroup=2, const char *newname="")
Definition: TH1.h:346
virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const
Definition: TH1.h:262
virtual void SetContent(const Double_t *content)
Replace bin contents by the contents of array content.
Definition: TH1.cxx:7850
virtual Float_t GetLabelSize(Option_t *axis="X") const
Return the "axis" label size.
Definition: Haxis.cxx:92
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,...
Definition: TH1.cxx:6919
Short_t fBarWidth
(1000*width) for bar charts or legos
Definition: TH1.h:91
virtual void SetContour(Int_t nlevels, const Double_t *levels=0)
Set the number and values of contour levels.
Definition: TH1.cxx:7935
virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const
Definition: TH1.h:439
virtual Double_t GetCellError(Int_t binx, Int_t biny) const
Definition: TH1.h:425
virtual Int_t GetNdivisions(Option_t *axis="X") const
Return the number of divisions for "axis".
Definition: Haxis.cxx:27
Int_t AxisChoice(Option_t *axis) const
Choose an axis according to "axis".
Definition: Haxis.cxx:14
virtual void SetMinimum(Double_t minimum=-1111)
Definition: TH1.h:395
Bool_t IsBinUnderflow(Int_t bin, Int_t axis=0) const
Return true if the bin is underflow.
Definition: TH1.cxx:5052
virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content)
Definition: TH1.h:429
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check that axis have same labels.
Definition: TH1.cxx:1501
virtual Double_t Interpolate(Double_t x) const
Given a point x, approximates the value via linear interpolation based on the two nearest bin centers...
Definition: TH1.cxx:4953
static void SetDefaultSumw2(Bool_t sumw2=kTRUE)
When this static function is called with sumw2=kTRUE, all new histograms will automatically activate ...
Definition: TH1.cxx:6318
Bool_t IsBinOverflow(Int_t bin, Int_t axis=0) const
Return true if the bin is overflow.
Definition: TH1.cxx:5020
Double_t GetRMS(Int_t axis=1) const
Definition: TH1.h:311
Double_t * fIntegral
!Integral of bins used by GetRandom
Definition: TH1.h:108
Double_t fMinimum
Minimum value for plotting.
Definition: TH1.h:98
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
Definition: TH1.cxx:7438
virtual void SetBarWidth(Float_t width=0.5)
Definition: TH1.h:356
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...
Definition: TH1.cxx:8666
virtual void DirectoryAutoAdd(TDirectory *)
Perform the automatic addition of the histogram to the given directory.
Definition: TH1.cxx:2714
virtual void GetLowEdge(Double_t *edge) const
Fill array with low edge of bins for 1D histogram Better to use h1.GetXaxis().GetLowEdge(edge)
Definition: TH1.cxx:8631
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
Definition: TH1.cxx:8596
void Build()
Creates histogram basic data structure.
Definition: TH1.cxx:723
virtual Double_t GetEntries() const
Return the current number of entries.
Definition: TH1.cxx:4294
const TAxis * GetZaxis() const
Definition: TH1.h:321
virtual void SetZTitle(const char *title)
Definition: TH1.h:411
virtual TF1 * GetFunction(const char *name) const
Return pointer to function with name.
Definition: TH1.cxx:8495
virtual Int_t BufferFill(Double_t x, Double_t w)
accumulate arguments in buffer.
Definition: TH1.cxx:1437
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.
Definition: TH1.cxx:4924
virtual UInt_t SetCanExtend(UInt_t extendBitMask)
Make the histogram axes extendable / not extendable according to the bit mask returns the previous bi...
Definition: TH1.cxx:6279
TList * GetListOfFunctions() const
Definition: TH1.h:239
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
Definition: TH1.cxx:3045
virtual void Copy(TObject &hnew) const
Copy this histogram structure to newth1.
Definition: TH1.cxx:2588
virtual Float_t GetTitleOffset(Option_t *axis="X") const
Return the "axis" title offset.
Definition: Haxis.cxx:131
Bool_t IsEmpty() const
Check if an histogram is empty (this a protected method used mainly by TH1Merger )
Definition: TH1.cxx:5002
virtual Double_t GetMeanError(Int_t axis=1) const
Return standard error of mean of this histogram along the X axis.
Definition: TH1.cxx:7105
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2998
virtual void SetBarOffset(Float_t offset=0.25)
Definition: TH1.h:355
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 ...
Definition: TH1.cxx:7558
Option_t * GetOption() const
Definition: TH1.h:298
virtual void ResetStats()
Reset the statistics including the number of entries and replace with values calculates from bin cont...
Definition: TH1.cxx:7399
virtual void SetBinContent(Int_t bin, Int_t, Int_t, Double_t content)
Definition: TH1.h:359
static void SetDefaultBufferSize(Int_t buffersize=1000)
Static function to set the default buffer size for automatic histograms.
Definition: TH1.cxx:6308
virtual void SetBinErrorOption(EBinErrorOpt type)
Definition: TH1.h:372
virtual void SetBuffer(Int_t buffersize, Option_t *option="")
Set the maximum number of entries to be kept in the buffer.
Definition: TH1.cxx:7910
virtual void DrawPanel()
Display a panel with all histogram drawing options.
Definition: TH1.cxx:3106
const TAxis * GetXaxis() const
Definition: TH1.h:319
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...
Definition: TH1.cxx:2437
virtual Double_t GetMaximumStored() const
Definition: TH1.h:284
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.
Definition: TH1.cxx:3404
virtual void GetMinimumAndMaximum(Double_t &min, Double_t &max) const
Retrieve the minimum and maximum values in the histogram.
Definition: TH1.cxx:8175
virtual const TArrayD * GetSumw2() const
Definition: TH1.h:309
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Definition: TH1.cxx:8024
static Int_t AutoP2GetBins(Int_t n)
Auxilliary function to get the next power of 2 integer value larger then n.
Definition: TH1.cxx:1253
Double_t fEntries
Number of entries.
Definition: TH1.h:92
virtual Long64_t Merge(TCollection *list)
Definition: TH1.h:337
virtual void SetName(const char *name)
Change the name of this histogram.
Definition: TH1.cxx:8404
virtual Double_t * GetIntegral()
Return a pointer to the array of bins integral.
Definition: TH1.cxx:2523
TAxis fZaxis
Z axis descriptor.
Definition: TH1.h:89
EStatOverflows fStatOverflows
per object flag to use under/overflows in statistics
Definition: TH1.h:111
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.
Definition: TH1.cxx:3378
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...
Definition: TH1.cxx:8894
virtual Float_t GetLabelOffset(Option_t *axis="X") const
Return the "axis" label offset.
Definition: Haxis.cxx:79
static bool CheckEqualAxes(const TAxis *a1, const TAxis *a2)
Check that the axis are the same.
Definition: TH1.cxx:1548
EBinErrorOpt
Definition: TH1.h:61
@ kPoisson2
errors from Poisson interval at 95% CL (~ 2 sigma)
Definition: TH1.h:64
@ kNormal
errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
Definition: TH1.h:62
@ kPoisson
errors from Poisson interval at 68.3% (1 sigma)
Definition: TH1.h:63
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4899
virtual TArrayD * GetSumw2()
Definition: TH1.h:308
TAxis fXaxis
X axis descriptor.
Definition: TH1.h:87
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.
Definition: Haxis.cxx:345
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TH1.cxx:3171
const Double_t * GetBuffer() const
Definition: TH1.h:234
virtual Bool_t IsHighlight() const
Definition: TH1.h:330
virtual void SetLabelColor(Color_t color=1, Option_t *axis="X")
Set axis labels color.
Definition: Haxis.cxx:226
virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const
Definition: TH1.h:265
virtual void ExtendAxis(Double_t x, TAxis *axis)
Histogram is resized along axis such that x is in the axis range.
Definition: TH1.cxx:6134
virtual void SetAxisColor(Color_t color=1, Option_t *axis="X")
Set color to draw the axis line and tick marks.
Definition: Haxis.cxx:187
virtual void SetNameTitle(const char *name, const char *title)
Change the name and title of this histogram.
Definition: TH1.cxx:8418
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
Definition: TH1.cxx:8607
static bool CheckConsistency(const TH1 *h1, const TH1 *h2)
Check histogram compatibility.
Definition: TH1.cxx:1621
const TAxis * GetYaxis() const
Definition: TH1.h:320
TArrayD fSumw2
Array of sum of squares of weights.
Definition: TH1.h:101
virtual void SetOption(Option_t *option=" ")
Definition: TH1.h:402
TH1 * GetAsymmetry(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 define...
Definition: TH1.cxx:4210
virtual Double_t GetContourLevel(Int_t level) const
Return value of contour number level.
Definition: TH1.cxx:7882
virtual void SetHighlight(Bool_t set=kTRUE)
Set highlight (enable/disable) mode for the histogram by default highlight mode is disable.
Definition: TH1.cxx:4330
virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X")
Set the "axis" range.
Definition: Haxis.cxx:201
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
Definition: TH1.cxx:8554
virtual void SetYTitle(const char *title)
Definition: TH1.h:410
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
Definition: TH1.cxx:6234
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
Definition: TH1.cxx:5825
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
Definition: TH1.cxx:8109
virtual Int_t GetSumw2N() const
Definition: TH1.h:310
virtual void SetCellError(Int_t binx, Int_t biny, Double_t content)
Definition: TH1.h:431
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
Definition: TH1.cxx:3596
Bool_t GetStatOverflowsBehaviour() const
Definition: TH1.h:148
virtual void SetTitleFont(Style_t font=62, Option_t *axis="X")
Set the axis' title font.
Definition: Haxis.cxx:323
virtual Color_t GetAxisColor(Option_t *axis="X") const
Return the number of divisions for "axis".
Definition: Haxis.cxx:40
virtual Double_t GetStdDevError(Int_t axis=1) const
Return error of standard deviation estimation for Normal distribution.
Definition: TH1.cxx:7167
virtual Bool_t Divide(TF1 *f1, Double_t c1=1)
Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2),...
Definition: TH1.cxx:2753
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...
Definition: TH1.cxx:8079
TH1 & operator=(const TH1 &)
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.
Definition: TH1.cxx:1584
TAxis fYaxis
Y axis descriptor.
Definition: TH1.h:88
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.
Definition: TH1.cxx:7672
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
Definition: TH1.cxx:7414
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.
Definition: TH1.cxx:6382
virtual void GetCenter(Double_t *center) const
Fill array with center of bins for 1D histogram Better to use h1.GetXaxis().GetCenter(center)
Definition: TH1.cxx:8618
TVirtualHistPainter * fPainter
!pointer to histogram painter
Definition: TH1.h:109
virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax)
Redefine x axis parameters.
Definition: TH1.cxx:8211
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.
Definition: TH1.cxx:3629
virtual void SetBinContent(Int_t bin, Int_t, Double_t content)
Definition: TH1.h:358
virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
Set size of axis' labels.
Definition: Haxis.cxx:285
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Redefines TObject::GetObjectInfo.
Definition: TH1.cxx:4351
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
Definition: TH1.cxx:8464
virtual void SetEntries(Double_t n)
Definition: TH1.h:381
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...
Definition: TH1.cxx:6077
static bool CheckAxisLimits(const TAxis *a1, const TAxis *a2)
Check that the axis limits of the histograms are the same.
Definition: TH1.cxx:1533
static Bool_t AddDirectoryStatus()
Static function: cannot be inlined on Windows/NT.
Definition: TH1.cxx:706
static Bool_t fgDefaultSumw2
!flag to call TH1::Sumw2 automatically at histogram creation time
Definition: TH1.h:115
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
Definition: TH1.cxx:2736
Double_t fTsumwx
Total Sum of weight*X.
Definition: TH1.h:95
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.
Definition: TH1.cxx:5083
virtual Double_t ComputeIntegral(Bool_t onlyPositive=false)
Compute integral (cumulative sum of bins) The result stored in fIntegral is used by the GetRandom fun...
Definition: TH1.cxx:2475
TString fOption
histogram options
Definition: TH1.h:102
virtual Int_t GetContour(Double_t *levels=0)
Return contour values into array levels if pointer levels is non zero.
Definition: TH1.cxx:7863
virtual void Eval(TF1 *f1, Option_t *option="")
Evaluate function f1 at the center of bins of this histogram.
Definition: TH1.cxx:3123
virtual Int_t BufferEmpty(Int_t action=0)
Fill histogram with all entries in the buffer.
Definition: TH1.cxx:1347
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
Definition: TH1.cxx:8434
@ kNstat
Definition: TH1.h:179
virtual void SetTickLength(Float_t length=0.02, Option_t *axis="X")
Set the axis' tick marks length.
Definition: Haxis.cxx:302
virtual TH1 * Rebin(Int_t ngroup=2, const char *newname="", const Double_t *xbins=0)
Rebin this histogram.
Definition: TH1.cxx:5892
virtual Double_t GetKurtosis(Int_t axis=1) const
Definition: TH1.cxx:7250
A doubly linked list.
Definition: TList.h:44
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:164
Mother of all ROOT objects.
Definition: TObject.h:37
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
EStatusBits
Definition: TObject.h:57
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
Definition: TObject.cxx:942
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
TVectorT.
Definition: TVectorT.h:27
TVirtualFFT is an interface class for Fast Fourier Transforms.
Definition: TVirtualFFT.h:88
Abstract interface to a histogram painter.
const Double_t sigma
return c1
Definition: legend1.C:41
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16
TH1F * h1
Definition: legend1.C:5
TF1 * f1
Definition: legend1.C:11
return c2
Definition: legend2.C:14
void forward(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
apply the weights (and functions) in forward direction of the DNN
Definition: NeuralNet.icc:546