41 bool doFits(uint32_t detid, std::vector<SiPixelCalibDigi>::const_iterator ipix)
override;
46 void newDetID(uint32_t detid)
override;
68 mineff_(iConfig.getUntrackedParameter<double>(
"minEfficiencyForAliveDef", 0.8)) {
86 int tpix = xpix * ypix;
113 <<
"now looking at DetID " << detid <<
", pixel " << ipix->row() <<
"," << ipix->col() << std::endl;
117 for (uint32_t
i = 0;
i < ipix->getnpoints();
i++) {
118 nom += ipix->getnentries(
i);
123 <<
" number of vcal points is now " <<
i <<
" for detid " << detid << std::endl;
126 <<
"DetID/col/row " << detid <<
"/" << ipix->col() <<
"/" << ipix->row()
127 <<
", now calculating efficiency: " << nom <<
"/" <<
denom <<
"=" << nom /
denom << std::endl;
131 if (
bookkeeper_[detid]->getBinContent(ipix->col() + 1, ipix->row() + 1) == 0) {
132 bookkeeper_[detid]->Fill(ipix->col(), ipix->row(), eff);
134 float zerobin =
summaries_[detid]->getBinContent(1);
135 summaries_[detid]->setBinContent(1, zerobin - 1);
137 bookkeeper_[detid]->setBinContent(ipix->col() + 1, ipix->row() + 1, -2);
143 for (std::map<uint32_t, MonitorElement *>::const_iterator idet =
bookkeeper_.begin(); idet !=
bookkeeper_.end();
146 float iunderthres = 0;
147 float imultiplefill = 0;
149 uint32_t detid = idet->first;
152 for (
int icol = 1; icol <=
bookkeeper_[detid]->getNbinsX(); ++icol) {
153 for (
int irow = 1; irow <=
bookkeeper_[detid]->getNbinsY(); ++irow) {
166 <<
mineff_ <<
":" << iunderthres / itot <<
" bad " << imultiplefill / itot << std::endl;
SiPixelIsAliveCalibration(const edm::ParameterSet &)
void calibrationEnd() override
edm::ESHandle< SiPixelCalibConfiguration > calib_
#define DEFINE_FWK_MODULE(type)
std::string translateDetIdToString(uint32_t detid)
std::map< uint32_t, MonitorElement * > bookkeeper_
bool checkCorrectCalibrationType() override
MonitorElement * bookDQMHistogram1D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX)
short getNTriggers() const
~SiPixelIsAliveCalibration() override
bool doFits(uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix) override
MonitorElement * bookDQMHistoPlaquetteSummary2D(uint32_t detid, std::string name, std::string title)
Log< level::Info, false > LogInfo
void doSetup(const edm::ParameterSet &)
std::string calibrationMode_
bool setDQMDirectory(std::string dirName)
Log< level::Warning, false > LogWarning
void newDetID(uint32_t detid) override
void calibrationSetup(const edm::EventSetup &) override
std::map< uint32_t, MonitorElement * > summaries_