Definition at line 73 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(), ecaldqm::getGeometry(), CaloGeometry::getSubdetectorGeometry(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), DetId::Hcal, PFLayer::HCAL_BARREL1, PFLayer::HCAL_ENDCAP, HcalBarrel, HcalChannelStatus::HcalCellDead, HcalChannelStatus::HcalCellMask, HcalChannelStatus::HcalCellOff, HcalEmpty, HcalEndcap, hGeom_, hQuality_, mps_fire::i, triggerObjects_cff::id, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, mps_update::status, hgcalTowerProducer_cfi::tower, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by produce().
90 std::map<std::pair<int, int>,
int> good, bads;
91 std::map<std::pair<int, int>, std::pair<int, HcalSubdetector>> minDepths;
100 if (status & statusMask) {
103 std::cout <<
"Channel " <<
i() <<
" (subdet " <<
id.subdet() <<
", zside " <<
id.zside() <<
", ieta " 104 <<
id.ieta() <<
", iphi " <<
id.iphi() <<
" depth " <<
id.depth() <<
" has status " << status
105 <<
" masked " << (status & statusMask) << std::endl;
109 auto& minD = minDepths[
tower];
110 if (minD.second ==
HcalEmpty || minD.first >
id.depth()) {
111 minD.first =
id.depth();
112 minD.second =
id.subdet();
116 const float dummyEnergy = 1
e-5;
117 for (
const auto& rec : bads) {
118 int ieta = rec.first.first,
iphi = rec.first.second, nbad = rec.second, ngood = good[rec.first];
119 auto minDepth = minDepths[rec.first];
122 bool isBad = (nbad > 0 && nbad >= ngood);
124 std::cout <<
"At ieta " <<
id.ieta() <<
", iphi " <<
id.iphi() <<
" I have " << nbad <<
" bad depths, " << ngood
125 <<
" good depths. First depth is in " << (barrel ?
"HB" :
"HE") <<
" depth " << minDepth.first <<
"; " 126 << (isBad ?
" MARK BAD" :
" ignore") << std::endl;
131 std::shared_ptr<const CaloCellGeometry> thisCell = (barrel ? hbGeom : heGeom)->
getGeometry(
id);
133 badAreasRH_.emplace_back(thisCell,
id(), layer, dummyEnergy);
135 badAreasC_.emplace_back(layer, dummyEnergy, pos.
x(), pos.
y(), pos.
z());
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
std::vector< reco::PFCluster > badAreasC_
const Item * getValues(DetId fId, bool throwOnFail=true) const
CaloGeometry const * getGeometry()
edm::ESHandle< CaloGeometry > hGeom_
std::vector< DetId > getAllChannels() const
edm::ESHandle< HcalChannelQuality > hQuality_
unsigned long long cacheId_geom_
std::vector< reco::PFRecHit > badAreasRH_
unsigned long long cacheId_quality_
uint32_t getValue() const