CMS 3D CMS Logo

SiPixelGainCalibrationRejectNoisyAndDead.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: InsertNoisyPixelsInDB
4 // Class: InsertNoisyPixelsInDB
5 //
13 //
14 // Original Author: Romain Rougny
15 // Created: Tue Feb 3 15:18:02 CET 2009
16 // $Id: SiPixelGainCalibrationRejectNoisyAndDead.cc,v 1.5 2009/10/21 15:53:42 heyburn Exp $
17 //
18 //
19 
20 // system include files
21 #include <fstream>
22 #include <map>
23 #include <memory>
24 #include <sys/stat.h>
25 #include <utility>
26 #include <vector>
27 
28 // user include files
48 
49 // ROOT includes
50 #include "TH2F.h"
51 #include "TFile.h"
52 #include "TDirectory.h"
53 #include "TKey.h"
54 #include "TString.h"
55 #include "TList.h"
56 
58 public:
61 
62  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
63 
64 private:
67  std::unique_ptr<SiPixelGainCalibrationOffline> theGainCalibrationDbInputOffline_;
68 
70  std::unique_ptr<SiPixelGainCalibrationForHLT> theGainCalibrationDbInputForHLT_;
71 
72  void analyze(const edm::Event&, const edm::EventSetup&) override;
73 
74  std::map<int, std::vector<std::pair<int, int> > > noisypixelkeeper;
75  std::map<int, std::vector<std::pair<int, int> > > insertednoisypixel;
77 
78  void fillDatabase(const edm::EventSetup&);
79  void getNoisyPixels();
80 
81  // ----------member data ---------------------------
85  const bool DEBUG;
86  float pedlow_;
87  float pedhi_;
88  float gainlow_;
89  float gainhi_;
90 };
91 
92 using namespace edm;
93 using namespace std;
94 
97  desc.setComment("EDAnalyzer to create SiPixelGainCalibration payloads by rejecting noisy and dead ones");
98  desc.addUntracked<bool>("debug", false);
99  desc.addUntracked<int>("insertNoisyPixelsInDB", 1);
100  desc.addUntracked<std::string>("record", "SiPixelGainCalibrationOfflineRcd");
101  desc.addUntracked<std::string>("noisyPixelList", "noisypixel.txt");
102  descriptions.addWithDefaultLabel(desc);
103 }
104 
106  : pddToken_(esConsumes()),
107  SiPixelGainCalibrationOfflineService_(iConfig, consumesCollector()),
108  SiPixelGainCalibrationForHLTService_(iConfig, consumesCollector()),
109  noisypixellist_(iConfig.getUntrackedParameter<std::string>("noisyPixelList", "noisypixel.txt")),
110  insertnoisypixelsindb_(iConfig.getUntrackedParameter<int>("insertNoisyPixelsInDB", 1)),
111  record_(iConfig.getUntrackedParameter<std::string>("record", "SiPixelGainCalibrationOfflineRcd")),
112  DEBUG(iConfig.getUntrackedParameter<bool>("debug", false)) {
113  //now do what ever initialization is needed
114 }
115 
117 
118 // ------------ method called to for each event ------------
120  if (insertnoisypixelsindb_ != 0)
121  getNoisyPixels();
122  fillDatabase(iSetup);
123 }
124 
126  if (DEBUG)
127  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
128  << "=>=>=>=> Starting the function fillDatabase()" << endl;
129 
130  if (record_ != "SiPixelGainCalibrationOfflineRcd" && record_ != "SiPixelGainCalibrationForHLTRcd") {
131  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
132  << record_ << " : this record can't be used !" << std::endl;
133  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
134  << "Please select SiPixelGainCalibrationForHLTRcd or SiPixelGainCalibrationOfflineRcd" << std::endl;
135  return;
136  }
137 
138  //Get the Calibration Data
139  if (record_ == "SiPixelGainCalibrationOfflineRcd")
141  if (record_ == "SiPixelGainCalibrationForHLTRcd")
143 
144  //Get list of ideal detids
145  const TrackerGeometry* pDD = &iSetup.getData(pddToken_);
146  edm::LogInfo("SiPixelCondObjOfflineBuilder") << " There are " << pDD->dets().size() << " detectors" << std::endl;
147 
148  if (record_ == "SiPixelGainCalibrationOfflineRcd") {
153  } else if (record_ == "SiPixelGainCalibrationForHLTRcd") {
158  }
159  if (gainlow_ < 0)
160  gainlow_ = 0;
161  if (gainhi_ > 21)
162  gainhi_ = 21;
163  if (pedlow_ < -100)
164  pedlow_ = -100;
165  if (pedhi_ > 300)
166  pedhi_ = 300;
167 
168  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
169  << "New payload will have pedlow,hi " << pedlow_ << "," << pedhi_ << " and gainlow,hi " << gainlow_ << ","
170  << gainhi_ << endl;
171  if (record_ == "SiPixelGainCalibrationOfflineRcd")
173  std::make_unique<SiPixelGainCalibrationOffline>(pedlow_, pedhi_, gainlow_, gainhi_);
174  if (record_ == "SiPixelGainCalibrationForHLTRcd")
176  std::make_unique<SiPixelGainCalibrationForHLT>(pedlow_, pedhi_, gainlow_, gainhi_);
177 
178  int nnoisy = 0;
179  int ndead = 0;
180 
181  int detid = 0;
182  int NDetid = 0;
183 
184  //checking for noisy pixels that won't be inserted ...
185  bool willNoisyPixBeInserted;
186  for (std::map<int, std::vector<std::pair<int, int> > >::const_iterator it = noisypixelkeeper.begin();
187  it != noisypixelkeeper.end();
188  it++) {
189  willNoisyPixBeInserted = false;
190  for (TrackerGeometry::DetContainer::const_iterator mod = pDD->dets().begin(); mod != pDD->dets().end(); mod++) {
191  detid = 0;
192  if (dynamic_cast<PixelGeomDetUnit const*>((*mod)) != nullptr)
193  detid = ((*mod)->geographicalId()).rawId();
194  if (detid == it->first) {
195  willNoisyPixBeInserted = true;
196  break;
197  }
198  }
199  if (!willNoisyPixBeInserted)
200  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
201  << "All Noisy Pixels in detid " << it->first
202  << "won't be inserted, check the TrackerGeometry you are using !! You are missing some modules" << endl;
203  }
204 
205  if (DEBUG)
206  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << "=>=>=>=> Starting Loop over all modules" << endl;
207 
208  //Looping over all modules
209  for (TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++) {
210  detid = 0;
211  if (dynamic_cast<PixelGeomDetUnit const*>((*it)) != nullptr)
212  detid = ((*it)->geographicalId()).rawId();
213  if (detid == 0)
214  continue;
215  NDetid++;
216  //edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")<<NDetid<<" "<<detid<<endl;
217  //if(NDetid==164) continue;
218 
219  if (DEBUG)
220  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << "=>=>=>=> We are in module " << detid << endl;
221 
222  // Get the module sizes
223  const PixelGeomDetUnit* pixDet = dynamic_cast<const PixelGeomDetUnit*>((*it));
224  const PixelTopology& topol = pixDet->specificTopology();
225  int nrows = topol.nrows(); // rows in x
226  int ncols = topol.ncolumns(); // cols in y
227 
228  float ped;
229  float gainforthiscol[2];
230  float pedforthiscol[2];
231  int nusedrows[2];
232  int nrowsrocsplit;
233  if (record_ == "SiPixelGainCalibrationOfflineRcd")
234  nrowsrocsplit = theGainCalibrationDbInputOffline_->getNumberOfRowsToAverageOver();
235  if (record_ == "SiPixelGainCalibrationForHLTRcd")
236  nrowsrocsplit = theGainCalibrationDbInputForHLT_->getNumberOfRowsToAverageOver();
237 
238  std::vector<char> theSiPixelGainCalibrationGainPerColPedPerPixel;
239  std::vector<char> theSiPixelGainCalibrationPerCol;
240 
241  if (DEBUG)
242  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << "=>=>=>=> Starting Loop for each rows/cols " << endl;
243 
244  for (int icol = 0; icol <= ncols - 1; icol++) {
245  if (DEBUG)
246  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << "=>=>=>=> Starting a new column" << endl;
247 
248  nusedrows[0] = nusedrows[1] = 0;
249  gainforthiscol[0] = gainforthiscol[1] = 0;
250  pedforthiscol[0] = pedforthiscol[1] = 0;
251 
252  for (int jrow = 0; jrow <= nrows - 1; jrow++) {
253  if (DEBUG)
254  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
255  << "=>=>=>=> We are in col,row " << icol << "," << jrow << endl;
256 
257  ped = 0;
258 
259  size_t iglobalrow = 0;
260  int noisyPixInRow = 0;
261  if (jrow > nrowsrocsplit) {
262  iglobalrow = 1;
263  noisyPixInRow = 0;
264  }
265 
266  bool isPixelDeadOld = false;
267  bool isColumnDeadOld = false;
268  // bool isPixelDeadNew = false;
269  // bool isColumnDeadNew = false;
270 
271  bool isPixelNoisyOld = false;
272  bool isColumnNoisyOld = false;
273  bool isPixelNoisyNew = false;
274  bool isColumnNoisyNew = false;
275 
276  bool isColumnDead = false;
277  bool isColumnNoisy = false;
278  bool isPixelDead = false;
279  bool isPixelNoisy = false;
280 
281  if (DEBUG)
282  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << "=>=>=>=> Trying to get gain/ped " << endl;
283 
284  try {
285  if (record_ == "SiPixelGainCalibrationOfflineRcd") {
286  isPixelDeadOld = SiPixelGainCalibrationOfflineService_.isDead(detid, icol, jrow);
287  isPixelNoisyOld = SiPixelGainCalibrationOfflineService_.isNoisy(detid, icol, jrow);
288  isColumnDeadOld = SiPixelGainCalibrationOfflineService_.isNoisyColumn(detid, icol, jrow);
289  isColumnNoisyOld = SiPixelGainCalibrationOfflineService_.isDeadColumn(detid, icol, jrow);
290  }
291  if (record_ == "SiPixelGainCalibrationForHLTRcd") {
292  isColumnDeadOld = SiPixelGainCalibrationForHLTService_.isNoisyColumn(detid, icol, jrow);
293  isColumnNoisyOld = SiPixelGainCalibrationForHLTService_.isDeadColumn(detid, icol, jrow);
294  }
295  if (!isColumnDeadOld && !isColumnNoisyOld) {
296  if (record_ == "SiPixelGainCalibrationOfflineRcd")
297  gainforthiscol[iglobalrow] = SiPixelGainCalibrationOfflineService_.getGain(detid, icol, jrow);
298  if (record_ == "SiPixelGainCalibrationForHLTRcd") {
299  gainforthiscol[iglobalrow] = SiPixelGainCalibrationForHLTService_.getGain(detid, icol, jrow);
300  pedforthiscol[iglobalrow] = SiPixelGainCalibrationForHLTService_.getPedestal(detid, icol, jrow);
301  }
302  }
303  if (!isPixelDeadOld && !isPixelNoisyOld)
304  if (record_ == "SiPixelGainCalibrationOfflineRcd")
305  ped = SiPixelGainCalibrationOfflineService_.getPedestal(detid, icol, jrow);
306  } catch (const std::exception& er) {
307  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
308  << "Problem trying to catch gain/ped from DETID " << detid << " @ col,row " << icol << "," << jrow
309  << endl;
310  }
311  //edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")<<"For DetId "<<detid<<" we found gain : "<<gain<<", pedestal : "<<ped<<std::endl;
312 
313  if (DEBUG)
314  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
315  << "=>=>=>=> Found gain " << gainforthiscol[iglobalrow] << " and ped " << pedforthiscol[iglobalrow]
316  << endl;
317 
318  //Check if pixel is in new noisy list
319  for (std::map<int, std::vector<std::pair<int, int> > >::const_iterator it = noisypixelkeeper.begin();
320  it != noisypixelkeeper.end();
321  it++)
322  for (unsigned int i = 0; i < (it->second).size(); i++)
323  if (it->first == detid && (it->second.at(i)).first == icol && (it->second.at(i)).second == jrow)
324  isPixelNoisyNew = true;
325 
326  isColumnDead = isColumnDeadOld;
327  isPixelDead = isPixelDeadOld;
328 
329  if (isPixelNoisyNew)
330  noisyPixInRow++;
331  if (noisyPixInRow == nrowsrocsplit)
332  isColumnNoisyNew = true;
333 
334  if (insertnoisypixelsindb_ == 0) {
335  isColumnNoisy = isColumnNoisyOld;
336  isPixelNoisy = isPixelNoisyOld;
337  } else if (insertnoisypixelsindb_ == 1) {
338  isPixelNoisy = isPixelNoisyNew;
339  isColumnNoisy = isColumnNoisyNew;
340  } else if (insertnoisypixelsindb_ == 2) {
341  isPixelNoisy = isPixelNoisyNew || isPixelNoisyOld;
342  isColumnNoisy = isColumnNoisyNew || isColumnNoisyOld;
343  }
344 
345  if (isPixelNoisy)
346  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
347  << "Inserting a noisy pixel in " << detid << " at col,row " << icol << "," << jrow << endl;
348  if (isColumnNoisy)
349  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
350  << "Inserting a noisy column in " << detid << " at col,row " << icol << "," << jrow << endl;
351  if (isPixelNoisy)
352  nnoisy++;
353  if (isPixelDead)
354  ndead++;
355 
356  if (DEBUG)
357  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << "=>=>=>=> Now Starting to fill the DB" << endl;
358 
359  //********** Fill the new DB !!
360 
361  if (DEBUG)
362  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
363  << "=>=>=>=> Filling Pixel Level Calibration" << endl;
364 
365  //Set Pedestal
366  if (record_ == "SiPixelGainCalibrationOfflineRcd") {
367  if (isPixelDead)
368  theGainCalibrationDbInputOffline_->setDeadPixel(theSiPixelGainCalibrationGainPerColPedPerPixel);
369  else if (isPixelNoisy)
370  theGainCalibrationDbInputOffline_->setNoisyPixel(theSiPixelGainCalibrationGainPerColPedPerPixel);
371  else
372  theGainCalibrationDbInputOffline_->setDataPedestal(ped, theSiPixelGainCalibrationGainPerColPedPerPixel);
373  }
374 
375  //Set Gain
376  if ((jrow + 1) % nrowsrocsplit == 0) {
377  if (DEBUG)
378  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
379  << "=>=>=>=> Filling Column Level Calibration" << endl;
380 
381  if (isColumnDead) {
382  if (record_ == "SiPixelGainCalibrationOfflineRcd")
383  theGainCalibrationDbInputOffline_->setDeadColumn(nrowsrocsplit,
384  theSiPixelGainCalibrationGainPerColPedPerPixel);
385  if (record_ == "SiPixelGainCalibrationForHLTRcd")
386  theGainCalibrationDbInputForHLT_->setDeadColumn(nrowsrocsplit, theSiPixelGainCalibrationPerCol);
387  } else if (isColumnNoisy) {
388  if (record_ == "SiPixelGainCalibrationOfflineRcd")
389  theGainCalibrationDbInputOffline_->setNoisyColumn(nrowsrocsplit,
390  theSiPixelGainCalibrationGainPerColPedPerPixel);
391  if (record_ == "SiPixelGainCalibrationForHLTRcd")
392  theGainCalibrationDbInputForHLT_->setNoisyColumn(nrowsrocsplit, theSiPixelGainCalibrationPerCol);
393  } else {
394  if (record_ == "SiPixelGainCalibrationOfflineRcd")
396  gainforthiscol[iglobalrow], nrowsrocsplit, theSiPixelGainCalibrationGainPerColPedPerPixel);
397  if (record_ == "SiPixelGainCalibrationForHLTRcd")
399  pedforthiscol[iglobalrow], gainforthiscol[iglobalrow], theSiPixelGainCalibrationPerCol);
400  }
401  }
402 
403  if (DEBUG)
404  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
405  << "=>=>=>=> This pixel is finished inserting" << endl;
406 
407  } //end of loop over rows
408 
409  if (DEBUG)
410  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
411  << "=>=>=>=> This column is finished inserting" << endl;
412 
413  } //end of loop over col
414 
415  if (DEBUG)
416  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << "=>=>=>=> Loop over rows/cols is finished" << endl;
417 
418  if (record_ == "SiPixelGainCalibrationOfflineRcd") {
419  SiPixelGainCalibrationOffline::Range offlinerange(theSiPixelGainCalibrationGainPerColPedPerPixel.begin(),
420  theSiPixelGainCalibrationGainPerColPedPerPixel.end());
421  if (!theGainCalibrationDbInputOffline_->put(detid, offlinerange, ncols))
422  edm::LogError("SiPixelGainCalibrationAnalysis")
423  << "warning: detid already exists for Offline (gain per col, ped per pixel) calibration database"
424  << std::endl;
425  }
426  if (record_ == "SiPixelGainCalibrationForHLTRcd") {
427  SiPixelGainCalibrationOffline::Range hltrange(theSiPixelGainCalibrationPerCol.begin(),
428  theSiPixelGainCalibrationPerCol.end());
429  if (!theGainCalibrationDbInputForHLT_->put(detid, hltrange, ncols))
430  edm::LogError("SiPixelGainCalibrationAnalysis")
431  << "warning: detid already exists for HLT (gain per col, ped per col) calibration database" << std::endl;
432  }
433 
434  if (DEBUG)
435  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << "=>=>=>=> This detid is finished inserting" << endl;
436 
437  } //end of loop over Detids
438 
439  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << " --- writing to DB!" << std::endl;
441  if (!mydbservice.isAvailable()) {
442  edm::LogError("db service unavailable");
443  return;
444  } else {
445  if (record_ == "SiPixelGainCalibrationOfflineRcd") {
446  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
447  << "now doing SiPixelGainCalibrationOfflineRcd payload..." << std::endl;
448  if (mydbservice->isNewTagRequest("SiPixelGainCalibrationOfflineRcd")) {
450  *theGainCalibrationDbInputOffline_, mydbservice->beginOfTime(), "SiPixelGainCalibrationOfflineRcd");
451  } else {
453  *theGainCalibrationDbInputOffline_, mydbservice->currentTime(), "SiPixelGainCalibrationOfflineRcd");
454  }
455  }
456  if (record_ == "SiPixelGainCalibrationForHLTRcd") {
457  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
458  << "now doing SiPixelGainCalibrationForHLTRcd payload..." << std::endl;
459  if (mydbservice->isNewTagRequest("SiPixelGainCalibrationForHLTRcd")) {
461  *theGainCalibrationDbInputForHLT_, mydbservice->beginOfTime(), "SiPixelGainCalibrationForHLTRcd");
462  } else {
464  *theGainCalibrationDbInputForHLT_, mydbservice->currentTime(), "SiPixelGainCalibrationForHLTRcd");
465  }
466  }
467  }
468 
469  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << " ---> SUMMARY :" << std::endl;
470  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
471  << " File had " << nnoisyininput << " noisy pixels" << std::endl;
472 
473  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << " DB has now " << nnoisy << " noisy pixels" << std::endl;
474  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << " DB has now " << ndead << " dead pixels" << std::endl;
475 }
476 
478  nnoisyininput = 0;
479 
480  ifstream in;
481  struct stat Stat;
482  if (stat(noisypixellist_.c_str(), &Stat)) {
483  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << "No file named " << noisypixellist_ << std::endl;
484  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
485  << "If you don't want to insert noisy pixel flag, disable it using tag insertNoisyPixelsInDB " << std::endl;
486  return;
487  }
488 
489  in.open(noisypixellist_.c_str());
490  if (in.is_open()) {
491  TString line;
492  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead") << "opened" << endl;
493  char linetmp[201];
494  while (in.getline(linetmp, 200)) {
495  line = linetmp;
496  if (line.Contains("OFFLINE")) {
497  line.Remove(0, line.First(",") + 9);
498  TString detidstring = line;
499  detidstring.Remove(line.First(" "), line.Sizeof());
500 
501  line.Remove(0, line.First(",") + 20);
502  TString col = line;
503  col.Remove(line.First(","), line.Sizeof());
504  line.Remove(0, line.First(",") + 1);
505  TString row = line;
506  row.Remove(line.First(" "), line.Sizeof());
507 
508  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")
509  << "Found noisy pixel in DETID " << detidstring << " col,row " << col << "," << row << std::endl;
510  nnoisyininput++;
511 
512  std::vector<std::pair<int, int> > tempvec;
513  if (noisypixelkeeper.find(detidstring.Atoi()) != noisypixelkeeper.end())
514  tempvec = (noisypixelkeeper.find(detidstring.Atoi()))->second;
515 
516  std::pair<int, int> temppair(col.Atoi(), row.Atoi());
517  tempvec.push_back(temppair);
518  noisypixelkeeper[detidstring.Atoi()] = tempvec;
519  }
520  }
521  }
522  /*
523  for(std::map <int,std::vector<std::pair<int,int> > >::const_iterator it=noisypixelkeeper.begin();it!=noisypixelkeeper.end();it++)
524  for(int i=0;i<(it->second).size();i++)
525  edm::LogPrint("SiPixelGainCalibrationRejectNoisyAndDead")<<it->first<<" "<<(it->second.at(i)).first<<" "<<(it->second.at(i)).second<<std::endl;
526  */
527 }
528 
529 //define this as a plug-in
size
Write out results.
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
bool isNoisyColumn(const uint32_t &detID, const int &col, const int &row) override
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pddToken_
virtual int ncolumns() const =0
float getPedestal(const uint32_t &detID, const int &col, const int &row) override
virtual int nrows() const =0
std::unique_ptr< SiPixelGainCalibrationOffline > theGainCalibrationDbInputOffline_
std::map< int, std::vector< std::pair< int, int > > > noisypixelkeeper
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Log< level::Error, false > LogError
std::pair< ContainerIterator, ContainerIterator > Range
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
U second(std::pair< T, U > const &p)
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
std::map< int, std::vector< std::pair< int, int > > > insertednoisypixel
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< SiPixelGainCalibrationForHLT > theGainCalibrationDbInputForHLT_
float getGain(const uint32_t &detID, const int &col, const int &row) override
bool isNewTagRequest(const std::string &recordName)
SiPixelGainCalibrationForHLTService SiPixelGainCalibrationForHLTService_
void setESObjects(const edm::EventSetup &es) override
void analyze(const edm::Event &, const edm::EventSetup &) override
bool isDeadColumn(const uint32_t &detID, const int &col, const int &row) override
bool isDead(const uint32_t &detID, const int &col, const int &row) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool getData(T &iHolder) const
Definition: EventSetup.h:122
Log< level::Warning, true > LogPrint
SiPixelGainCalibrationOfflineService SiPixelGainCalibrationOfflineService_
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override
Log< level::Info, false > LogInfo
HLT enums.
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
#define DEBUG
Definition: DMRChecker.cc:120
col
Definition: cuy.py:1009
bool isDeadColumn(const uint32_t &detID, const int &col, const int &row) override
bool isNoisyColumn(const uint32_t &detID, const int &col, const int &row) override
float getPedestal(const uint32_t &detID, const int &col, const int &row) override
bool isAvailable() const
Definition: Service.h:40
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
float getGain(const uint32_t &detID, const int &col, const int &row) override