lsst.jointcal  16.0-17-g0bdc215+2
Histo2d.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 #ifndef LSST_JOINTCAL_HISTO2D_H
3 #define LSST_JOINTCAL_HISTO2D_H
4 
5 namespace lsst {
6 namespace jointcal {
7 
8 class Histo2d {
9 public:
10  Histo2d() : data() {}
11  Histo2d(int nx, float minx, float maxx, int ny, float miny, float maxy);
12 
13  Histo2d(const Histo2d &other);
14 
15  void fill(float x, float y, float weight = 1.);
16 
17  double maxBin(double &x, double &y) const;
18 
19  void binWidth(double &Hdx, double &Hdy) const {
20  Hdx = 1. / scalex;
21  Hdy = 1. / scaley;
22  }
23 
24  double binContent(double x, double y) const;
25 
26  void zeroBin(double x, double y);
27 
28  ~Histo2d() {}
29 
30 private:
31  void operator=(const Histo2d &right);
32  bool indices(double x, double y, int &ix, int &iy) const;
33 
35  int nx, ny;
36  float minx, miny;
37  float scalex, scaley;
38 };
39 } // namespace jointcal
40 } // namespace lsst
41 
42 #endif // LSST_JOINTCAL_HISTO2D_H
void binWidth(double &Hdx, double &Hdy) const
Definition: Histo2d.h:19
double binContent(double x, double y) const
Definition: Histo2d.cc:77
void fill(float x, float y, float weight=1.)
Definition: Histo2d.cc:49
void zeroBin(double x, double y)
Definition: Histo2d.cc:72
T right(T... args)
ItemVariant const * other
double maxBin(double &x, double &y) const
Definition: Histo2d.cc:54
Class for a simple mapping implementing a generic Gtransfo.
double x
afw::table::Key< double > weight
int y