43 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
44 prefixME_.append(
"/");
135 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::analyze> Not enough events processed to evaluate summary status!"<<std::endl;
165 std::cout <<
"Insufficient events processed. Subdetector status is:"<<std::endl;
192 double localHB[20]={0};
193 double localHE[20]={0};
194 double localHF[20]={0};
195 double localHO[20]={0};
196 double localHFlumi[20]={0};
197 double localHO0[20]={0};
198 double localHO12[20]={0};
204 std::cout <<
"<HcalSummaryClient::analyze> ERROR: SummaryMapByDepth can't be found!"<<std::endl;
215 std::vector<MonitorElement*> chStat;
222 for (
int d=0;d<4;++d)
234 if (
abs(ieta)>20 &&
phi%2==0)
continue;
235 if (
abs(ieta)>39 &&
phi%4!=3)
continue;
250 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
251 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
257 if (
abs(ieta)<5) ++localHO0[
cl];
258 else ++localHO12[
cl];
269 double chanStat=chStat[d]->getBinContent(
eta,
phi);
277 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
278 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
327 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
328 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
354 std::map<std::string, int>::const_iterator it;
360 totalcells+=it->second;
364 localHB[
i]=1-(1.*localHB[
i]/it->second);
375 totalcells+=it->second;
379 localHE[
i]=1-(1.*localHE[
i]/it->second);
390 totalcells+=it->second;
395 localHO[
i]=1-(1.*localHO[
i]/it->second);
402 localHO0[
i]=1-(1.*localHO0[
i]/it->second);
411 localHO12[
i]=1-(1.*localHO12[
i]/it->second);
425 totalcells+=it->second;
430 localHF[
i]=1-(1.*localHF[
i]/it->second);
438 localHFlumi[
i]=1-(1.*localHFlumi[
i]/it->second);
508 if (
debug_>2)
std::cout <<
"<HcalSummaryClient::fillReportSummary>"<<std::endl;
557 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummary> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
573 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummary> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
581 for (
unsigned int i=0;
i<7;++
i)
588 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::analyze()> Could not get Monitor Element named 'Hcal_"<<subdets[
i]<<
"'"<<std::endl;
614 float status_HO12=-1;
615 float status_HFlumi=-1;
616 float status_global=-1;
625 std::map<std::string, int>::const_iterator it;
636 status_global=status_HB+status_HE+status_HO+status_HF;
637 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;
640 totalcells+=it->second;
642 status_HB=1-(status_HB)/events/it->second;
645 totalcells+=it->second;
647 status_HE=1-(status_HE)/events/it->second;
650 totalcells+=it->second;
652 status_HO=1-(status_HO)/events/it->second;
655 totalcells+=it->second;
657 status_HF=1-(status_HF)/events/it->second;
661 status_HO0=1-(status_HO0)/events/it->second;
665 status_HO12=1-(status_HO12)/events/it->second;
669 status_HFlumi=1-(status_HFlumi)/events/it->second;
671 status_global=1-status_global/events/totalcells;
672 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;
693 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummaryLSbyLS> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
710 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummaryLSbyLS> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
714 if (me) me->
Fill(status_global);
718 for (
unsigned int i=0;
i<7;++
i)
725 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::LSbyLS> Could not get Monitor Element named 'Hcal_"<<subdets[
i]<<
"'"<<std::endl;
728 if (subdets[i]==
"HB") me->
Fill(status_HB);
729 else if (subdets[i]==
"HE") me->
Fill(status_HE);
730 else if (subdets[i]==
"HO") me->
Fill(status_HO);
731 else if (subdets[i]==
"HF") me->
Fill(status_HF);
732 else if (subdets[i]==
"HO0") me->
Fill(status_HO0);
733 else if (subdets[i]==
"HO12") me->
Fill(status_HO12);
734 else if (subdets[i]==
"HFlumi") me->
Fill(status_HFlumi);
784 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::beginRun> dqmStore does not exist!"<<std::endl;
801 for (
unsigned int i=0;
i<7;++
i)
839 "Minimum Error Rate Required For Channel To Be Counted As Problem",
863 for (
unsigned int depth=0;depth<4;++depth)
868 for (
int ieta=0;ieta<etabins;++ieta)
870 for (
int iphi=0;iphi<72;++iphi)
883 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)
EtaPhiHists * ProblemCellsByDepth
void removeElement(const std::string &name)
Abs< T >::type abs(const T &t)
~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)
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
if(conf.exists("allCellsPositionCalc"))
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)