Logo ROOT  
Reference Guide
TH1.h
Go to the documentation of this file.
1 // @(#)root/hist:$Id$
2 // Author: Rene Brun 26/12/94
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TH1
13 #define ROOT_TH1
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TH1 //
19 // //
20 // 1-Dim histogram base class. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TAxis.h"
25 
26 #include "TAttLine.h"
27 
28 #include "TAttFill.h"
29 
30 #include "TAttMarker.h"
31 
32 #include "TArrayC.h"
33 #include "TArrayS.h"
34 #include "TArrayI.h"
35 #include "TArrayF.h"
36 #include "TArrayD.h"
37 #include "Foption.h"
38 
39 #include "TVectorFfwd.h"
40 #include "TVectorDfwd.h"
41 
42 #include "TFitResultPtr.h"
43 
44 #include <cfloat>
45 #include <string>
46 
47 class TF1;
48 class TH1D;
49 class TBrowser;
50 class TDirectory;
51 class TList;
52 class TCollection;
53 class TVirtualFFT;
55 
56 
57 class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
58 
59 public:
60 
61  // enumeration specifying type of statistics for bin errors
62  enum EBinErrorOpt {
63  kNormal = 0, ///< errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
64  kPoisson = 1 , ///< errors from Poisson interval at 68.3% (1 sigma)
65  kPoisson2 = 2 ///< errors from Poisson interval at 95% CL (~ 2 sigma)
66  };
67 
68  // enumeration specifying which axes can be extended
69  enum {
70  kNoAxis = 0, ///< NOTE: Must always be 0 !!!
71  kXaxis = BIT(0),
72  kYaxis = BIT(1),
73  kZaxis = BIT(2),
75  };
76 
77  /// Enumeration specifying the way to treat statoverflow
79  kIgnore = 0, ///< Override global flag ignoring the overflows
80  kConsider = 1, ///< Override global flag considering the overflows
81  kNeutral = 2, ///< Adapt to the global flag
82  };
83 
84  friend class TH1Merger;
85 
86 protected:
87  Int_t fNcells; ///< number of bins(1D), cells (2D) +U/Overflows
88  TAxis fXaxis; ///< X axis descriptor
89  TAxis fYaxis; ///< Y axis descriptor
90  TAxis fZaxis; ///< Z axis descriptor
91  Short_t fBarOffset; ///< (1000*offset) for bar charts or legos
92  Short_t fBarWidth; ///< (1000*width) for bar charts or legos
93  Double_t fEntries; ///< Number of entries
94  Double_t fTsumw; ///< Total Sum of weights
95  Double_t fTsumw2; ///< Total Sum of squares of weights
96  Double_t fTsumwx; ///< Total Sum of weight*X
97  Double_t fTsumwx2; ///< Total Sum of weight*X*X
98  Double_t fMaximum; ///< Maximum value for plotting
99  Double_t fMinimum; ///< Minimum value for plotting
100  Double_t fNormFactor; ///< Normalization factor
101  TArrayD fContour; ///< Array to display contour levels
102  TArrayD fSumw2; ///< Array of sum of squares of weights
103  TString fOption; ///< histogram options
104  TList *fFunctions; ///<->Pointer to list of functions (fits and user)
105  Int_t fBufferSize; ///< fBuffer size
106  Double_t *fBuffer; ///<[fBufferSize] entry buffer
107  TDirectory *fDirectory; ///<!Pointer to directory holding this histogram
108  Int_t fDimension; ///<!Histogram dimension (1, 2 or 3 dim)
109  Double_t *fIntegral; ///<!Integral of bins used by GetRandom
110  TVirtualHistPainter *fPainter; ///<!pointer to histogram painter
111  EBinErrorOpt fBinStatErrOpt; ///< option for bin statistical errors
112  EStatOverflows fStatOverflows; ///< per object flag to use under/overflows in statistics
113  static Int_t fgBufferSize; ///<!default buffer size for automatic histograms
114  static Bool_t fgAddDirectory; ///<!flag to add histograms to the directory
115  static Bool_t fgStatOverflows; ///<!flag to use under/overflows in statistics
116  static Bool_t fgDefaultSumw2; ///<!flag to call TH1::Sumw2 automatically at histogram creation time
117 
118 public:
119  static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption);
120 
121 private:
122  Int_t AxisChoice(Option_t *axis) const;
123  void Build();
124 
125  TH1(const TH1&);
126  TH1& operator=(const TH1&); // Not implemented
127 
128 
129 protected:
130  TH1();
131  TH1(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
132  TH1(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
133  TH1(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
134  virtual Int_t BufferFill(Double_t x, Double_t w);
135  virtual Bool_t FindNewAxisLimits(const TAxis* axis, const Double_t point, Double_t& newMin, Double_t &newMax);
136  virtual void SavePrimitiveHelp(std::ostream &out, const char *hname, Option_t *option = "");
137  static Bool_t RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxis);
138  static Bool_t SameLimitsAndNBins(const TAxis& axis1, const TAxis& axis2);
139  Bool_t IsEmpty() const;
140 
141  inline static Double_t AutoP2GetPower2(Double_t x, Bool_t next = kTRUE);
142  inline static Int_t AutoP2GetBins(Int_t n);
143  virtual Int_t AutoP2FindLimits(Double_t min, Double_t max);
144 
145  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,
146  Option_t * opt, Bool_t doerr = kFALSE) const;
147 
148  virtual void DoFillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1);
149  Bool_t GetStatOverflowsBehaviour() const { return EStatOverflows::kNeutral == fStatOverflows ? fgStatOverflows : EStatOverflows::kConsider == fStatOverflows; }
150 
151  static bool CheckAxisLimits(const TAxis* a1, const TAxis* a2);
152  static bool CheckBinLimits(const TAxis* a1, const TAxis* a2);
153  static bool CheckBinLabels(const TAxis* a1, const TAxis* a2);
154  static bool CheckEqualAxes(const TAxis* a1, const TAxis* a2);
155  static bool CheckConsistentSubAxes(const TAxis *a1, Int_t firstBin1, Int_t lastBin1, const TAxis *a2, Int_t firstBin2=0, Int_t lastBin2=0);
156  static bool CheckConsistency(const TH1* h1, const TH1* h2);
157 
158 public:
159  // TH1 status bits
160  enum EStatusBits {
161  kNoStats = BIT(9), ///< don't draw stats box
162  kUserContour = BIT(10), ///< user specified contour levels
163  // kCanRebin = BIT(11), ///< FIXME DEPRECATED - to be removed, replaced by SetCanExtend / CanExtendAllAxes
164  kLogX = BIT(15), ///< X-axis in log scale
165  kIsZoomed = BIT(16), ///< bit set when zooming on Y axis
166  kNoTitle = BIT(17), ///< don't draw the histogram title
167  kIsAverage = BIT(18), ///< Bin contents are average (used by Add)
168  kIsNotW = BIT(19), ///< Histogram is forced to be not weighted even when the histogram is filled with weighted
169  /// different than 1.
170  kAutoBinPTwo = BIT(20), ///< Use Power(2)-based algorithm for autobinning
171  kIsHighlight = BIT(21) ///< bit set if histo is highlight
172  };
173  // size of statistics data (size of array used in GetStats()/ PutStats )
174  // s[0] = sumw s[1] = sumw2
175  // s[2] = sumwx s[3] = sumwx2
176  // s[4] = sumwy s[5] = sumwy2 s[6] = sumwxy
177  // s[7] = sumwz s[8] = sumwz2 s[9] = sumwxz s[10] = sumwyz
178  // s[11] = sumwt s[12] = sumwt2 (11 and 12 used only by TProfile3D)
179  enum {
180  kNstat = 13 // size of statistics data (up to TProfile3D)
181  };
182 
183 
184  virtual ~TH1();
185 
186  virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="");
187  virtual Bool_t Add(const TH1 *h1, Double_t c1=1);
188  virtual Bool_t Add(const TH1 *h, const TH1 *h2, Double_t c1=1, Double_t c2=1); // *MENU*
189  virtual void AddBinContent(Int_t bin);
190  virtual void AddBinContent(Int_t bin, Double_t w);
191  static void AddDirectory(Bool_t add=kTRUE);
192  static Bool_t AddDirectoryStatus();
193  virtual void Browse(TBrowser *b);
194  virtual Bool_t CanExtendAllAxes() const;
195  virtual Double_t Chi2Test(const TH1* h2, Option_t *option = "UU", Double_t *res = 0) const;
196  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;
197  virtual Double_t Chisquare(TF1 * f1, Option_t *option = "") const;
198  virtual void ClearUnderflowAndOverflow();
199  virtual Double_t ComputeIntegral(Bool_t onlyPositive = false);
200  TObject* Clone(const char* newname=0) const;
201  virtual void Copy(TObject &hnew) const;
202  virtual void DirectoryAutoAdd(TDirectory *);
203  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
204  virtual Bool_t Divide(TF1 *f1, Double_t c1=1);
205  virtual Bool_t Divide(const TH1 *h1);
206  virtual Bool_t Divide(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU*
207  virtual void Draw(Option_t *option="");
208  virtual TH1 *DrawCopy(Option_t *option="", const char * name_postfix = "_copy") const;
209  virtual TH1 *DrawNormalized(Option_t *option="", Double_t norm=1) const;
210  virtual void DrawPanel(); // *MENU*
211  virtual Int_t BufferEmpty(Int_t action=0);
212  virtual void Eval(TF1 *f1, Option_t *option="");
213  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
214  virtual void ExtendAxis(Double_t x, TAxis *axis);
215  virtual TH1 *FFT(TH1* h_output, Option_t *option);
216  virtual Int_t Fill(Double_t x);
217  virtual Int_t Fill(Double_t x, Double_t w);
218  virtual Int_t Fill(const char *name, Double_t w);
219  virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1);
220  virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t) {;}
221  virtual void FillRandom(const char *fname, Int_t ntimes=5000);
222  virtual void FillRandom(TH1 *h, Int_t ntimes=5000);
223  virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0);
224  virtual Int_t FindFixBin(Double_t x, Double_t y=0, Double_t z=0) const;
225  virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const;
226  virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const;
227  virtual TObject *FindObject(const char *name) const;
228  virtual TObject *FindObject(const TObject *obj) const;
229  virtual TFitResultPtr Fit(const char *formula ,Option_t *option="" ,Option_t *goption="", Double_t xmin=0, Double_t xmax=0); // *MENU*
230  virtual TFitResultPtr Fit(TF1 *f1 ,Option_t *option="" ,Option_t *goption="", Double_t xmin=0, Double_t xmax=0);
231  virtual void FitPanel(); // *MENU*
232  TH1 *GetAsymmetry(TH1* h2, Double_t c2=1, Double_t dc2=0);
233  Int_t GetBufferLength() const {return fBuffer ? (Int_t)fBuffer[0] : 0;}
234  Int_t GetBufferSize () const {return fBufferSize;}
235  const Double_t *GetBuffer() const {return fBuffer;}
236  static Int_t GetDefaultBufferSize();
237  virtual Double_t *GetIntegral();
238  TH1 *GetCumulative(Bool_t forward = kTRUE, const char* suffix = "_cumulative") const;
239 
240  TList *GetListOfFunctions() const { return fFunctions; }
241 
242  virtual Int_t GetNdivisions(Option_t *axis="X") const;
243  virtual Color_t GetAxisColor(Option_t *axis="X") const;
244  virtual Color_t GetLabelColor(Option_t *axis="X") const;
245  virtual Style_t GetLabelFont(Option_t *axis="X") const;
246  virtual Float_t GetLabelOffset(Option_t *axis="X") const;
247  virtual Float_t GetLabelSize(Option_t *axis="X") const;
248  virtual Style_t GetTitleFont(Option_t *axis="X") const;
249  virtual Float_t GetTitleOffset(Option_t *axis="X") const;
250  virtual Float_t GetTitleSize(Option_t *axis="X") const;
251  virtual Float_t GetTickLength(Option_t *axis="X") const;
252  virtual Float_t GetBarOffset() const {return Float_t(0.001*Float_t(fBarOffset));}
253  virtual Float_t GetBarWidth() const {return Float_t(0.001*Float_t(fBarWidth));}
254  virtual Int_t GetContour(Double_t *levels=0);
255  virtual Double_t GetContourLevel(Int_t level) const;
256  virtual Double_t GetContourLevelPad(Int_t level) const;
257 
258  virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const;
259  virtual void GetBinXYZ(Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const;
260  virtual Double_t GetBinCenter(Int_t bin) const;
261  virtual Double_t GetBinContent(Int_t bin) const;
262  virtual Double_t GetBinContent(Int_t bin, Int_t) const { return GetBinContent(bin); }
263  virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const { return GetBinContent(bin); }
264  virtual Double_t GetBinError(Int_t bin) const;
265  virtual Double_t GetBinError(Int_t binx, Int_t biny) const { return GetBinError(GetBin(binx, biny)); } // for 2D histograms only
266  virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const { return GetBinError(GetBin(binx, biny, binz)); } // for 3D histograms only
267  virtual Double_t GetBinErrorLow(Int_t bin) const;
268  virtual Double_t GetBinErrorUp(Int_t bin) const;
269  virtual EBinErrorOpt GetBinErrorOption() const { return fBinStatErrOpt; }
270  virtual Double_t GetBinLowEdge(Int_t bin) const;
271  virtual Double_t GetBinWidth(Int_t bin) const;
272  virtual Double_t GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx=0, Int_t lastx=0,Double_t maxdiff=0) const;
273  virtual void GetCenter(Double_t *center) const;
274  static Bool_t GetDefaultSumw2();
275  TDirectory *GetDirectory() const {return fDirectory;}
276  virtual Double_t GetEntries() const;
277  virtual Double_t GetEffectiveEntries() const;
278  virtual TF1 *GetFunction(const char *name) const;
279  virtual Int_t GetDimension() const { return fDimension; }
280  virtual Double_t GetKurtosis(Int_t axis=1) const;
281  virtual void GetLowEdge(Double_t *edge) const;
282  virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const;
283  virtual Int_t GetMaximumBin() const;
284  virtual Int_t GetMaximumBin(Int_t &locmax, Int_t &locmay, Int_t &locmaz) const;
285  virtual Double_t GetMaximumStored() const {return fMaximum;}
286  virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const;
287  virtual Int_t GetMinimumBin() const;
288  virtual Int_t GetMinimumBin(Int_t &locmix, Int_t &locmiy, Int_t &locmiz) const;
289  virtual Double_t GetMinimumStored() const {return fMinimum;}
290  virtual void GetMinimumAndMaximum(Double_t& min, Double_t& max) const;
291  virtual Double_t GetMean(Int_t axis=1) const;
292  virtual Double_t GetMeanError(Int_t axis=1) const;
293  virtual Int_t GetNbinsX() const {return fXaxis.GetNbins();}
294  virtual Int_t GetNbinsY() const {return fYaxis.GetNbins();}
295  virtual Int_t GetNbinsZ() const {return fZaxis.GetNbins();}
296  virtual Int_t GetNcells() const {return fNcells; }
297  virtual Double_t GetNormFactor() const {return fNormFactor;}
298  virtual char *GetObjectInfo(Int_t px, Int_t py) const;
299  Option_t *GetOption() const {return fOption.Data();}
300 
302 
303  virtual Int_t GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum=0);
304  virtual Double_t GetRandom() const;
305  virtual void GetStats(Double_t *stats) const;
306  virtual Double_t GetStdDev(Int_t axis=1) const;
307  virtual Double_t GetStdDevError(Int_t axis=1) const;
308  virtual Double_t GetSumOfWeights() const;
309  virtual TArrayD *GetSumw2() {return &fSumw2;}
310  virtual const TArrayD *GetSumw2() const {return &fSumw2;}
311  virtual Int_t GetSumw2N() const {return fSumw2.fN;}
312  Double_t GetRMS(Int_t axis=1) const { return GetStdDev(axis); }
313  Double_t GetRMSError(Int_t axis=1) const { return GetStdDevError(axis); }
314 
315  virtual Double_t GetSkewness(Int_t axis=1) const;
316  EStatOverflows GetStatOverflows() const {return fStatOverflows; }; ///< Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more information.
317  TAxis* GetXaxis() { return &fXaxis; }
318  TAxis* GetYaxis() { return &fYaxis; }
319  TAxis* GetZaxis() { return &fZaxis; }
320  const TAxis* GetXaxis() const { return &fXaxis; }
321  const TAxis* GetYaxis() const { return &fYaxis; }
322  const TAxis* GetZaxis() const { return &fZaxis; }
323  virtual Double_t Integral(Option_t *option="") const;
324  virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const;
325  virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Double_t & err, Option_t *option="") const;
326  virtual Double_t Interpolate(Double_t x) const;
327  virtual Double_t Interpolate(Double_t x, Double_t y) const;
328  virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z) const;
329  Bool_t IsBinOverflow(Int_t bin, Int_t axis = 0) const;
330  Bool_t IsBinUnderflow(Int_t bin, Int_t axis = 0) const;
331  virtual Bool_t IsHighlight() const { return TestBit(kIsHighlight); }
332  virtual Double_t AndersonDarlingTest(const TH1 *h2, Option_t *option="") const;
333  virtual Double_t AndersonDarlingTest(const TH1 *h2, Double_t &advalue) const;
334  virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const;
335  virtual void LabelsDeflate(Option_t *axis="X");
336  virtual void LabelsInflate(Option_t *axis="X");
337  virtual void LabelsOption(Option_t *option="h", Option_t *axis="X");
338  virtual Long64_t Merge(TCollection *list) { return Merge(list,""); }
339  Long64_t Merge(TCollection *list, Option_t * option);
340  virtual Bool_t Multiply(TF1 *f1, 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
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 SetHighlight(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsHighlight
385  virtual void SetLabelColor(Color_t color=1, Option_t *axis="X");
386  virtual void SetLabelFont(Style_t font=62, Option_t *axis="X");
387  virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X");
388  virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X");
389 
390  /*
391  * Set the minimum / maximum value for the Y axis (1-D histograms) or Z axis (2-D histograms)
392  * By default the maximum / minimum value used in drawing is the maximum / minimum value of the histogram
393  * plus a margin of 10%. If these functions are called, the values are used without any extra margin.
394  */
395  virtual void SetMaximum(Double_t maximum = -1111) { fMaximum = maximum; }; // *MENU*
396  virtual void SetMinimum(Double_t minimum = -1111) { fMinimum = minimum; }; // *MENU*
397 
398  virtual void SetName(const char *name); // *MENU*
399  virtual void SetNameTitle(const char *name, const char *title);
400  virtual void SetNdivisions(Int_t n=510, Option_t *axis="X");
401  virtual void SetNormFactor(Double_t factor=1) {fNormFactor = factor;}
402  virtual void SetStats(Bool_t stats=kTRUE); // *MENU*
403  virtual void SetOption(Option_t *option=" ") {fOption = option;}
404  virtual void SetTickLength(Float_t length=0.02, Option_t *axis="X");
405  virtual void SetTitleFont(Style_t font=62, Option_t *axis="X");
406  virtual void SetTitleOffset(Float_t offset=1, Option_t *axis="X");
407  virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X");
408  void SetStatOverflows(EStatOverflows statOverflows) {fStatOverflows = statOverflows;}; ///< See GetStatOverflows for more information.
409  virtual void SetTitle(const char *title); // *MENU*
410  virtual void SetXTitle(const char *title) {fXaxis.SetTitle(title);}
411  virtual void SetYTitle(const char *title) {fYaxis.SetTitle(title);}
412  virtual void SetZTitle(const char *title) {fZaxis.SetTitle(title);}
413  virtual TH1 *ShowBackground(Int_t niter=20, Option_t *option="same"); // *MENU*
414  virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05); // *MENU*
415  virtual void Smooth(Int_t ntimes=1, Option_t *option=""); // *MENU*
416  static void SmoothArray(Int_t NN, Double_t *XX, Int_t ntimes=1);
417  static void StatOverflows(Bool_t flag=kTRUE);
418  virtual void Sumw2(Bool_t flag = kTRUE);
419  void UseCurrentStyle();
420  static TH1 *TransformHisto(TVirtualFFT *fft, TH1* h_output, Option_t *option);
421 
422 
423  // TODO: Remove obsolete methods in v6-04
424  virtual Double_t GetCellContent(Int_t binx, Int_t biny) const
425  { Obsolete("GetCellContent", "v6-00", "v6-04"); return GetBinContent(GetBin(binx, biny)); }
426  virtual Double_t GetCellError(Int_t binx, Int_t biny) const
427  { Obsolete("GetCellError", "v6-00", "v6-04"); return GetBinError(binx, biny); }
428  virtual void RebinAxis(Double_t x, TAxis *axis)
429  { Obsolete("RebinAxis", "v6-00", "v6-04"); ExtendAxis(x, axis); }
430  virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content)
431  { Obsolete("SetCellContent", "v6-00", "v6-04"); SetBinContent(GetBin(binx, biny), content); }
432  virtual void SetCellError(Int_t binx, Int_t biny, Double_t content)
433  { Obsolete("SetCellError", "v6-00", "v6-04"); SetBinError(binx, biny, content); }
434 
435  ClassDef(TH1,8) //1-Dim histogram base class
436 
437 protected:
438  virtual Double_t RetrieveBinContent(Int_t bin) const;
439  virtual void UpdateBinContent(Int_t bin, Double_t content);
440  virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const { return fSumw2.fN ? fSumw2.fArray[bin] : RetrieveBinContent(bin); }
441 };
442 
443 namespace cling {
444  std::string printValue(TH1 *val);
445 }
446 
447 //________________________________________________________________________
448 
449 class TH1C : public TH1, public TArrayC {
450 
451 public:
452  TH1C();
453  TH1C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
454  TH1C(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
455  TH1C(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
456  TH1C(const TH1C &h1c);
457  TH1C& operator=(const TH1C &h1);
458  virtual ~TH1C();
459 
460  virtual void AddBinContent(Int_t bin);
461  virtual void AddBinContent(Int_t bin, Double_t w);
462  virtual void Copy(TObject &hnew) const;
463  virtual void Reset(Option_t *option="");
464  virtual void SetBinsLength(Int_t n=-1);
465 
466  ClassDef(TH1C,3) //1-Dim histograms (one char per channel)
467 
468  friend TH1C operator*(Double_t c1, const TH1C &h1);
469  friend TH1C operator*(const TH1C &h1, Double_t c1);
470  friend TH1C operator+(const TH1C &h1, const TH1C &h2);
471  friend TH1C operator-(const TH1C &h1, const TH1C &h2);
472  friend TH1C operator*(const TH1C &h1, const TH1C &h2);
473  friend TH1C operator/(const TH1C &h1, const TH1C &h2);
474 
475 protected:
476  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
477  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Char_t (content); }
478 };
479 
480 TH1C operator*(Double_t c1, const TH1C &h1);
481 inline
483 TH1C operator+(const TH1C &h1, const TH1C &h2);
484 TH1C operator-(const TH1C &h1, const TH1C &h2);
485 TH1C operator*(const TH1C &h1, const TH1C &h2);
486 TH1C operator/(const TH1C &h1, const TH1C &h2);
487 
488 //________________________________________________________________________
489 
490 class TH1S : public TH1, public TArrayS {
491 
492 public:
493  TH1S();
494  TH1S(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
495  TH1S(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
496  TH1S(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
497  TH1S(const TH1S &h1s);
498  TH1S& operator=(const TH1S &h1);
499  virtual ~TH1S();
500 
501  virtual void AddBinContent(Int_t bin);
502  virtual void AddBinContent(Int_t bin, Double_t w);
503  virtual void Copy(TObject &hnew) const;
504  virtual void Reset(Option_t *option="");
505  virtual void SetBinsLength(Int_t n=-1);
506 
507  ClassDef(TH1S,3) //1-Dim histograms (one short per channel)
508 
509  friend TH1S operator*(Double_t c1, const TH1S &h1);
510  friend TH1S operator*(const TH1S &h1, Double_t c1);
511  friend TH1S operator+(const TH1S &h1, const TH1S &h2);
512  friend TH1S operator-(const TH1S &h1, const TH1S &h2);
513  friend TH1S operator*(const TH1S &h1, const TH1S &h2);
514  friend TH1S operator/(const TH1S &h1, const TH1S &h2);
515 
516 protected:
517  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
518  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Short_t (content); }
519 };
520 
521 TH1S operator*(Double_t c1, const TH1S &h1);
522 inline
524 TH1S operator+(const TH1S &h1, const TH1S &h2);
525 TH1S operator-(const TH1S &h1, const TH1S &h2);
526 TH1S operator*(const TH1S &h1, const TH1S &h2);
527 TH1S operator/(const TH1S &h1, const TH1S &h2);
528 
529 //________________________________________________________________________
530 
531 class TH1I: public TH1, public TArrayI {
532 
533 public:
534  TH1I();
535  TH1I(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
536  TH1I(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
537  TH1I(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
538  TH1I(const TH1I &h1i);
539  TH1I& operator=(const TH1I &h1);
540  virtual ~TH1I();
541 
542  virtual void AddBinContent(Int_t bin);
543  virtual void AddBinContent(Int_t bin, Double_t w);
544  virtual void Copy(TObject &hnew) const;
545  virtual void Reset(Option_t *option="");
546  virtual void SetBinsLength(Int_t n=-1);
547 
548  ClassDef(TH1I,3) //1-Dim histograms (one 32 bits integer per channel)
549 
550  friend TH1I operator*(Double_t c1, const TH1I &h1);
551  friend TH1I operator*(const TH1I &h1, Double_t c1);
552  friend TH1I operator+(const TH1I &h1, const TH1I &h2);
553  friend TH1I operator-(const TH1I &h1, const TH1I &h2);
554  friend TH1I operator*(const TH1I &h1, const TH1I &h2);
555  friend TH1I operator/(const TH1I &h1, const TH1I &h2);
556 
557 protected:
558  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
559  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Int_t (content); }
560 };
561 
562 TH1I operator*(Double_t c1, const TH1I &h1);
563 inline
565 TH1I operator+(const TH1I &h1, const TH1I &h2);
566 TH1I operator-(const TH1I &h1, const TH1I &h2);
567 TH1I operator*(const TH1I &h1, const TH1I &h2);
568 TH1I operator/(const TH1I &h1, const TH1I &h2);
569 
570 //________________________________________________________________________
571 
572 class TH1F : public TH1, public TArrayF {
573 
574 public:
575  TH1F();
576  TH1F(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
577  TH1F(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
578  TH1F(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
579  explicit TH1F(const TVectorF &v);
580  TH1F(const TH1F &h1f);
581  TH1F& operator=(const TH1F &h1);
582  virtual ~TH1F();
583 
584  virtual void AddBinContent(Int_t bin) {++fArray[bin];}
585  virtual void AddBinContent(Int_t bin, Double_t w)
586  {fArray[bin] += Float_t (w);}
587  virtual void Copy(TObject &hnew) const;
588  virtual void Reset(Option_t *option="");
589  virtual void SetBinsLength(Int_t n=-1);
590 
591  ClassDef(TH1F,3) //1-Dim histograms (one float per channel)
592 
593  friend TH1F operator*(Double_t c1, const TH1F &h1);
594  friend TH1F operator*(const TH1F &h1, Double_t c1);
595  friend TH1F operator+(const TH1F &h1, const TH1F &h2);
596  friend TH1F operator-(const TH1F &h1, const TH1F &h2);
597  friend TH1F operator*(const TH1F &h1, const TH1F &h2);
598  friend TH1F operator/(const TH1F &h1, const TH1F &h2);
599 
600 protected:
601  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
602  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Float_t (content); }
603 };
604 
605 TH1F operator*(Double_t c1, const TH1F &h1);
606 inline
608 TH1F operator+(const TH1F &h1, const TH1F &h2);
609 TH1F operator-(const TH1F &h1, const TH1F &h2);
610 TH1F operator*(const TH1F &h1, const TH1F &h2);
611 TH1F operator/(const TH1F &h1, const TH1F &h2);
612 
613 //________________________________________________________________________
614 
615 class TH1D : public TH1, public TArrayD {
616 
617 public:
618  TH1D();
619  TH1D(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
620  TH1D(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
621  TH1D(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
622  explicit TH1D(const TVectorD &v);
623  TH1D(const TH1D &h1d);
624  TH1D& operator=(const TH1D &h1);
625  virtual ~TH1D();
626 
627  virtual void AddBinContent(Int_t bin) {++fArray[bin];}
628  virtual void AddBinContent(Int_t bin, Double_t w)
629  {fArray[bin] += Double_t (w);}
630  virtual void Copy(TObject &hnew) const;
631  virtual void Reset(Option_t *option="");
632  virtual void SetBinsLength(Int_t n=-1);
633 
634  ClassDef(TH1D,3) //1-Dim histograms (one double per channel)
635 
636  friend TH1D operator*(Double_t c1, const TH1D &h1);
637  friend TH1D operator*(const TH1D &h1, Double_t c1);
638  friend TH1D operator+(const TH1D &h1, const TH1D &h2);
639  friend TH1D operator-(const TH1D &h1, const TH1D &h2);
640  friend TH1D operator*(const TH1D &h1, const TH1D &h2);
641  friend TH1D operator/(const TH1D &h1, const TH1D &h2);
642 
643 protected:
644  virtual Double_t RetrieveBinContent(Int_t bin) const { return fArray[bin]; }
645  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = content; }
646 };
647 
648 TH1D operator*(Double_t c1, const TH1D &h1);
649 inline
651 TH1D operator+(const TH1D &h1, const TH1D &h2);
652 TH1D operator-(const TH1D &h1, const TH1D &h2);
653 TH1D operator*(const TH1D &h1, const TH1D &h2);
654 TH1D operator/(const TH1D &h1, const TH1D &h2);
655 
656  extern TH1 *R__H(Int_t hid);
657  extern TH1 *R__H(const char *hname);
658 
659 #endif
TH1::FindObject
virtual TObject * FindObject(const char *name) const
Search object named name in the list of functions.
Definition: TH1.cxx:3780
c
#define c(i)
Definition: RSha256.hxx:119
TH1I::operator+
friend TH1I operator+(const TH1I &h1, const TH1I &h2)
Operator +.
Definition: TH1.cxx:9422
TH1::UpdateBinContent
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:8905
TH1::GetTitleSize
virtual Float_t GetTitleSize(Option_t *axis="X") const
Return the "axis" title size.
Definition: Haxis.cxx:144
TH1I::operator/
friend TH1I operator/(const TH1I &h1, const TH1I &h2)
Operator /.
Definition: TH1.cxx:9455
TH1::LabelsOption
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X")
Set option(s) to draw axis with labels.
Definition: TH1.cxx:5221
TH1::RetrieveBinContent
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:8895
n
const Int_t n
Definition: legend1.C:16
TH1::AndersonDarlingTest
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:7569
TAxis
Class to manage histogram axis.
Definition: TAxis.h:30
TH1::GetZaxis
const TAxis * GetZaxis() const
Definition: TH1.h:322
TH1::kIsHighlight
@ kIsHighlight
bit set if histo is highlight
Definition: TH1.h:171
TH1::GetBinError
virtual Double_t GetBinError(Int_t binx, Int_t biny) const
Definition: TH1.h:265
TArrayS
Definition: TArrayS.h:27
TH1::kYaxis
@ kYaxis
Definition: TH1.h:72
TH1::kPoisson2
@ kPoisson2
errors from Poisson interval at 95% CL (~ 2 sigma)
Definition: TH1.h:65
TH1::GetSumw2N
virtual Int_t GetSumw2N() const
Definition: TH1.h:311
TH1::GetFunction
virtual TF1 * GetFunction(const char *name) const
Return pointer to function with name.
Definition: TH1.cxx:8506
TH1::Copy
virtual void Copy(TObject &hnew) const
Copy this histogram structure to newth1.
Definition: TH1.cxx:2587
TH1::kNoAxis
@ kNoAxis
NOTE: Must always be 0 !!!
Definition: TH1.h:70
TH1::Chi2Test
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:1949
TH1::FindFixBin
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:3628
TH1::ShowBackground
virtual TH1 * ShowBackground(Int_t niter=20, Option_t *option="same")
This function calculates the background spectrum in this histogram.
Definition: TH1.cxx:8742
TBrowser
Definition: TBrowser.h:37
ymax
float ymax
Definition: THbookFile.cxx:95
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TH1::GetBinWithContent
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:4931
Style_t
short Style_t
Definition: RtypesCore.h:80
TObject::TestBit
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
TH1::GetMeanError
virtual Double_t GetMeanError(Int_t axis=1) const
Return standard error of mean of this histogram along the X axis.
Definition: TH1.cxx:7116
TH1::GetBinErrorLow
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
Definition: TH1.cxx:8534
TH1::fYaxis
TAxis fYaxis
Y axis descriptor.
Definition: TH1.h:89
TH1::SetContour
virtual void SetContour(Int_t nlevels, const Double_t *levels=0)
Set the number and values of contour levels.
Definition: TH1.cxx:7946
TH1C::operator*
friend TH1C operator*(Double_t c1, const TH1C &h1)
Operator *.
Definition: TH1.cxx:9048
TH1I::operator-
friend TH1I operator-(const TH1I &h1, const TH1I &h2)
Operator -.
Definition: TH1.cxx:9433
TH1::SameLimitsAndNBins
static Bool_t SameLimitsAndNBins(const TAxis &axis1, const TAxis &axis2)
Same limits and bins.
Definition: TH1.cxx:5510
TH1::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TH1.cxx:6788
operator/
TH1C operator/(const TH1C &h1, const TH1C &h2)
Operator /.
Definition: TH1.cxx:9092
Foption
R__EXTERN Foption_t Foption
Definition: TTreePlayer.cxx:88
Foption_t
Definition: Foption.h:24
TH1::fBinStatErrOpt
EBinErrorOpt fBinStatErrOpt
option for bin statistical errors
Definition: TH1.h:111
TH1I::operator=
TH1I & operator=(const TH1I &h1)
Operator =.
Definition: TH1.cxx:9401
TH1::kPoisson
@ kPoisson
errors from Poisson interval at 68.3% (1 sigma)
Definition: TH1.h:64
TH1::SetMinimum
virtual void SetMinimum(Double_t minimum=-1111)
Definition: TH1.h:396
TH1::GetNbinsZ
virtual Int_t GetNbinsZ() const
Definition: TH1.h:295
TH1::GetObjectInfo
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Redefines TObject::GetObjectInfo.
Definition: TH1.cxx:4358
TH1I
1-D histogram with an int per channel (see TH1 documentation)}
Definition: TH1.h:531
TH1::fEntries
Double_t fEntries
Number of entries.
Definition: TH1.h:93
TString::Data
const char * Data() const
Definition: TString.h:369
TH1::SetNameTitle
virtual void SetNameTitle(const char *name, const char *title)
Change the name and title of this histogram.
Definition: TH1.cxx:8429
TH1::fZaxis
TAxis fZaxis
Z axis descriptor.
Definition: TH1.h:90
TH1S::AddBinContent
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:9173
TH1::GetTitleOffset
virtual Float_t GetTitleOffset(Option_t *axis="X") const
Return the "axis" title offset.
Definition: Haxis.cxx:131
TH1::GetCellContent
virtual Double_t GetCellContent(Int_t binx, Int_t biny) const
Definition: TH1.h:424
TH1::AutoP2GetPower2
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:1239
TH1::Divide
virtual Bool_t Divide(TF1 *f1, Double_t c1=1)
Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2),...
Definition: TH1.cxx:2752
TH1::DrawCopy
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
Definition: TH1.cxx:3044
TH1::ClearUnderflowAndOverflow
virtual void ClearUnderflowAndOverflow()
Remove all the content from the underflow and overflow bins, without changing the number of entries A...
Definition: TH1.cxx:2455
TH1::GetPainter
TVirtualHistPainter * GetPainter(Option_t *option="")
Return pointer to painter.
Definition: TH1.cxx:4367
TH1C::RetrieveBinContent
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:476
TH1::SetBuffer
virtual void SetBuffer(Int_t buffersize, Option_t *option="")
Set the maximum number of entries to be kept in the buffer.
Definition: TH1.cxx:7921
TH1::fTsumw
Double_t fTsumw
Total Sum of weights.
Definition: TH1.h:94
xmax
float xmax
Definition: THbookFile.cxx:95
TH1::SetContent
virtual void SetContent(const Double_t *content)
Replace bin contents by the contents of array content.
Definition: TH1.cxx:7861
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TH1::DrawPanel
virtual void DrawPanel()
Display a panel with all histogram drawing options.
Definition: TH1.cxx:3105
TH1C::operator/
friend TH1C operator/(const TH1C &h1, const TH1C &h2)
Operator /.
Definition: TH1.cxx:9092
TH1::fBufferSize
Int_t fBufferSize
fBuffer size
Definition: TH1.h:105
TH1::SetNormFactor
virtual void SetNormFactor(Double_t factor=1)
Definition: TH1.h:401
TH1::GetSkewness
virtual Double_t GetSkewness(Int_t axis=1) const
Definition: TH1.cxx:7191
TH1D
1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:615
TH1::SetBins
virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax)
Redefine x axis parameters.
Definition: TH1.cxx:8222
TH1::GetContourLevel
virtual Double_t GetContourLevel(Int_t level) const
Return value of contour number level.
Definition: TH1.cxx:7893
TH1::kIsNotW
@ kIsNotW
Histogram is forced to be not weighted even when the histogram is filled with weighted different than...
Definition: TH1.h:168
TH1::GetAsymmetry
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:4217
TAttMarker.h
Float_t
float Float_t
Definition: RtypesCore.h:57
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TH1::CheckBinLabels
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check that axis have same labels.
Definition: TH1.cxx:1500
TH1F::UpdateBinContent
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:602
TH1::GetDefaultSumw2
static Bool_t GetDefaultSumw2()
Return kTRUE if TH1::Sumw2 must be called when creating new histograms.
Definition: TH1.cxx:4293
TH1::GetBinErrorUp
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
Definition: TH1.cxx:8565
Int_t
int Int_t
Definition: RtypesCore.h:45
TH1::GetTickLength
virtual Float_t GetTickLength(Option_t *axis="X") const
Return the "axis" tick length.
Definition: Haxis.cxx:105
operator+
TH1C operator+(const TH1C &h1, const TH1C &h2)
Operator +.
Definition: TH1.cxx:9059
TH1::GetBinError
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
Definition: TH1.cxx:8518
TH1::SetCanExtend
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:6290
TH1::fDirectory
TDirectory * fDirectory
!Pointer to directory holding this histogram
Definition: TH1.h:107
TArrayI::fArray
Int_t * fArray
Definition: TArrayI.h:36
TH1I::AddBinContent
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:9354
TH1I::SetBinsLength
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9391
TH1::fBuffer
Double_t * fBuffer
[fBufferSize] entry buffer
Definition: TH1.h:106
TH1::SetBinContent
virtual void SetBinContent(Int_t bin, Int_t, Int_t, Double_t content)
Definition: TH1.h:360
TH1::GetBinWidth
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
Definition: TH1.cxx:8618
TH1C::~TH1C
virtual ~TH1C()
Destructor.
Definition: TH1.cxx:8977
TH1::operator=
TH1 & operator=(const TH1 &)
TArrayC::fArray
Char_t * fArray
Definition: TArrayC.h:36
TH1::GetEntries
virtual Double_t GetEntries() const
Return the current number of entries.
Definition: TH1.cxx:4301
TH1S::SetBinsLength
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9210
TH1::SetBinContent
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:8677
TArrayS::fArray
Short_t * fArray
Definition: TArrayS.h:36
x
Double_t x[n]
Definition: legend1.C:17
TH1S::operator=
TH1S & operator=(const TH1S &h1)
Operator =.
Definition: TH1.cxx:9220
TH1F::RetrieveBinContent
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:601
TH1::FitOptionsMake
static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption)
Decode string choptin and fill fitOption structure.
Definition: TH1.cxx:4499
TH1::GetYaxis
const TAxis * GetYaxis() const
Definition: TH1.h:321
TH1::GetBinContent
virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const
Definition: TH1.h:263
TH1::kNeutral
@ kNeutral
Adapt to the global flag.
Definition: TH1.h:81
TH1::GetListOfFunctions
TList * GetListOfFunctions() const
Definition: TH1.h:240
TH1::Add
virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="")
Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2),...
Definition: TH1.cxx:777
TVectorDfwd.h
R__H
TH1 * R__H(Int_t hid)
return pointer to histogram with name hid if id >=0 h_id if id <0
Definition: TH1.cxx:9826
TH1::fNcells
Int_t fNcells
number of bins(1D), cells (2D) +U/Overflows
Definition: TH1.h:87
TArray::fN
Int_t fN
Definition: TArray.h:38
TH1::GetContourLevelPad
virtual Double_t GetContourLevelPad(Int_t level) const
Return the value of contour number "level" in Pad coordinates.
Definition: TH1.cxx:7903
TH1::TransformHisto
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:8775
TH1::SetName
virtual void SetName(const char *name)
Change the name of this histogram.
Definition: TH1.cxx:8415
TObject::Obsolete
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
Definition: TObject.cxx:952
TH1::fDimension
Int_t fDimension
!Histogram dimension (1, 2 or 3 dim)
Definition: TH1.h:108
TH1::SetAxisRange
virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X")
Set the "axis" range.
Definition: Haxis.cxx:201
TH1::ResetStats
virtual void ResetStats()
Reset the statistics including the number of entries and replace with values calculates from bin cont...
Definition: TH1.cxx:7410
TH1::fMaximum
Double_t fMaximum
Maximum value for plotting.
Definition: TH1.h:98
TH1I::operator*
friend TH1I operator*(Double_t c1, const TH1I &h1)
Operator *.
Definition: TH1.cxx:9411
TH1::TH1
TH1()
Histogram default constructor.
Definition: TH1.cxx:550
TH1::SetXTitle
virtual void SetXTitle(const char *title)
Definition: TH1.h:410
TH1::SetContourLevel
virtual void SetContourLevel(Int_t level, Double_t value)
Set value for one contour level.
Definition: TH1.cxx:7985
TString
Definition: TString.h:136
TH1::RecomputeAxisLimits
static Bool_t RecomputeAxisLimits(TAxis &destAxis, const TAxis &anAxis)
Finds new limits for the axis for the Merge function.
Definition: TH1.cxx:5520
TH1::fBarOffset
Short_t fBarOffset
(1000*offset) for bar charts or legos
Definition: TH1.h:91
TH1::Print
virtual void Print(Option_t *option="") const
Print some global quantities for this histogram.
Definition: TH1.cxx:6641
TH1::fPainter
TVirtualHistPainter * fPainter
!pointer to histogram painter
Definition: TH1.h:110
TH1D::UpdateBinContent
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:645
TArrayF
Definition: TArrayF.h:27
TH1D::~TH1D
virtual ~TH1D()
Destructor.
Definition: TH1.cxx:9717
TH1::Interpolate
virtual Double_t Interpolate(Double_t x) const
Given a point x, approximates the value via linear interpolation based on the two nearest bin centers...
Definition: TH1.cxx:4960
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TH1::kXaxis
@ kXaxis
Definition: TH1.h:71
Foption.h
TH1::SetYTitle
virtual void SetYTitle(const char *title)
Definition: TH1.h:411
TH1::GetZaxis
TAxis * GetZaxis()
Definition: TH1.h:319
TH1S::RetrieveBinContent
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:517
Color_t
short Color_t
Definition: RtypesCore.h:83
TH1::RecursiveRemove
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from the list of functions.
Definition: TH1.cxx:6217
v
@ v
Definition: rootcling_impl.cxx:3635
TH1::GetTitleFont
virtual Style_t GetTitleFont(Option_t *axis="X") const
Return the "axis" title font.
Definition: Haxis.cxx:118
TH1::GetNdivisions
virtual Int_t GetNdivisions(Option_t *axis="X") const
Return the number of divisions for "axis".
Definition: Haxis.cxx:27
TH1::RebinX
virtual TH1 * RebinX(Int_t ngroup=2, const char *newname="")
Definition: TH1.h:347
b
#define b(i)
Definition: RSha256.hxx:118
h1
TH1F * h1
Definition: legend1.C:5
TH1::CheckBinLimits
static bool CheckBinLimits(const TAxis *a1, const TAxis *a2)
Check bin limits.
Definition: TH1.cxx:1471
bool
TH1::KolmogorovTest
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:7683
TH1::SetTitleSize
virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Set the axis' title size.
Definition: Haxis.cxx:365
TH1::SetZTitle
virtual void SetZTitle(const char *title)
Definition: TH1.h:412
TH1::SetTitleFont
virtual void SetTitleFont(Style_t font=62, Option_t *axis="X")
Set the axis' title font.
Definition: Haxis.cxx:323
operator*
TH1C operator*(Double_t c1, const TH1C &h1)
Operator *.
Definition: TH1.cxx:9048
TH1::fTsumw2
Double_t fTsumw2
Total Sum of squares of weights.
Definition: TH1.h:95
TH1::kNoTitle
@ kNoTitle
don't draw the histogram title
Definition: TH1.h:166
TH1Merger
Definition: TH1Merger.h:17
NN
#define NN
Definition: _BDT.class.C:90
TH1::UseCurrentStyle
void UseCurrentStyle()
Copy current attributes from/to current style.
Definition: TH1.cxx:7021
q
float * q
Definition: THbookFile.cxx:89
TH1S::~TH1S
virtual ~TH1S()
Destructor.
Definition: TH1.cxx:9158
TH1::CheckConsistentSubAxes
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:1583
TH1::GetNormFactor
virtual Double_t GetNormFactor() const
Definition: TH1.h:297
TArrayI::Reset
void Reset()
Definition: TArrayI.h:53
TH1::IntegralAndError
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:7476
TH1::GetDimension
virtual Int_t GetDimension() const
Definition: TH1.h:279
TH1::GetContour
virtual Int_t GetContour(Double_t *levels=0)
Return contour values into array levels if pointer levels is non zero.
Definition: TH1.cxx:7874
TH1::SetTitle
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
Definition: TH1.cxx:6344
TH1::GetMinimumAndMaximum
virtual void GetMinimumAndMaximum(Double_t &min, Double_t &max) const
Retrieve the minimum and maximum values in the histogram.
Definition: TH1.cxx:8186
TH1::fgDefaultSumw2
static Bool_t fgDefaultSumw2
!flag to call TH1::Sumw2 automatically at histogram creation time
Definition: TH1.h:116
TH1::Clone
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
Definition: TH1.cxx:2664
TH1::fgAddDirectory
static Bool_t fgAddDirectory
!flag to add histograms to the directory
Definition: TH1.h:114
TH1I::~TH1I
virtual ~TH1I()
Destructor.
Definition: TH1.cxx:9339
TH1::GetXaxis
const TAxis * GetXaxis() const
Definition: TH1.h:320
TAttLine.h
TH1::ExtendAxis
virtual void ExtendAxis(Double_t x, TAxis *axis)
Histogram is resized along axis such that x is in the axis range.
Definition: TH1.cxx:6145
TH1C
1-D histogram with a byte per channel (see TH1 documentation)
Definition: TH1.h:449
TH1D::RetrieveBinContent
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:644
TH1C::UpdateBinContent
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:477
TH1::~TH1
virtual ~TH1()
Histogram default destructor.
Definition: TH1.cxx:578
TH1::GetBinError
virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const
Definition: TH1.h:266
TH1::GetLabelSize
virtual Float_t GetLabelSize(Option_t *axis="X") const
Return the "axis" label size.
Definition: Haxis.cxx:92
TH1::GetRMSError
Double_t GetRMSError(Int_t axis=1) const
Definition: TH1.h:313
TH1::fBarWidth
Short_t fBarWidth
(1000*width) for bar charts or legos
Definition: TH1.h:92
TH1::GetMean
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:7085
TH1::BufferFill
virtual Int_t BufferFill(Double_t x, Double_t w)
accumulate arguments in buffer.
Definition: TH1.cxx:1436
TH1::PutStats
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
Definition: TH1.cxx:7395
TVirtualHistPainter
Definition: TVirtualHistPainter.h:30
TH1::GetCenter
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:8629
TArrayD.h
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TH1::SavePrimitiveHelp
virtual void SavePrimitiveHelp(std::ostream &out, const char *hname, Option_t *option="")
Helper function for the SavePrimitive functions from TH1 or classes derived from TH1,...
Definition: TH1.cxx:6930
TH1::Eval
virtual void Eval(TF1 *f1, Option_t *option="")
Evaluate function f1 at the center of bins of this histogram.
Definition: TH1.cxx:3122
TH1::GetBinContent
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4906
TH1D::SetBinsLength
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9750
TH1::ShowPeaks
virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
Interface to TSpectrum::Search.
Definition: TH1.cxx:8757
TAttFill.h
TH1::GetMinimumBin
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
Definition: TH1.cxx:8120
TH1S::operator*
friend TH1S operator*(Double_t c1, const TH1S &h1)
Operator *.
Definition: TH1.cxx:9229
TH1::SetTickLength
virtual void SetTickLength(Float_t length=0.02, Option_t *axis="X")
Set the axis' tick marks length.
Definition: Haxis.cxx:302
TAttLine
Definition: TAttLine.h:18
TH1::GetLabelOffset
virtual Float_t GetLabelOffset(Option_t *axis="X") const
Return the "axis" label offset.
Definition: Haxis.cxx:79
TH1::GetStatOverflows
EStatOverflows GetStatOverflows() const
Definition: TH1.h:316
TH1::kIgnore
@ kIgnore
Override global flag ignoring the overflows.
Definition: TH1.h:79
TH1D::operator=
TH1D & operator=(const TH1D &h1)
Operator =.
Definition: TH1.cxx:9760
TFitResultPtr
Definition: TFitResultPtr.h:32
TH1::GetYaxis
TAxis * GetYaxis()
Definition: TH1.h:318
TH1::GetMaximumBin
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Definition: TH1.cxx:8035
xmin
float xmin
Definition: THbookFile.cxx:95
TH1::GetSumw2
virtual TArrayD * GetSumw2()
Definition: TH1.h:309
TH1F::AddBinContent
virtual void AddBinContent(Int_t bin, Double_t w)
Increment bin content by a weight w.
Definition: TH1.h:585
TH1::fIntegral
Double_t * fIntegral
!Integral of bins used by GetRandom
Definition: TH1.h:109
TH1::Rebin
virtual TH1 * Rebin(Int_t ngroup=2, const char *newname="", const Double_t *xbins=0)
Rebin this histogram.
Definition: TH1.cxx:5903
h
#define h(i)
Definition: RSha256.hxx:124
TH1::CheckConsistency
static bool CheckConsistency(const TH1 *h1, const TH1 *h2)
Check histogram compatibility.
Definition: TH1.cxx:1620
TH1::SetLabelSize
virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
Set size of axis' labels.
Definition: Haxis.cxx:285
TH1::GetBarWidth
virtual Float_t GetBarWidth() const
Definition: TH1.h:253
TH1::DrawNormalized
virtual TH1 * DrawNormalized(Option_t *option="", Double_t norm=1) const
Draw a normalized copy of this histogram.
Definition: TH1.cxx:3074
TH1::fgBufferSize
static Int_t fgBufferSize
!default buffer size for automatic histograms
Definition: TH1.h:113
TH1::ComputeIntegral
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:2474
TH1::GetMaximumStored
virtual Double_t GetMaximumStored() const
Definition: TH1.h:285
TH1::fContour
TArrayD fContour
Array to display contour levels.
Definition: TH1.h:101
TH1::BufferEmpty
virtual Int_t BufferEmpty(Int_t action=0)
Fill histogram with all entries in the buffer.
Definition: TH1.cxx:1346
TH1::GetLowEdge
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:8642
TH1::SetEntries
virtual void SetEntries(Double_t n)
Definition: TH1.h:382
TH1::FindLastBinAbove
virtual Int_t FindLastBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
Find last bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold i...
Definition: TH1.cxx:3720
TH1D::TH1D
TH1D()
Constructor.
Definition: TH1.cxx:9652
TH1::DoIntegral
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:7485
TH1::SetBinContent
virtual void SetBinContent(Int_t bin, Int_t, Double_t content)
Definition: TH1.h:359
TNamed
Definition: TNamed.h:29
TArrayC.h
TH1::GetStdDevError
virtual Double_t GetStdDevError(Int_t axis=1) const
Return error of standard deviation estimation for Normal distribution.
Definition: TH1.cxx:7178
TH1::GetBinContent
virtual Double_t GetBinContent(Int_t bin, Int_t) const
Definition: TH1.h:262
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TArrayF::fArray
Float_t * fArray
Definition: TArrayF.h:36
TH1::GetBufferSize
Int_t GetBufferSize() const
Definition: TH1.h:234
TH1::AddDirectory
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
Definition: TH1.cxx:1225
TH1C::TH1C
TH1C()
Constructor.
Definition: TH1.cxx:8929
TH1::GetBinCenter
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
Definition: TH1.cxx:8596
TH1C::AddBinContent
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:8992
TH1::GetBinErrorOption
virtual EBinErrorOpt GetBinErrorOption() const
Definition: TH1.h:269
TH1D::Copy
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9732
TH1::SetHighlight
virtual void SetHighlight(Bool_t set=kTRUE)
Set highlight (enable/disable) mode for the histogram by default highlight mode is disable.
Definition: TH1.cxx:4337
TH1::FFT
virtual TH1 * FFT(TH1 *h_output, Option_t *option)
This function allows to do discrete Fourier transforms of TH1 and TH2.
Definition: TH1.cxx:3214
TH1::DistancetoPrimitive
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
Definition: TH1.cxx:2735
TH1::GetBin
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:4808
TH1::ExecuteEvent
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TH1.cxx:3170
TH1::SetMaximum
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:395
TH1::AutoP2FindLimits
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:1275
TH1::GetLabelFont
virtual Style_t GetLabelFont(Option_t *axis="X") const
Return the "axis" label font.
Definition: Haxis.cxx:66
TH1::GetIntegral
virtual Double_t * GetIntegral()
Return a pointer to the array of bins integral.
Definition: TH1.cxx:2522
TH1::Rebuild
virtual void Rebuild(Option_t *option="")
Using the current bin info, recompute the arrays for contents and errors.
Definition: TH1.cxx:6719
TH1::GetDefaultBufferSize
static Int_t GetDefaultBufferSize()
Static function return the default buffer size for automatic histograms the parameter fgBufferSize ma...
Definition: TH1.cxx:4284
TH1::GetNcells
virtual Int_t GetNcells() const
Definition: TH1.h:296
TH1::fNormFactor
Double_t fNormFactor
Normalization factor.
Definition: TH1.h:100
TArrayF::Reset
void Reset()
Definition: TArrayF.h:53
TH1::Fill
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
Definition: TH1.cxx:3274
TAttMarker
Definition: TAttMarker.h:19
TH1S::UpdateBinContent
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:518
TH1::GetBinErrorSqUnchecked
virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const
Definition: TH1.h:440
TH1::GetMinimum
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:8090
TH1::FillN
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:3377
TH1::GetSumw2
virtual const TArrayD * GetSumw2() const
Definition: TH1.h:310
TArrayI.h
TH1::SetBinsLength
virtual void SetBinsLength(Int_t=-1)
Definition: TH1.h:372
TH1::fFunctions
TList * fFunctions
->Pointer to list of functions (fits and user)
Definition: TH1.h:104
TH1::IsBinOverflow
Bool_t IsBinOverflow(Int_t bin, Int_t axis=0) const
Return true if the bin is overflow.
Definition: TH1.cxx:5027
BIT
#define BIT(n)
Definition: Rtypes.h:85
TH1::fMinimum
Double_t fMinimum
Minimum value for plotting.
Definition: TH1.h:99
TH1F::operator=
TH1F & operator=(const TH1F &h1)
Operator =.
Definition: TH1.cxx:9581
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TH1::Build
void Build()
Creates histogram basic data structure.
Definition: TH1.cxx:722
TH1::fStatOverflows
EStatOverflows fStatOverflows
per object flag to use under/overflows in statistics
Definition: TH1.h:112
TH1::SetDirectory
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:8392
TH1::IsBinUnderflow
Bool_t IsBinUnderflow(Int_t bin, Int_t axis=0) const
Return true if the bin is underflow.
Definition: TH1.cxx:5059
y
Double_t y[n]
Definition: legend1.C:17
TArrayF.h
TH1C::Reset
virtual void Reset(Option_t *option="")
Reset.
Definition: TH1.cxx:9019
Short_t
short Short_t
Definition: RtypesCore.h:39
TH1C::SetBinsLength
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9029
TH1::FillN
virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t)
Definition: TH1.h:220
TH1::SetError
virtual void SetError(const Double_t *error)
Replace bin errors by values in array error.
Definition: TH1.cxx:8406
TH1S::operator+
friend TH1S operator+(const TH1S &h1, const TH1S &h2)
Operator +.
Definition: TH1.cxx:9240
TH1::GetStatOverflowsBehaviour
Bool_t GetStatOverflowsBehaviour() const
Definition: TH1.h:149
TH1::GetMinimumStored
virtual Double_t GetMinimumStored() const
Definition: TH1.h:289
TNamed::SetTitle
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:164
TH1::SetStats
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
Definition: TH1.cxx:8445
TH1::fgStatOverflows
static Bool_t fgStatOverflows
!flag to use under/overflows in statistics
Definition: TH1.h:115
TH1::FillRandom
virtual void FillRandom(const char *fname, Int_t ntimes=5000)
Fill histogram following distribution in function fname.
Definition: TH1.cxx:3444
TH1::kLogX
@ kLogX
X-axis in log scale.
Definition: TH1.h:164
TH1::CanExtendAllAxes
virtual Bool_t CanExtendAllAxes() const
Returns true if all axes are extendable.
Definition: TH1.cxx:6277
TH1::Multiply
virtual Bool_t Multiply(TF1 *f1, Double_t c1=1)
Performs the operation:
Definition: TH1.cxx:5661
TH1::EBinErrorOpt
EBinErrorOpt
Definition: TH1.h:62
TH1::Chisquare
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:2436
TH1F::Copy
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9553
TH1::GetKurtosis
virtual Double_t GetKurtosis(Int_t axis=1) const
Definition: TH1.cxx:7261
TH1S::operator-
friend TH1S operator-(const TH1S &h1, const TH1S &h2)
Operator -.
Definition: TH1.cxx:9251
TH1::SetNdivisions
virtual void SetNdivisions(Int_t n=510, Option_t *axis="X")
Set the number of divisions to draw an axis.
Definition: Haxis.cxx:170
TH1::GetQuantiles
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:4458
TH1::GetOption
Option_t * GetOption() const
Definition: TH1.h:299
TH1::SetLabelOffset
virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Set offset between axis and axis' labels.
Definition: Haxis.cxx:267
TH1::fOption
TString fOption
histogram options
Definition: TH1.h:103
ymin
float ymin
Definition: THbookFile.cxx:95
TArrayC
Definition: TArrayC.h:27
TH1::GetStdDev
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
Definition: TH1.cxx:7139
TH1::GetRandom
virtual Double_t GetRandom() const
Return a random number distributed according the histogram bin contents.
Definition: TH1.cxx:4855
TH1::CheckEqualAxes
static bool CheckEqualAxes(const TAxis *a1, const TAxis *a2)
Check that the axis are the same.
Definition: TH1.cxx:1547
TH1::StatOverflows
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:6557
TH1::FindFirstBinAbove
virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
Find first bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold ...
Definition: TH1.cxx:3657
TH1::Browse
virtual void Browse(TBrowser *b)
Browse the Histogram object.
Definition: TH1.cxx:713
TH1::kZaxis
@ kZaxis
Definition: TH1.h:73
TH1I::Copy
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9373
TH1::GetBinLowEdge
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
Definition: TH1.cxx:8607
TArrayD::Reset
void Reset()
Definition: TArrayD.h:53
TArrayD::fArray
Double_t * fArray
Definition: TArrayD.h:36
sigma
const Double_t sigma
Definition: h1analysisProxy.h:11
TH1F::~TH1F
virtual ~TH1F()
Destructor.
Definition: TH1.cxx:9546
TH1::LabelsDeflate
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:5090
TH1::IsHighlight
virtual Bool_t IsHighlight() const
Definition: TH1.h:331
TVectorT
Definition: TMatrixTBase.h:78
TH1::RebinAxis
virtual void RebinAxis(Double_t x, TAxis *axis)
Definition: TH1.h:428
TH1::SetCellContent
virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content)
Definition: TH1.h:430
TH1::GetLabelColor
virtual Color_t GetLabelColor(Option_t *axis="X") const
Return the "axis" label color.
Definition: Haxis.cxx:53
TH1::GetRMS
Double_t GetRMS(Int_t axis=1) const
Definition: TH1.h:312
f1
TF1 * f1
Definition: legend1.C:11
TH1::Smooth
virtual void Smooth(Int_t ntimes=1, Option_t *option="")
Smooth bin contents of this histogram.
Definition: TH1.cxx:6511
TH1F::AddBinContent
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.h:584
TH1::GetAxisColor
virtual Color_t GetAxisColor(Option_t *axis="X") const
Return the number of divisions for "axis".
Definition: Haxis.cxx:40
Double_t
double Double_t
Definition: RtypesCore.h:59
TH1::SetTitleOffset
virtual void SetTitleOffset(Float_t offset=1, Option_t *axis="X")
Specify a parameter offset to control the distance between the axis and the axis' title.
Definition: Haxis.cxx:345
TH1::GetStats
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:7344
TH1::kNstat
@ kNstat
Definition: TH1.h:180
TH1::SetLabelFont
virtual void SetLabelFont(Style_t font=62, Option_t *axis="X")
Set font number used to draw axis labels.
Definition: Haxis.cxx:249
TH1S::TH1S
TH1S()
Constructor.
Definition: TH1.cxx:9110
TH1::DirectoryAutoAdd
virtual void DirectoryAutoAdd(TDirectory *)
Perform the automatic addition of the histogram to the given directory.
Definition: TH1.cxx:2713
TH1::SetBinError
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:8661
TH1::GetBufferLength
Int_t GetBufferLength() const
Definition: TH1.h:233
TFitResultPtr.h
TH1::FindBin
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:3595
TH1I::RetrieveBinContent
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:558
TArrayS.h
TH1::kUserContour
@ kUserContour
user specified contour levels
Definition: TH1.h:162
TH1F
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:572
TH1S
1-D histogram with a short per channel (see TH1 documentation)
Definition: TH1.h:490
TH1::SetStatOverflows
void SetStatOverflows(EStatOverflows statOverflows)
Definition: TH1.h:408
TH1C::operator=
TH1C & operator=(const TH1C &h1)
Operator =.
Definition: TH1.cxx:9039
TMVA::DNN::forward
void forward(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
apply the weights (and functions) in forward direction of the DNN
Definition: NeuralNet.icc:546
TH1::fSumw2
TArrayD fSumw2
Array of sum of squares of weights.
Definition: TH1.h:102
TH1::FitPanel
virtual void FitPanel()
Display a panel with all histogram fit options.
Definition: TH1.cxx:4162
TAxis.h
TH1::Sumw2
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
Definition: TH1.cxx:8475
TObject
Definition: TObject.h:37
TH1::SmoothArray
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:6393
TH1::fTsumwx2
Double_t fTsumwx2
Total Sum of weight*X*X.
Definition: TH1.h:97
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TH1::EStatOverflows
EStatOverflows
Enumeration specifying the way to treat statoverflow.
Definition: TH1.h:78
TH1::Reset
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
Definition: TH1.cxx:6735
TH1::AddBinContent
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:1200
TH1::kIsZoomed
@ kIsZoomed
bit set when zooming on Y axis
Definition: TH1.h:165
TH1
Definition: TH1.h:57
TH1C::Copy
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9011
TH1::GetBuffer
const Double_t * GetBuffer() const
Definition: TH1.h:235
name
char name[80]
Definition: TGX11.cxx:110
TH1D::AddBinContent
virtual void AddBinContent(Int_t bin, Double_t w)
Increment bin content by a weight w.
Definition: TH1.h:628
TH1::CheckAxisLimits
static bool CheckAxisLimits(const TAxis *a1, const TAxis *a2)
Check that the axis limits of the histograms are the same.
Definition: TH1.cxx:1532
TH1::SetDefaultSumw2
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:6329
TH1F::SetBinsLength
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
Definition: TH1.cxx:9571
TH1::fXaxis
TAxis fXaxis
X axis descriptor.
Definition: TH1.h:88
TH1::IsEmpty
Bool_t IsEmpty() const
Check if an histogram is empty (this a protected method used mainly by TH1Merger )
Definition: TH1.cxx:5009
TDirectory
Definition: TDirectory.h:40
TH1D::AddBinContent
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.h:627
operator-
TH1C operator-(const TH1C &h1, const TH1C &h2)
Operator -.
Definition: TH1.cxx:9070
TH1F::TH1F
TH1F()
Constructor.
Definition: TH1.cxx:9473
c2
return c2
Definition: legend2.C:14
TH1::Chi2TestX
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:2008
TH1::DoFillN
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:3403
TH1I::TH1I
TH1I()
Constructor.
Definition: TH1.cxx:9291
TH1::kIsAverage
@ kIsAverage
Bin contents are average (used by Add)
Definition: TH1.h:167
TH1::GetCumulative
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:2544
TH1::SetDefaultBufferSize
static void SetDefaultBufferSize(Int_t buffersize=1000)
Static function to set the default buffer size for automatic histograms.
Definition: TH1.cxx:6319
TH1::kNoStats
@ kNoStats
don't draw stats box
Definition: TH1.h:161
TH1S::operator/
friend TH1S operator/(const TH1S &h1, const TH1S &h2)
Operator /.
Definition: TH1.cxx:9273
TH1::GetBarOffset
virtual Float_t GetBarOffset() const
Definition: TH1.h:252
TH1::GetNbinsY
virtual Int_t GetNbinsY() const
Definition: TH1.h:294
TVectorFfwd.h
TH1::SetCellError
virtual void SetCellError(Int_t binx, Int_t biny, Double_t content)
Definition: TH1.h:432
TCollection
Definition: TCollection.h:63
TH1::kAllAxes
@ kAllAxes
Definition: TH1.h:74
TAttFill
Definition: TAttFill.h:19
TH1::Fit
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:3807
TH1::Merge
virtual Long64_t Merge(TCollection *list)
Definition: TH1.h:338
TArrayS::Reset
void Reset()
Definition: TArrayS.h:53
type
int type
Definition: TGX11.cxx:121
TH1::GetBinXYZ
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:4821
TH1::kConsider
@ kConsider
Override global flag considering the overflows.
Definition: TH1.h:80
TH1::AddDirectoryStatus
static Bool_t AddDirectoryStatus()
Static function: cannot be inlined on Windows/NT.
Definition: TH1.cxx:705
TF1
1-Dim function class
Definition: TF1.h:212
TArrayD
Definition: TArrayD.h:27
TH1::GetSumOfWeights
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
Definition: TH1.cxx:7425
TH1::GetXaxis
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
Definition: TH1.h:317
TH1::fTsumwx
Double_t fTsumwx
Total Sum of weight*X.
Definition: TH1.h:96
TH1::GetMaximum
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:8005
TH1::Integral
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
Definition: TH1.cxx:7449
TH1::AutoP2GetBins
static Int_t AutoP2GetBins(Int_t n)
Auxilliary function to get the next power of 2 integer value larger then n.
Definition: TH1.cxx:1252
TH1::GetDirectory
TDirectory * GetDirectory() const
Definition: TH1.h:275
TH1::SetLabelColor
virtual void SetLabelColor(Color_t color=1, Option_t *axis="X")
Set axis labels color.
Definition: Haxis.cxx:226
TH1::kNormal
@ kNormal
errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
Definition: TH1.h:63
TH1::SetOption
virtual void SetOption(Option_t *option=" ")
Definition: TH1.h:403
Char_t
char Char_t
Definition: RtypesCore.h:33
TH1::SetBarWidth
virtual void SetBarWidth(Float_t width=0.5)
Definition: TH1.h:357
TH1::LabelsInflate
virtual void LabelsInflate(Option_t *axis="X")
Double the number of bins for axis.
Definition: TH1.cxx:5160
TH1::AxisChoice
Int_t AxisChoice(Option_t *axis) const
Choose an axis according to "axis".
Definition: Haxis.cxx:14
TH1::Scale
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
Definition: TH1.cxx:6245
TObject::EStatusBits
EStatusBits
Definition: TObject.h:57
TH1S::Copy
virtual void Copy(TObject &hnew) const
Copy this to newth1.
Definition: TH1.cxx:9192
TAxis::GetNbins
Int_t GetNbins() const
Definition: TAxis.h:121
TH1::SetBarOffset
virtual void SetBarOffset(Float_t offset=0.25)
Definition: TH1.h:356
TVirtualFFT
Definition: TVirtualFFT.h:88
TH1::SetAxisColor
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
TH1::GetEffectiveEntries
virtual Double_t GetEffectiveEntries() const
Number of effective entries of the histogram.
Definition: TH1.cxx:4326
TH1::Paint
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
Definition: TH1.cxx:5836
TList
Definition: TList.h:44
TH1C::operator-
friend TH1C operator-(const TH1C &h1, const TH1C &h2)
Operator -.
Definition: TH1.cxx:9070
TArrayI
Definition: TArrayI.h:27
TH1::GetNbinsX
virtual Int_t GetNbinsX() const
Definition: TH1.h:293
TH1::kAutoBinPTwo
@ kAutoBinPTwo
Use Power(2)-based algorithm for autobinning.
Definition: TH1.h:170
TH1C::operator+
friend TH1C operator+(const TH1C &h1, const TH1C &h2)
Operator +.
Definition: TH1.cxx:9059
int
TH1::SetBinErrorOption
virtual void SetBinErrorOption(EBinErrorOpt type)
Definition: TH1.h:373
TH1::FindNewAxisLimits
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:6088
TH1::Draw
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2997
c1
return c1
Definition: legend1.C:41
TH1::GetCellError
virtual Double_t GetCellError(Int_t binx, Int_t biny) const
Definition: TH1.h:426
TH1I::UpdateBinContent
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:559