CMS 3D CMS Logo

CaloBox.h
Go to the documentation of this file.
1 /*
2  * CaloBox.h
3  *
4  * Created on: 11-May-2009
5  * Author: jamie
6  */
7 
8 #ifndef CALOBOX_H_
9 #define CALOBOX_H_
10 
11 #include <map>
12 #include <utility>
13 #include <iostream>
14 #include <string>
15 namespace pftools {
16 
17 class CaloBox {
18 public:
19  CaloBox(double centerEta, double centerPhi, double dEta, double dPhi,
20  unsigned nEta, unsigned nPhi);
21  virtual ~CaloBox();
22 
23  bool fill(double eta, double phi, double energy);
24 
25  void reset();
26 
27  double centerEta_;
28  double centerPhi_;
29  double dEta_;
30  double dPhi_;
31  unsigned nEta_;
32  unsigned nPhi_;
33 
38 
39  void test();
40 
41  const std::map<std::pair<int, int>, double>& energies() const {
42  return energies_;
43  }
44 
45  std::ostream& dump(std::ostream& stream, double norm = 1.0, std::string rowDelim = "\n") const;
46 
47 private:
48  std::map<std::pair<int, int>, double> energies_;
49  CaloBox();
50 
51 };
52 
53 std::ostream& operator<<(std::ostream& stream, const CaloBox& cb);
54 
55 }
56 
57 #endif /* CALOBOX_H_ */
bool fill(double eta, double phi, double energy)
Definition: CaloBox.cc:61
void reset()
Definition: CaloBox.cc:48
int etaNegBound_
Definition: CaloBox.h:35
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
double centerEta_
Definition: CaloBox.h:27
int phiPosBound_
Definition: CaloBox.h:36
int etaPosBound_
Definition: CaloBox.h:34
double dEta_
Definition: CaloBox.h:29
virtual ~CaloBox()
Definition: CaloBox.cc:57
General option file parser.
Definition: Calibratable.h:15
unsigned nPhi_
Definition: CaloBox.h:32
const std::map< std::pair< int, int >, double > & energies() const
Definition: CaloBox.h:41
std::map< std::pair< int, int >, double > energies_
Definition: CaloBox.h:48
int phiNegBound_
Definition: CaloBox.h:37
double centerPhi_
Definition: CaloBox.h:28
std::ostream & dump(std::ostream &stream, double norm=1.0, std::string rowDelim="\n") const
Definition: CaloBox.cc:82
std::ostream & operator<<(std::ostream &s, const Calibratable &calib_)
Definition: Calibratable.cc:6
double dPhi_
Definition: CaloBox.h:30
unsigned nEta_
Definition: CaloBox.h:31