CMS 3D CMS Logo

HGCalTowerMap.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1TCalorimeter_HGCalTowerMap_h
2 #define DataFormats_L1TCalorimeter_HGCalTowerMap_h
3 
6 
7 #include <unordered_map>
8 
9 namespace l1t {
10 
11  class HGCalTowerMap;
14 
15  class HGCalTowerMap {
16  public:
18 
19  HGCalTowerMap(const std::vector<l1t::HGCalTowerCoord>& tower_ids, const int layer);
20 
21  int layer() const { return layer_; }
22 
24 
25  bool addEt(short bin_id, float etEm, float etHad);
26 
27  unsigned nTowers() const { return towerMap_.size(); }
28  const std::unordered_map<unsigned short, l1t::HGCalTower>& towers() const { return towerMap_; }
29 
30  private:
31  std::unordered_map<unsigned short, l1t::HGCalTower> towerMap_;
32  unsigned layer_;
33  };
34 
35 } // namespace l1t
36 
37 #endif
const std::unordered_map< unsigned short, l1t::HGCalTower > & towers() const
Definition: HGCalTowerMap.h:28
bool addEt(short bin_id, float etEm, float etHad)
delete x;
Definition: CaloConfig.h:22
BXVector< HGCalTowerMap > HGCalTowerMapBxCollection
Definition: HGCalTowerMap.h:12
const HGCalTowerMap & operator+=(const HGCalTowerMap &map)
int layer() const
Definition: HGCalTowerMap.h:21
std::unordered_map< unsigned short, l1t::HGCalTower > towerMap_
Definition: HGCalTowerMap.h:31
unsigned nTowers() const
Definition: HGCalTowerMap.h:27