Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-23 03:27:32

0001 ///
0002 /// \class HGCalTowerMap2DImpl
0003 ///
0004 /// \author: Thomas Strebler
0005 ///
0006 /// Description: first iteration of HGCal Tower Maps
0007 
0008 #include "FWCore/Utilities/interface/EDMException.h"
0009 
0010 #include "L1Trigger/L1THGCal/interface/backend/HGCalTowerMap2DImpl.h"
0011 #include "L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h"
0012 
0013 HGCalTowerMap2DImpl::HGCalTowerMap2DImpl(const edm::ParameterSet& conf)
0014     : useLayerWeights_(conf.getParameter<bool>("useLayerWeights")),
0015       layerWeights_(conf.getParameter<std::vector<double>>("layerWeights")),
0016       towerGeometryHelper_(conf.getParameter<edm::ParameterSet>("L1TTriggerTowerConfig")) {}
0017 
0018 std::unordered_map<int, l1t::HGCalTowerMap> HGCalTowerMap2DImpl::newTowerMaps() {
0019   bool isNose = towerGeometryHelper_.isNose();
0020 
0021   std::unordered_map<int, l1t::HGCalTowerMap> towerMaps;
0022   for (unsigned layer = 1; layer <= triggerTools_.lastLayer(isNose); layer++) {
0023     // FIXME: this is hardcoded...quite ugly
0024     if (!isNose && layer <= triggerTools_.lastLayerEE(isNose) && layer % 2 == 0)
0025       continue;
0026 
0027     towerMaps[layer] = l1t::HGCalTowerMap(towerGeometryHelper_.getTowerCoordinates(), layer);
0028   }
0029 
0030   return towerMaps;
0031 }