45 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
46 prefixME_.append(
"/");
137 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::analyze> Not enough events processed to evaluate summary status!"<<std::endl;
167 std::cout <<
"Insufficient events processed. Subdetector status is:"<<std::endl;
194 double localHB[20]={0};
195 double localHE[20]={0};
196 double localHF[20]={0};
197 double localHO[20]={0};
198 double localHFlumi[20]={0};
199 double localHO0[20]={0};
200 double localHO12[20]={0};
206 std::cout <<
"<HcalSummaryClient::analyze> ERROR: SummaryMapByDepth can't be found!"<<std::endl;
217 std::vector<MonitorElement*> chStat;
224 for (
int d=0;d<4;++d)
236 if (
abs(ieta)>20 &&
phi%2==0)
continue;
237 if (
abs(ieta)>39 &&
phi%4!=3)
continue;
242 for (
unsigned int cl=0;cl<
clients_.size();++cl)
252 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
253 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
259 if (
abs(ieta)<5) ++localHO0[cl];
260 else ++localHO12[cl];
262 else if (
isHB(
eta-1,d+1)) ++localHB[cl];
263 else if (
isHE(
eta-1,d+1)) ++localHE[cl];
271 double chanStat=chStat[d]->getBinContent(
eta,
phi);
279 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
280 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
311 for (
unsigned int cl=0;cl<
clients_.size();++cl)
329 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
330 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
356 std::map<std::string, int>::const_iterator it;
362 totalcells+=it->second;
366 localHB[
i]=1-(1.*localHB[
i]/it->second);
377 totalcells+=it->second;
381 localHE[
i]=1-(1.*localHE[
i]/it->second);
392 totalcells+=it->second;
397 localHO[
i]=1-(1.*localHO[
i]/it->second);
404 localHO0[
i]=1-(1.*localHO0[
i]/it->second);
413 localHO12[
i]=1-(1.*localHO12[
i]/it->second);
427 totalcells+=it->second;
432 localHF[
i]=1-(1.*localHF[
i]/it->second);
440 localHFlumi[
i]=1-(1.*localHFlumi[
i]/it->second);
510 if (
debug_>2)
std::cout <<
"<HcalSummaryClient::fillReportSummary>"<<std::endl;
559 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummary> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
575 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummary> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
583 for (
unsigned int i=0;
i<7;++
i)
590 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::analyze()> Could not get Monitor Element named 'Hcal_"<<subdets[
i]<<
"'"<<std::endl;
616 float status_HO12=-1;
617 float status_HFlumi=-1;
618 float status_global=-1;
627 std::map<std::string, int>::const_iterator it;
638 status_global=status_HB+status_HE+status_HO+status_HF;
639 if (
debug_>1)
std::cout <<
"<HcalSummaryClient::fillReportsummaryLSbyLS> BAD CHANNELS*EVENTS = HB: "<<status_HB<<
" HE: "<<status_HE<<
" HO: "<<status_HO<<
" HO0: "<<status_HO0<<
" HO12: "<<status_HO12<<
" HF:"<<status_HF<<
" HFlumi: "<<status_HFlumi<<
" TOTAL BAD CHANNELS*EVENTS = "<<status_global<<
" TOTAL EVENTS = "<<events<<std::endl;
642 totalcells+=it->second;
644 status_HB=1-(status_HB)/events/it->second;
647 totalcells+=it->second;
649 status_HE=1-(status_HE)/events/it->second;
652 totalcells+=it->second;
654 status_HO=1-(status_HO)/events/it->second;
657 totalcells+=it->second;
659 status_HF=1-(status_HF)/events/it->second;
663 status_HO0=1-(status_HO0)/events/it->second;
667 status_HO12=1-(status_HO12)/events/it->second;
671 status_HFlumi=1-(status_HFlumi)/events/it->second;
673 status_global=1-status_global/events/totalcells;
674 if (
debug_>1)
std::cout <<
"<HcalSummaryClient::fillReportsummaryLSbyLS> STATUS= HB: "<<status_HB<<
" HE: "<<status_HE<<
" HO: "<<status_HO<<
" HO0: "<<status_HO0<<
" HO12: "<<status_HO12<<
" HF:"<<status_HF<<
" HFlumi: "<<status_HFlumi<<
" GLOBAL STATUS = "<<status_global<<
" TOTAL EVENTS = "<<events<<std::endl;
695 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummaryLSbyLS> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
712 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummaryLSbyLS> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
716 if (me) me->
Fill(status_global);
720 for (
unsigned int i=0;
i<7;++
i)
727 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::LSbyLS> Could not get Monitor Element named 'Hcal_"<<subdets[
i]<<
"'"<<std::endl;
730 if (subdets[i]==
"HB") me->
Fill(status_HB);
731 else if (subdets[i]==
"HE") me->
Fill(status_HE);
732 else if (subdets[i]==
"HO") me->
Fill(status_HO);
733 else if (subdets[i]==
"HF") me->
Fill(status_HF);
734 else if (subdets[i]==
"HO0") me->
Fill(status_HO0);
735 else if (subdets[i]==
"HO12") me->
Fill(status_HO12);
736 else if (subdets[i]==
"HFlumi") me->
Fill(status_HFlumi);
786 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::beginRun> dqmStore does not exist!"<<std::endl;
803 for (
unsigned int i=0;
i<7;++
i)
841 "Minimum Error Rate Required For Channel To Be Counted As Problem",
865 for (
unsigned int depth=0;depth<4;++depth)
870 for (
int ieta=0;ieta<etabins;++ieta)
872 for (
int iphi=0;iphi<72;++iphi)
885 for (
int j=1;
j<=7;++
j)
bool isHO(int etabin, int depth)
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * ProblemCells
void setBinContent(int binx, double content)
set content of bin (1-D)
bool UseBadChannelStatusInSummary_
HcalSummaryClient()
Constructors.
std::map< std::string, int > subdetCells_
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void fillReportSummaryLSbyLS(int LS)
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
bool isHE(int etabin, int depth)
MonitorElement * StatusVsLS_
MonitorElement * EnoughEvents_
MonitorElement * bookFloat(const char *name)
Book float.
bool hasErrors_Temp(void)
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
const T & max(const T &a, const T &b)
EtaPhiHists * ProblemCellsByDepth
void removeElement(const std::string &name)
~HcalSummaryClient()
Destructor.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
bool isHB(int etabin, int depth)
std::vector< HcalBaseDQClient * > clients_
bool isHF(int etabin, int depth)
constexpr char const * subdets[11]
int64_t getIntValue(void) const
EtaPhiHists * SummaryMapByDepth
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
MonitorElement * MinEvents_
MonitorElement * certificationMap_
MonitorElement * reportMap_
MonitorElement * reportMapShift_
double getBinContent(int binx) const
get content of bin (1-D)
int badChannelStatusMask_
virtual void analyze(void)
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void Reset(void)
reset ME (ie. contents, errors, etc)
tuple size
Write out results.
MonitorElement * MinErrorRate_
void setCurrentFolder(const std::string &fullpath)
void fillReportSummary(int LS)
bool hasWarnings_Temp(void)