Logo ROOT   6.07/09
Reference Guide
TH3.h
Go to the documentation of this file.
1 // @(#)root/hist:$Id$
2 // Author: Rene Brun 27/10/95
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_TH3
13 #define ROOT_TH3
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TH3 //
19 // //
20 // 3-Dim histogram base class. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TH1
25 #include "TH1.h"
26 #endif
27 
28 #ifndef ROOT_TAtt3D
29 #include "TAtt3D.h"
30 #endif
31 
32 class TH2D;
33 class TProfile2D;
34 
35 class TH3 : public TH1, public TAtt3D {
36 
37 protected:
38  Double_t fTsumwy; //Total Sum of weight*Y
39  Double_t fTsumwy2; //Total Sum of weight*Y*Y
40  Double_t fTsumwxy; //Total Sum of weight*X*Y
41  Double_t fTsumwz; //Total Sum of weight*Z
42  Double_t fTsumwz2; //Total Sum of weight*Z*Z
43  Double_t fTsumwxz; //Total Sum of weight*X*Z
44  Double_t fTsumwyz; //Total Sum of weight*Y*Z
45 
46  TH3();
47  TH3(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup
48  ,Int_t nbinsy,Double_t ylow,Double_t yup
49  ,Int_t nbinsz,Double_t zlow,Double_t zup);
50  TH3(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins
51  ,Int_t nbinsy,const Float_t *ybins
52  ,Int_t nbinsz,const Float_t *zbins);
53  TH3(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins
54  ,Int_t nbinsy,const Double_t *ybins
55  ,Int_t nbinsz,const Double_t *zbins);
57 
58  void DoFillProfileProjection(TProfile2D * p2, const TAxis & a1, const TAxis & a2, const TAxis & a3, Int_t bin1, Int_t bin2, Int_t bin3, Int_t inBin, Bool_t useWeights) const;
59 
60  virtual Int_t BufferFill(Double_t, Double_t) {return -2;} //may not use
61  virtual Int_t BufferFill(Double_t, Double_t, Double_t) {return -2;} //may not use
62  Int_t Fill(Double_t); //MayNotUse
63  Int_t Fill(Double_t,Double_t) {return Fill(0.);} //MayNotUse
64  Int_t Fill(const char*, Double_t) {return Fill(0);} //MayNotUse
65  Int_t Fill(Double_t,const char*,Double_t) {return Fill(0);} //MayNotUse
66  Int_t Fill(const char*,Double_t,Double_t) {return Fill(0);} //MayNotUse
67  Int_t Fill(const char*,const char*,Double_t) {return Fill(0);} //MayNotUse
68 
69 private:
70 
71  TH3(const TH3&);
72  TH3& operator=(const TH3&); // Not implemented
73 
74 public:
75  virtual ~TH3();
76  virtual Int_t BufferEmpty(Int_t action=0);
77  virtual void Copy(TObject &hnew) const;
78  virtual Int_t Fill(Double_t x, Double_t y, Double_t z);
79  virtual Int_t Fill(Double_t x, Double_t y, Double_t z, Double_t w);
80 
81  virtual Int_t Fill(const char *namex, const char *namey, const char *namez, Double_t w);
82  virtual Int_t Fill(const char *namex, Double_t y, const char *namez, Double_t w);
83  virtual Int_t Fill(const char *namex, const char *namey, Double_t z, Double_t w);
84  virtual Int_t Fill(Double_t x, const char *namey, const char *namez, Double_t w);
85  virtual Int_t Fill(Double_t x, const char *namey, Double_t z, Double_t w);
86  virtual Int_t Fill(Double_t x, Double_t y, const char *namez, Double_t w);
87 
88  virtual void FillRandom(const char *fname, Int_t ntimes=5000);
89  virtual void FillRandom(TH1 *h, Int_t ntimes=5000);
90  virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1) const;
91  virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1) const;
92  virtual void FitSlicesZ(TF1 *f1=0,Int_t binminx=1, Int_t binmaxx=0,Int_t binminy=1, Int_t binmaxy=0,
93  Int_t cut=0 ,Option_t *option="QNR"); // *MENU*
94  virtual Int_t GetBin(Int_t binx, Int_t biny, Int_t binz) const;
95  virtual Double_t GetBinContent(Int_t bin) const { return TH1::GetBinContent(bin); }
96  virtual Double_t GetBinContent(Int_t bin, Int_t) const { return TH1::GetBinContent(bin); }
97  virtual Double_t GetBinContent(Int_t binx, Int_t biny, Int_t binz) const { return TH1::GetBinContent( GetBin(binx, biny, binz) ); }
98  using TH1::GetBinErrorLow;
99  using TH1::GetBinErrorUp;
100  virtual Double_t GetBinErrorLow(Int_t binx, Int_t biny, Int_t binz) { return TH1::GetBinErrorLow( GetBin(binx, biny, binz) ); }
101  virtual Double_t GetBinErrorUp(Int_t binx, Int_t biny, Int_t binz) { return TH1::GetBinErrorUp( GetBin(binx, biny, binz) ); }
102  virtual Double_t GetBinWithContent3(Double_t c, Int_t &binx, Int_t &biny, Int_t &binz, Int_t firstx=0, Int_t lastx=0,Int_t firsty=0, Int_t lasty=0, Int_t firstz=0, Int_t lastz=0, Double_t maxdiff=0) const;
103  virtual Double_t GetCorrelationFactor(Int_t axis1=1,Int_t axis2=2) const;
104  virtual Double_t GetCovariance(Int_t axis1=1,Int_t axis2=2) const;
105  virtual void GetRandom3(Double_t &x, Double_t &y, Double_t &z);
106  virtual void GetStats(Double_t *stats) const;
107  virtual Double_t Integral(Option_t *option="") const;
108  using TH1::Integral;
109  virtual Double_t Integral(Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Int_t binz1, Int_t binz2, Option_t *option="") const;
110  using TH1::IntegralAndError;
111  virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Int_t binz1, Int_t binz2, Double_t & err, Option_t *option="") const;
112  virtual Double_t Interpolate(Double_t x);
113  virtual Double_t Interpolate(Double_t x, Double_t y);
114  virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z);
115  virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const;
116  virtual TH1D *ProjectionX(const char *name="_px", Int_t iymin=0, Int_t iymax=-1, Int_t izmin=0,
117  Int_t izmax=-1, Option_t *option="") const; // *MENU*
118  virtual TH1D *ProjectionY(const char *name="_py", Int_t ixmin=0, Int_t ixmax=-1, Int_t izmin=0,
119  Int_t izmax=-1, Option_t *option="") const; // *MENU*
120  virtual TH1D *ProjectionZ(const char *name="_pz", Int_t ixmin=0, Int_t ixmax=-1, Int_t iymin=0,
121  Int_t iymax=-1, Option_t *option="") const; // *MENU*
122  virtual TH1 *Project3D(Option_t *option="x") const; // *MENU*
123  virtual TProfile2D *Project3DProfile(Option_t *option="xy") const; // *MENU*
124  virtual void PutStats(Double_t *stats);
125  virtual TH3 *RebinX(Int_t ngroup = 2, const char *newname = "");
126  virtual TH3 *RebinY(Int_t ngroup = 2, const char *newname = "");
127  virtual TH3 *RebinZ(Int_t ngroup = 2, const char *newname = "");
128  virtual TH3 *Rebin3D(Int_t nxgroup = 2, Int_t nygroup = 2, Int_t nzgroup = 2, const char *newname = "");
129  virtual void Reset(Option_t *option="");
130  virtual void SetBinContent(Int_t bin, Double_t content);
131  virtual void SetBinContent(Int_t bin, Int_t, Double_t content) { SetBinContent(bin, content); }
132  virtual void SetBinContent(Int_t binx, Int_t biny, Int_t binz, Double_t content) { SetBinContent(GetBin(binx, biny, binz), content); }
133  virtual void SetShowProjection(const char *option="xy",Int_t nbins=1); // *MENU*
134 
135 protected:
136 
137  virtual TH1D *DoProject1D(const char* name, const char * title, int imin1, int imax1, int imin2, int imax2,
138  const TAxis* projAxis, const TAxis * axis1, const TAxis * axis2, Option_t * option) const;
139  virtual TH1D *DoProject1D(const char* name, const char * title, const TAxis* projAxis,
140  bool computeErrors, bool originalRange, bool useUF, bool useOF) const;
141  virtual TH2D *DoProject2D(const char* name, const char * title, const TAxis* projX, const TAxis* projY,
142  bool computeErrors, bool originalRange,
143  bool useUF, bool useOF) const;
144  virtual TProfile2D *DoProjectProfile2D(const char* name, const char * title, const TAxis* projX, const TAxis* projY,
145  bool originalRange, bool useUF, bool useOF) const;
146 
147  // these functions are need to be used inside TProfile3D::DoProjectProfile2D
148  static TH1D *DoProject1D(const TH3 & h, const char* name, const char * title, const TAxis* projX,
149  bool computeErrors, bool originalRange, bool useUF, bool useOF) {
150  return h.DoProject1D(name, title, projX, computeErrors, originalRange, useUF, useOF);
151  }
152  static TH2D *DoProject2D(const TH3 & h, const char* name, const char * title, const TAxis* projX, const TAxis* projY,
153  bool computeErrors, bool originalRange, bool useUF, bool useOF) {
154  return h.DoProject2D(name, title, projX,projY, computeErrors, originalRange, useUF, useOF);
155  }
156 
157  ClassDef(TH3,5) //3-Dim histogram base class
158 };
159 
160 //________________________________________________________________________
161 
162 class TH3C : public TH3, public TArrayC {
163 public:
164  TH3C();
165  TH3C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup
166  ,Int_t nbinsy,Double_t ylow,Double_t yup
167  ,Int_t nbinsz,Double_t zlow,Double_t zup);
168  TH3C(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins
169  ,Int_t nbinsy,const Float_t *ybins
170  ,Int_t nbinsz,const Float_t *zbins);
171  TH3C(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins
172  ,Int_t nbinsy,const Double_t *ybins
173  ,Int_t nbinsz,const Double_t *zbins);
174  TH3C(const TH3C &h3c);
175  virtual ~TH3C();
176  virtual void AddBinContent(Int_t bin);
177  virtual void AddBinContent(Int_t bin, Double_t w);
178  virtual void Copy(TObject &hnew) const;
179  virtual void Reset(Option_t *option="");
180  virtual void SetBinsLength(Int_t n=-1);
181  TH3C& operator=(const TH3C &h1);
182  friend TH3C operator*(Float_t c1, TH3C &h1);
183  friend TH3C operator*(TH3C &h1, Float_t c1) {return operator*(c1,h1);}
184  friend TH3C operator+(TH3C &h1, TH3C &h2);
185  friend TH3C operator-(TH3C &h1, TH3C &h2);
186  friend TH3C operator*(TH3C &h1, TH3C &h2);
187  friend TH3C operator/(TH3C &h1, TH3C &h2);
188 
189 protected:
190  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
191  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Char_t (content); }
192 
193  ClassDef(TH3C,3) //3-Dim histograms (one char per channel)
194 };
195 
196 //________________________________________________________________________
197 
198 class TH3S : public TH3, public TArrayS {
199 public:
200  TH3S();
201  TH3S(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup
202  ,Int_t nbinsy,Double_t ylow,Double_t yup
203  ,Int_t nbinsz,Double_t zlow,Double_t zup);
204  TH3S(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins
205  ,Int_t nbinsy,const Float_t *ybins
206  ,Int_t nbinsz,const Float_t *zbins);
207  TH3S(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins
208  ,Int_t nbinsy,const Double_t *ybins
209  ,Int_t nbinsz,const Double_t *zbins);
210  TH3S(const TH3S &h3s);
211  virtual ~TH3S();
212  virtual void AddBinContent(Int_t bin);
213  virtual void AddBinContent(Int_t bin, Double_t w);
214  virtual void Copy(TObject &hnew) const;
215  virtual void Reset(Option_t *option="");
216  virtual void SetBinsLength(Int_t n=-1);
217  TH3S& operator=(const TH3S &h1);
218  friend TH3S operator*(Float_t c1, TH3S &h1);
219  friend TH3S operator*(TH3S &h1, Float_t c1) {return operator*(c1,h1);}
220  friend TH3S operator+(TH3S &h1, TH3S &h2);
221  friend TH3S operator-(TH3S &h1, TH3S &h2);
222  friend TH3S operator*(TH3S &h1, TH3S &h2);
223  friend TH3S operator/(TH3S &h1, TH3S &h2);
224 
225 protected:
226  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
227  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Short_t (content); }
228 
229  ClassDef(TH3S,3) //3-Dim histograms (one short per channel)
230 };
231 
232 //________________________________________________________________________
233 
234 class TH3I : public TH3, public TArrayI {
235 public:
236  TH3I();
237  TH3I(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup
238  ,Int_t nbinsy,Double_t ylow,Double_t yup
239  ,Int_t nbinsz,Double_t zlow,Double_t zup);
240  TH3I(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins
241  ,Int_t nbinsy,const Float_t *ybins
242  ,Int_t nbinsz,const Float_t *zbins);
243  TH3I(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins
244  ,Int_t nbinsy,const Double_t *ybins
245  ,Int_t nbinsz,const Double_t *zbins);
246  TH3I(const TH3I &h3i);
247  virtual ~TH3I();
248  virtual void AddBinContent(Int_t bin);
249  virtual void AddBinContent(Int_t bin, Double_t w);
250  virtual void Copy(TObject &hnew) const;
251  virtual void Reset(Option_t *option="");
252  virtual void SetBinsLength(Int_t n=-1);
253  TH3I& operator=(const TH3I &h1);
254  friend TH3I operator*(Float_t c1, TH3I &h1);
255  friend TH3I operator*(TH3I &h1, Float_t c1) {return operator*(c1,h1);}
256  friend TH3I operator+(TH3I &h1, TH3I &h2);
257  friend TH3I operator-(TH3I &h1, TH3I &h2);
258  friend TH3I operator*(TH3I &h1, TH3I &h2);
259  friend TH3I operator/(TH3I &h1, TH3I &h2);
260 
261 protected:
262  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
263  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Int_t (content); }
264 
265  ClassDef(TH3I,3) //3-Dim histograms (one 32 bits integer per channel)
266 };
267 
268 
269 //________________________________________________________________________
270 
271 class TH3F : public TH3, public TArrayF {
272 public:
273  TH3F();
274  TH3F(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup
275  ,Int_t nbinsy,Double_t ylow,Double_t yup
276  ,Int_t nbinsz,Double_t zlow,Double_t zup);
277  TH3F(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins
278  ,Int_t nbinsy,const Float_t *ybins
279  ,Int_t nbinsz,const Float_t *zbins);
280  TH3F(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins
281  ,Int_t nbinsy,const Double_t *ybins
282  ,Int_t nbinsz,const Double_t *zbins);
283  TH3F(const TH3F &h3f);
284  virtual ~TH3F();
285  virtual void AddBinContent(Int_t bin) {++fArray[bin];}
286  virtual void AddBinContent(Int_t bin, Double_t w)
287  {fArray[bin] += Float_t (w);}
288  virtual void Copy(TObject &hnew) const;
289  virtual void Reset(Option_t *option="");
290  virtual void SetBinsLength(Int_t n=-1);
291  TH3F& operator=(const TH3F &h1);
292  friend TH3F operator*(Float_t c1, TH3F &h1);
293  friend TH3F operator*(TH3F &h1, Float_t c1) {return operator*(c1,h1);}
294  friend TH3F operator+(TH3F &h1, TH3F &h2);
295  friend TH3F operator-(TH3F &h1, TH3F &h2);
296  friend TH3F operator*(TH3F &h1, TH3F &h2);
297  friend TH3F operator/(TH3F &h1, TH3F &h2);
298 
299 protected:
300  virtual Double_t RetrieveBinContent(Int_t bin) const { return Double_t (fArray[bin]); }
301  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = Float_t (content); }
302 
303  ClassDef(TH3F,3) //3-Dim histograms (one float per channel)
304 };
305 
306 //________________________________________________________________________
307 
308 class TH3D : public TH3, public TArrayD {
309 public:
310  TH3D();
311  TH3D(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup
312  ,Int_t nbinsy,Double_t ylow,Double_t yup
313  ,Int_t nbinsz,Double_t zlow,Double_t zup);
314  TH3D(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins
315  ,Int_t nbinsy,const Float_t *ybins
316  ,Int_t nbinsz,const Float_t *zbins);
317  TH3D(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins
318  ,Int_t nbinsy,const Double_t *ybins
319  ,Int_t nbinsz,const Double_t *zbins);
320  TH3D(const TH3D &h3d);
321  virtual ~TH3D();
322  virtual void AddBinContent(Int_t bin) {++fArray[bin];}
323  virtual void AddBinContent(Int_t bin, Double_t w)
324  {fArray[bin] += Double_t (w);}
325  virtual void Copy(TObject &hnew) const;
326  virtual void Reset(Option_t *option="");
327  virtual void SetBinsLength(Int_t n=-1);
328  TH3D& operator=(const TH3D &h1);
329  friend TH3D operator*(Float_t c1, TH3D &h1);
330  friend TH3D operator*(TH3D &h1, Float_t c1) {return operator*(c1,h1);}
331  friend TH3D operator+(TH3D &h1, TH3D &h2);
332  friend TH3D operator-(TH3D &h1, TH3D &h2);
333  friend TH3D operator*(TH3D &h1, TH3D &h2);
334  friend TH3D operator/(TH3D &h1, TH3D &h2);
335 
336 protected:
337  virtual Double_t RetrieveBinContent(Int_t bin) const { return fArray[bin]; }
338  virtual void UpdateBinContent(Int_t bin, Double_t content) { fArray[bin] = content; }
339 
340  ClassDef(TH3D,3) //3-Dim histograms (one double per channel)
341 };
342 
343 #endif
344 
virtual Int_t BufferFill(Double_t, Double_t)
accumulate arguments in buffer.
Definition: TH3.h:60
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
Definition: TH1.cxx:8146
TH3()
Default constructor.
Definition: TH3.cxx:63
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH1.cxx:4640
virtual TH3 * RebinX(Int_t ngroup=2, const char *newname="")
Rebin only the X axis see Rebin3D.
Definition: TH3.cxx:2667
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH3.h:322
float Float_t
Definition: RtypesCore.h:53
virtual void FillRandom(const char *fname, Int_t ntimes=5000)
Fill histogram following distribution in function fname.
Definition: TH3.cxx:658
tomato 3-D histogram with a float per channel (see TH1 documentation)}
Definition: TH3.h:271
return c
const char Option_t
Definition: RtypesCore.h:62
return c1
Definition: legend1.C:41
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content.
Definition: TH3.cxx:3229
virtual TH3 * Rebin3D(Int_t nxgroup=2, Int_t nygroup=2, Int_t nzgroup=2, const char *newname="")
Rebin this histogram grouping nxgroup/nygroup/nzgroup bins along the xaxis/yaxis/zaxis together...
Definition: TH3.cxx:2718
friend TH3F operator*(TH3F &h1, Float_t c1)
Definition: TH3.h:293
TH1 * h
Definition: legend2.C:5
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: TH3.cxx:1356
virtual Double_t GetBinErrorLow(Int_t binx, Int_t biny, Int_t binz)
Definition: TH3.h:100
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:21
static TH2D * DoProject2D(const TH3 &h, const char *name, const char *title, const TAxis *projX, const TAxis *projY, bool computeErrors, bool originalRange, bool useUF, bool useOF)
Definition: TH3.h:152
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: TH3.h:300
Double_t fTsumwy
Definition: TH3.h:38
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH3.h:285
Array of floats (32 bits per element).
Definition: TArrayF.h:29
TTime operator/(const TTime &t1, const TTime &t2)
Definition: TTime.h:89
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Double_t fTsumwz
Definition: TH3.h:41
int nbins[3]
virtual void Copy(TObject &hnew) const
Copy.
Definition: TH3.cxx:156
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: TH3.h:190
virtual TProfile2D * Project3DProfile(Option_t *option="xy") const
Project a 3-d histogram into a 2-d profile histograms depending on the option parameter option may co...
Definition: TH3.cxx:2567
Double_t fTsumwyz
Definition: TH3.h:44
virtual Double_t GetBinWithContent3(Double_t c, Int_t &binx, Int_t &biny, Int_t &binz, Int_t firstx=0, Int_t lastx=0, Int_t firsty=0, Int_t lasty=0, Int_t firstz=0, Int_t lastz=0, Double_t maxdiff=0) const
Compute first cell (binx,biny,binz) in the range [firstx,lastx](firsty,lasty][firstz,lastz] for which diff = abs(cell_content-c) <= maxdiff In case several cells in the specified range with diff=0 are found the first cell found is returned in binx,biny,binz.
Definition: TH3.cxx:984
static TH1D * DoProject1D(const TH3 &h, const char *name, const char *title, const TAxis *projX, bool computeErrors, bool originalRange, bool useUF, bool useOF)
Definition: TH3.h:148
virtual Int_t BufferFill(Double_t x, Double_t y, Double_t z, Double_t w)
accumulate arguments in buffer.
Definition: TH3.cxx:251
virtual TH1 * Project3D(Option_t *option="x") const
Project a 3-d histogram into 1 or 2-d histograms depending on the option parameter option may contain...
Definition: TH3.cxx:2202
Array of integers (32 bits per element).
Definition: TArrayI.h:29
Double_t x[n]
Definition: legend1.C:17
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
Definition: TH1.cxx:8177
#define ClassDef(name, id)
Definition: Rtypes.h:254
Double_t fTsumwxz
Definition: TH3.h:43
Int_t Fill(const char *, const char *, Double_t)
Definition: TH3.h:67
Int_t Fill(Double_t, const char *, Double_t)
Definition: TH3.h:65
virtual TH3 * RebinY(Int_t ngroup=2, const char *newname="")
Rebin only the Y axis see Rebin3D.
Definition: TH3.cxx:2677
Int_t Fill(const char *, Double_t)
Increment bin with namex with a weight w.
Definition: TH3.h:64
TTime operator-(const TTime &t1, const TTime &t2)
Definition: TTime.h:85
static double p2(double t, double a, double b, double c)
virtual TH1D * ProjectionY(const char *name="_py", Int_t ixmin=0, Int_t ixmax=-1, Int_t izmin=0, Int_t izmax=-1, Option_t *option="") const
Project a 3-D histogram into a 1-D histogram along Y.
Definition: TH3.cxx:1603
TH1F * h1
Definition: legend1.C:5
TString operator+(const TString &s1, const TString &s2)
Use the special concatenation constructor.
Definition: TString.cxx:1438
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
Definition: TH1.cxx:1195
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: TH3.h:227
The 3-D histogram classes derived from the 1-D histogram classes.
Definition: TH3.h:35
tomato 3-D histogram with an int per channel (see TH1 documentation)}
Definition: TH3.h:234
virtual TProfile2D * DoProjectProfile2D(const char *name, const char *title, const TAxis *projX, const TAxis *projY, bool originalRange, bool useUF, bool useOF) const
internal method to project to a 2D Profile called from TH3::Project3DProfile
Definition: TH3.cxx:2360
virtual Double_t GetCorrelationFactor(Int_t axis1=1, Int_t axis2=2) const
Return correlation factor between axis1 and axis2.
Definition: TH3.cxx:1024
virtual Double_t GetBinErrorUp(Int_t binx, Int_t biny, Int_t binz)
Definition: TH3.h:101
tomato 3-D histogram with a short per channel (see TH1 documentation)
Definition: TH3.h:198
THist< 3, double, THistStatContent, THistStatUncertainty > TH3D
Definition: THist.hxx:313
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: TH3.h:262
virtual TH1D * DoProject1D(const char *name, const char *title, int imin1, int imax1, int imin2, int imax2, const TAxis *projAxis, const TAxis *axis1, const TAxis *axis2, Option_t *option) const
internal methdod performing the projection to 1D histogram called from TH3::Project3D ...
Definition: TH3.cxx:1650
THist< 3, char, THistStatContent > TH3C
Definition: THist.hxx:315
virtual TH1D * ProjectionX(const char *name="_px", Int_t iymin=0, Int_t iymax=-1, Int_t izmin=0, Int_t izmax=-1, Option_t *option="") const
Project a 3-D histogram into a 1-D histogram along X.
Definition: TH3.cxx:1571
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
Definition: TH1.cxx:7081
Class to manage histogram axis.
Definition: TAxis.h:36
tomato 3-D histogram with a double per channel (see TH1 documentation)}
Definition: TH3.h:308
Array of shorts (16 bits per element).
Definition: TArrayS.h:29
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
Definition: TH3.cxx:1213
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: TH3.h:191
virtual Double_t GetCovariance(Int_t axis1=1, Int_t axis2=2) const
Return covariance between axis1 and axis2.
Definition: TH3.cxx:1042
virtual void FitSlicesZ(TF1 *f1=0, Int_t binminx=1, Int_t binmaxx=0, Int_t binminy=1, Int_t binmaxy=0, Int_t cut=0, Option_t *option="QNR")
Project slices along Z in case of a 3-D histogram, then fit each slice with function f1 and make a 2-...
Definition: TH3.cxx:864
TTime operator*(const TTime &t1, const TTime &t2)
Definition: TTime.h:87
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:7108
Double_t fTsumwy2
Definition: TH3.h:39
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: TH3.h:338
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
Definition: TH3.cxx:2650
short Short_t
Definition: RtypesCore.h:35
virtual void SetShowProjection(const char *option="xy", Int_t nbins=1)
When the mouse is moved in a pad containing a 3-d view of this histogram a second canvas shows a proj...
Definition: TH3.cxx:3413
friend TH3D operator*(TH3D &h1, Float_t c1)
Definition: TH3.h:330
Int_t Fill(Double_t)
Invalid Fill method.
Definition: TH3.cxx:280
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition: TH3.h:95
tomato 1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:618
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: TH3.h:301
virtual void AddBinContent(Int_t bin, Double_t w)
Increment bin content by a weight w.
Definition: TH3.h:286
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
Definition: TH3.cxx:3210
virtual Int_t GetBin(Int_t binx, Int_t biny, Int_t binz) const
See comments in TH1::GetBin.
Definition: TH3.cxx:950
virtual void AddBinContent(Int_t bin, Double_t w)
Increment bin content by a weight w.
Definition: TH3.h:323
void DoFillProfileProjection(TProfile2D *p2, const TAxis &a1, const TAxis &a2, const TAxis &a3, Int_t bin1, Int_t bin2, Int_t bin3, Int_t inBin, Bool_t useWeights) const
internal function to fill the bins of the projected profile 2D histogram called from DoProjectProfile...
Definition: TH3.cxx:2334
TH3 & operator=(const TH3 &)
Double_t fTsumwz2
Definition: TH3.h:42
THist< 3, int, THistStatContent > TH3I
Definition: THist.hxx:316
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: TH3.cxx:750
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: TH3.h:263
double Double_t
Definition: RtypesCore.h:55
virtual Int_t BufferEmpty(Int_t action=0)
Fill histogram with all entries in the buffer.
Definition: TH3.cxx:177
virtual Double_t GetBinContent(Int_t bin, Int_t) const
Definition: TH3.h:96
virtual TH2D * DoProject2D(const char *name, const char *title, const TAxis *projX, const TAxis *projY, bool computeErrors, bool originalRange, bool useUF, bool useOF) const
internal method performing the projection to a 2D histogram called from TH3::Project3D ...
Definition: TH3.cxx:1899
Double_t y[n]
Definition: legend1.C:17
The TH1 histogram class.
Definition: TH1.h:80
tomato 3-D histogram with a byte per channel (see TH1 documentation)
Definition: TH3.h:162
virtual TH1D * ProjectionZ(const char *name="_pz", Int_t ixmin=0, Int_t ixmax=-1, Int_t iymin=0, Int_t iymax=-1, Option_t *option="") const
Project a 3-D histogram into a 1-D histogram along Z.
Definition: TH3.cxx:1634
Profile2D histograms are used to display the mean value of Z and its RMS for each cell in X...
Definition: TProfile2D.h:31
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: TH3.h:337
virtual Double_t GetBinContent(Int_t binx, Int_t biny, Int_t binz) const
Definition: TH3.h:97
Array of doubles (64 bits per element).
Definition: TArrayD.h:29
THist< 3, float, THistStatContent, THistStatUncertainty > TH3F
Definition: THist.hxx:314
Mother of all ROOT objects.
Definition: TObject.h:44
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
char Char_t
Definition: RtypesCore.h:29
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: TH3.cxx:793
Double_t fTsumwxy
Definition: TH3.h:40
virtual void GetStats(Double_t *stats) const
Fill the array stats from the contents of this histogram The array stats must be correctly dimensionn...
Definition: TH3.cxx:1136
virtual TH3 * RebinZ(Int_t ngroup=2, const char *newname="")
Rebin only the Z axis see Rebin3D.
Definition: TH3.cxx:2687
virtual void GetRandom3(Double_t &x, Double_t &y, Double_t &z)
Return 3 random numbers along axis x , y and z distributed according the cellcontents of a 3-dim hist...
Definition: TH3.cxx:1089
Int_t Fill(const char *, Double_t, Double_t)
Definition: TH3.h:66
virtual void SetBinContent(Int_t binx, Int_t biny, Int_t binz, Double_t content)
Definition: TH3.h:132
friend TH3C operator*(TH3C &h1, Float_t c1)
Definition: TH3.h:183
1-Dim function class
Definition: TF1.h:149
virtual void SetBinsLength(Int_t=-1)
Definition: TH1.h:377
virtual void SetBinContent(Int_t bin, Int_t, Double_t content)
Definition: TH3.h:131
TF1 * f1
Definition: legend1.C:11
friend TH3I operator*(TH3I &h1, Float_t c1)
Definition: TH3.h:255
virtual Int_t BufferFill(Double_t, Double_t, Double_t)
Definition: TH3.h:61
virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Int_t binz1, Int_t binz2, Double_t &err, Option_t *option="") const
Return integral of bin contents in range [binx1,binx2],[biny1,biny2],[binz1,binz2] for a 3-D histogra...
Definition: TH3.cxx:1244
virtual ~TH3()
Destructor.
Definition: TH3.cxx:148
virtual Double_t Interpolate(Double_t x)
Not yet implemented.
Definition: TH3.cxx:1255
Int_t Fill(Double_t, Double_t)
Increment bin with abscissa X with a weight w.
Definition: TH3.h:63
const Int_t n
Definition: legend1.C:16
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: TH3.h:226
char name[80]
Definition: TGX11.cxx:109
friend TH3S operator*(TH3S &h1, Float_t c1)
Definition: TH3.h:219
tomato 2-D histogram with a double per channel (see TH1 documentation)}
Definition: TH2.h:296
Array of chars or bytes (8 bits per element).
Definition: TArrayC.h:29