@@ -1731,6 +1731,8 @@ std::map<int, std::shared_ptr<LutXml>> HcalLutManager::getZdcLutXml(const HcalTP
17311731 std::vector<EMap::EMapRow>& _map = _emap.get_map ();
17321732 edm::LogInfo (" HcalLutManager" ) << " EMap contains " << _map.size () << " channels" ;
17331733
1734+ const auto lutMetaDataChannels = conditions->getHcalLutMetadata ()->getAllChannels ();
1735+
17341736 // loop over all EMap channels
17351737 RooGKCounter _counter;
17361738 for (std::vector<EMap::EMapRow>::const_iterator row = _map.begin (); row != _map.end (); row++) {
@@ -1779,14 +1781,27 @@ std::map<int, std::shared_ptr<LutXml>> HcalLutManager::getZdcLutXml(const HcalTP
17791781 } else if (row->zdc_section == " ZDC HAD" ) {
17801782 section = HcalZDCDetId::HAD;
17811783 _cfg.iphi = 2 ;
1782- } else if (row->zdc_section == " ZDC LUM" ) {
1783- continue ;
1784- } else if (row->zdc_section == " ZDC RPD" ) {
1784+ } else {
17851785 continue ;
17861786 }
1787- HcalZDCDetId _detid (section, (row->zdc_zside > 0 ), row->zdc_channel );
1787+ HcalZDCDetId _zdcdetid (section, (row->zdc_zside > 0 ), row->zdc_channel );
1788+
1789+ bool isInLutMetadata = false ;
1790+ for (const auto & detid : lutMetaDataChannels) {
1791+ if (detid.det () != DetId::Calo or detid.subdetId () != HcalZDCDetId::SubdetectorId)
1792+ continue ;
1793+
1794+ HcalZDCDetId zdcdetid (detid.rawId ());
1795+ if (_zdcdetid == zdcdetid) {
1796+ isInLutMetadata = true ;
1797+ break ;
1798+ }
1799+ }
1800+
1801+ if (!isInLutMetadata)
1802+ continue ;
17881803
1789- for (const auto i : _coder.getLinearizationLUT (_detid , ootpu_lut)) {
1804+ for (const auto i : _coder.getLinearizationLUT (_zdcdetid , ootpu_lut)) {
17901805 _cfg.lut .push_back (i);
17911806 }
17921807
0 commit comments