star-travex
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Profile3D.h
Go to the documentation of this file.
1 #ifndef Profile3D_h
2 #define Profile3D_h
3 
4 #include <string>
5 
6 #include "TProfile3D.h"
7 #include "TAxis.h"
8 #include "StiRootIO/H3D.h"
9 #include "StiRootIO/Profile2D.h"
10 
11 
12 class Profile3D : public TProfile3D
13 {
14 public:
15 
16  Profile3D();
17  Profile3D(std::string name, std::string title, Int_t nbinsx, Double_t xlow, Double_t xup,
18  Int_t nbinsy, Double_t ylow, Double_t yup, Int_t nbinsz, Double_t zlow, Double_t zup,
19  std::string options="");
20 
21  void ResetBinCumulMode();
22  Int_t FillAsCumulative(Double_t x, Double_t y, Double_t z, Double_t t);
23  virtual Profile2D *DoProjectProfile2D(const char* name, const char * title, const TAxis* projX, const TAxis* projY,
24  bool originalRange, bool useUF, bool useOF) const;
25  Profile2D *Project3DProfile(Option_t *option) const;
26  virtual Double_t RetrieveBinContent(Int_t bin) const { return (fBinEntries.fArray[bin] > 0) ? fArray[bin]/fBinEntries.fArray[bin] : 0; }
27  virtual void Print(Option_t *option) const;
28  TH3D *ProjectionXYZ(const char *name, Option_t *option) const;
29 
30  static TH2D *DoProject2D(const H3D & h, const char* name, const char * title, TAxis* projX, TAxis* projY,
31  bool computeErrors, bool originalRange, bool useUF, bool useOF)
32  {
33  return h.DoProject2D(name, title, projX,projY, computeErrors, originalRange, useUF, useOF);
34  }
35 
36 protected:
37 
38  TArrayC fBinCumulMode;
39 
40  ClassDef(Profile3D, 1)
41 };
42 
43 #endif
Int_t FillAsCumulative(Double_t x, Double_t y, Double_t z, Double_t t)
Definition: Profile3D.cxx:43
Definition: H3D.h:7
Profile2D * Project3DProfile(Option_t *option) const
Definition: Profile3D.cxx:185
TH2D * DoProject2D(const char *name, const char *title, TAxis *projX, TAxis *projY, bool computeErrors=false, bool originalRange=false, bool useUF=false, bool useOF=false) const
static TH2D * DoProject2D(const H3D &h, const char *name, const char *title, TAxis *projX, TAxis *projY, bool computeErrors, bool originalRange, bool useUF, bool useOF)
Definition: Profile3D.h:30
TArrayC fBinCumulMode
Definition: Profile3D.h:38
TH3D * ProjectionXYZ(const char *name, Option_t *option) const
Definition: Profile3D.cxx:400
virtual void Print(Option_t *option) const
Definition: Profile3D.cxx:315
void ResetBinCumulMode()
Definition: Profile3D.cxx:36
virtual Double_t RetrieveBinContent(Int_t bin) const
Definition: Profile3D.h:26
virtual Profile2D * DoProjectProfile2D(const char *name, const char *title, const TAxis *projX, const TAxis *projY, bool originalRange, bool useUF, bool useOF) const
Definition: Profile3D.cxx:96