Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:54

0001 #ifndef DataFormats_L1TCalorimeter_HGCalTowerMap_h
0002 #define DataFormats_L1TCalorimeter_HGCalTowerMap_h
0003 
0004 #include "DataFormats/L1THGCal/interface/HGCalTower.h"
0005 #include "DataFormats/L1Trigger/interface/BXVector.h"
0006 
0007 #include <unordered_map>
0008 
0009 namespace l1t {
0010 
0011   class HGCalTowerMap;
0012   struct HGCalTowerCoord;
0013   typedef BXVector<HGCalTowerMap> HGCalTowerMapBxCollection;
0014 
0015   class HGCalTowerMap {
0016   public:
0017     HGCalTowerMap() : layer_(0) {}
0018 
0019     HGCalTowerMap(const std::vector<l1t::HGCalTowerCoord>& tower_ids, const int layer);
0020 
0021     int layer() const { return layer_; }
0022 
0023     const HGCalTowerMap& operator+=(const HGCalTowerMap& map);
0024 
0025     bool addEt(short bin_id, float etEm, float etHad);
0026 
0027     unsigned nTowers() const { return towerMap_.size(); }
0028     const std::unordered_map<unsigned short, l1t::HGCalTower>& towers() const { return towerMap_; }
0029 
0030   private:
0031     std::unordered_map<unsigned short, l1t::HGCalTower> towerMap_;
0032     unsigned layer_;
0033   };
0034 
0035 }  // namespace l1t
0036 
0037 #endif