34 .getParameter<std::vector<edm::InputTag>>(
"badPixelFEDChannelCollections");
40 .getUntrackedParameter<edm::InputTag>(
"pixelClusterLabel");
46 produces<SiPixelDetectorStatus, edm::Transition::EndLuminosityBlock>(
"siPixelStatus");
57 edm::LogInfo(
"SiPixelStatusProducer") <<
"beginRun: update the std::map for pixel geo/topo " << std::endl;
72 edm::LogInfo(
"SiPixelStatusProducer") <<
"beginlumi instance" << std::endl;
76 for (
unsigned int itDetId = 0; itDetId <
fDetIds_.size(); ++itDetId) {
88 edm::LogInfo(
"SiPixelStatusProducer") <<
"start cluster analyzer " << std::endl;
100 <<
" edmNew::DetSetVector<SiPixelCluster> " <<
fPixelClusterLabel_ <<
" does not exist!" << std::endl;
107 for (
const auto&
clusters : *hClusterColl) {
111 int colsperroc =
fSensors_[detid].second;
117 std::map<int, int> rocIds_detid;
124 const std::vector<SiPixelCluster::Pixel>& pixvector = clu.pixels();
125 for (
unsigned int i = 0;
i < pixvector.size(); ++
i) {
126 int mr0 = pixvector[
i].x;
127 int mc0 = pixvector[
i].y;
129 int irow = mr0 / rowsperroc;
130 int icol = mc0 / colsperroc;
133 if (rocIds_detid.find(
key) != rocIds_detid.end()) {
148 <<
" edmNew::DetSetVector<SiPixelCluster> " <<
fPixelClusterLabel_ <<
" is NOT Valid!" << std::endl;
158 if (!
iEvent.getByToken(tk, pixelFEDChannelCollectionHandle)) {
160 <<
" PixelFEDChannelCollection with index " << tk.index() <<
" does NOT exist!" << std::endl;
164 iEvent.getByToken(tk, pixelFEDChannelCollectionHandle);
165 if (!pixelFEDChannelCollectionHandle.
isValid()) {
167 <<
" PixelFEDChannelCollection with index " << tk.index() <<
" is NOT valid!" << std::endl;
172 std::map<int, std::vector<PixelFEDChannel>> tmpFEDerror25;
173 for (
const auto& disabledChannels : *pixelFEDChannelCollectionHandle) {
175 for (
const auto& ch : disabledChannels) {
176 DetId detId = disabledChannels.detId();
177 int detid = detId.
rawId();
183 tmpFEDerror25[detid].push_back(ch);
192 std::map<int, std::vector<PixelFEDChannel>>::iterator itFEDerror25;
194 int detid = itFEDerror25->first;
195 if (tmpFEDerror25.find(detid) != tmpFEDerror25.end()) {
196 std::vector<PixelFEDChannel> chs = itFEDerror25->second;
197 std::vector<PixelFEDChannel> chs_tmp = tmpFEDerror25[detid];
199 std::vector<PixelFEDChannel> chs_common;
200 for (
unsigned int ich = 0; ich < chs.size(); ich++) {
203 for (
unsigned int ich_tmp = 0; ich_tmp < chs_tmp.size(); ich_tmp++) {
206 chs_common.push_back(ch);
212 if (chs_common.empty())
243 std::map<int, std::vector<PixelFEDChannel>>::iterator itFEDerror25;
246 int detid = itFEDerror25->first;
247 std::vector<PixelFEDChannel> chs = itFEDerror25->second;
248 for (
unsigned int ich = 0; ich < chs.size(); ich++) {
260 std::vector<SiPixelDetectorStatus>* siPixelDetectorStatusVtr)
const {
265 siPixelDetectorStatusVtr->push_back(
fDet_);
270 return int(icol + irow * nROCcolumns);