CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/DataFormats/ParticleFlowReco/interface/CaloBox.h

Go to the documentation of this file.
00001 /*
00002  * CaloBox.h
00003  *
00004  *  Created on: 11-May-2009
00005  *      Author: jamie
00006  */
00007 
00008 #ifndef CALOBOX_H_
00009 #define CALOBOX_H_
00010 
00011 #include <map>
00012 #include <utility>
00013 #include <iostream>
00014 #include <string>
00015 namespace pftools {
00016 
00017 class CaloBox {
00018 public:
00019         CaloBox(double centerEta, double centerPhi, double dEta, double dPhi,
00020                         unsigned nEta, unsigned nPhi);
00021         virtual ~CaloBox();
00022 
00023         bool fill(double eta, double phi, double energy);
00024 
00025         void reset();
00026 
00027         double centerEta_;
00028         double centerPhi_;
00029         double dEta_;
00030         double dPhi_;
00031         unsigned nEta_;
00032         unsigned nPhi_;
00033 
00034         int etaPosBound_;
00035         int etaNegBound_;
00036         int phiPosBound_;
00037         int phiNegBound_;
00038 
00039         void test();
00040 
00041         const std::map<std::pair<int, int>, double>& energies() const {
00042                 return energies_;
00043         }
00044 
00045         std::ostream& dump(std::ostream& stream, double norm = 1.0, std::string rowDelim = "\n") const;
00046 
00047 private:
00048         std::map<std::pair<int, int>, double> energies_;
00049         CaloBox();
00050 
00051 };
00052 
00053 std::ostream& operator<<(std::ostream& stream, const CaloBox& cb);
00054 
00055 }
00056 
00057 #endif /* CALOBOX_H_ */