CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ClusterizingHistogram.h
Go to the documentation of this file.
1 #ifndef _CLUSTERIZINGHISTOGRAM_TT_H_
2 #define _CLUSTERIZINGHISTOGRAM_TT_H_
3 
4 #include <vector>
5 #include <cmath>
6 
14 public:
15  ClusterizingHistogram(int nb, float xmi, float xma);
17 
18  void fill( float x);
19  int nbins() const {return my_nbins;}
20  float min_x() const {return xmin;}
21  float max_x() const {return xmax;}
22  int entries() const {return my_entries;}
23  int underflows() const {return my_underflows;}
24  int overflows() const {return my_overflows;}
25  float bin_pos(int i) const {
26  return (bin_entries[i]!=0) ? bin_means[i]/bin_entries[i] : 0;}
27  void dump() const;
28  void dump(int i1, int i2) const;
29  void dump(float x1, float x2) const;
30  void dump(double x1, double x2) const;
31  void dump(float x1, double x2) const;
32  void dump(double x1, float x2) const;
33  void reset();
34  int bin( float x) const;
35  int bin( double x) const;
36 
37  std::vector<float> clusterize( float resolution);
38 
39 private:
40  ClusterizingHistogram(){} // Prohibit
41  int my_nbins;
42  float xmin;
43  float xmax;
48  float *bin_means;
49  float binsiz;
50 };
51 
52 #endif
int i
Definition: DBlmapReader.cc:9
std::vector< float > clusterize(float resolution)
float bin_pos(int i) const
x
Definition: VDTMath.h:216