44 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
45 prefixME_.append(
"/");
133 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::analyze> Not enough events processed to evaluate summary status!"<<std::endl;
163 std::cout <<
"Insufficient events processed. Subdetector status is:"<<std::endl;
190 double localHB[20]={0};
191 double localHE[20]={0};
192 double localHF[20]={0};
193 double localHO[20]={0};
194 double localHFlumi[20]={0};
195 double localHO0[20]={0};
196 double localHO12[20]={0};
202 std::cout <<
"<HcalSummaryClient::analyze> ERROR: SummaryMapByDepth can't be found!"<<std::endl;
213 std::vector<MonitorElement*> chStat;
220 for (
int d=0;d<4;++d)
232 if (
abs(ieta)>20 &&
phi%2==0)
continue;
233 if (
abs(ieta)>39 &&
phi%4!=3)
continue;
238 for (
unsigned int cl=0;cl<
clients_.size();++cl)
248 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
249 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
255 if (
abs(ieta)<5) ++localHO0[cl];
256 else ++localHO12[cl];
258 else if (
isHB(
eta-1,d+1)) ++localHB[cl];
259 else if (
isHE(
eta-1,d+1)) ++localHE[cl];
267 double chanStat=chStat[d]->getBinContent(
eta,
phi);
275 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
276 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
307 for (
unsigned int cl=0;cl<
clients_.size();++cl)
325 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
326 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
352 std::map<std::string, int>::const_iterator it;
358 totalcells+=it->second;
362 localHB[
i]=1-(1.*localHB[
i]/it->second);
373 totalcells+=it->second;
377 localHE[
i]=1-(1.*localHE[
i]/it->second);
388 totalcells+=it->second;
393 localHO[
i]=1-(1.*localHO[
i]/it->second);
400 localHO0[
i]=1-(1.*localHO0[
i]/it->second);
409 localHO12[
i]=1-(1.*localHO12[
i]/it->second);
423 totalcells+=it->second;
428 localHF[
i]=1-(1.*localHF[
i]/it->second);
436 localHFlumi[
i]=1-(1.*localHFlumi[
i]/it->second);
506 if (
debug_>2)
std::cout <<
"<HcalSummaryClient::fillReportSummary>"<<std::endl;
555 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummary> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
562 std::string
subdets[7] = {
"HB",
"HE",
"HO",
"HF",
"HO0",
"HO12",
"HFlumi"};
563 for (
unsigned int i=0;
i<7;++
i)
570 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::analyze()> Could not get Monitor Element named 'Hcal_"<<subdets[
i]<<
"'"<<std::endl;
596 float status_HO12=-1;
597 float status_HFlumi=-1;
598 float status_global=-1;
607 std::map<std::string, int>::const_iterator it;
618 status_global=status_HB+status_HE+status_HO+status_HF;
619 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;
622 totalcells+=it->second;
624 status_HB=1-(status_HB)/events/it->second;
627 totalcells+=it->second;
629 status_HE=1-(status_HE)/events/it->second;
632 totalcells+=it->second;
634 status_HO=1-(status_HO)/events/it->second;
637 totalcells+=it->second;
639 status_HF=1-(status_HF)/events/it->second;
643 status_HO0=1-(status_HO0)/events/it->second;
647 status_HO12=1-(status_HO12)/events/it->second;
651 status_HFlumi=1-(status_HFlumi)/events/it->second;
653 status_global=1-status_global/events/totalcells;
654 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;
675 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummaryLSbyLS> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
679 if (me) me->
Fill(status_global);
682 std::string
subdets[7] = {
"HB",
"HE",
"HO",
"HF",
"HO0",
"HO12",
"HFlumi"};
683 for (
unsigned int i=0;
i<7;++
i)
690 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::LSbyLS> Could not get Monitor Element named 'Hcal_"<<subdets[
i]<<
"'"<<std::endl;
693 if (subdets[i]==
"HB") me->
Fill(status_HB);
694 else if (subdets[i]==
"HE") me->
Fill(status_HE);
695 else if (subdets[i]==
"HO") me->
Fill(status_HO);
696 else if (subdets[i]==
"HF") me->
Fill(status_HF);
697 else if (subdets[i]==
"HO0") me->
Fill(status_HO0);
698 else if (subdets[i]==
"HO12") me->
Fill(status_HO12);
699 else if (subdets[i]==
"HFlumi") me->
Fill(status_HFlumi);
749 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::beginRun> dqmStore does not exist!"<<std::endl;
765 std::string
subdets[7] = {
"HB",
"HE",
"HO",
"HF",
"HO0",
"HO12",
"HFlumi"};
766 for (
unsigned int i=0;
i<7;++
i)
804 "Minimum Error Rate Required For Channel To Be Counted As Problem",
828 for (
unsigned int depth=0;depth<4;++depth)
833 for (
int ieta=0;ieta<etabins;++ieta)
835 for (
int iphi=0;iphi<72;++iphi)
848 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
static std::string subdets[11]
const T & max(const T &a, const T &b)
EtaPhiHists * ProblemCellsByDepth
void removeElement(const std::string &name)
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)
int CalcIeta(int subdet, int eta, int depth)
std::vector< HcalBaseDQClient * > clients_
bool isHF(int etabin, int depth)
int64_t getIntValue(void) const
EtaPhiHists * SummaryMapByDepth
void FillUnphysicalHEHFBins(EtaPhiHists &hh)
MonitorElement * MinEvents_
MonitorElement * certificationMap_
MonitorElement * reportMap_
double getBinContent(int binx) const
get content of bin (1-D)
perl if(1 lt scalar(@::datatypes))
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)