ROOT  6.06/09
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 #ifndef ROOT_TAxis
25 #include "TAxis.h"
26 #endif
27 
28 #ifndef ROOT_TAttLine
29 #include "TAttLine.h"
30 #endif
31 
32 #ifndef ROOT_TAttFill
33 #include "TAttFill.h"
34 #endif
35 
36 #ifndef ROOT_TAttMarker
37 #include "TAttMarker.h"
38 #endif
39 
40 #ifndef ROOT_TArrayC
41 #include "TArrayC.h"
42 #endif
43 #ifndef ROOT_TArrayS
44 #include "TArrayS.h"
45 #endif
46 #ifndef ROOT_TArrayI
47 #include "TArrayI.h"
48 #endif
49 #ifndef ROOT_TArrayF
50 #include "TArrayF.h"
51 #endif
52 #ifndef ROOT_TArrayD
53 #include "TArrayD.h"
54 #endif
55 #include "Foption.h"
56 
57 #ifndef ROOT_TVectorFfwd
58 #include "TVectorFfwd.h"
59 #endif
60 #ifndef ROOT_TVectorDfwd
61 #include "TVectorDfwd.h"
62 #endif
63 
64 #ifndef ROOT_TFitResultPtr
65 #include "TFitResultPtr.h"
66 #endif
67 
68 #include <float.h>
69 
70 class TF1;
71 class TH1D;
72 class TBrowser;
73 class TDirectory;
74 class TList;
75 class TCollection;
76 class TVirtualFFT;
78 
79 
80 class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
81 
82 public:
83 
84  // enumeration specifying type of statistics for bin errors
85  enum EBinErrorOpt {
86  kNormal = 0, // errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
87  kPoisson = 1 , // errors from Poisson interval at 68.3% (1 sigma)
88  kPoisson2 = 2 // errors from Poisson interval at 95% CL (~ 2 sigma)
89  };
90 
91  // enumeration specifying which axes can be extended
92  enum {
93  kNoAxis = 0, // NOTE: Must always be 0 !!!
94  kXaxis = BIT(0),
95  kYaxis = BIT(1),
96  kZaxis = BIT(2),
98  };
99 
100 protected:
101  Int_t fNcells; //number of bins(1D), cells (2D) +U/Overflows
102  TAxis fXaxis; //X axis descriptor
103  TAxis fYaxis; //Y axis descriptor
104  TAxis fZaxis; //Z axis descriptor
105  Short_t fBarOffset; //(1000*offset) for bar charts or legos
106  Short_t fBarWidth; //(1000*width) for bar charts or legos
107  Double_t fEntries; //Number of entries
108  Double_t fTsumw; //Total Sum of weights
109  Double_t fTsumw2; //Total Sum of squares of weights
110  Double_t fTsumwx; //Total Sum of weight*X
111  Double_t fTsumwx2; //Total Sum of weight*X*X
112  Double_t fMaximum; //Maximum value for plotting
113  Double_t fMinimum; //Minimum value for plotting
114  Double_t fNormFactor; //Normalization factor
115  TArrayD fContour; //Array to display contour levels
116  TArrayD fSumw2; //Array of sum of squares of weights
117  TString fOption; //histogram options
118  TList *fFunctions; //->Pointer to list of functions (fits and user)
119  Int_t fBufferSize; //fBuffer size
120  Double_t *fBuffer; //[fBufferSize] entry buffer
121  TDirectory *fDirectory; //!Pointer to directory holding this histogram
122  Int_t fDimension; //!Histogram dimension (1, 2 or 3 dim)
123  Double_t *fIntegral; //!Integral of bins used by GetRandom
124  TVirtualHistPainter *fPainter; //!pointer to histogram painter
125  EBinErrorOpt fBinStatErrOpt; //option for bin statistical errors
126  static Int_t fgBufferSize; //!default buffer size for automatic histograms
127  static Bool_t fgAddDirectory; //!flag to add histograms to the directory
128  static Bool_t fgStatOverflows; //!flag to use under/overflows in statistics
129  static Bool_t fgDefaultSumw2; //!flag to call TH1::Sumw2 automatically at histogram creation time
130 
131 public:
132  static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption);
133 
134 private:
135  Int_t AxisChoice(Option_t *axis) const;
136  void Build();
137 
138  TH1(const TH1&);
139  TH1& operator=(const TH1&); // Not implemented
140 
141 
142 protected:
143  TH1();
144  TH1(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
145  TH1(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
146  TH1(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
147  virtual Int_t BufferFill(Double_t x, Double_t w);
148  virtual Bool_t FindNewAxisLimits(const TAxis* axis, const Double_t point, Double_t& newMin, Double_t &newMax);
149  virtual void SavePrimitiveHelp(std::ostream &out, const char *hname, Option_t *option = "");
150  static Bool_t RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxis);
151  static Bool_t SameLimitsAndNBins(const TAxis& axis1, const TAxis& axis2);
152 
153  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,
154  Option_t * opt, Bool_t doerr = kFALSE) const;
155 
156  virtual void DoFillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1);
157 
158  static bool CheckAxisLimits(const TAxis* a1, const TAxis* a2);
159  static bool CheckBinLimits(const TAxis* a1, const TAxis* a2);
160  static bool CheckBinLabels(const TAxis* a1, const TAxis* a2);
161  static bool CheckEqualAxes(const TAxis* a1, const TAxis* a2);
162  static bool CheckConsistentSubAxes(const TAxis *a1, Int_t firstBin1, Int_t lastBin1, const TAxis *a2, Int_t firstBin2=0, Int_t lastBin2=0);
163  static bool CheckConsistency(const TH1* h1, const TH1* h2);
164 
165 public:
166  // TH1 status bits
167  enum {
168  kNoStats = BIT(9), // don't draw stats box
169  kUserContour = BIT(10), // user specified contour levels
170  //kCanRebin = BIT(11), // FIXME DEPRECATED - to be removed, replaced by SetCanExtend / CanExtendAllAxes
171  kLogX = BIT(15), // X-axis in log scale
172  kIsZoomed = BIT(16), // bit set when zooming on Y axis
173  kNoTitle = BIT(17), // don't draw the histogram title
174  kIsAverage = BIT(18), // Bin contents are average (used by Add)
175  kIsNotW = BIT(19) // Histogram is forced to be not weighted even when the histogram is filled with weighted different than 1.
176  };
177  // size of statistics data (size of array used in GetStats()/ PutStats )
178  // s[0] = sumw s[1] = sumw2
179  // s[2] = sumwx s[3] = sumwx2
180  // s[4] = sumwy s[5] = sumwy2 s[6] = sumwxy
181  // s[7] = sumwz s[8] = sumwz2 s[9] = sumwxz s[10] = sumwyz
182  // s[11] = sumwt s[12] = sumwt2 (11 and 12 used only by TProfile3D)
183  enum {
184  kNstat = 13 // size of statistics data (up to TProfile3D)
185  };
186 
187 
188  virtual ~TH1();
189 
190  virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="");
191  virtual Bool_t Add(const TH1 *h1, Double_t c1=1);
192  virtual Bool_t Add(const TH1 *h, const TH1 *h2, Double_t c1=1, Double_t c2=1); // *MENU*
193  virtual void AddBinContent(Int_t bin);
194  virtual void AddBinContent(Int_t bin, Double_t w);
195  static void AddDirectory(Bool_t add=kTRUE);
196  static Bool_t AddDirectoryStatus();
197  virtual void Browse(TBrowser *b);
198  virtual Bool_t CanExtendAllAxes() const;
199  virtual Double_t Chi2Test(const TH1* h2, Option_t *option = "UU", Double_t *res = 0) const;
200  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;
201  virtual Double_t Chisquare(TF1 * f1, Option_t *option = "") const;
202  virtual void ClearUnderflowAndOverflow();
203  virtual Double_t ComputeIntegral(Bool_t onlyPositive = false);
204  TObject* Clone(const char* newname=0) const;
205  virtual void Copy(TObject &hnew) const;
206  virtual void DirectoryAutoAdd(TDirectory *);
207  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
208  virtual Bool_t Divide(TF1 *f1, Double_t c1=1);
209  virtual Bool_t Divide(const TH1 *h1);
210  virtual Bool_t Divide(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU*
211  virtual void Draw(Option_t *option="");
212  virtual TH1 *DrawCopy(Option_t *option="", const char * name_postfix = "_copy") const;
213  virtual TH1 *DrawNormalized(Option_t *option="", Double_t norm=1) const;
214  virtual void DrawPanel(); // *MENU*
215  virtual Int_t BufferEmpty(Int_t action=0);
216  virtual void Eval(TF1 *f1, Option_t *option="");
217  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
218  virtual void ExtendAxis(Double_t x, TAxis *axis);
219  virtual TH1 *FFT(TH1* h_output, Option_t *option);
220  virtual Int_t Fill(Double_t x);
221  virtual Int_t Fill(Double_t x, Double_t w);
222  virtual Int_t Fill(const char *name, Double_t w);
223  virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1);
224  virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t) {;}
225  virtual void FillRandom(const char *fname, Int_t ntimes=5000);
226  virtual void FillRandom(TH1 *h, Int_t ntimes=5000);
227  virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0);
228  virtual Int_t FindFixBin(Double_t x, Double_t y=0, Double_t z=0) const;
229  virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) const;
230  virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) const;
231  virtual TObject *FindObject(const char *name) const;
232  virtual TObject *FindObject(const TObject *obj) const;
233  virtual TFitResultPtr Fit(const char *formula ,Option_t *option="" ,Option_t *goption="", Double_t xmin=0, Double_t xmax=0); // *MENU*
234  virtual TFitResultPtr Fit(TF1 *f1 ,Option_t *option="" ,Option_t *goption="", Double_t xmin=0, Double_t xmax=0);
235  virtual void FitPanel(); // *MENU*
236  TH1 *GetAsymmetry(TH1* h2, Double_t c2=1, Double_t dc2=0);
237  Int_t GetBufferLength() const {return fBuffer ? (Int_t)fBuffer[0] : 0;}
238  Int_t GetBufferSize () const {return fBufferSize;}
239  const Double_t *GetBuffer() const {return fBuffer;}
240  static Int_t GetDefaultBufferSize();
241  virtual Double_t *GetIntegral();
242  TH1 *GetCumulative(Bool_t forward = kTRUE, const char* suffix = "_cumulative") const;
243 
244  TList *GetListOfFunctions() const { return fFunctions; }
245 
246  virtual Int_t GetNdivisions(Option_t *axis="X") const;
247  virtual Color_t GetAxisColor(Option_t *axis="X") const;
248  virtual Color_t GetLabelColor(Option_t *axis="X") const;
249  virtual Style_t GetLabelFont(Option_t *axis="X") const;
250  virtual Float_t GetLabelOffset(Option_t *axis="X") const;
251  virtual Float_t GetLabelSize(Option_t *axis="X") const;
252  virtual Style_t GetTitleFont(Option_t *axis="X") const;
253  virtual Float_t GetTitleOffset(Option_t *axis="X") const;
254  virtual Float_t GetTitleSize(Option_t *axis="X") const;
255  virtual Float_t GetTickLength(Option_t *axis="X") const;
256  virtual Float_t GetBarOffset() const {return Float_t(0.001*Float_t(fBarOffset));}
257  virtual Float_t GetBarWidth() const {return Float_t(0.001*Float_t(fBarWidth));}
258  virtual Int_t GetContour(Double_t *levels=0);
259  virtual Double_t GetContourLevel(Int_t level) const;
260  virtual Double_t GetContourLevelPad(Int_t level) const;
261 
262  virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const;
263  virtual void GetBinXYZ(Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const;
264  virtual Double_t GetBinCenter(Int_t bin) const;
265  virtual Double_t GetBinContent(Int_t bin) const;
266  virtual Double_t GetBinContent(Int_t bin, Int_t) const { return GetBinContent(bin); }
267  virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const { return GetBinContent(bin); }
268  virtual Double_t GetBinError(Int_t bin) const;
269  virtual Double_t GetBinError(Int_t binx, Int_t biny) const { return GetBinError(GetBin(binx, biny)); } // for 2D histograms only
270  virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const { return GetBinError(GetBin(binx, biny, binz)); } // for 3D histograms only
271  virtual Double_t GetBinErrorLow(Int_t bin) const;
272  virtual Double_t GetBinErrorUp(Int_t bin) const;
273  virtual EBinErrorOpt GetBinErrorOption() const { return fBinStatErrOpt; }
274  virtual Double_t GetBinLowEdge(Int_t bin) const;
275  virtual Double_t GetBinWidth(Int_t bin) const;
276  virtual Double_t GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx=0, Int_t lastx=0,Double_t maxdiff=0) const;
277  virtual void GetCenter(Double_t *center) const;
278  static Bool_t GetDefaultSumw2();
279  TDirectory *GetDirectory() const {return fDirectory;}
280  virtual Double_t GetEntries() const;
281  virtual Double_t GetEffectiveEntries() const;
282  virtual TF1 *GetFunction(const char *name) const;
283  virtual Int_t GetDimension() const { return fDimension; }
284  virtual Double_t GetKurtosis(Int_t axis=1) const;
285  virtual void GetLowEdge(Double_t *edge) const;
286  virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const;
287  virtual Int_t GetMaximumBin() const;
288  virtual Int_t GetMaximumBin(Int_t &locmax, Int_t &locmay, Int_t &locmaz) const;
289  virtual Double_t GetMaximumStored() const {return fMaximum;}
290  virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const;
291  virtual Int_t GetMinimumBin() const;
292  virtual Int_t GetMinimumBin(Int_t &locmix, Int_t &locmiy, Int_t &locmiz) const;
293  virtual Double_t GetMinimumStored() const {return fMinimum;}
294  virtual Double_t GetMean(Int_t axis=1) const;
295  virtual Double_t GetMeanError(Int_t axis=1) const;
296  virtual Int_t GetNbinsX() const {return fXaxis.GetNbins();}
297  virtual Int_t GetNbinsY() const {return fYaxis.GetNbins();}
298  virtual Int_t GetNbinsZ() const {return fZaxis.GetNbins();}
299  virtual Int_t GetNcells() const {return fNcells; }
300  virtual Double_t GetNormFactor() const {return fNormFactor;}
301  virtual char *GetObjectInfo(Int_t px, Int_t py) const;
302  Option_t *GetOption() const {return fOption.Data();}
303 
305 
306  virtual Int_t GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum=0);
307  virtual Double_t GetRandom() const;
308  virtual void GetStats(Double_t *stats) const;
309  virtual Double_t GetStdDev(Int_t axis=1) const;
310  virtual Double_t GetStdDevError(Int_t axis=1) const;
311  virtual Double_t GetSumOfWeights() const;
312  virtual TArrayD *GetSumw2() {return &fSumw2;}
313  virtual const TArrayD *GetSumw2() const {return &fSumw2;}
314  virtual Int_t GetSumw2N() const {return fSumw2.fN;}
315  Double_t GetRMS(Int_t axis=1) const { return GetStdDev(axis); }
316  Double_t GetRMSError(Int_t axis=1) const { return GetStdDevError(axis); }
317 
318  virtual Double_t GetSkewness(Int_t axis=1) const;
319  TAxis* GetXaxis() { return &fXaxis; }
320  TAxis* GetYaxis() { return &fYaxis; }
321  TAxis* GetZaxis() { return &fZaxis; }
322  const TAxis* GetXaxis() const { return &fXaxis; }
323  const TAxis* GetYaxis() const { return &fYaxis; }
324  const TAxis* GetZaxis() const { return &fZaxis; }
325  virtual Double_t Integral(Option_t *option="") const;
326  virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const;
327  virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Double_t & err, Option_t *option="") const;
328  virtual Double_t Interpolate(Double_t x);
331  Bool_t IsBinOverflow(Int_t bin) const;
332  Bool_t IsBinUnderflow(Int_t bin) const;
333  virtual Double_t AndersonDarlingTest(const TH1 *h2, Option_t *option="") const;
334  virtual Double_t AndersonDarlingTest(const TH1 *h2, Double_t &advalue) const;
335  virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const;
336  virtual void LabelsDeflate(Option_t *axis="X");
337  virtual void LabelsInflate(Option_t *axis="X");
338  virtual void LabelsOption(Option_t *option="h", Option_t *axis="X");
339  virtual Long64_t Merge(TCollection *list);
340  virtual Bool_t Multiply(TF1 *h1, Double_t c1=1);
341  virtual Bool_t Multiply(const TH1 *h1);
342  virtual Bool_t Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU*
343  virtual void Paint(Option_t *option="");
344  virtual void Print(Option_t *option="") const;
345  virtual void PutStats(Double_t *stats);
346  virtual TH1 *Rebin(Int_t ngroup=2, const char*newname="", const Double_t *xbins=0); // *MENU*
347  virtual TH1 *RebinX(Int_t ngroup=2, const char*newname="") { return Rebin(ngroup,newname, (Double_t*) 0); }
348  virtual void Rebuild(Option_t *option="");
349  virtual void RecursiveRemove(TObject *obj);
350  virtual void Reset(Option_t *option="");
351  virtual void ResetStats();
352  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
353  virtual void Scale(Double_t c1=1, Option_t *option="");
354  virtual void SetAxisColor(Color_t color=1, Option_t *axis="X");
355  virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X");
356  virtual void SetBarOffset(Float_t offset=0.25) {fBarOffset = Short_t(1000*offset);}
357  virtual void SetBarWidth(Float_t width=0.5) {fBarWidth = Short_t(1000*width);}
358  virtual void SetBinContent(Int_t bin, Double_t content);
359  virtual void SetBinContent(Int_t bin, Int_t, Double_t content) { SetBinContent(bin, content); }
360  virtual void SetBinContent(Int_t bin, Int_t, Int_t, Double_t content) { SetBinContent(bin, content); }
361  virtual void SetBinError(Int_t bin, Double_t error);
362  virtual void SetBinError(Int_t binx, Int_t biny, Double_t error);
363  virtual void SetBinError(Int_t binx, Int_t biny, Int_t binz, Double_t error);
364  virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax);
365  virtual void SetBins(Int_t nx, const Double_t *xBins);
367  virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, const Double_t *yBins);
369  Int_t nz, Double_t zmin, Double_t zmax);
370  virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, const Double_t * yBins, Int_t nz,
371  const Double_t *zBins);
372  virtual void SetBinsLength(Int_t = -1) { } //redefined in derived classes
373  virtual void SetBinErrorOption(EBinErrorOpt type) { fBinStatErrOpt = type; }
374  virtual void SetBuffer(Int_t buffersize, Option_t *option="");
375  virtual UInt_t SetCanExtend(UInt_t extendBitMask);
376  virtual void SetContent(const Double_t *content);
377  virtual void SetContour(Int_t nlevels, const Double_t *levels=0);
378  virtual void SetContourLevel(Int_t level, Double_t value);
379  static void SetDefaultBufferSize(Int_t buffersize=1000);
380  static void SetDefaultSumw2(Bool_t sumw2=kTRUE);
381  virtual void SetDirectory(TDirectory *dir);
382  virtual void SetEntries(Double_t n) {fEntries = n;};
383  virtual void SetError(const Double_t *error);
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  virtual void SetTitle(const char *title); // *MENU*
408  virtual void SetXTitle(const char *title) {fXaxis.SetTitle(title);}
409  virtual void SetYTitle(const char *title) {fYaxis.SetTitle(title);}
410  virtual void SetZTitle(const char *title) {fZaxis.SetTitle(title);}
411  virtual TH1 *ShowBackground(Int_t niter=20, Option_t *option="same"); // *MENU*
412  virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05); // *MENU*
413  virtual void Smooth(Int_t ntimes=1, Option_t *option=""); // *MENU*
414  static void SmoothArray(Int_t NN, Double_t *XX, Int_t ntimes=1);
415  static void StatOverflows(Bool_t flag=kTRUE);
416  virtual void Sumw2(Bool_t flag = kTRUE);
417  void UseCurrentStyle();
418  static TH1 *TransformHisto(TVirtualFFT *fft, TH1* h_output, Option_t *option);
419 
420 
421  // TODO: Remove obsolete methods in v6-04
422  virtual Double_t GetCellContent(Int_t binx, Int_t biny) const
423  { Obsolete("GetCellContent", "v6-00", "v6-04"); return GetBinContent(GetBin(binx, biny)); }
424  virtual Double_t GetCellError(Int_t binx, Int_t biny) const
425  { Obsolete("GetCellError", "v6-00", "v6-04"); return GetBinError(binx, biny); }
426  virtual void RebinAxis(Double_t x, TAxis *axis)
427  { Obsolete("RebinAxis", "v6-00", "v6-04"); ExtendAxis(x, axis); }
428  virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content)
429  { Obsolete("SetCellContent", "v6-00", "v6-04"); SetBinContent(GetBin(binx, biny), content); }
430  virtual void SetCellError(Int_t binx, Int_t biny, Double_t content)
431  { Obsolete("SetCellError", "v6-00", "v6-04"); SetBinError(binx, biny, content); }
432 
433  ClassDef(TH1,7) //1-Dim histogram base class
434 
435 protected:
436  virtual Double_t RetrieveBinContent(Int_t bin) const;
437  virtual void UpdateBinContent(Int_t bin, Double_t content);
438  virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const { return fSumw2.fN ? fSumw2.fArray[bin] : RetrieveBinContent(bin); }
439 };
440 
441 namespace cling {
442  std::string printValue(TH1 *val);
443 }
444 
445 //________________________________________________________________________
446 
447 class TH1C : public TH1, public TArrayC {
448 
449 public:
450  TH1C();
451  TH1C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
452  TH1C(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
453  TH1C(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
454  TH1C(const TH1C &h1c);
455  TH1C& operator=(const TH1C &h1);
456  virtual ~TH1C();
457 
458  virtual void AddBinContent(Int_t bin);
459  virtual void AddBinContent(Int_t bin, Double_t w);
460  virtual void Copy(TObject &hnew) const;
461  virtual void Reset(Option_t *option="");
462  virtual void SetBinsLength(Int_t n=-1);
463 
464  ClassDef(TH1C,2) //1-Dim histograms (one char per channel)
465 
466  friend TH1C operator*(Double_t c1, const TH1C &h1);
467  friend TH1C operator*(const TH1C &h1, Double_t c1);
468  friend TH1C operator+(const TH1C &h1, const TH1C &h2);
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 
473 protected:
474  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
475  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Char_t (content); }
476 };
477 
478 TH1C operator*(Double_t c1, const TH1C &h1);
479 inline
480 TH1C operator*(const TH1C &h1, Double_t c1) {return operator*(c1,h1);}
481 TH1C operator+(const TH1C &h1, const TH1C &h2);
482 TH1C operator-(const TH1C &h1, const TH1C &h2);
483 TH1C operator*(const TH1C &h1, const TH1C &h2);
484 TH1C operator/(const TH1C &h1, const TH1C &h2);
485 
486 //________________________________________________________________________
487 
488 class TH1S : public TH1, public TArrayS {
489 
490 public:
491  TH1S();
492  TH1S(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
493  TH1S(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
494  TH1S(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
495  TH1S(const TH1S &h1s);
496  TH1S& operator=(const TH1S &h1);
497  virtual ~TH1S();
498 
499  virtual void AddBinContent(Int_t bin);
500  virtual void AddBinContent(Int_t bin, Double_t w);
501  virtual void Copy(TObject &hnew) const;
502  virtual void Reset(Option_t *option="");
503  virtual void SetBinsLength(Int_t n=-1);
504 
505  ClassDef(TH1S,2) //1-Dim histograms (one short per channel)
506 
507  friend TH1S operator*(Double_t c1, const TH1S &h1);
508  friend TH1S operator*(const TH1S &h1, Double_t c1);
509  friend TH1S operator+(const TH1S &h1, const TH1S &h2);
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 
514 protected:
515  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
516  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Short_t (content); }
517 };
518 
519 TH1S operator*(Double_t c1, const TH1S &h1);
520 inline
521 TH1S operator*(const TH1S &h1, Double_t c1) {return operator*(c1,h1);}
522 TH1S operator+(const TH1S &h1, const TH1S &h2);
523 TH1S operator-(const TH1S &h1, const TH1S &h2);
524 TH1S operator*(const TH1S &h1, const TH1S &h2);
525 TH1S operator/(const TH1S &h1, const TH1S &h2);
526 
527 //________________________________________________________________________
528 
529 class TH1I: public TH1, public TArrayI {
530 
531 public:
532  TH1I();
533  TH1I(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
534  TH1I(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
535  TH1I(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
536  TH1I(const TH1I &h1i);
537  TH1I& operator=(const TH1I &h1);
538  virtual ~TH1I();
539 
540  virtual void AddBinContent(Int_t bin);
541  virtual void AddBinContent(Int_t bin, Double_t w);
542  virtual void Copy(TObject &hnew) const;
543  virtual void Reset(Option_t *option="");
544  virtual void SetBinsLength(Int_t n=-1);
545 
546  ClassDef(TH1I,2) //1-Dim histograms (one 32 bits integer per channel)
547 
548  friend TH1I operator*(Double_t c1, const TH1I &h1);
549  friend TH1I operator*(const TH1I &h1, Double_t c1);
550  friend TH1I operator+(const TH1I &h1, const TH1I &h2);
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 
555 protected:
556  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
557  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Int_t (content); }
558 };
559 
560 TH1I operator*(Double_t c1, const TH1I &h1);
561 inline
562 TH1I operator*(const TH1I &h1, Double_t c1) {return operator*(c1,h1);}
563 TH1I operator+(const TH1I &h1, const TH1I &h2);
564 TH1I operator-(const TH1I &h1, const TH1I &h2);
565 TH1I operator*(const TH1I &h1, const TH1I &h2);
566 TH1I operator/(const TH1I &h1, const TH1I &h2);
567 
568 //________________________________________________________________________
569 
570 class TH1F : public TH1, public TArrayF {
571 
572 public:
573  TH1F();
574  TH1F(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
575  TH1F(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
576  TH1F(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
577  explicit TH1F(const TVectorF &v);
578  TH1F(const TH1F &h1f);
579  TH1F& operator=(const TH1F &h1);
580  virtual ~TH1F();
581 
582  virtual void AddBinContent(Int_t bin) {++fArray[bin];}
583  virtual void AddBinContent(Int_t bin, Double_t w)
584  {fArray[bin] += Float_t (w);}
585  virtual void Copy(TObject &hnew) const;
586  virtual void Reset(Option_t *option="");
587  virtual void SetBinsLength(Int_t n=-1);
588 
589  ClassDef(TH1F,2) //1-Dim histograms (one float per channel)
590 
591  friend TH1F operator*(Double_t c1, const TH1F &h1);
592  friend TH1F operator*(const TH1F &h1, Double_t c1);
593  friend TH1F operator+(const TH1F &h1, const TH1F &h2);
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 
598 protected:
599  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
600  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Float_t (content); }
601 };
602 
603 TH1F operator*(Double_t c1, const TH1F &h1);
604 inline
605 TH1F operator*(const TH1F &h1, Double_t c1) {return operator*(c1,h1);}
606 TH1F operator+(const TH1F &h1, const TH1F &h2);
607 TH1F operator-(const TH1F &h1, const TH1F &h2);
608 TH1F operator*(const TH1F &h1, const TH1F &h2);
609 TH1F operator/(const TH1F &h1, const TH1F &h2);
610 
611 //________________________________________________________________________
612 
613 class TH1D : public TH1, public TArrayD {
614 
615 public:
616  TH1D();
617  TH1D(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
618  TH1D(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
619  TH1D(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
620  explicit TH1D(const TVectorD &v);
621  TH1D(const TH1D &h1d);
622  TH1D& operator=(const TH1D &h1);
623  virtual ~TH1D();
624 
625  virtual void AddBinContent(Int_t bin) {++fArray[bin];}
626  virtual void AddBinContent(Int_t bin, Double_t w)
627  {fArray[bin] += Double_t (w);}
628  virtual void Copy(TObject &hnew) const;
629  virtual void Reset(Option_t *option="");
630  virtual void SetBinsLength(Int_t n=-1);
631 
632  ClassDef(TH1D,2) //1-Dim histograms (one double per channel)
633 
634  friend TH1D operator*(Double_t c1, const TH1D &h1);
635  friend TH1D operator*(const TH1D &h1, Double_t c1);
636  friend TH1D operator+(const TH1D &h1, const TH1D &h2);
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 
641 protected:
642  virtual Double_t RetrieveBinContent(Int_t bin) const { return fArray[bin]; }
643  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = content; }
644 };
645 
646 TH1D operator*(Double_t c1, const TH1D &h1);
647 inline
648 TH1D operator*(const TH1D &h1, Double_t c1) {return operator*(c1,h1);}
649 TH1D operator+(const TH1D &h1, const TH1D &h2);
650 TH1D operator-(const TH1D &h1, const TH1D &h2);
651 TH1D operator*(const TH1D &h1, const TH1D &h2);
652 TH1D operator/(const TH1D &h1, const TH1D &h2);
653 
654  extern TH1 *R__H(Int_t hid);
655  extern TH1 *R__H(const char *hname);
656 
657 #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:6487
const int nx
Definition: kalman.C:16
virtual void Browse(TBrowser *b)
Browe the Histogram object.
Definition: TH1.cxx:718
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TH1.cxx:6723
virtual void SetZTitle(const char *title)
Definition: TH1.h:410
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9709
virtual void SetNameTitle(const char *name, const char *title)
Change the name and title of this histogram.
Definition: TH1.cxx:8303
ClassDef(TH1F, 2) friend TH1F operator*(Double_t c1
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:3478
Double_t fNormFactor
Definition: TH1.h:114
virtual void SetBarOffset(Float_t offset=0.25)
Definition: TH1.h:356
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:516
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
Definition: TH1.cxx:6174
Float_t * fArray
Definition: TArrayF.h:32
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
Definition: TH1.cxx:3159
virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
Interface to TSpectrum::Search.
Definition: TH1.cxx:8628
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
Definition: TH1.cxx:8412
TList * GetListOfFunctions() const
Definition: TH1.h:244
TH1D & operator=(const TH1D &h1)
Operator =.
Definition: TH1.cxx:9720
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
Definition: TH1.cxx:5798
const TH1C & h1
Definition: TH1.h:466
float xmin
Definition: THbookFile.cxx:93
virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const
Definition: TH1.h:270
virtual Float_t GetTickLength(Option_t *axis="X") const
Return the "axis" tick length.
Definition: Haxis.cxx:105
virtual TH1 * DrawNormalized(Option_t *option="", Double_t norm=1) const
Draw a normalized copy of this histogram.
Definition: TH1.cxx:2954
virtual void SetTitleFont(Style_t font=62, Option_t *axis="X")
The the axis' title font.
Definition: Haxis.cxx:314
Int_t AxisChoice(Option_t *axis) const
Choose an axis according to "axis".
Definition: Haxis.cxx:14
virtual ~TH1I()
Destructor.
Definition: TH1.cxx:9257
long long Long64_t
Definition: RtypesCore.h:69
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4629
virtual Double_t GetBinError(Int_t binx, Int_t biny) const
Definition: TH1.h:269
Bool_t IsBinOverflow(Int_t bin) const
Definition: TH1.cxx:4732
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:394
void UseCurrentStyle()
Copy current attributes from/to current style.
Definition: TH1.cxx:6950
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:475
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X")
Set option(s) to draw axis with labels.
Definition: TH1.cxx:4901
short Style_t
Definition: RtypesCore.h:76
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:1909
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:3559
Short_t fBarWidth
Definition: TH1.h:106
const TAxis * GetXaxis() const
Definition: TH1.h:322
static Bool_t fgDefaultSumw2
flag to use under/overflows in statistics
Definition: TH1.h:129
TVirtualHistPainter * GetPainter(Option_t *option="")
return pointer to painter if painter does not exist, it is created
Definition: TH1.cxx:4096
virtual void FitPanel()
Display a panel with all histogram fit options.
Definition: TH1.cxx:3912
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:8266
Short_t * fArray
Definition: TArrayS.h:32
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:7270
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Definition: TH1.cxx:7952
const char Option_t
Definition: RtypesCore.h:62
TCanvas * c1
Definition: legend1.C:2
void Reset()
Definition: TArrayD.h:49
float ymin
Definition: THbookFile.cxx:93
virtual void SetError(const Double_t *error)
Replace bin errors by values in array error.
Definition: TH1.cxx:8278
Bool_t IsBinUnderflow(Int_t bin) const
Definition: TH1.cxx:4754
TAxis fYaxis
Definition: TH1.h:103
virtual Int_t BufferFill(Double_t x, Double_t w)
accumulate arguments in buffer.
Definition: TH1.cxx:1334
virtual void SetContour(Int_t nlevels, const Double_t *levels=0)
Set the number and values of contour levels.
Definition: TH1.cxx:7863
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
Definition: TH1.cxx:7323
virtual Int_t GetDimension() const
Definition: TH1.h:283
Double_t GetRMSError(Int_t axis=1) const
Definition: TH1.h:316
R__EXTERN Foption_t Foption
Definition: TTreePlayer.cxx:87
TList * fFunctions
Definition: TH1.h:118
virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax)
Redefine x axis parameters.
Definition: TH1.cxx:8090
virtual Double_t RetrieveBinContent(Int_t bin) const
Definition: TH1.h:474
#define BIT(n)
Definition: Rtypes.h:120
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:3964
static Bool_t fgStatOverflows
flag to add histograms to the directory
Definition: TH1.h:128
static Bool_t SameLimitsAndNBins(const TAxis &axis1, const TAxis &axis2)
Same limits and bins.
Definition: TH1.cxx:5184
virtual ~TH1F()
Destructor.
Definition: TH1.cxx:9484
void Build()
Creates histogram basic data structure.
Definition: TH1.cxx:728
virtual void SetNdivisions(Int_t n=510, Option_t *axis="X")
Set the number of divisions to draw an axis.
Definition: Haxis.cxx:169
virtual void AddBinContent(Int_t bin, Double_t w)
Increment bin content by a weight w.
Definition: TH1.h:626
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:4182
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.h:582
virtual void Reset(Option_t *option="")
Reset.
Definition: TH1.cxx:8904
static bool CheckAxisLimits(const TAxis *a1, const TAxis *a2)
Check that the axis limits of the histograms are the same if a first and last bin is passed the axis ...
Definition: TH1.cxx:1429
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:8895
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9096
virtual void SetMinimum(Double_t minimum=-1111)
Definition: TH1.h:395
TH1 & operator=(const TH1 &)
virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
Set size of axis' labels.
Definition: Haxis.cxx:278
Basic string class.
Definition: TString.h:137
static Bool_t AddDirectoryStatus()
static function: cannot be inlined on Windows/NT
Definition: TH1.cxx:709
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:570
virtual Float_t GetLabelOffset(Option_t *axis="X") const
Return the "axis" label offset.
Definition: Haxis.cxx:79
1-D histogram with a short per channel (see TH1 documentation)
Definition: TH1.h:488
virtual Color_t GetAxisColor(Option_t *axis="X") const
Return the number of divisions for "axis".
Definition: Haxis.cxx:40
Array of floats (32 bits per element).
Definition: TArrayF.h:29
virtual Double_t GetNormFactor() const
Definition: TH1.h:300
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:2445
int Int_t
Definition: RtypesCore.h:41
virtual void SetYTitle(const char *title)
Definition: TH1.h:409
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual void Smooth(Int_t ntimes=1, Option_t *option="")
Smooth bin contents of this histogram.
Definition: TH1.cxx:6440
virtual Double_t GetStdDevError(Int_t axis=1) const
Return error of standard deviation estimation for Normal distribution.
Definition: TH1.cxx:7105
TArrayD fSumw2
Definition: TH1.h:116
const TH1I & h1
Definition: TH1.h:548
virtual Int_t GetNbinsX() const
Definition: TH1.h:296
virtual Float_t GetLabelSize(Option_t *axis="X") const
Return the "axis" label size.
Definition: Haxis.cxx:92
void Reset()
Definition: TArrayF.h:49
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:8516
virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X")
Set the "axis" range.
Definition: Haxis.cxx:199
TDirectory * GetDirectory() const
Definition: TH1.h:279
static Bool_t RecomputeAxisLimits(TAxis &destAxis, const TAxis &anAxis)
Finds new limits for the axis for the Merge function.
Definition: TH1.cxx:5195
TAxis fZaxis
Definition: TH1.h:104
virtual Double_t GetEntries() const
return the current number of entries
Definition: TH1.cxx:4051
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:5620
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9512
TH1 * R__H(Int_t hid)
return pointer to histogram with name hid if id >=0 h_id if id <0
Definition: TH1.cxx:9792
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:8503
virtual Double_t GetCellContent(Int_t binx, Int_t biny) const
Definition: TH1.h:422
static bool CheckBinLimits(const TAxis *a1, const TAxis *a2)
Definition: TH1.cxx:1369
Array of integers (32 bits per element).
Definition: TArrayI.h:29
virtual void SetBuffer(Int_t buffersize, Option_t *option="")
set the maximum number of entries to be kept in the buffer
Definition: TH1.cxx:7837
Double_t fTsumwx2
Definition: TH1.h:111
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
Definition: TH1.cxx:6669
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
Definition: TH1.cxx:1231
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
Definition: TH1.cxx:2565
virtual void SetBarWidth(Float_t width=0.5)
Definition: TH1.h:357
TDirectory * fDirectory
Definition: TH1.h:121
static void SetDefaultSumw2(Bool_t sumw2=kTRUE)
static function.
Definition: TH1.cxx:6253
virtual Double_t GetBinWidth(Int_t bin) const
return bin width for 1D historam Better to use h1.GetXaxis().GetBinWidth(bin)
Definition: TH1.cxx:8492
Marker Attributes class.
Definition: TAttMarker.h:32
const char * Data() const
Definition: TString.h:349
virtual void SetCellError(Int_t binx, Int_t biny, Double_t content)
Definition: TH1.h:430
virtual Double_t GetSkewness(Int_t axis=1) const
For axis = 1, 2 or 3 returns skewness of the histogram along x, y or z axis.
Definition: TH1.cxx:7118
ClassDef(TH1D, 2) friend TH1D operator*(Double_t c1
static bool CheckConsistentSubAxes(const TAxis *a1, Int_t firstBin1, Int_t lastBin1, const TAxis *a2, Int_t firstBin2=0, Int_t lastBin2=0)
Check that two sub axis are the same the limits are defined by first bin and last bin N...
Definition: TH1.cxx:1480
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:4682
virtual Int_t GetContour(Double_t *levels=0)
Return contour values into array levels if pointer levels is non zero.
Definition: TH1.cxx:7787
TH1C & operator=(const TH1C &h1)
Operator =.
Definition: TH1.cxx:8926
virtual Double_t GetRandom() const
return a random number distributed according the histogram bin contents.
Definition: TH1.cxx:4583
Fill Area Attributes class.
Definition: TAttFill.h:32
Double_t x[n]
Definition: legend1.C:17
static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption)
flag to call TH1::Sumw2 automatically at histogram creation time
Definition: TH1.cxx:4224
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
Definition: TH1.cxx:8441
virtual void Eval(TF1 *f1, Option_t *option="")
Evaluate function f1 at the center of bins of this histogram.
Definition: TH1.cxx:3004
virtual Double_t GetBinLowEdge(Int_t bin) const
return bin lower edge for 1D historam Better to use h1.GetXaxis().GetBinLowEdge(bin) ...
Definition: TH1.cxx:8481
static Bool_t GetDefaultSumw2()
return kTRUE if TH1::Sumw2 must be called when creating new histograms.
Definition: TH1.cxx:4042
static void SetDefaultBufferSize(Int_t buffersize=1000)
static function to set the default buffer size for automatic histograms.
Definition: TH1.cxx:6241
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
TH1C operator+(const TH1C &h1, const TH1C &h2)
Operator +.
Definition: TH1.cxx:8949
virtual Double_t GetMaximumStored() const
Definition: TH1.h:289
virtual ~TH1()
Histogram default destructor.
Definition: TH1.cxx:584
virtual EBinErrorOpt GetBinErrorOption() const
Definition: TH1.h:273
const int ny
Definition: kalman.C:17
virtual void SetOption(Option_t *option=" ")
Definition: TH1.h:402
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:7415
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.h:625
virtual TObject * FindObject(const char *name) const
search object named name in the list of functions
Definition: TH1.cxx:3578
virtual const TArrayD * GetSumw2() const
Definition: TH1.h:313
virtual void SetContourLevel(Int_t level, Double_t value)
Set value for one contour level.
Definition: TH1.cxx:7903
Abstract interface to a histogram painter.
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:4535
Double_t * fArray
Definition: TArrayD.h:32
ClassDef(TAttLine, 2)
TString fOption
Definition: TH1.h:117
const TH1D & h1
Definition: TH1.h:634
virtual TArrayD * GetSumw2()
Definition: TH1.h:312
virtual void SetLabelFont(Style_t font=62, Option_t *axis="X")
Set font number used to draw axis labels.
Definition: Haxis.cxx:244
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:6037
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
Definition: TH1.cxx:2925
TH1F * h1
Definition: legend1.C:5
ClassDef(TH1C, 2) friend TH1C operator*(Double_t c1
virtual void SetContent(const Double_t *content)
Replace bin contents by the contents of array content.
Definition: TH1.cxx:7772
TH1C operator*(Double_t c1, const TH1C &h1)
Operator *.
Definition: TH1.cxx:8937
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:1204
virtual void ResetStats()
Reset the statistics including the number of entries and replace with values calculates from bin cont...
Definition: TH1.cxx:7338
virtual Double_t Chi2Test(const TH1 *h2, Option_t *option="UU", Double_t *res=0) const
chi^{2} test for comparing weighted and unweighted histograms
Definition: TH1.cxx:1850
TArrayD fContour
Definition: TH1.h:115
virtual void SetBinError(Int_t bin, Double_t error)
see convention for numbering bins in TH1::GetBin
Definition: TH1.cxx:8528
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:2373
virtual void LabelsInflate(Option_t *axis="X")
Double the number of bins for axis.
Definition: TH1.cxx:4843
const TH1F & h1
Definition: TH1.h:591
char * out
Definition: TBase64.cxx:29
short Color_t
Definition: RtypesCore.h:79
Double_t fTsumwx
Definition: TH1.h:110
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:2630
virtual void SetAxisColor(Color_t color=1, Option_t *axis="X")
Set color to draw the axis line and tick marks.
Definition: Haxis.cxx:185
Int_t GetBufferSize() const
Definition: TH1.h:238
virtual Double_t GetEffectiveEntries() const
number of effective entries of the histogram, neff = (Sum of weights )^2 / (Sum of weight^2 ) In case...
Definition: TH1.cxx:4073
static Bool_t fgAddDirectory
default buffer size for automatic histograms
Definition: TH1.h:127
A doubly linked list.
Definition: TList.h:47
Double_t fMinimum
Definition: TH1.h:113
virtual void ExtendAxis(Double_t x, TAxis *axis)
Histogram is resized along axis such that x is in the axis range.
Definition: TH1.cxx:6091
virtual TH1 * FFT(TH1 *h_output, Option_t *option)
This function allows to do discrete Fourier transforms of TH1 and TH2.
Definition: TH1.cxx:3098
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
Definition: TH1.cxx:2612
std::string printValue(const TDatime &val)
Print a TDatime at the prompt.
Definition: TDatime.cxx:447
void Reset()
Definition: TArrayS.h:49
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:9075
virtual Double_t RetrieveBinContent(Int_t bin) const
Definition: TH1.h:556
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TH1.cxx:3053
Int_t fN
Definition: TArray.h:40
virtual Double_t * GetIntegral()
Return a pointer to the array of bins integral.
Definition: TH1.cxx:2422
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:7497
virtual Double_t GetBinCenter(Int_t bin) const
return bin center for 1D historam Better to use h1.GetXaxis().GetBinCenter(bin)
Definition: TH1.cxx:8470
virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const
Definition: TH1.h:267
float ymax
Definition: THbookFile.cxx:93
virtual void Print(Option_t *option="") const
Print some global quantities for this histogram.
Definition: TH1.cxx:6573
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:7014
virtual void FillRandom(const char *fname, Int_t ntimes=5000)
Fill histogram following distribution in function fname.
Definition: TH1.cxx:3330
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
Definition: TH1.cxx:7378
virtual Int_t GetNdivisions(Option_t *axis="X") const
Return the number of divisions for "axis".
Definition: Haxis.cxx:27
Double_t length(const TVector2 &v)
Definition: CsgOps.cxx:347
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:6318
Class to manage histogram axis.
Definition: TAxis.h:36
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2878
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
check that axis have same labels
Definition: TH1.cxx:1396
Array of shorts (16 bits per element).
Definition: TArrayS.h:29
SVector< double, 2 > v
Definition: Dict.h:5
virtual Double_t GetMinimumStored() const
Definition: TH1.h:293
Int_t GetNbins() const
Definition: TAxis.h:125
const TAxis * GetYaxis() const
Definition: TH1.h:323
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Redefines TObject::GetObjectInfo.
Definition: TH1.cxx:4086
1-D histogram with a int per channel (see TH1 documentation)}
Definition: TH1.h:529
virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Double_t &err, Option_t *option="") const
Return integral of bin contents in range [binx1,binx2] and its error By default the integral is compu...
Definition: TH1.cxx:7405
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9295
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
Definition: TFitResultPtr.h:33
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:8647
TH1C operator-(const TH1C &h1, const TH1C &h2)
Operator -.
Definition: TH1.cxx:8961
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:8543
Collection abstract base class.
Definition: TCollection.h:48
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:7610
static Int_t fgBufferSize
Definition: TH1.h:126
virtual TH1 * Rebin(Int_t ngroup=2, const char *newname="", const Double_t *xbins=0)
Rebin this histogram.
Definition: TH1.cxx:5859
Double_t fEntries
Definition: TH1.h:107
virtual Double_t GetMeanError(Int_t axis=1) const
Return standard error of mean of this histogram along the X axis.
Definition: TH1.cxx:7045
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:4776
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:3289
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
Definition: TH1.cxx:7354
virtual TH1 * ShowBackground(Int_t niter=20, Option_t *option="same")
This function calculates the background spectrum in this histogram.
Definition: TH1.cxx:8612
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9315
virtual ~TH1C()
Destructor.
Definition: TH1.cxx:8857
virtual Int_t GetNbinsZ() const
Definition: TH1.h:298
short Short_t
Definition: RtypesCore.h:35
virtual Int_t GetSumw2N() const
Definition: TH1.h:314
virtual Double_t GetKurtosis(Int_t axis=1) const
For axis =1, 2 or 3 returns kurtosis of the histogram along x, y or z axis.
Definition: TH1.cxx:7188
TAxis * GetYaxis()
Definition: TH1.h:320
float xmax
Definition: THbookFile.cxx:93
const TAxis * GetZaxis() const
Definition: TH1.h:324
Double_t GetRMS(Int_t axis=1) const
Definition: TH1.h:315
Double_t * fIntegral
Histogram dimension (1, 2 or 3 dim)
Definition: TH1.h:123
virtual void SetBinErrorOption(EBinErrorOpt type)
Definition: TH1.h:373
static bool CheckConsistency(const TH1 *h1, const TH1 *h2)
Check histogram compatibility.
Definition: TH1.cxx:1516
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:557
1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:613
static Int_t GetDefaultBufferSize()
static function return the default buffer size for automatic histograms the parameter fgBufferSize ma...
Definition: TH1.cxx:4032
virtual void Rebuild(Option_t *option="")
Using the current bin info, recompute the arrays for contents and errors.
Definition: TH1.cxx:6652
const Double_t * GetBuffer() const
Definition: TH1.h:239
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from the list of functions.
Definition: TH1.cxx:6147
EBinErrorOpt fBinStatErrOpt
pointer to histogram painter
Definition: TH1.h:125
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9689
TVirtualFFT is an interface class for Fast Fourier Transforms.
Definition: TVirtualFFT.h:92
virtual void SetName(const char *name)
Change the name of this histogram.
Definition: TH1.cxx:8288
virtual Color_t GetLabelColor(Option_t *axis="X") const
Return the "axis" label color.
Definition: Haxis.cxx:53
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
Definition: TObject.cxx:980
Double_t fTsumw2
Definition: TH1.h:109
Int_t GetBufferLength() const
Definition: TH1.h:237
virtual Double_t RetrieveBinContent(Int_t bin) const
Definition: TH1.h:642
return c2
Definition: legend2.C:14
ClassDef(TH1S, 2) friend TH1S operator*(Double_t c1
virtual TH1 * RebinX(Int_t ngroup=2, const char *newname="")
Definition: TH1.h:347
double Double_t
Definition: RtypesCore.h:55
Int_t * fArray
Definition: TArrayI.h:32
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:6864
Double_t fTsumw
Definition: TH1.h:108
Describe directory structure in memory.
Definition: TDirectory.h:41
virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
The the axis' title size.
Definition: Haxis.cxx:354
int type
Definition: TGX11.cxx:120
Definition: TDatime.h:114
virtual Double_t GetBinContent(Int_t bin, Int_t) const
Definition: TH1.h:266
Double_t y[n]
Definition: legend1.C:17
TH1I & operator=(const TH1I &h1)
Operator =.
Definition: TH1.cxx:9326
The TH1 histogram class.
Definition: TH1.h:80
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:3512
ClassDef(TH1I, 2) friend TH1I operator*(Double_t c1
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
Definition: TH1.cxx:8037
Short_t fBarOffset
Definition: TH1.h:105
Array of doubles (64 bits per element).
Definition: TArrayD.h:29
virtual Double_t GetCellError(Int_t binx, Int_t biny) const
Definition: TH1.h:424
virtual void RebinAxis(Double_t x, TAxis *axis)
Definition: TH1.h:426
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:643
#define name(a, b)
Definition: linkTestLib0.cpp:5
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:780
TAxis * GetZaxis()
Definition: TH1.h:321
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:6211
virtual void SetTickLength(Float_t length=0.02, Option_t *axis="X")
Set the axis' tick marks length.
Definition: Haxis.cxx:294
Mother of all ROOT objects.
Definition: TObject.h:58
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9116
virtual void SetBinContent(Int_t bin, Int_t, Int_t, Double_t content)
Definition: TH1.h:360
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:3539
virtual void ClearUnderflowAndOverflow()
Remove all the content from the underflow and overflow bins, without changing the number of entries A...
Definition: TH1.cxx:2354
char Char_t
Definition: RtypesCore.h:29
virtual Int_t GetNbinsY() const
Definition: TH1.h:297
TH1S & operator=(const TH1S &h1)
Operator =.
Definition: TH1.cxx:9127
virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const
Definition: TH1.h:438
Double_t fMaximum
Definition: TH1.h:112
virtual Double_t RetrieveBinContent(Int_t bin) const
Definition: TH1.h:515
virtual void SetXTitle(const char *title)
Definition: TH1.h:408
virtual void DirectoryAutoAdd(TDirectory *)
Perform the automatic addition of the histogram to the given directory.
Definition: TH1.cxx:2589
TVirtualHistPainter * fPainter
Integral of bins used by GetRandom.
Definition: TH1.h:124
virtual void DrawPanel()
Display a panel with all histogram drawing options.
Definition: TH1.cxx:2986
TH1C operator/(const TH1C &h1, const TH1C &h2)
Operator /.
Definition: TH1.cxx:8985
Int_t fBufferSize
Definition: TH1.h:119
virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content)
Definition: TH1.h:428
virtual Float_t GetTitleSize(Option_t *axis="X") const
Return the "axis" title size.
Definition: Haxis.cxx:144
virtual void Copy(TObject &hnew) const
Copy this histogram structure to newth1.
Definition: TH1.cxx:2488
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:3265
virtual Double_t RetrieveBinContent(Int_t bin) const
Definition: TH1.h:599
virtual void SetBinContent(Int_t bin, Int_t, Double_t content)
Definition: TH1.h:359
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:2336
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9492
1-Dim function class
Definition: TF1.h:149
virtual void SetBinsLength(Int_t=-1)
Definition: TH1.h:372
virtual void AddBinContent(Int_t bin, Double_t w)
Increment bin content by a weight w.
Definition: TH1.h:583
Char_t * fArray
Definition: TArrayC.h:32
1-D histogram with a bype per channel (see TH1 documentation)
Definition: TH1.h:447
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
Definition: TH1.cxx:8350
TF1 * f1
Definition: legend1.C:11
virtual Bool_t CanExtendAllAxes() const
returns true if all axes are extendable
Definition: TH1.cxx:6197
Int_t fDimension
Pointer to directory holding this histogram.
Definition: TH1.h:122
void Reset()
Definition: TArrayI.h:49
virtual Int_t BufferEmpty(Int_t action=0)
Fill histogram with all entries in the buffer.
Definition: TH1.cxx:1251
virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t)
Definition: TH1.h:224
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:600
virtual ~TH1D()
Destructor.
Definition: TH1.cxx:9672
virtual void SetEntries(Double_t n)
Definition: TH1.h:382
TAxis fXaxis
Definition: TH1.h:102
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:9274
virtual void SetTitle(const char *title)
Change (i.e.
Definition: TH1.cxx:6268
virtual Style_t GetLabelFont(Option_t *axis="X") const
Return the "axis" label font.
Definition: Haxis.cxx:66
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
Definition: TH1.cxx:7067
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:8874
EBinErrorOpt
Definition: TH1.h:85
virtual Style_t GetTitleFont(Option_t *axis="X") const
Return the "axis" title font.
Definition: Haxis.cxx:118
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
Definition: TH1.cxx:8395
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:7921
const Bool_t kTRUE
Definition: Rtypes.h:91
float * q
Definition: THbookFile.cxx:87
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
Definition: TNamed.cxx:152
TObject * obj
virtual Float_t GetBarWidth() const
Definition: TH1.h:257
Double_t * fBuffer
Definition: TH1.h:120
float value
Definition: math.cpp:443
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:4549
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:3607
virtual Int_t GetNcells() const
Definition: TH1.h:299
double norm(double *x, double *p)
Definition: unuranDistr.cxx:40
virtual void SetNormFactor(Double_t factor=1)
Definition: TH1.h:400
virtual ClassDef(TH1, 7) protected 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:8779
virtual TF1 * GetFunction(const char *name) const
Return pointer to function with name.
Definition: TH1.cxx:8382
static bool CheckEqualAxes(const TAxis *a1, const TAxis *a2)
Check that the axis are the same.
Definition: TH1.cxx:1443
virtual ~TH1S()
Destructor.
Definition: TH1.cxx:9058
const Int_t n
Definition: legend1.C:16
Line Attributes class.
Definition: TAttLine.h:32
const TH1S & h1
Definition: TH1.h:507
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
Definition: TH1.cxx:8320
TH1F & operator=(const TH1F &h1)
Operator =.
Definition: TH1.cxx:9523
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:8006
virtual Double_t GetContourLevel(Int_t level) const
Return value of contour number level use GetContour to return the array of all contour levels...
Definition: TH1.cxx:7807
virtual Double_t GetContourLevelPad(Int_t level) const
Return the value of contour number "level" in Pad coordinates ie: if the Pad is in log scale along Z ...
Definition: TH1.cxx:7818
virtual Double_t GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx=0, Int_t lastx=0, Double_t maxdiff=0) const
compute first binx in the range [firstx,lastx] for which diff = abs(bin_content-c) <= maxdiff In case...
Definition: TH1.cxx:4653
virtual Float_t GetBarOffset() const
Definition: TH1.h:256
TAxis * GetXaxis()
Definition: TH1.h:319
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:8915
virtual Long64_t Merge(TCollection *list)
Add all histograms in the collection to this histogram.
Definition: TH1.cxx:5305
virtual Float_t GetTitleOffset(Option_t *axis="X") const
Return the "axis" title offset.
Definition: Haxis.cxx:131
virtual void SetLabelColor(Color_t color=1, Option_t *axis="X")
Set axis labels color.
Definition: Haxis.cxx:223
Int_t fNcells
Definition: TH1.h:101
virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Set offset between axis and axis' labels.
Definition: Haxis.cxx:261
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:335
Option_t * GetOption() const
Definition: TH1.h:302
Array of chars or bytes (8 bits per element).
Definition: TArrayC.h:29