Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:50:12

0001 #include <cassert>
0002 #include <algorithm>
0003 
0004 #include "DataFormats/JetReco/interface/DiscretizedEnergyFlow.h"
0005 
0006 namespace reco {
0007 
0008   DiscretizedEnergyFlow::DiscretizedEnergyFlow(const double* data,
0009                                                const char* title,
0010                                                const double etaMin,
0011                                                const double etaMax,
0012                                                const double phiBin0Edge,
0013                                                const unsigned nEtaBins,
0014                                                const unsigned nPhiBins)
0015       : title_(title),
0016         etaMin_(etaMin),
0017         etaMax_(etaMax),
0018         phiBin0Edge_(phiBin0Edge),
0019         nEtaBins_(nEtaBins),
0020         nPhiBins_(nPhiBins) {
0021     assert(data);
0022     assert(title);
0023     const unsigned nbins = nEtaBins * nPhiBins;
0024     data_.resize(nbins);
0025     std::copy(data, data + nbins, data_.begin());
0026   }
0027 
0028 }  // namespace reco