Logo ROOT   6.12/06
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 
46 class TF1;
47 class TH1D;
48 class TBrowser;
49 class TDirectory;
50 class TList;
51 class TCollection;
52 class TVirtualFFT;
54 
55 
56 class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
57 
58 public:
59 
60  // enumeration specifying type of statistics for bin errors
61  enum EBinErrorOpt {
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  friend class TH1Merger;
77 
78 protected:
79  Int_t fNcells; ///< number of bins(1D), cells (2D) +U/Overflows
80  TAxis fXaxis; ///< X axis descriptor
81  TAxis fYaxis; ///< Y axis descriptor
82  TAxis fZaxis; ///< Z axis descriptor
83  Short_t fBarOffset; ///< (1000*offset) for bar charts or legos
84  Short_t fBarWidth; ///< (1000*width) for bar charts or legos
85  Double_t fEntries; ///< Number of entries
86  Double_t fTsumw; ///< Total Sum of weights
87  Double_t fTsumw2; ///< Total Sum of squares of weights
88  Double_t fTsumwx; ///< Total Sum of weight*X
89  Double_t fTsumwx2; ///< Total Sum of weight*X*X
90  Double_t fMaximum; ///< Maximum value for plotting
91  Double_t fMinimum; ///< Minimum value for plotting
92  Double_t fNormFactor; ///< Normalization factor
93  TArrayD fContour; ///< Array to display contour levels
94  TArrayD fSumw2; ///< Array of sum of squares of weights
95  TString fOption; ///< histogram options
96  TList *fFunctions; ///<->Pointer to list of functions (fits and user)
97  Int_t fBufferSize; ///< fBuffer size
98  Double_t *fBuffer; ///<[fBufferSize] entry buffer
99  TDirectory *fDirectory; ///<!Pointer to directory holding this histogram
100  Int_t fDimension; ///<!Histogram dimension (1, 2 or 3 dim)
101  Double_t *fIntegral; ///<!Integral of bins used by GetRandom
102  TVirtualHistPainter *fPainter; ///<!pointer to histogram painter
103  EBinErrorOpt fBinStatErrOpt; ///< option for bin statistical errors
104  static Int_t fgBufferSize; ///<!default buffer size for automatic histograms
105  static Bool_t fgAddDirectory; ///<!flag to add histograms to the directory
106  static Bool_t fgStatOverflows; ///<!flag to use under/overflows in statistics
107  static Bool_t fgDefaultSumw2; ///<!flag to call TH1::Sumw2 automatically at histogram creation time
108 
109 public:
110  static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption);
111 
112 private:
113  Int_t AxisChoice(Option_t *axis) const;
114  void Build();
115 
116  TH1(const TH1&);
117  TH1& operator=(const TH1&); // Not implemented
118 
119 
120 protected:
121  TH1();
122  TH1(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
123  TH1(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
124  TH1(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
125  virtual Int_t BufferFill(Double_t x, Double_t w);
126  virtual Bool_t FindNewAxisLimits(const TAxis* axis, const Double_t point, Double_t& newMin, Double_t &newMax);
127  virtual void SavePrimitiveHelp(std::ostream &out, const char *hname, Option_t *option = "");
128  static Bool_t RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxis);
129  static Bool_t SameLimitsAndNBins(const TAxis& axis1, const TAxis& axis2);
130  Bool_t IsEmpty() const { return fTsumw == 0 && GetEntries() == 0; } //need to use GetEntries() in case of buffer histograms
131 
132  inline static Double_t AutoP2GetPower2(Double_t x, Bool_t next = kTRUE);
133  inline static Int_t AutoP2GetBins(Int_t n);
134  virtual Int_t AutoP2FindLimits(Double_t min, Double_t max);
135 
136  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,
137  Option_t * opt, Bool_t doerr = kFALSE) const;
138 
139  virtual void DoFillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1);
140 
141  static bool CheckAxisLimits(const TAxis* a1, const TAxis* a2);
142  static bool CheckBinLimits(const TAxis* a1, const TAxis* a2);
143  static bool CheckBinLabels(const TAxis* a1, const TAxis* a2);
144  static bool CheckEqualAxes(const TAxis* a1, const TAxis* a2);
145  static bool CheckConsistentSubAxes(const TAxis *a1, Int_t firstBin1, Int_t lastBin1, const TAxis *a2, Int_t firstBin2=0, Int_t lastBin2=0);
146  static bool CheckConsistency(const TH1* h1, const TH1* h2);
147 
148 public:
149  // TH1 status bits
150  enum EStatusBits {
151  kNoStats = BIT(9), ///< don't draw stats box
152  kUserContour = BIT(10), ///< user specified contour levels
153  // kCanRebin = BIT(11), ///< FIXME DEPRECATED - to be removed, replaced by SetCanExtend / CanExtendAllAxes
154  kLogX = BIT(15), ///< X-axis in log scale
155  kIsZoomed = BIT(16), ///< bit set when zooming on Y axis
156  kNoTitle = BIT(17), ///< don't draw the histogram title
157  kIsAverage = BIT(18), ///< Bin contents are average (used by Add)
158  kIsNotW = BIT(19), ///< Histogram is forced to be not weighted even when the histogram is filled with weighted
159  /// different than 1.
160  kAutoBinPTwo = BIT(20) ///< Use Power(2)-based algorithm for autobinning
161  };
162  // size of statistics data (size of array used in GetStats()/ PutStats )
163  // s[0] = sumw s[1] = sumw2
164  // s[2] = sumwx s[3] = sumwx2
165  // s[4] = sumwy s[5] = sumwy2 s[6] = sumwxy
166  // s[7] = sumwz s[8] = sumwz2 s[9] = sumwxz s[10] = sumwyz
167  // s[11] = sumwt s[12] = sumwt2 (11 and 12 used only by TProfile3D)
168  enum {
169  kNstat = 13 // size of statistics data (up to TProfile3D)
170  };
171 
172 
173  virtual ~TH1();
174 
175  virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="");
176  virtual Bool_t Add(const TH1 *h1, Double_t c1=1);
177  virtual Bool_t Add(const TH1 *h, const TH1 *h2, Double_t c1=1, Double_t c2=1); // *MENU*
178  virtual void AddBinContent(Int_t bin);
179  virtual void AddBinContent(Int_t bin, Double_t w);
180  static void AddDirectory(Bool_t add=kTRUE);
181  static Bool_t AddDirectoryStatus();
182  virtual void Browse(TBrowser *b);
183  virtual Bool_t CanExtendAllAxes() const;
184  virtual Double_t Chi2Test(const TH1* h2, Option_t *option = "UU", Double_t *res = 0) const;
185  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;
186  virtual Double_t Chisquare(TF1 * f1, Option_t *option = "") const;
187  virtual void ClearUnderflowAndOverflow();
188  virtual Double_t ComputeIntegral(Bool_t onlyPositive = false);
189  TObject* Clone(const char* newname=0) const;
190  virtual void Copy(TObject &hnew) const;
191  virtual void DirectoryAutoAdd(TDirectory *);
192  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
193  virtual Bool_t Divide(TF1 *f1, Double_t c1=1);
194  virtual Bool_t Divide(const TH1 *h1);
195  virtual Bool_t Divide(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU*
196  virtual void Draw(Option_t *option="");
197  virtual TH1 *DrawCopy(Option_t *option="", const char * name_postfix = "_copy") const;
198  virtual TH1 *DrawNormalized(Option_t *option="", Double_t norm=1) const;
199  virtual void DrawPanel(); // *MENU*
200  virtual Int_t BufferEmpty(Int_t action=0);
201  virtual void Eval(TF1 *f1, Option_t *option="");
202  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
203  virtual void ExtendAxis(Double_t x, TAxis *axis);
204  virtual TH1 *FFT(TH1* h_output, Option_t *option);
205  virtual Int_t Fill(Double_t x);
206  virtual Int_t Fill(Double_t x, Double_t w);
207  virtual Int_t Fill(const char *name, Double_t w);
208  virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1);
209  virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t) {;}
210  virtual void FillRandom(const char *fname, Int_t ntimes=5000);
211  virtual void FillRandom(TH1 *h, Int_t ntimes=5000);
212  virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0);
213  virtual Int_t FindFixBin(Double_t x, Double_t y=0, Double_t z=0) const;
214  virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) const;
215  virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) const;
216  virtual TObject *FindObject(const char *name) const;
217  virtual TObject *FindObject(const TObject *obj) const;
218  virtual TFitResultPtr Fit(const char *formula ,Option_t *option="" ,Option_t *goption="", Double_t xmin=0, Double_t xmax=0); // *MENU*
219  virtual TFitResultPtr Fit(TF1 *f1 ,Option_t *option="" ,Option_t *goption="", Double_t xmin=0, Double_t xmax=0);
220  virtual void FitPanel(); // *MENU*
221  TH1 *GetAsymmetry(TH1* h2, Double_t c2=1, Double_t dc2=0);
222  Int_t GetBufferLength() const {return fBuffer ? (Int_t)fBuffer[0] : 0;}
223  Int_t GetBufferSize () const {return fBufferSize;}
224  const Double_t *GetBuffer() const {return fBuffer;}
225  static Int_t GetDefaultBufferSize();
226  virtual Double_t *GetIntegral();
227  TH1 *GetCumulative(Bool_t forward = kTRUE, const char* suffix = "_cumulative") const;
228 
229  TList *GetListOfFunctions() const { return fFunctions; }
230 
231  virtual Int_t GetNdivisions(Option_t *axis="X") const;
232  virtual Color_t GetAxisColor(Option_t *axis="X") const;
233  virtual Color_t GetLabelColor(Option_t *axis="X") const;
234  virtual Style_t GetLabelFont(Option_t *axis="X") const;
235  virtual Float_t GetLabelOffset(Option_t *axis="X") const;
236  virtual Float_t GetLabelSize(Option_t *axis="X") const;
237  virtual Style_t GetTitleFont(Option_t *axis="X") const;
238  virtual Float_t GetTitleOffset(Option_t *axis="X") const;
239  virtual Float_t GetTitleSize(Option_t *axis="X") const;
240  virtual Float_t GetTickLength(Option_t *axis="X") const;
241  virtual Float_t GetBarOffset() const {return Float_t(0.001*Float_t(fBarOffset));}
242  virtual Float_t GetBarWidth() const {return Float_t(0.001*Float_t(fBarWidth));}
243  virtual Int_t GetContour(Double_t *levels=0);
244  virtual Double_t GetContourLevel(Int_t level) const;
245  virtual Double_t GetContourLevelPad(Int_t level) const;
246 
247  virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const;
248  virtual void GetBinXYZ(Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const;
249  virtual Double_t GetBinCenter(Int_t bin) const;
250  virtual Double_t GetBinContent(Int_t bin) const;
251  virtual Double_t GetBinContent(Int_t bin, Int_t) const { return GetBinContent(bin); }
252  virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const { return GetBinContent(bin); }
253  virtual Double_t GetBinError(Int_t bin) const;
254  virtual Double_t GetBinError(Int_t binx, Int_t biny) const { return GetBinError(GetBin(binx, biny)); } // for 2D histograms only
255  virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const { return GetBinError(GetBin(binx, biny, binz)); } // for 3D histograms only
256  virtual Double_t GetBinErrorLow(Int_t bin) const;
257  virtual Double_t GetBinErrorUp(Int_t bin) const;
258  virtual EBinErrorOpt GetBinErrorOption() const { return fBinStatErrOpt; }
259  virtual Double_t GetBinLowEdge(Int_t bin) const;
260  virtual Double_t GetBinWidth(Int_t bin) const;
261  virtual Double_t GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx=0, Int_t lastx=0,Double_t maxdiff=0) const;
262  virtual void GetCenter(Double_t *center) const;
263  static Bool_t GetDefaultSumw2();
264  TDirectory *GetDirectory() const {return fDirectory;}
265  virtual Double_t GetEntries() const;
266  virtual Double_t GetEffectiveEntries() const;
267  virtual TF1 *GetFunction(const char *name) const;
268  virtual Int_t GetDimension() const { return fDimension; }
269  virtual Double_t GetKurtosis(Int_t axis=1) const;
270  virtual void GetLowEdge(Double_t *edge) const;
271  virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const;
272  virtual Int_t GetMaximumBin() const;
273  virtual Int_t GetMaximumBin(Int_t &locmax, Int_t &locmay, Int_t &locmaz) const;
274  virtual Double_t GetMaximumStored() const {return fMaximum;}
275  virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const;
276  virtual Int_t GetMinimumBin() const;
277  virtual Int_t GetMinimumBin(Int_t &locmix, Int_t &locmiy, Int_t &locmiz) const;
278  virtual Double_t GetMinimumStored() const {return fMinimum;}
279  virtual void GetMinimumAndMaximum(Double_t& min, Double_t& max) const;
280  virtual Double_t GetMean(Int_t axis=1) const;
281  virtual Double_t GetMeanError(Int_t axis=1) const;
282  virtual Int_t GetNbinsX() const {return fXaxis.GetNbins();}
283  virtual Int_t GetNbinsY() const {return fYaxis.GetNbins();}
284  virtual Int_t GetNbinsZ() const {return fZaxis.GetNbins();}
285  virtual Int_t GetNcells() const {return fNcells; }
286  virtual Double_t GetNormFactor() const {return fNormFactor;}
287  virtual char *GetObjectInfo(Int_t px, Int_t py) const;
288  Option_t *GetOption() const {return fOption.Data();}
289 
291 
292  virtual Int_t GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum=0);
293  virtual Double_t GetRandom() const;
294  virtual void GetStats(Double_t *stats) const;
295  virtual Double_t GetStdDev(Int_t axis=1) const;
296  virtual Double_t GetStdDevError(Int_t axis=1) const;
297  virtual Double_t GetSumOfWeights() const;
298  virtual TArrayD *GetSumw2() {return &fSumw2;}
299  virtual const TArrayD *GetSumw2() const {return &fSumw2;}
300  virtual Int_t GetSumw2N() const {return fSumw2.fN;}
301  Double_t GetRMS(Int_t axis=1) const { return GetStdDev(axis); }
302  Double_t GetRMSError(Int_t axis=1) const { return GetStdDevError(axis); }
303 
304  virtual Double_t GetSkewness(Int_t axis=1) const;
305  TAxis* GetXaxis() { return &fXaxis; }
306  TAxis* GetYaxis() { return &fYaxis; }
307  TAxis* GetZaxis() { return &fZaxis; }
308  const TAxis* GetXaxis() const { return &fXaxis; }
309  const TAxis* GetYaxis() const { return &fYaxis; }
310  const TAxis* GetZaxis() const { return &fZaxis; }
311  virtual Double_t Integral(Option_t *option="") const;
312  virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const;
313  virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Double_t & err, Option_t *option="") const;
314  virtual Double_t Interpolate(Double_t x);
317  Bool_t IsBinOverflow(Int_t bin, Int_t axis = 0) const;
318  Bool_t IsBinUnderflow(Int_t bin, Int_t axis = 0) const;
319  virtual Double_t AndersonDarlingTest(const TH1 *h2, Option_t *option="") const;
320  virtual Double_t AndersonDarlingTest(const TH1 *h2, Double_t &advalue) const;
321  virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const;
322  virtual void LabelsDeflate(Option_t *axis="X");
323  virtual void LabelsInflate(Option_t *axis="X");
324  virtual void LabelsOption(Option_t *option="h", Option_t *axis="X");
325  virtual Long64_t Merge(TCollection *list);
326  virtual Bool_t Multiply(TF1 *h1, Double_t c1=1);
327  virtual Bool_t Multiply(const TH1 *h1);
328  virtual Bool_t Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU*
329  virtual void Paint(Option_t *option="");
330  virtual void Print(Option_t *option="") const;
331  virtual void PutStats(Double_t *stats);
332  virtual TH1 *Rebin(Int_t ngroup=2, const char*newname="", const Double_t *xbins=0); // *MENU*
333  virtual TH1 *RebinX(Int_t ngroup=2, const char*newname="") { return Rebin(ngroup,newname, (Double_t*) 0); }
334  virtual void Rebuild(Option_t *option="");
335  virtual void RecursiveRemove(TObject *obj);
336  virtual void Reset(Option_t *option="");
337  virtual void ResetStats();
338  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
339  virtual void Scale(Double_t c1=1, Option_t *option="");
340  virtual void SetAxisColor(Color_t color=1, Option_t *axis="X");
341  virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X");
342  virtual void SetBarOffset(Float_t offset=0.25) {fBarOffset = Short_t(1000*offset);}
343  virtual void SetBarWidth(Float_t width=0.5) {fBarWidth = Short_t(1000*width);}
344  virtual void SetBinContent(Int_t bin, Double_t content);
345  virtual void SetBinContent(Int_t bin, Int_t, Double_t content) { SetBinContent(bin, content); }
346  virtual void SetBinContent(Int_t bin, Int_t, Int_t, Double_t content) { SetBinContent(bin, content); }
347  virtual void SetBinError(Int_t bin, Double_t error);
348  virtual void SetBinError(Int_t binx, Int_t biny, Double_t error);
349  virtual void SetBinError(Int_t binx, Int_t biny, Int_t binz, Double_t error);
350  virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax);
351  virtual void SetBins(Int_t nx, const Double_t *xBins);
353  virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, const Double_t *yBins);
355  Int_t nz, Double_t zmin, Double_t zmax);
356  virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, const Double_t * yBins, Int_t nz,
357  const Double_t *zBins);
358  virtual void SetBinsLength(Int_t = -1) { } //redefined in derived classes
359  virtual void SetBinErrorOption(EBinErrorOpt type) { fBinStatErrOpt = type; }
360  virtual void SetBuffer(Int_t buffersize, Option_t *option="");
361  virtual UInt_t SetCanExtend(UInt_t extendBitMask);
362  virtual void SetContent(const Double_t *content);
363  virtual void SetContour(Int_t nlevels, const Double_t *levels=0);
364  virtual void SetContourLevel(Int_t level, Double_t value);
365  static void SetDefaultBufferSize(Int_t buffersize=1000);
366  static void SetDefaultSumw2(Bool_t sumw2=kTRUE);
367  virtual void SetDirectory(TDirectory *dir);
368  virtual void SetEntries(Double_t n) {fEntries = n;};
369  virtual void SetError(const Double_t *error);
370  virtual void SetLabelColor(Color_t color=1, Option_t *axis="X");
371  virtual void SetLabelFont(Style_t font=62, Option_t *axis="X");
372  virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X");
373  virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X");
374 
375  /*
376  * Set the minimum / maximum value for the Y axis (1-D histograms) or Z axis (2-D histograms)
377  * By default the maximum / minimum value used in drawing is the maximum / minimum value of the histogram
378  * plus a margin of 10%. If these functions are called, the values are used without any extra margin.
379  */
380  virtual void SetMaximum(Double_t maximum = -1111) { fMaximum = maximum; }; // *MENU*
381  virtual void SetMinimum(Double_t minimum = -1111) { fMinimum = minimum; }; // *MENU*
382 
383  virtual void SetName(const char *name); // *MENU*
384  virtual void SetNameTitle(const char *name, const char *title);
385  virtual void SetNdivisions(Int_t n=510, Option_t *axis="X");
386  virtual void SetNormFactor(Double_t factor=1) {fNormFactor = factor;}
387  virtual void SetStats(Bool_t stats=kTRUE); // *MENU*
388  virtual void SetOption(Option_t *option=" ") {fOption = option;}
389  virtual void SetTickLength(Float_t length=0.02, Option_t *axis="X");
390  virtual void SetTitleFont(Style_t font=62, Option_t *axis="X");
391  virtual void SetTitleOffset(Float_t offset=1, Option_t *axis="X");
392  virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X");
393  virtual void SetTitle(const char *title); // *MENU*
394  virtual void SetXTitle(const char *title) {fXaxis.SetTitle(title);}
395  virtual void SetYTitle(const char *title) {fYaxis.SetTitle(title);}
396  virtual void SetZTitle(const char *title) {fZaxis.SetTitle(title);}
397  virtual TH1 *ShowBackground(Int_t niter=20, Option_t *option="same"); // *MENU*
398  virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05); // *MENU*
399  virtual void Smooth(Int_t ntimes=1, Option_t *option=""); // *MENU*
400  static void SmoothArray(Int_t NN, Double_t *XX, Int_t ntimes=1);
401  static void StatOverflows(Bool_t flag=kTRUE);
402  virtual void Sumw2(Bool_t flag = kTRUE);
403  void UseCurrentStyle();
404  static TH1 *TransformHisto(TVirtualFFT *fft, TH1* h_output, Option_t *option);
405 
406 
407  // TODO: Remove obsolete methods in v6-04
408  virtual Double_t GetCellContent(Int_t binx, Int_t biny) const
409  { Obsolete("GetCellContent", "v6-00", "v6-04"); return GetBinContent(GetBin(binx, biny)); }
410  virtual Double_t GetCellError(Int_t binx, Int_t biny) const
411  { Obsolete("GetCellError", "v6-00", "v6-04"); return GetBinError(binx, biny); }
412  virtual void RebinAxis(Double_t x, TAxis *axis)
413  { Obsolete("RebinAxis", "v6-00", "v6-04"); ExtendAxis(x, axis); }
414  virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content)
415  { Obsolete("SetCellContent", "v6-00", "v6-04"); SetBinContent(GetBin(binx, biny), content); }
416  virtual void SetCellError(Int_t binx, Int_t biny, Double_t content)
417  { Obsolete("SetCellError", "v6-00", "v6-04"); SetBinError(binx, biny, content); }
418 
419  ClassDef(TH1,7) //1-Dim histogram base class
420 
421 protected:
422  virtual Double_t RetrieveBinContent(Int_t bin) const;
423  virtual void UpdateBinContent(Int_t bin, Double_t content);
424  virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const { return fSumw2.fN ? fSumw2.fArray[bin] : RetrieveBinContent(bin); }
425 };
426 
427 namespace cling {
428  std::string printValue(TH1 *val);
429 }
430 
431 //________________________________________________________________________
432 
433 class TH1C : public TH1, public TArrayC {
434 
435 public:
436  TH1C();
437  TH1C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
438  TH1C(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
439  TH1C(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
440  TH1C(const TH1C &h1c);
441  TH1C& operator=(const TH1C &h1);
442  virtual ~TH1C();
443 
444  virtual void AddBinContent(Int_t bin);
445  virtual void AddBinContent(Int_t bin, Double_t w);
446  virtual void Copy(TObject &hnew) const;
447  virtual void Reset(Option_t *option="");
448  virtual void SetBinsLength(Int_t n=-1);
449 
450  ClassDef(TH1C,2) //1-Dim histograms (one char per channel)
451 
452  friend TH1C operator*(Double_t c1, const TH1C &h1);
453  friend TH1C operator*(const TH1C &h1, Double_t c1);
454  friend TH1C operator+(const TH1C &h1, const TH1C &h2);
455  friend TH1C operator-(const TH1C &h1, const TH1C &h2);
456  friend TH1C operator*(const TH1C &h1, const TH1C &h2);
457  friend TH1C operator/(const TH1C &h1, const TH1C &h2);
458 
459 protected:
460  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
461  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Char_t (content); }
462 };
463 
464 TH1C operator*(Double_t c1, const TH1C &h1);
465 inline
467 TH1C operator+(const TH1C &h1, const TH1C &h2);
468 TH1C operator-(const TH1C &h1, const TH1C &h2);
469 TH1C operator*(const TH1C &h1, const TH1C &h2);
470 TH1C operator/(const TH1C &h1, const TH1C &h2);
471 
472 //________________________________________________________________________
473 
474 class TH1S : public TH1, public TArrayS {
475 
476 public:
477  TH1S();
478  TH1S(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
479  TH1S(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
480  TH1S(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
481  TH1S(const TH1S &h1s);
482  TH1S& operator=(const TH1S &h1);
483  virtual ~TH1S();
484 
485  virtual void AddBinContent(Int_t bin);
486  virtual void AddBinContent(Int_t bin, Double_t w);
487  virtual void Copy(TObject &hnew) const;
488  virtual void Reset(Option_t *option="");
489  virtual void SetBinsLength(Int_t n=-1);
490 
491  ClassDef(TH1S,2) //1-Dim histograms (one short per channel)
492 
493  friend TH1S operator*(Double_t c1, const TH1S &h1);
494  friend TH1S operator*(const TH1S &h1, Double_t c1);
495  friend TH1S operator+(const TH1S &h1, const TH1S &h2);
496  friend TH1S operator-(const TH1S &h1, const TH1S &h2);
497  friend TH1S operator*(const TH1S &h1, const TH1S &h2);
498  friend TH1S operator/(const TH1S &h1, const TH1S &h2);
499 
500 protected:
501  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
502  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Short_t (content); }
503 };
504 
505 TH1S operator*(Double_t c1, const TH1S &h1);
506 inline
508 TH1S operator+(const TH1S &h1, const TH1S &h2);
509 TH1S operator-(const TH1S &h1, const TH1S &h2);
510 TH1S operator*(const TH1S &h1, const TH1S &h2);
511 TH1S operator/(const TH1S &h1, const TH1S &h2);
512 
513 //________________________________________________________________________
514 
515 class TH1I: public TH1, public TArrayI {
516 
517 public:
518  TH1I();
519  TH1I(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
520  TH1I(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
521  TH1I(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
522  TH1I(const TH1I &h1i);
523  TH1I& operator=(const TH1I &h1);
524  virtual ~TH1I();
525 
526  virtual void AddBinContent(Int_t bin);
527  virtual void AddBinContent(Int_t bin, Double_t w);
528  virtual void Copy(TObject &hnew) const;
529  virtual void Reset(Option_t *option="");
530  virtual void SetBinsLength(Int_t n=-1);
531 
532  ClassDef(TH1I,2) //1-Dim histograms (one 32 bits integer per channel)
533 
534  friend TH1I operator*(Double_t c1, const TH1I &h1);
535  friend TH1I operator*(const TH1I &h1, Double_t c1);
536  friend TH1I operator+(const TH1I &h1, const TH1I &h2);
537  friend TH1I operator-(const TH1I &h1, const TH1I &h2);
538  friend TH1I operator*(const TH1I &h1, const TH1I &h2);
539  friend TH1I operator/(const TH1I &h1, const TH1I &h2);
540 
541 protected:
542  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
543  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Int_t (content); }
544 };
545 
546 TH1I operator*(Double_t c1, const TH1I &h1);
547 inline
549 TH1I operator+(const TH1I &h1, const TH1I &h2);
550 TH1I operator-(const TH1I &h1, const TH1I &h2);
551 TH1I operator*(const TH1I &h1, const TH1I &h2);
552 TH1I operator/(const TH1I &h1, const TH1I &h2);
553 
554 //________________________________________________________________________
555 
556 class TH1F : public TH1, public TArrayF {
557 
558 public:
559  TH1F();
560  TH1F(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
561  TH1F(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
562  TH1F(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
563  explicit TH1F(const TVectorF &v);
564  TH1F(const TH1F &h1f);
565  TH1F& operator=(const TH1F &h1);
566  virtual ~TH1F();
567 
568  virtual void AddBinContent(Int_t bin) {++fArray[bin];}
569  virtual void AddBinContent(Int_t bin, Double_t w)
570  {fArray[bin] += Float_t (w);}
571  virtual void Copy(TObject &hnew) const;
572  virtual void Reset(Option_t *option="");
573  virtual void SetBinsLength(Int_t n=-1);
574 
575  ClassDef(TH1F,2) //1-Dim histograms (one float per channel)
576 
577  friend TH1F operator*(Double_t c1, const TH1F &h1);
578  friend TH1F operator*(const TH1F &h1, Double_t c1);
579  friend TH1F operator+(const TH1F &h1, const TH1F &h2);
580  friend TH1F operator-(const TH1F &h1, const TH1F &h2);
581  friend TH1F operator*(const TH1F &h1, const TH1F &h2);
582  friend TH1F operator/(const TH1F &h1, const TH1F &h2);
583 
584 protected:
585  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
586  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Float_t (content); }
587 };
588 
589 TH1F operator*(Double_t c1, const TH1F &h1);
590 inline
592 TH1F operator+(const TH1F &h1, const TH1F &h2);
593 TH1F operator-(const TH1F &h1, const TH1F &h2);
594 TH1F operator*(const TH1F &h1, const TH1F &h2);
595 TH1F operator/(const TH1F &h1, const TH1F &h2);
596 
597 //________________________________________________________________________
598 
599 class TH1D : public TH1, public TArrayD {
600 
601 public:
602  TH1D();
603  TH1D(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
604  TH1D(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
605  TH1D(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
606  explicit TH1D(const TVectorD &v);
607  TH1D(const TH1D &h1d);
608  TH1D& operator=(const TH1D &h1);
609  virtual ~TH1D();
610 
611  virtual void AddBinContent(Int_t bin) {++fArray[bin];}
612  virtual void AddBinContent(Int_t bin, Double_t w)
613  {fArray[bin] += Double_t (w);}
614  virtual void Copy(TObject &hnew) const;
615  virtual void Reset(Option_t *option="");
616  virtual void SetBinsLength(Int_t n=-1);
617 
618  ClassDef(TH1D,2) //1-Dim histograms (one double per channel)
619 
620  friend TH1D operator*(Double_t c1, const TH1D &h1);
621  friend TH1D operator*(const TH1D &h1, Double_t c1);
622  friend TH1D operator+(const TH1D &h1, const TH1D &h2);
623  friend TH1D operator-(const TH1D &h1, const TH1D &h2);
624  friend TH1D operator*(const TH1D &h1, const TH1D &h2);
625  friend TH1D operator/(const TH1D &h1, const TH1D &h2);
626 
627 protected:
628  virtual Double_t RetrieveBinContent(Int_t bin) const { return fArray[bin]; }
629  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = content; }
630 };
631 
632 TH1D operator*(Double_t c1, const TH1D &h1);
633 inline
635 TH1D operator+(const TH1D &h1, const TH1D &h2);
636 TH1D operator-(const TH1D &h1, const TH1D &h2);
637 TH1D operator*(const TH1D &h1, const TH1D &h2);
638 TH1D operator/(const TH1D &h1, const TH1D &h2);
639 
640  extern TH1 *R__H(Int_t hid);
641  extern TH1 *R__H(const char *hname);
642 
643 #endif
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:6365
virtual void Browse(TBrowser *b)
Browse the Histogram object.
Definition: TH1.cxx:712
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TH1.cxx:6596
virtual void SetZTitle(const char *title)
Definition: TH1.h:396
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9548
virtual void Print(Option_t *option="") const
Print some global quantities for this histogram.
Definition: TH1.cxx:6449
virtual Double_t GetMaximumStored() const
Definition: TH1.h:274
virtual void SetNameTitle(const char *name, const char *title)
Change the name and title of this histogram.
Definition: TH1.cxx:8229
virtual Style_t GetLabelFont(Option_t *axis="X") const
Return the "axis" label font.
Definition: Haxis.cxx:66
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:3563
virtual Int_t GetNcells() const
Definition: TH1.h:285
Double_t fNormFactor
Normalization factor.
Definition: TH1.h:92
virtual void SetBarOffset(Float_t offset=0.25)
Definition: TH1.h:342
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:502
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
Definition: TH1.cxx:6061
Float_t * fArray
Definition: TArrayF.h:30
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
Definition: TH1.cxx:3242
virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
Interface to TSpectrum::Search.
Definition: TH1.cxx:8555
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:7805
TH1D & operator=(const TH1D &h1)
Operator =.
Definition: TH1.cxx:9558
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:7281
virtual Double_t GetEffectiveEntries() const
Number of effective entries of the histogram.
Definition: TH1.cxx:4201
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
Definition: TH1.cxx:5661
float xmin
Definition: THbookFile.cxx:93
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
Definition: TH1.cxx:8395
Bool_t IsBinUnderflow(Int_t bin, Int_t axis=0) const
Return true if the bin is underflow.
Definition: TH1.cxx:4895
virtual void SetTitleFont(Style_t font=62, Option_t *axis="X")
Set the axis&#39; title font.
Definition: Haxis.cxx:323
virtual ~TH1I()
Destructor.
Definition: TH1.cxx:9137
long long Long64_t
Definition: RtypesCore.h:69
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:1273
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:380
void UseCurrentStyle()
Copy current attributes from/to current style.
Definition: TH1.cxx:6826
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:461
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X")
Set option(s) to draw axis with labels.
Definition: TH1.cxx:5057
short Style_t
Definition: RtypesCore.h:76
virtual const TArrayD * GetSumw2() const
Definition: TH1.h:299
Short_t fBarWidth
(1000*width) for bar charts or legos
Definition: TH1.h:84
TH1C()
Constructor.
Definition: TH1.cxx:8727
Bool_t IsBinOverflow(Int_t bin, Int_t axis=0) const
Return true if the bin is overflow.
Definition: TH1.cxx:4863
static Bool_t fgDefaultSumw2
!flag to call TH1::Sumw2 automatically at histogram creation time
Definition: TH1.h:107
TVirtualHistPainter * GetPainter(Option_t *option="")
Return pointer to painter.
Definition: TH1.cxx:4222
virtual void FitPanel()
Display a panel with all histogram fit options.
Definition: TH1.cxx:4037
float Float_t
Definition: RtypesCore.h:53
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:8192
virtual TF1 * GetFunction(const char *name) const
Return pointer to function with name.
Definition: TH1.cxx:8305
Short_t * fArray
Definition: TArrayS.h:30
const char Option_t
Definition: RtypesCore.h:62
virtual Float_t GetBarOffset() const
Definition: TH1.h:241
return c1
Definition: legend1.C:41
void Reset()
Definition: TArrayD.h:47
float ymin
Definition: THbookFile.cxx:93
virtual void SetError(const Double_t *error)
Replace bin errors by values in array error.
Definition: TH1.cxx:8206
virtual Double_t GetMinimumStored() const
Definition: TH1.h:278
virtual Double_t GetNormFactor() const
Definition: TH1.h:286
TAxis fYaxis
Y axis descriptor.
Definition: TH1.h:81
virtual Int_t BufferFill(Double_t x, Double_t w)
accumulate arguments in buffer.
Definition: TH1.cxx:1434
virtual void SetContour(Int_t nlevels, const Double_t *levels=0)
Set the number and values of contour levels.
Definition: TH1.cxx:7746
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
Definition: TH1.cxx:7200
R__EXTERN Foption_t Foption
Definition: TTreePlayer.cxx:89
TList * fFunctions
->Pointer to list of functions (fits and user)
Definition: TH1.h:96
virtual Int_t FindLastBinAbove(Double_t threshold=0, Int_t axis=1) const
Find last bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold i...
Definition: TH1.cxx:3641
virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax)
Redefine x axis parameters.
Definition: TH1.cxx:8022
#define BIT(n)
Definition: Rtypes.h:78
TH1 * h
Definition: legend2.C:5
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:4092
static Bool_t fgStatOverflows
!flag to use under/overflows in statistics
Definition: TH1.h:106
virtual TH1 * DrawNormalized(Option_t *option="", Double_t norm=1) const
Draw a normalized copy of this histogram.
Definition: TH1.cxx:3042
static Bool_t SameLimitsAndNBins(const TAxis &axis1, const TAxis &axis2)
Same limits and bins.
Definition: TH1.cxx:5342
virtual ~TH1F()
Destructor.
Definition: TH1.cxx:9344
void Build()
Creates histogram basic data structure.
Definition: TH1.cxx:721
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
Definition: TH1.cxx:7230
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 Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4761
virtual void AddBinContent(Int_t bin, Double_t w)
Increment bin content by a weight w.
Definition: TH1.h:612
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:8809
TVectorT.
Definition: TMatrixTBase.h:77
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:4313
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
Definition: TH1.cxx:7254
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.h:568
virtual void Reset(Option_t *option="")
Reset.
Definition: TH1.cxx:8817
TH1D()
Constructor.
Definition: TH1.cxx:9450
static bool CheckAxisLimits(const TAxis *a1, const TAxis *a2)
Check that the axis limits of the histograms are the same.
Definition: TH1.cxx:1527
friend TH1S operator+(const TH1S &h1, const TH1S &h2)
Operator +.
Definition: TH1.cxx:9038
virtual Double_t GetMeanError(Int_t axis=1) const
Return standard error of mean of this histogram along the X axis.
Definition: TH1.cxx:6921
virtual Int_t GetNbinsZ() const
Definition: TH1.h:284
TH1F()
Constructor.
Definition: TH1.cxx:9271
virtual void SetMinimum(Double_t minimum=-1111)
Definition: TH1.h:381
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:6890
TH1 & operator=(const TH1 &)
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9530
virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
Set size of axis&#39; labels.
Definition: Haxis.cxx:285
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:4676
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9351
Basic string class.
Definition: TString.h:125
static Bool_t AddDirectoryStatus()
Static function: cannot be inlined on Windows/NT.
Definition: TH1.cxx:704
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:556
1-D histogram with a short per channel (see TH1 documentation)
Definition: TH1.h:474
Array of floats (32 bits per element).
Definition: TArrayF.h:27
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:1237
errors from Poisson interval at 68.3% (1 sigma)
Definition: TH1.h:63
int Int_t
Definition: RtypesCore.h:41
virtual void SetYTitle(const char *title)
Definition: TH1.h:395
bool Bool_t
Definition: RtypesCore.h:59
virtual Double_t GetCellContent(Int_t binx, Int_t biny) const
Definition: TH1.h:408
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:542
Double_t GetRMS(Int_t axis=1) const
Definition: TH1.h:301
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
Definition: TH1.cxx:3014
virtual void Smooth(Int_t ntimes=1, Option_t *option="")
Smooth bin contents of this histogram.
Definition: TH1.cxx:6319
virtual Style_t GetTitleFont(Option_t *axis="X") const
Return the "axis" title font.
Definition: Haxis.cxx:118
virtual Int_t GetNdivisions(Option_t *axis="X") const
Return the number of divisions for "axis".
Definition: Haxis.cxx:27
TArrayD fSumw2
Array of sum of squares of weights.
Definition: TH1.h:94
user specified contour levels
Definition: TH1.h:152
virtual Color_t GetAxisColor(Option_t *axis="X") const
Return the number of divisions for "axis".
Definition: Haxis.cxx:40
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
Definition: TH1.cxx:8406
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9171
void Reset()
Definition: TArrayF.h:47
virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X")
Set the "axis" range.
Definition: Haxis.cxx:201
static Bool_t RecomputeAxisLimits(TAxis &destAxis, const TAxis &anAxis)
Finds new limits for the axis for the Merge function.
Definition: TH1.cxx:5353
TAxis fZaxis
Z axis descriptor.
Definition: TH1.h:82
virtual Bool_t Multiply(TF1 *h1, Double_t c1=1)
Performs the operation: this = this*c1*f1 if errors are defined (see TH1::Sumw2), errors are also rec...
Definition: TH1.cxx:5486
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9369
TH1 * R__H(Int_t hid)
return pointer to histogram with name hid if id >=0 h_id if id <0
Definition: TH1.cxx:9624
don&#39;t draw the histogram title
Definition: TH1.h:156
virtual Double_t GetContourLevel(Int_t level) const
Return value of contour number level.
Definition: TH1.cxx:7693
bit set when zooming on Y axis
Definition: TH1.h:155
don&#39;t draw stats box
Definition: TH1.h:151
static bool CheckBinLimits(const TAxis *a1, const TAxis *a2)
Check bin limits.
Definition: TH1.cxx:1469
Array of integers (32 bits per element).
Definition: TArrayI.h:27
virtual void SetBuffer(Int_t buffersize, Option_t *option="")
Set the maximum number of entries to be kept in the buffer.
Definition: TH1.cxx:7721
Double_t fTsumwx2
Total Sum of weight*X*X.
Definition: TH1.h:89
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:7148
virtual Bool_t CanExtendAllAxes() const
Returns true if all axes are extendable.
Definition: TH1.cxx:6085
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
Definition: TH1.cxx:6543
friend TH1S operator-(const TH1S &h1, const TH1S &h2)
Operator -.
Definition: TH1.cxx:9049
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
Definition: TH1.cxx:1223
virtual void SetBarWidth(Float_t width=0.5)
Definition: TH1.h:343
TDirectory * fDirectory
!Pointer to directory holding this histogram
Definition: TH1.h:99
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:6137
Marker Attributes class.
Definition: TAttMarker.h:19
virtual void SetCellError(Int_t binx, Int_t biny, Double_t content)
Definition: TH1.h:416
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:1576
virtual Int_t GetDimension() const
Definition: TH1.h:268
virtual Double_t Interpolate(Double_t x)
Given a point x, approximates the value via linear interpolation based on the two nearest bin centers...
Definition: TH1.cxx:4815
virtual Int_t GetContour(Double_t *levels=0)
Return contour values into array levels if pointer levels is non zero.
Definition: TH1.cxx:7674
TH1C & operator=(const TH1C &h1)
Operator =.
Definition: TH1.cxx:8837
Fill Area Attributes class.
Definition: TAttFill.h:19
Double_t x[n]
Definition: legend1.C:17
static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption)
Decode string choptin and fill fitOption structure.
Definition: TH1.cxx:4354
#define ClassDef(name, id)
Definition: Rtypes.h:320
virtual void Eval(TF1 *f1, Option_t *option="")
Evaluate function f1 at the center of bins of this histogram.
Definition: TH1.cxx:3090
static Bool_t GetDefaultSumw2()
Return kTRUE if TH1::Sumw2 must be called when creating new histograms.
Definition: TH1.cxx:4168
static void SetDefaultBufferSize(Int_t buffersize=1000)
Static function to set the default buffer size for automatic histograms.
Definition: TH1.cxx:6127
Use Power(2)-based algorithm for autobinning.
Definition: TH1.h:160
const Double_t * GetBuffer() const
Definition: TH1.h:224
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:1945
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TH1C operator+(const TH1C &h1, const TH1C &h2)
Operator +.
Definition: TH1.cxx:8857
virtual ~TH1()
Histogram default destructor.
Definition: TH1.cxx:577
Double_t GetRMSError(Int_t axis=1) const
Definition: TH1.h:302
virtual void SetOption(Option_t *option=" ")
Definition: TH1.h:388
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.h:611
virtual void SetContourLevel(Int_t level, Double_t value)
Set value for one contour level.
Definition: TH1.cxx:7785
TH1I()
Constructor.
Definition: TH1.cxx:9089
Abstract interface to a histogram painter.
virtual Float_t GetTitleOffset(Option_t *axis="X") const
Return the "axis" title offset.
Definition: Haxis.cxx:131
TH1S()
Constructor.
Definition: TH1.cxx:8908
Double_t * fArray
Definition: TArrayD.h:30
errors from Poisson interval at 95% CL (~ 2 sigma)
Definition: TH1.h:64
const Double_t sigma
virtual Float_t GetLabelOffset(Option_t *axis="X") const
Return the "axis" label offset.
Definition: Haxis.cxx:79
TString fOption
histogram options
Definition: TH1.h:95
virtual Double_t GetBinContent(Int_t bin, Int_t) const
Definition: TH1.h:251
friend TH1I operator-(const TH1I &h1, const TH1I &h2)
Operator -.
Definition: TH1.cxx:9231
virtual TArrayD * GetSumw2()
Definition: TH1.h:298
virtual void SetLabelFont(Style_t font=62, Option_t *axis="X")
Set font number used to draw axis labels.
Definition: Haxis.cxx:249
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:5904
TH1F * h1
Definition: legend1.C:5
virtual void SetContent(const Double_t *content)
Replace bin contents by the contents of array content.
Definition: TH1.cxx:7661
TH1C operator*(Double_t c1, const TH1C &h1)
Operator *.
Definition: TH1.cxx:8846
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:1198
friend TH1C operator*(Double_t c1, const TH1C &h1)
Operator *.
Definition: TH1.cxx:8846
virtual void ResetStats()
Reset the statistics including the number of entries and replace with values calculates from bin cont...
Definition: TH1.cxx:7215
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
Definition: TObject.cxx:942
TArrayD fContour
Array to display contour levels.
Definition: TH1.h:93
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:8459
Int_t AxisChoice(Option_t *axis) const
Choose an axis according to "axis".
Definition: Haxis.cxx:14
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:2470
virtual void LabelsInflate(Option_t *axis="X")
Double the number of bins for axis.
Definition: TH1.cxx:4996
short Color_t
Definition: RtypesCore.h:79
virtual Double_t GetSkewness(Int_t axis=1) const
Definition: TH1.cxx:6995
Double_t fTsumwx
Total Sum of weight*X.
Definition: TH1.h:88
virtual Bool_t Divide(TF1 *f1, Double_t c1=1)
Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2), errors are also recalculated.
Definition: TH1.cxx:2722
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
static Int_t AutoP2GetBins(Int_t n)
Auxilliary function to get the next power of 2 integer value larger then n.
Definition: TH1.cxx:1250
static Bool_t fgAddDirectory
!flag to add histograms to the directory
Definition: TH1.h:105
A doubly linked list.
Definition: TList.h:44
virtual void GetMinimumAndMaximum(Double_t &min, Double_t &max) const
Retrieve the minimum and maximum values in the histogram.
Definition: TH1.cxx:7986
virtual Double_t GetStdDevError(Int_t axis=1) const
Return error of standard deviation estimation for Normal distribution.
Definition: TH1.cxx:6982
Int_t GetBufferSize() const
Definition: TH1.h:223
Double_t fMinimum
Minimum value for plotting.
Definition: TH1.h:91
virtual EBinErrorOpt GetBinErrorOption() const
Definition: TH1.h:258
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:7488
virtual void ExtendAxis(Double_t x, TAxis *axis)
Histogram is resized along axis such that x is in the axis range.
Definition: TH1.cxx:5961
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:2540
virtual TH1 * FFT(TH1 *h_output, Option_t *option)
This function allows to do discrete Fourier transforms of TH1 and TH2.
Definition: TH1.cxx:3182
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
Definition: TH1.cxx:2705
void Reset()
Definition: TArrayS.h:47
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:8971
friend TH1S operator/(const TH1S &h1, const TH1S &h2)
Operator /.
Definition: TH1.cxx:9071
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TH1.cxx:3138
Int_t fN
Definition: TArray.h:38
virtual Double_t * GetIntegral()
Return a pointer to the array of bins integral.
Definition: TH1.cxx:2518
NOTE: Must always be 0 !!!
Definition: TH1.h:69
virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const
Definition: TH1.h:255
float ymax
Definition: THbookFile.cxx:93
std::string printValue(const TDatime *val)
Print a TDatime at the prompt.
Definition: TDatime.cxx:514
friend TH1C operator-(const TH1C &h1, const TH1C &h2)
Operator -.
Definition: TH1.cxx:8868
friend TH1C operator+(const TH1C &h1, const TH1C &h2)
Operator +.
Definition: TH1.cxx:8857
const TAxis * GetZaxis() const
Definition: TH1.h:310
virtual void FillRandom(const char *fname, Int_t ntimes=5000)
Fill histogram following distribution in function fname.
Definition: TH1.cxx:3412
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:6201
Class to manage histogram axis.
Definition: TAxis.h:30
virtual Double_t GetKurtosis(Int_t axis=1) const
Definition: TH1.cxx:7065
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2967
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check that axis have same labels.
Definition: TH1.cxx:1495
Array of shorts (16 bits per element).
Definition: TArrayS.h:27
virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const
Definition: TH1.h:252
SVector< double, 2 > v
Definition: Dict.h:5
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:4786
friend TH1I operator+(const TH1I &h1, const TH1I &h2)
Operator +.
Definition: TH1.cxx:9220
virtual Float_t GetTitleSize(Option_t *axis="X") const
Return the "axis" title size.
Definition: Haxis.cxx:144
1-D histogram with an int per channel (see TH1 documentation)}
Definition: TH1.h:515
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
Definition: TFitResultPtr.h:31
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:8573
TH1C operator-(const TH1C &h1, const TH1C &h2)
Operator -.
Definition: TH1.cxx:8868
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:8475
Collection abstract base class.
Definition: TCollection.h:63
static Int_t fgBufferSize
!default buffer size for automatic histograms
Definition: TH1.h:104
virtual TH1 * Rebin(Int_t ngroup=2, const char *newname="", const Double_t *xbins=0)
Rebin this histogram.
Definition: TH1.cxx:5727
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:7374
Double_t fEntries
Number of entries.
Definition: TH1.h:85
unsigned int UInt_t
Definition: RtypesCore.h:42
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:4926
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:3371
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:2432
const TAxis * GetYaxis() const
Definition: TH1.h:309
virtual void Copy(TObject &hnew) const
Copy this histogram structure to newth1.
Definition: TH1.cxx:2583
virtual TH1 * ShowBackground(Int_t niter=20, Option_t *option="same")
This function calculates the background spectrum in this histogram.
Definition: TH1.cxx:8540
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9189
virtual ~TH1C()
Destructor.
Definition: TH1.cxx:8775
short Short_t
Definition: RtypesCore.h:35
Option_t * GetOption() const
Definition: TH1.h:288
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:8990
virtual Double_t GetContourLevelPad(Int_t level) const
Return the value of contour number "level" in Pad coordinates.
Definition: TH1.cxx:7703
TAxis * GetYaxis()
Definition: TH1.h:306
float xmax
Definition: THbookFile.cxx:93
Double_t * fIntegral
!Integral of bins used by GetRandom
Definition: TH1.h:101
virtual void SetBinErrorOption(EBinErrorOpt type)
Definition: TH1.h:359
static bool CheckConsistency(const TH1 *h1, const TH1 *h2)
Check histogram compatibility.
Definition: TH1.cxx:1611
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:543
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:585
TH1()
Histogram default constructor.
Definition: TH1.cxx:550
1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:599
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:4663
static Int_t GetDefaultBufferSize()
Static function return the default buffer size for automatic histograms the parameter fgBufferSize ma...
Definition: TH1.cxx:4159
virtual TObject * FindObject(const char *name) const
Search object named name in the list of functions.
Definition: TH1.cxx:3659
virtual void Rebuild(Option_t *option="")
Using the current bin info, recompute the arrays for contents and errors.
Definition: TH1.cxx:6527
virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) const
Find first bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold ...
Definition: TH1.cxx:3622
friend TH1I operator/(const TH1I &h1, const TH1I &h2)
Operator /.
Definition: TH1.cxx:9253
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from the list of functions.
Definition: TH1.cxx:6033
EBinErrorOpt fBinStatErrOpt
option for bin statistical errors
Definition: TH1.h:103
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:8693
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:7890
errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
Definition: TH1.h:62
const Bool_t kFALSE
Definition: RtypesCore.h:88
TVirtualFFT is an interface class for Fast Fourier Transforms.
Definition: TVirtualFFT.h:88
virtual void SetName(const char *name)
Change the name of this histogram.
Definition: TH1.cxx:8215
friend TH1I operator*(Double_t c1, const TH1I &h1)
Operator *.
Definition: TH1.cxx:9209
virtual Int_t GetSumw2N() const
Definition: TH1.h:300
Double_t fTsumw2
Total Sum of squares of weights.
Definition: TH1.h:87
Bin contents are average (used by Add)
Definition: TH1.h:157
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:501
return c2
Definition: legend2.C:14
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
Definition: TH1.cxx:8417
virtual TH1 * RebinX(Int_t ngroup=2, const char *newname="")
Definition: TH1.h:333
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
Definition: TH1.cxx:8333
double Double_t
Definition: RtypesCore.h:55
Int_t * fArray
Definition: TArrayI.h:30
virtual void SavePrimitiveHelp(std::ostream &out, const char *hname, Option_t *option="")
Helper function for the SavePrimitive functions from TH1 or classes derived from TH1, eg TProfile, TProfile2D.
Definition: TH1.cxx:6738
Double_t fTsumw
Total Sum of weights.
Definition: TH1.h:86
Describe directory structure in memory.
Definition: TDirectory.h:34
virtual Double_t GetBinError(Int_t binx, Int_t biny) const
Definition: TH1.h:254
virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Set the axis&#39; title size.
Definition: Haxis.cxx:365
EStatusBits
Definition: TObject.h:57
Histogram is forced to be not weighted even when the histogram is filled with weighted different than...
Definition: TH1.h:158
Print a TSeq at the prompt:
Definition: TDatime.h:115
Double_t y[n]
Definition: legend1.C:17
TH1I & operator=(const TH1I &h1)
Operator =.
Definition: TH1.cxx:9199
The TH1 histogram class.
Definition: TH1.h:56
virtual Double_t GetEntries() const
Return the current number of entries.
Definition: TH1.cxx:4176
void forward(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
apply the weights (and functions) in forward direction of the DNN
Definition: NeuralNet.icc:545
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:2004
Short_t fBarOffset
(1000*offset) for bar charts or legos
Definition: TH1.h:83
Array of doubles (64 bits per element).
Definition: TArrayD.h:27
virtual void RebinAxis(Double_t x, TAxis *axis)
Definition: TH1.h:412
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:629
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), errors are also recalculated.
Definition: TH1.cxx:775
TAxis * GetZaxis()
Definition: TH1.h:307
virtual Color_t GetLabelColor(Option_t *axis="X") const
Return the "axis" label color.
Definition: Haxis.cxx:53
virtual Float_t GetTickLength(Option_t *axis="X") const
Return the "axis" tick length.
Definition: Haxis.cxx:105
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:6098
virtual void SetTickLength(Float_t length=0.02, Option_t *axis="X")
Set the axis&#39; tick marks length.
Definition: Haxis.cxx:302
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:3596
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9008
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
virtual void SetBinContent(Int_t bin, Int_t, Int_t, Double_t content)
Definition: TH1.h:346
virtual void ClearUnderflowAndOverflow()
Remove all the content from the underflow and overflow bins, without changing the number of entries A...
Definition: TH1.cxx:2451
X-axis in log scale.
Definition: TH1.h:154
char Char_t
Definition: RtypesCore.h:29
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Redefines TObject::GetObjectInfo.
Definition: TH1.cxx:4213
TH1S & operator=(const TH1S &h1)
Operator =.
Definition: TH1.cxx:9018
Double_t fMaximum
Maximum value for plotting.
Definition: TH1.h:90
virtual void SetXTitle(const char *title)
Definition: TH1.h:394
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:460
virtual void DirectoryAutoAdd(TDirectory *)
Perform the automatic addition of the histogram to the given directory.
Definition: TH1.cxx:2683
TVirtualHistPainter * fPainter
!pointer to histogram painter
Definition: TH1.h:102
friend TH1C operator/(const TH1C &h1, const TH1C &h2)
Operator /.
Definition: TH1.cxx:8890
friend TH1S operator*(Double_t c1, const TH1S &h1)
Operator *.
Definition: TH1.cxx:9027
Int_t GetBufferLength() const
Definition: TH1.h:222
virtual void DrawPanel()
Display a panel with all histogram drawing options.
Definition: TH1.cxx:3073
TH1C operator/(const TH1C &h1, const TH1C &h2)
Operator /.
Definition: TH1.cxx:8890
Int_t fBufferSize
fBuffer size
Definition: TH1.h:97
virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content)
Definition: TH1.h:414
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
Definition: TH1.cxx:7920
virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const
Definition: TH1.h:424
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:7290
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:3345
virtual void SetBinContent(Int_t bin, Int_t, Double_t content)
Definition: TH1.h:345
1-Dim function class
Definition: TF1.h:211
virtual void SetBinsLength(Int_t=-1)
Definition: TH1.h:358
virtual void AddBinContent(Int_t bin, Double_t w)
Increment bin content by a weight w.
Definition: TH1.h:569
Char_t * fArray
Definition: TArrayC.h:30
1-D histogram with a byte per channel (see TH1 documentation)
Definition: TH1.h:433
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
Definition: TH1.cxx:8274
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
Definition: TH1.cxx:2660
TF1 * f1
Definition: legend1.C:11
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
const TAxis * GetXaxis() const
Definition: TH1.h:308
Int_t fDimension
!Histogram dimension (1, 2 or 3 dim)
Definition: TH1.h:100
void Reset()
Definition: TArrayI.h:47
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
Definition: TH1.cxx:8364
virtual Int_t BufferEmpty(Int_t action=0)
Fill histogram with all entries in the buffer.
Definition: TH1.cxx:1344
virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t)
Definition: TH1.h:209
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:586
virtual ~TH1D()
Destructor.
Definition: TH1.cxx:9515
virtual void SetEntries(Double_t n)
Definition: TH1.h:368
TAxis fXaxis
X axis descriptor.
Definition: TH1.h:80
Bool_t IsEmpty() const
Definition: TH1.h:130
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:9152
virtual void SetTitle(const char *title)
Change (i.e.
Definition: TH1.cxx:6152
virtual Int_t GetNbinsX() const
Definition: TH1.h:282
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:8790
Int_t GetNbins() const
Definition: TAxis.h:121
EBinErrorOpt
Definition: TH1.h:61
virtual Double_t GetCellError(Int_t binx, Int_t biny) const
Definition: TH1.h:410
float * q
Definition: THbookFile.cxx:87
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:164
TList * GetListOfFunctions() const
Definition: TH1.h:229
Double_t * fBuffer
[fBufferSize] entry buffer
Definition: TH1.h:98
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:3686
const Bool_t kTRUE
Definition: RtypesCore.h:87
virtual void SetNormFactor(Double_t factor=1)
Definition: TH1.h:386
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:8703
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
Definition: TH1.cxx:6944
virtual Double_t GetRandom() const
Return a random number distributed according the histogram bin contents.
Definition: TH1.cxx:4710
static bool CheckEqualAxes(const TAxis *a1, const TAxis *a2)
Check that the axis are the same.
Definition: TH1.cxx:1540
virtual Float_t GetLabelSize(Option_t *axis="X") const
Return the "axis" label size.
Definition: Haxis.cxx:92
virtual ~TH1S()
Destructor.
Definition: TH1.cxx:8956
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Definition: TH1.cxx:7835
const Int_t n
Definition: legend1.C:16
Line Attributes class.
Definition: TAttLine.h:18
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:8428
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
Definition: TH1.cxx:8245
TH1F & operator=(const TH1F &h1)
Operator =.
Definition: TH1.cxx:9379
virtual Float_t GetBarWidth() const
Definition: TH1.h:242
char name[80]
Definition: TGX11.cxx:109
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:8441
TAxis * GetXaxis()
Definition: TH1.h:305
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:8827
virtual Long64_t Merge(TCollection *list)
Add all histograms in the collection to this histogram.
Definition: TH1.cxx:5462
virtual Int_t GetNbinsY() const
Definition: TH1.h:283
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:628
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
Definition: TH1.cxx:8317
TDirectory * GetDirectory() const
Definition: TH1.h:264
virtual void SetLabelColor(Color_t color=1, Option_t *axis="X")
Set axis labels color.
Definition: Haxis.cxx:226
Int_t fNcells
number of bins(1D), cells (2D) +U/Overflows
Definition: TH1.h:79
virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Set offset between axis and axis&#39; labels.
Definition: Haxis.cxx:267
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&#39; title...
Definition: Haxis.cxx:345
const char * Data() const
Definition: TString.h:345
Array of chars or bytes (8 bits per element).
Definition: TArrayC.h:27