40 .getParameter<std::vector<edm::InputTag>>(
"badPixelFEDChannelCollections");
46 .getUntrackedParameter<edm::InputTag>(
"pixelClusterLabel");
52 produces<SiPixelDetectorStatus, edm::Transition::EndLuminosityBlock>(
"siPixelStatus");
61 GlobalCache
const* iCache) {
66 auto returnValue = std::make_shared<SiPixelTopoFinder>();
68 returnValue->init(trackerGeometry, trackerTopology, cablingMap);
76 edm::LogInfo(
"SiPixelStatusProducer") <<
"beginRun: update the std::map for pixel geo/topo " << std::endl;
91 edm::LogInfo(
"SiPixelStatusProducer") <<
"beginlumi instance" << std::endl;
95 for (
unsigned int itDetId = 0; itDetId <
fDetIds_.size(); ++itDetId) {
107 edm::LogInfo(
"SiPixelStatusProducer") <<
"start cluster analyzer " << std::endl;
119 <<
" edmNew::DetSetVector<SiPixelCluster> " <<
fPixelClusterLabel_ <<
" does not exist!" << std::endl;
126 for (
const auto&
clusters : *hClusterColl) {
130 int colsperroc =
fSensors_[detid].second;
136 std::map<int, int> rocIds_detid;
143 const std::vector<SiPixelCluster::Pixel>& pixvector = clu.pixels();
144 for (
unsigned int i = 0;
i < pixvector.size(); ++
i) {
145 int mr0 = pixvector[
i].x;
146 int mc0 = pixvector[
i].y;
148 int irow = mr0 / rowsperroc;
149 int icol = mc0 / colsperroc;
152 if (rocIds_detid.find(
key) != rocIds_detid.end()) {
167 <<
" edmNew::DetSetVector<SiPixelCluster> " <<
fPixelClusterLabel_ <<
" is NOT Valid!" << std::endl;
177 if (!
iEvent.getByToken(tk, pixelFEDChannelCollectionHandle)) {
179 <<
" PixelFEDChannelCollection with index " << tk.index() <<
" does NOT exist!" << std::endl;
183 iEvent.getByToken(tk, pixelFEDChannelCollectionHandle);
184 if (!pixelFEDChannelCollectionHandle.
isValid()) {
186 <<
" PixelFEDChannelCollection with index " << tk.index() <<
" is NOT valid!" << std::endl;
191 std::map<int, std::vector<PixelFEDChannel>> tmpFEDerror25;
192 for (
const auto& disabledChannels : *pixelFEDChannelCollectionHandle) {
194 for (
const auto& ch : disabledChannels) {
195 DetId detId = disabledChannels.detId();
196 int detid = detId.
rawId();
202 tmpFEDerror25[detid].push_back(ch);
211 std::map<int, std::vector<PixelFEDChannel>>::iterator itFEDerror25;
213 int detid = itFEDerror25->first;
214 if (tmpFEDerror25.find(detid) != tmpFEDerror25.end()) {
215 std::vector<PixelFEDChannel> chs = itFEDerror25->second;
216 std::vector<PixelFEDChannel> chs_tmp = tmpFEDerror25[detid];
218 std::vector<PixelFEDChannel> chs_common;
219 for (
unsigned int ich = 0; ich < chs.size(); ich++) {
222 for (
unsigned int ich_tmp = 0; ich_tmp < chs_tmp.size(); ich_tmp++) {
225 chs_common.push_back(ch);
231 if (chs_common.empty())
262 std::map<int, std::vector<PixelFEDChannel>>::iterator itFEDerror25;
265 int detid = itFEDerror25->first;
266 std::vector<PixelFEDChannel> chs = itFEDerror25->second;
267 for (
unsigned int ich = 0; ich < chs.size(); ich++) {
279 std::vector<SiPixelDetectorStatus>* siPixelDetectorStatusVtr)
const {
284 siPixelDetectorStatusVtr->push_back(
fDet_);
289 return int(icol + irow * nROCcolumns);