50 ignore_non_pattern_(iConfig.getParameter<
bool>(
"ignoreNonPattern")),
51 control_pattern_size_(iConfig.getParameter<
bool>(
"checkPatternEachEvent")),
52 includeErrors_(iConfig.getUntrackedParameter<
bool>(
"includeErrors",
false)),
53 errorType(iConfig.getUntrackedParameter<
int>(
"errorTypeNumber", 1)),
55 number_of_pixels_per_pattern_(0),
56 use_realeventnumber_(iConfig.getParameter<
bool>(
"useRealEventNumber"))
61 produces<edm::DetSetVector<SiPixelCalibDigi>>();
63 produces<edm::DetSetVector<SiPixelCalibDigiError>>();
65 calibToken_ = esConsumes<SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd>();
67 cablingMapToken_ = esConsumes<SiPixelFedCablingMap, SiPixelFedCablingMapRcd>();
102 edm::LogInfo(
"SiPixelCalibProducer") <<
"in fill(), calibpoint " << icalibpoint <<
" ndigis " << pixelDigis->size()
106 for (digiIter = pixelDigis->begin(); digiIter != pixelDigis->end(); ++digiIter) {
107 uint32_t detid = digiIter->id;
110 for (ipix = digiIter->data.
begin(); ipix != digiIter->
end(); ++ipix) {
112 fillPixel(detid, ipix->row(), ipix->column(), icalibpoint, ipix->adc());
131 <<
"matched detid " << detid <<
" to fed " <<
detid_to_fedid_[detid] << std::endl;
146 edm::LogError(
"SiPixelCalibDigiProducer") <<
" was unable to match detid " << detid <<
" to a FED!" << std::endl;
155 temppixelworker.first = detid;
156 temppixelworker.second.first = row;
157 temppixelworker.second.second =
col;
158 std::map<pixelstruct, SiPixelCalibDigi>::const_iterator ipix =
intermediate_data_.find(temppixelworker);
183 edm::LogError(
"SiPixelCalibDigiProducer") <<
"Number of pixels in pattern is now: " << tempsize <<
", size is was "
205 <<
" rowpatternnumbers = " << rowpatternnumber <<
" " << colpatternnumber <<
" " << patternnumber << std::endl;
209 std::vector<short> temprowvals(0);
210 std::vector<short> tempcolvals(0);
211 uint32_t nminuscol = 0;
212 uint32_t nminusrow = 0;
213 uint32_t npatterns = 0;
214 for (uint32_t icol = 0; icol < calibcols.size(); icol++) {
215 if (calibcols[icol] == -1) {
217 }
else if (nminuscol == colpatternnumber) {
219 short val = calibcols[icol];
220 tempcolvals.push_back(
val);
221 }
else if (nminuscol > colpatternnumber)
224 for (uint32_t irow = 0; irow < calibrows.size(); irow++) {
226 if (calibrows[irow] == -1)
228 else if (nminusrow == rowpatternnumber) {
229 short val = calibrows[irow];
230 temprowvals.push_back(
val);
231 }
else if (nminusrow > rowpatternnumber)
235 while (
currentpattern_.size() > temprowvals.size() * tempcolvals.size()) {
238 for (uint32_t irow = 0; irow < temprowvals.size(); irow++) {
239 for (uint32_t icol = 0; icol < tempcolvals.size(); icol++) {
240 std::pair<short, short>
pattern(temprowvals[irow], tempcolvals[icol]);
270 auto pOut = std::make_unique<edm::DetSetVector<SiPixelCalibDigi>>();
271 auto pErr = std::make_unique<edm::DetSetVector<SiPixelCalibDigiError>>();
276 for (std::map<pixelstruct, SiPixelCalibDigi>::const_iterator idet =
intermediate_data_.begin();
279 uint32_t detid = idet->first.first;
281 if (!
checkPixel(idet->first.first, idet->first.second.first, idet->first.second.second))
287 detSet.
data.push_back(tempdigi);
290 for (std::map<pixelstruct, SiPixelCalibDigiError>::const_iterator ierr =
error_data_.begin();
293 uint32_t detid = ierr->first.first;
296 errSet.
data.push_back(temperror);
343 std::ostringstream errorlog;
344 errorlog <<
"DETID " << detid <<
", row, col (offline)=" << row <<
"," <<
col
346 <<
" found no match in list of patterns: ";
360 temppixelworker.first = detid;
361 temppixelworker.second.first = row;
362 temppixelworker.second.second =
col;
363 std::map<pixelstruct, SiPixelCalibDigiError>::const_iterator ierr =
error_data_.find(temppixelworker);