43 bool doFits(uint32_t detid, std::vector<SiPixelCalibDigi>::const_iterator ipix)
override;
48 void newDetID(uint32_t detid)
override;
70 mineff_(iConfig.getUntrackedParameter<double>(
"minEfficiencyForAliveDef", 0.8)) {
88 int tpix = xpix * ypix;
115 <<
"now looking at DetID " << detid <<
", pixel " << ipix->row() <<
"," << ipix->col() << std::endl;
119 for (uint32_t
i = 0;
i < ipix->getnpoints();
i++) {
120 nom += ipix->getnentries(
i);
125 <<
" number of vcal points is now " <<
i <<
" for detid " << detid << std::endl;
128 <<
"DetID/col/row " << detid <<
"/" << ipix->col() <<
"/" << ipix->row()
129 <<
", now calculating efficiency: " << nom <<
"/" << denom <<
"=" << nom / denom << std::endl;
133 if (
bookkeeper_[detid]->getBinContent(ipix->col() + 1, ipix->row() + 1) == 0) {
134 bookkeeper_[detid]->Fill(ipix->col(), ipix->row(), eff);
136 float zerobin =
summaries_[detid]->getBinContent(1);
137 summaries_[detid]->setBinContent(1, zerobin - 1);
139 bookkeeper_[detid]->setBinContent(ipix->col() + 1, ipix->row() + 1, -2);
145 for (std::map<uint32_t, MonitorElement *>::const_iterator idet =
bookkeeper_.begin(); idet !=
bookkeeper_.end();
148 float iunderthres = 0;
149 float imultiplefill = 0;
151 uint32_t detid = idet->first;
154 for (
int icol = 1; icol <=
bookkeeper_[detid]->getNbinsX(); ++icol) {
155 for (
int irow = 1; irow <=
bookkeeper_[detid]->getNbinsY(); ++irow) {
168 <<
mineff_ <<
":" << iunderthres / itot <<
" bad " << imultiplefill / itot << std::endl;
SiPixelIsAliveCalibration(const edm::ParameterSet &)
void calibrationEnd() override
edm::ESHandle< SiPixelCalibConfiguration > calib_
std::string translateDetIdToString(uint32_t detid)
std::map< uint32_t, MonitorElement * > bookkeeper_
MonitorElement * bookDQMHistoPlaquetteSummary2D(uint32_t detid, std::string name, std::string title)
bool checkCorrectCalibrationType() override
#define DEFINE_FWK_MODULE(type)
MonitorElement * bookDQMHistogram1D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX)
~SiPixelIsAliveCalibration() override
bool doFits(uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix) override
void doSetup(const edm::ParameterSet &)
std::string calibrationMode_
bool setDQMDirectory(std::string dirName)
short getNTriggers() const
void newDetID(uint32_t detid) override
void calibrationSetup(const edm::EventSetup &) override
std::map< uint32_t, MonitorElement * > summaries_