Definition at line 78 of file PFBadHcalPseudoClusterProducer.cc.
References badAreasC_, badAreasRH_, reco::CaloCluster::badHcalMarker, Reference_intrackfit_cff::barrel, cacheId_geom_, cacheId_quality_, gather_cfg::cout, debug_, MillePedeFileConverter_cfg::e, edm::EventSetup::get(), HcalCondObjectContainer< Item >::getAllChannels(), edm::EventSetup::getHandle(), CaloGeometry::getSubdetectorGeometry(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), good, DetId::Hcal, PFLayer::HCAL_BARREL1, PFLayer::HCAL_ENDCAP, HcalBarrel, HcalChannelStatus::HcalCellDead, HcalChannelStatus::HcalCellMask, HcalChannelStatus::HcalCellOff, HcalEmpty, HcalEndcap, hGeom_, hGeomToken_, hQuality_, hQualityToken_, mps_fire::i, l1ctLayer2EG_cff::id, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, phase1PixelTopology::layer, mps_update::status, and l1tHGCalTowerProducer_cfi::tower.
Referenced by produce().
93 std::map<std::pair<int, int>,
int>
good, bads;
94 std::map<std::pair<int, int>, std::pair<int, HcalSubdetector>> minDepths;
103 if (
status & statusMask) {
106 std::cout <<
"Channel " <<
i() <<
" (subdet " <<
id.subdet() <<
", zside " <<
id.zside() <<
", ieta " 107 <<
id.ieta() <<
", iphi " <<
id.iphi() <<
" depth " <<
id.depth() <<
" has status " <<
status 108 <<
" masked " << (
status & statusMask) << std::endl;
112 auto& minD = minDepths[
tower];
113 if (minD.second ==
HcalEmpty || minD.first >
id.depth()) {
114 minD.first =
id.depth();
115 minD.second =
id.subdet();
119 const float dummyEnergy = 1
e-5;
120 for (
const auto& rec : bads) {
121 int ieta = rec.first.first,
iphi = rec.first.second, nbad = rec.second, ngood =
good[rec.first];
122 auto minDepth = minDepths[rec.first];
125 bool isBad = (nbad > 0 && nbad >= ngood);
127 std::cout <<
"At ieta " <<
id.ieta() <<
", iphi " <<
id.iphi() <<
" I have " << nbad <<
" bad depths, " << ngood
128 <<
" good depths. First depth is in " << (
barrel ?
"HB" :
"HE") <<
" depth " << minDepth.first <<
"; " 129 << (isBad ?
" MARK BAD" :
" ignore") << std::endl;
134 std::shared_ptr<const CaloCellGeometry> thisCell = (
barrel ? hbGeom : heGeom)->getGeometry(
id);
std::vector< reco::PFCluster > badAreasC_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > hGeomToken_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hQualityToken_
edm::ESHandle< CaloGeometry > hGeom_
const Item * getValues(DetId fId, bool throwOnFail=true) const
constexpr std::array< uint8_t, layerIndexSize > layer
std::vector< DetId > getAllChannels() const
edm::ESHandle< HcalChannelQuality > hQuality_
uint32_t getValue() const
unsigned long long cacheId_geom_
std::vector< reco::PFRecHit > badAreasRH_
auto const good
min quality of good
unsigned long long cacheId_quality_
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly