43 virtual bool doFits(uint32_t detid, std::vector<SiPixelCalibDigi>::const_iterator ipix)
override;
50 virtual void newDetID(uint32_t detid)
override;
72 mineff_(iConfig.getUntrackedParameter<double>(
"minEfficiencyForAliveDef",0.8))
125 edm::LogInfo(
"SiPixelIsAliveCalibration") <<
"now looking at DetID " << detid <<
", pixel " << ipix->row() <<
"," << ipix->col() << std::endl;
129 for(uint32_t
i=0;
i<ipix->getnpoints();
i++){
130 nom+=ipix->getnentries(
i);
131 denom+=
calib_->getNTriggers();
133 edm::LogWarning(
"SiPixelIsAliveCalibration::doFits") <<
" ERROR!!" <<
" number of vcal points is now " <<
i <<
" for detid " << detid << std::endl;
135 edm::LogInfo(
"SiPixelIsAliveCalibration") <<
"DetID/col/row " << detid <<
"/"<< ipix->col() <<
"/" << ipix->row() <<
", now calculating efficiency: " << nom <<
"/" << denom <<
"=" << nom/denom << std::endl;
139 if(
bookkeeper_[detid]->getBinContent(ipix->col()+1,ipix->row()+1)==0){
140 bookkeeper_[detid]->Fill(ipix->col(), ipix->row(), eff);
142 float zerobin =
summaries_[detid]->getBinContent(1);
143 summaries_[detid]->setBinContent(1, zerobin-1);
146 bookkeeper_[detid]->setBinContent(ipix->col()+1,ipix->row()+1,-2);
153 for(std::map<uint32_t, MonitorElement *>::const_iterator idet=
bookkeeper_.begin(); idet!=
bookkeeper_.end();++idet){
156 float imultiplefill=0;
158 uint32_t detid=idet->first;
161 for(
int icol=1; icol <=
bookkeeper_[detid]->getNbinsX(); ++icol){
162 for(
int irow=1; irow <=
bookkeeper_[detid]->getNbinsY(); ++irow){
164 double val =
bookkeeper_[detid]->getBinContent(icol,irow);
174 edm::LogInfo(
"SiPixelIsAliveCalibration") <<
"summary for " <<
translateDetIdToString(detid) <<
"\tfrac dead:" << idead/itot <<
" frac below " <<
mineff_ <<
":" << iunderthres/itot <<
" bad " << imultiplefill/itot << std::endl;
SiPixelIsAliveCalibration(const edm::ParameterSet &)
~SiPixelIsAliveCalibration()
virtual void calibrationEnd() override
edm::ESHandle< SiPixelCalibConfiguration > calib_
#define DEFINE_FWK_MODULE(type)
std::string translateDetIdToString(uint32_t detid)
MonitorElement * bookDQMHistoPlaquetteSummary2D(uint32_t detid, std::string name, std::string title)
virtual bool checkCorrectCalibrationType() override
std::map< uint32_t, MonitorElement * > bookkeeper_
MonitorElement * bookDQMHistogram1D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX)
virtual bool doFits(uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix) override
std::map< uint32_t, MonitorElement * > summaries_
void doSetup(const edm::ParameterSet &)
std::string calibrationMode_
bool setDQMDirectory(std::string dirName)
virtual void newDetID(uint32_t detid) override
virtual void calibrationSetup(const edm::EventSetup &) override