CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LookupTable2d.h
Go to the documentation of this file.
1 #ifndef RecoJets_FFTJetAlgorithms_LookupTable2d_h
2 #define RecoJets_FFTJetAlgorithms_LookupTable2d_h
3 
4 #include <vector>
5 
6 namespace fftjetcms {
8  {
9  public:
10  LookupTable2d(unsigned nx, double xmin, double xmax,
11  unsigned ny, double ymin, double ymax,
12  const std::vector<double>& data);
13 
14  inline const std::vector<double>& data() const {return data_;}
15  inline unsigned nx() const {return nx_;}
16  inline unsigned ny() const {return ny_;}
17  inline double xmin() const {return xmin_;}
18  inline double xmax() const {return xmax_;}
19  inline double ymin() const {return ymin_;}
20  inline double ymax() const {return ymax_;}
21  inline double xstep() const {return bwx_;}
22  inline double ystep() const {return bwy_;}
23  inline double binValue(const unsigned ix, const unsigned iy) const
24  {return data_.at(ix*ny_ + iy);}
25 
26  double closest(double x, double y) const;
27 
28  private:
29  LookupTable2d();
30 
31  std::vector<double> data_;
32  unsigned nx_;
33  unsigned ny_;
34  double xmin_;
35  double xmax_;
36  double ymin_;
37  double ymax_;
38  double bwx_;
39  double bwy_;
40  };
41 }
42 
43 #endif // RecoJets_FFTJetAlgorithms_LookupTable2d_h
double ymax() const
Definition: LookupTable2d.h:20
double xmax() const
Definition: LookupTable2d.h:18
double ymin() const
Definition: LookupTable2d.h:19
double xstep() const
Definition: LookupTable2d.h:21
double ystep() const
Definition: LookupTable2d.h:22
const std::vector< double > & data() const
Definition: LookupTable2d.h:14
double xmin() const
Definition: LookupTable2d.h:17
double closest(double x, double y) const
double binValue(const unsigned ix, const unsigned iy) const
Definition: LookupTable2d.h:23
unsigned ny() const
Definition: LookupTable2d.h:16
unsigned nx() const
Definition: LookupTable2d.h:15
std::vector< double > data_
Definition: LookupTable2d.h:31