Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:23

0001 /** \class DiscretizedEnergyFlow
0002  *
0003  * \short A grid filled with discretized energy flow 
0004  *
0005  * This is a pure storage class with limited functionality.
0006  * Applications should use fftjet::Grid2d. This object
0007  * is not sparsified and should be dropped before the event
0008  * is written out.
0009  *
0010  * \author Igor Volobouev, TTU, June 28, 2010
0011  ************************************************************/
0012 
0013 #ifndef DataFormats_FFTJetAlgorithms_DiscretizedEnergyFlow_h
0014 #define DataFormats_FFTJetAlgorithms_DiscretizedEnergyFlow_h
0015 
0016 #include <vector>
0017 #include <string>
0018 
0019 namespace reco {
0020   class DiscretizedEnergyFlow {
0021   public:
0022     inline DiscretizedEnergyFlow()
0023         : title_(""), etaMin_(0.0), etaMax_(0.0), phiBin0Edge_(0.0), nEtaBins_(0), nPhiBins_(0) {}
0024 
0025     DiscretizedEnergyFlow(const double* data,
0026                           const char* title,
0027                           double etaMin,
0028                           double etaMax,
0029                           double phiBin0Edge,
0030                           unsigned nEtaBins,
0031                           unsigned nPhiBins);
0032 
0033     inline const double* data() const {
0034       if (data_.empty())
0035         return nullptr;
0036       else
0037         return &data_[0];
0038     }
0039     inline const char* title() const { return title_.c_str(); }
0040     inline double etaMin() const { return etaMin_; }
0041     inline double etaMax() const { return etaMax_; }
0042     inline double phiBin0Edge() const { return phiBin0Edge_; }
0043     inline unsigned nEtaBins() const { return nEtaBins_; }
0044     inline unsigned nPhiBins() const { return nPhiBins_; }
0045 
0046   private:
0047     std::vector<double> data_;
0048     std::string title_;
0049     double etaMin_;
0050     double etaMax_;
0051     double phiBin0Edge_;
0052     unsigned nEtaBins_;
0053     unsigned nPhiBins_;
0054   };
0055 }  // namespace reco
0056 
0057 #endif  // DataFormats_FFTJetAlgorithms_DiscretizedEnergyFlow_h