9 const int layer=0) :
layer_(layer) {
10 for(
auto tower_id: tower_ids) {
20 <<
"HGCalTowerMap: Trying to add HGCalTowerMaps with different bins: " <<
nTowers() <<
" and " << map.
nTowers() <<endl;
23 for(
auto tower: map.
towers()) {
24 auto this_tower =
towerMap_.find(tower.first);
27 <<
"HGCalTowerMap: Trying to add HGCalTowerMaps but could not find bin: " << tower.first <<endl;
29 this_tower->second+=tower.second;
39 if(this_tower ==
towerMap_.end())
return false;
40 this_tower->second.addEtEm(etEm);
41 this_tower->second.addEtHad(etHad);
static const char layer_[]
const std::unordered_map< unsigned short, l1t::HGCalTower > & towers() const
bool addEt(short bin_id, float etEm, float etHad)
const HGCalTowerMap & operator+=(const HGCalTowerMap &map)
std::unordered_map< unsigned short, l1t::HGCalTower > towerMap_