64 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
65 prefixME_.append(
"/");
184 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::analyze> Not enough events processed to evaluate summary status!"<<std::endl;
214 std::cout <<
"Insufficient events processed. Subdetector status is:"<<std::endl;
241 double localHB[20]={0};
242 double localHE[20]={0};
243 double localHF[20]={0};
244 double localHO[20]={0};
245 double localHFlumi[20]={0};
246 double localHO0[20]={0};
247 double localHO12[20]={0};
253 std::cout <<
"<HcalSummaryClient::analyze> ERROR: SummaryMapByDepth can't be found!"<<std::endl;
264 std::vector<MonitorElement*> chStat;
265 chStat.push_back(ig.
get(
prefixME_+
"HcalInfo/ChannelStatus/HB HE HF Depth 1 ChannelStatus"));
266 chStat.push_back(ig.
get(
prefixME_+
"HcalInfo/ChannelStatus/HB HE HF Depth 2 ChannelStatus"));
267 chStat.push_back(ig.
get(
prefixME_+
"HcalInfo/ChannelStatus/HE Depth 3 ChannelStatus"));
268 chStat.push_back(ig.
get(
prefixME_+
"HcalInfo/ChannelStatus/HO Depth 4 ChannelStatus"));
271 for (
int d=0;
d<4;++
d)
283 if (
abs(ieta)>20 &&
phi%2==0)
continue;
284 if (
abs(ieta)>39 &&
phi%4!=3)
continue;
299 if ((
d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
300 (
d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
306 if (
abs(ieta)<5) ++localHO0[
cl];
307 else ++localHO12[
cl];
318 double chanStat=chStat[
d]->getBinContent(
eta,
phi);
326 if ((
d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
327 (
d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
376 if ((
d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
377 (
d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
403 std::map<std::string, int>::const_iterator it;
409 totalcells+=it->second;
413 localHB[
i]=1-(1.*localHB[
i]/it->second);
424 totalcells+=it->second;
428 localHE[
i]=1-(1.*localHE[
i]/it->second);
439 totalcells+=it->second;
444 localHO[
i]=1-(1.*localHO[
i]/it->second);
451 localHO0[
i]=1-(1.*localHO0[
i]/it->second);
460 localHO12[
i]=1-(1.*localHO12[
i]/it->second);
474 totalcells+=it->second;
479 localHF[
i]=1-(1.*localHF[
i]/it->second);
487 localHFlumi[
i]=1-(1.*localHFlumi[
i]/it->second);
557 if (
debug_>2)
std::cout <<
"<HcalSummaryClient::fillReportSummary>"<<std::endl;
606 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummary> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
622 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummary> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
630 for (
unsigned int i=0;
i<7;++
i)
634 me=ig.
get(
subdir_+
"reportSummaryContents/Hcal_"+subdets[
i]);
637 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::analyze()> Could not get Monitor Element named 'Hcal_"<<subdets[
i]<<
"'"<<std::endl;
658 bool enoughEvents=
true;
668 float status_HFlumi=0;
669 float status_global=-1;
676 me=ig.
get(name+
"ProblemsThisLS");
679 if (
debug_>0)
std::cout <<
"<HcalLSbyLSMonitor> Error! Could not get histogram "<<name.c_str()<<std::endl;
688 std::cout <<
"<HcalLSbyLSMonitor> Error! Number of events "<<Nevents<<
" for histogram "<<name.c_str()<<
" is less than the required minimum of "<<
minEvents_<<std::endl;
693 TotalEvents=
std::max(TotalEvents,Nevents);
695 if ( enoughEvents==
true ) {
708 std::map<std::string, int>::const_iterator it;
711 status_global=status_HB+status_HE+status_HO+status_HF;
712 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 = "<<TotalEvents<<std::endl;
715 totalcells+=it->second;
717 status_HB=1-(status_HB)/TotalEvents/it->second;
720 totalcells+=it->second;
722 status_HE=1-(status_HE)/TotalEvents/it->second;
725 totalcells+=it->second;
727 status_HO=1-(status_HO)/TotalEvents/it->second;
730 totalcells+=it->second;
732 status_HF=1-(status_HF)/TotalEvents/it->second;
736 status_HO0=1-(status_HO0)/TotalEvents/it->second;
740 status_HO12=1-(status_HO12)/TotalEvents/it->second;
744 status_HFlumi=1-(status_HFlumi)/TotalEvents/it->second;
746 status_global=1-status_global/TotalEvents/totalcells;
747 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 = "<<TotalEvents<<std::endl;
768 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummaryLSbyLS> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
785 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummaryLSbyLS> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
789 if (me) me->
Fill(status_global);
793 for (
unsigned int i=0;
i<7;++
i)
797 me=ig.
get(
subdir_+
"reportSummaryContents/Hcal_"+subdets[
i]);
800 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::LSbyLS> Could not get Monitor Element named 'Hcal_"<<subdets[
i]<<
"'"<<std::endl;
803 if (subdets[i]==
"HB") me->
Fill(status_HB);
804 else if (subdets[i]==
"HE") me->
Fill(status_HE);
805 else if (subdets[i]==
"HO") me->
Fill(status_HO);
806 else if (subdets[i]==
"HF") me->
Fill(status_HF);
807 else if (subdets[i]==
"HO0") me->
Fill(status_HO0);
808 else if (subdets[i]==
"HO12") me->
Fill(status_HO12);
809 else if (subdets[i]==
"HFlumi") me->
Fill(status_HFlumi);
855 for (
unsigned int i=0;
i<7;++
i)
859 me=ig.
get(
subdir_+
"reportSummaryContents/Hcal_"+subdets[
i]);
866 me=ig.
get(
prefixME_+
"HcalInfo/SummaryClientPlots/HB HE HF Depth 1 Problem Summary Map");
868 me=ig.
get(
prefixME_+
"HcalInfo/SummaryClientPlots/HB HE HF Depth 2 Problem Summary Map");
870 me=ig.
get(
prefixME_+
"HcalInfo/SummaryClientPlots/HE Depth 3 Problem Summary Map");
872 me=ig.
get(
prefixME_+
"HcalInfo/SummaryClientPlots/HO Depth 4 Problem Summary Map");
882 MinEvents_=ib.
book1D(
"MinEvents",
"Minimum Events Required From Each Task To Form Summary",
893 "Minimum Error Rate Required For Channel To Be Counted As Problem",
922 for (
int ieta=0;ieta<etabins;++ieta)
924 for (
int iphi=0;iphi<72;++iphi)
937 for (
int j=1;
j<=7;++
j)
bool isHO(int etabin, int depth)
std::vector< std::string > TaskList_
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 * get(const std::string &path)
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_
bool hasErrors_Temp(void)
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
void analyze(DQMStore::IBooker &, DQMStore::IGetter &, int LS=-1)
EtaPhiHists * ProblemCellsByDepth
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
void setup(DQMStore::IBooker &m_dbe, std::string Name, std::string Units="")
~HcalSummaryClient()
Destructor.
bool isHB(int etabin, int depth)
std::vector< HcalBaseDQClient * > clients_
bool isHF(int etabin, int depth)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
int64_t getIntValue(void) const
void fillReportSummary(DQMStore::IBooker &, DQMStore::IGetter &, int LS)
EtaPhiHists * SummaryMapByDepth
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
MonitorElement * MinEvents_
MonitorElement * certificationMap_
MonitorElement * reportMap_
MonitorElement * reportMapShift_
void setCurrentFolder(const std::string &fullpath)
double getBinContent(int binx) const
get content of bin (1-D)
void fillReportSummaryLSbyLS(DQMStore::IBooker &, DQMStore::IGetter &, int LS)
MonitorElement * bookFloat(Args &&...args)
int badChannelStatusMask_
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
void removeElement(Args &&...args)
tuple size
Write out results.
MonitorElement * MinErrorRate_
bool hasWarnings_Temp(void)