Cat
Histo2D.h
Go to the documentation of this file.
1 //$Id: Histo2D.h,v 1.3 2006/03/16 17:08:21 fmachefe Exp $
2 //------------------------------------------------------------------------------
3 //
4 // Package : Histo2D
5 //
6 // Description:
7 //
8 // Author(s) : F. Machefert -
9 // Date : 5 March 2004
10 //
11 //------------------------------------------------------------------------------
12 
13 #ifndef HISTO2D_H_
14 #define HISTO2D_H_
15 
16 // include files
17 #include <string>
18 #include <vector>
19 
20 #include "Object.h"
21 
22 #include "TH2D.h"
23 
24 //-----------------------------------------------------------------------------
25 // Histo2D
26 //-----------------------------------------------------------------------------
27 
28 class Histo2D : public Object {
29 public:
30  Histo2D ( TH2D* histo );
31  ~Histo2D( ){ }
32 
33  // void fill(double x, double y, double value=1.);
34 
35  double minX(){
36  return m_minX;
37  }
38 
39  double maxX(){
40  return m_maxX;
41  }
42 
43  double minY(){
44  return m_minY;
45  }
46 
47  double maxY(){
48  return m_maxY;
49  }
50 
51  double minZ(){
52  return m_minZ;
53  }
54 
55  double maxZ(){
56  return m_maxZ;
57  }
58  /*
59  std::vector< std::vector<double> > bins(){
60  return m_bins;
61  }
62 
63  std::vector< std::vector<double> > xbins(){
64  return m_xcenters;
65  }
66 
67  std::vector< std::vector<double> > ybins(){
68  return m_ycenters;
69  }
70  */
71 
72  std::vector<double> bins(){
73  return m_bins;
74  }
75 
76  std::vector<double> xbins(){
77  return m_xcenters;
78  }
79 
80  std::vector<double> ybins(){
81  return m_ycenters;
82  }
83 
84  unsigned long nxbins(){
85  return m_nxbins;
86  }
87 
88  unsigned long nybins(){
89  return m_nybins;
90  }
91 
92  /*
93  double bin(double x);
94 
95  double overflow(){
96  return m_overflow;
97  }
98  double underflow(){
99  return m_underflow;
100  }
101  */
102 
103  void statistics(double &, double& , double &);
104 
105 private:
106  double m_zero;
107  double m_infini;
108 
109  unsigned long m_nxbins;
110  unsigned long m_nybins;
111 
112  /*
113  std::vector< std::vector<double> > m_bins;
114  std::vector< std::vector<double> > m_xcenters;
115  std::vector< std::vector<double> > m_ycenters;
116  */
117 
118  std::vector<double> m_bins;
119  std::vector<double> m_xcenters;
120  std::vector<double> m_ycenters;
121 
122  double m_minX;
123  double m_maxX;
124  double m_minY;
125  double m_maxY;
126  double m_minZ;
127  double m_maxZ;
128 
129  double m_overflow;
130  double m_underflow;
131 
132  double m_content;
133  double m_mean;
134  double m_rms;
135 };
136 
137 #endif
138 
Definition: Object.h:21
std::vector< double > ybins()
Definition: Histo2D.h:80
double m_zero
Definition: Histo2D.h:106
unsigned long m_nybins
Definition: Histo2D.h:110
std::vector< double > m_xcenters
Definition: Histo2D.h:119
double m_maxZ
Definition: Histo2D.h:127
double m_content
Definition: Histo2D.h:132
std::vector< double > m_ycenters
Definition: Histo2D.h:120
unsigned long m_nxbins
Definition: Histo2D.h:109
Histo2D(TH2D *histo)
Definition: Histo2D.cpp:22
double maxY()
Definition: Histo2D.h:47
double m_minZ
Definition: Histo2D.h:126
double m_maxX
Definition: Histo2D.h:123
double m_mean
Definition: Histo2D.h:133
double maxZ()
Definition: Histo2D.h:55
double m_underflow
Definition: Histo2D.h:130
unsigned long nybins()
Definition: Histo2D.h:88
double m_rms
Definition: Histo2D.h:134
double m_minY
Definition: Histo2D.h:124
void statistics(double &, double &, double &)
Definition: Histo2D.cpp:77
double m_infini
Definition: Histo2D.h:107
double m_maxY
Definition: Histo2D.h:125
~Histo2D()
Definition: Histo2D.h:31
std::vector< double > xbins()
Definition: Histo2D.h:76
double maxX()
Definition: Histo2D.h:39
double m_overflow
Definition: Histo2D.h:129
double m_minX
Definition: Histo2D.h:122
std::vector< double > bins()
Definition: Histo2D.h:72
unsigned long nxbins()
Definition: Histo2D.h:84
double minY()
Definition: Histo2D.h:43
double minZ()
Definition: Histo2D.h:51
std::vector< double > m_bins
Definition: Histo2D.h:118
double minX()
Definition: Histo2D.h:35