45 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
46 prefixME_.append(
"/");
138 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::analyze> Not enough events processed to evaluate summary status!"<<std::endl;
168 std::cout <<
"Insufficient events processed. Subdetector status is:"<<std::endl;
195 double localHB[20]={0};
196 double localHE[20]={0};
197 double localHF[20]={0};
198 double localHO[20]={0};
199 double localHFlumi[20]={0};
200 double localHO0[20]={0};
201 double localHO12[20]={0};
215 std::string
s=
"Hcal/DeadCellMonitor_Hcal/RBX_loss_VS_LB";
217 if (me!=0) checkIgnore=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, checkIgnore,
debug_);
220 float ignoreDeadRate[156]={0.};
224 for (
int i=1;
i<=checkIgnore->GetNbinsY();++
i)
225 for (
int j=2;
j<=checkIgnore->GetNbinsX();++
j)
226 if ( checkIgnore->GetBinContent(
j,
i)>0 )
228 if(checkIgnore->GetBinContent(
j-1,
i)<1 || (checkIgnore->GetBinContent(
j-1,
i)>0 && checkIgnore->GetBinContent(
j-2,
i)<1))
229 ignoreDeadRate[
i]=72.;
231 if(checkIgnore->GetBinContent(
j-1,
i)>0 && checkIgnore->GetBinContent(
j-2,
i)>0 )
232 {ignoreDeadRate[
i] = 0.;
break;}
236 float ignoreShortDeadRate_HB=0;
237 float ignoreShortDeadRate_HE=0;
238 for (
int i =0;
i<156;
i++)
241 ignoreShortDeadRate_HB = ignoreShortDeadRate_HB+ignoreDeadRate[
i];
243 ignoreShortDeadRate_HE = ignoreShortDeadRate_HE+ignoreDeadRate[
i];
245 ignoreShortDeadRate_HB = ignoreShortDeadRate_HB/2592;
246 ignoreShortDeadRate_HE = ignoreShortDeadRate_HE/2592;
253 std::cout <<
"<HcalSummaryClient::analyze> ERROR: SummaryMapByDepth can't be found!"<<std::endl;
264 std::vector<MonitorElement*> chStat;
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;
303 bool HEM15A =
true ? (
isHE(
eta-1,d+1) && (
phi>56 &&
phi<59 && ieta<0)) :
false;
304 bool HEM15B =
true ? (
isHE(
eta-1,d+1) && (
phi>54 &&
phi<57 && ieta<0)) :
false;
305 bool HBP14A =
true ? (
isHB(
eta-1,d+1) && (
phi>50 && phi<53 && ieta>0)) :
false;
307 if( HEM15A || HEM15B || HBP14A )
314 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
315 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
321 if (
abs(ieta)<5) ++localHO0[
cl];
322 else ++localHO12[
cl];
333 double chanStat=chStat[d]->getBinContent(
eta,
phi);
341 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
342 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
391 bool HEM15A =
true ? (
isHE(
eta-1,d+1) && (
phi>56 &&
phi<59 && ieta<0)) :
false;
392 bool HEM15B =
true ? (
isHE(
eta-1,d+1) && (
phi>54 &&
phi<57 && ieta<0)) :
false;
393 bool HBP14A =
true ? (
isHB(
eta-1,d+1) && (
phi>50 && phi<53 && ieta>0)) :
false;
395 if( HEM15A || HEM15B || HBP14A )
406 if ((d==0 && (
abs(ieta)==33 ||
abs(ieta)==34)) ||
407 (d==1 && (
abs(ieta)==35 ||
abs(ieta)==36)))
433 std::map<std::string, int>::const_iterator it;
439 totalcells+=it->second;
444 localHB[
i]=1-(1.*localHB[
i]/it->second);
446 localHB[
i]=
std::min(1.0, localHB[
i]+ignoreShortDeadRate_HB);
457 totalcells+=it->second;
462 localHE[
i]=1-(1.*localHE[
i]/it->second);
464 localHE[
i]=
std::min(1.0, localHE[
i]+ignoreShortDeadRate_HE);
475 totalcells+=it->second;
480 localHO[
i]=1-(1.*localHO[
i]/it->second);
487 localHO0[
i]=1-(1.*localHO0[
i]/it->second);
496 localHO12[
i]=1-(1.*localHO12[
i]/it->second);
510 totalcells+=it->second;
515 localHF[
i]=1-(1.*localHF[
i]/it->second);
523 localHFlumi[
i]=1-(1.*localHFlumi[
i]/it->second);
593 if (
debug_>2)
std::cout <<
"<HcalSummaryClient::fillReportSummary>"<<std::endl;
642 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummary> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
658 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummary> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
665 std::string
subdets[7] = {
"HB",
"HE",
"HO",
"HF",
"HO0",
"HO12",
"HFlumi"};
666 for (
unsigned int i=0;
i<7;++
i)
673 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::analyze()> Could not get Monitor Element named 'Hcal_"<<subdets[
i]<<
"'"<<std::endl;
699 float status_HO12=-1;
700 float status_HFlumi=-1;
701 float status_global=-1;
710 std::map<std::string, int>::const_iterator it;
721 status_global=status_HB+status_HE+status_HO+status_HF;
722 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;
725 totalcells+=it->second;
727 status_HB=1-(status_HB)/events/it->second;
730 totalcells+=it->second;
732 status_HE=1-(status_HE)/events/it->second;
735 totalcells+=it->second;
737 status_HO=1-(status_HO)/events/it->second;
740 totalcells+=it->second;
742 status_HF=1-(status_HF)/events/it->second;
746 status_HO0=1-(status_HO0)/events/it->second;
750 status_HO12=1-(status_HO12)/events/it->second;
754 status_HFlumi=1-(status_HFlumi)/events/it->second;
756 status_global=1-status_global/events/totalcells;
757 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;
778 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummaryLSbyLS> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
795 else if (
debug_>0)
std::cout <<
"<HcalSummaryClient::fillReportSummaryLSbyLS> CANNOT GET REPORT SUMMARY MAP!!!!!"<<std::endl;
799 if (me) me->
Fill(status_global);
802 std::string
subdets[7] = {
"HB",
"HE",
"HO",
"HF",
"HO0",
"HO12",
"HFlumi"};
803 for (
unsigned int i=0;
i<7;++
i)
810 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::LSbyLS> Could not get Monitor Element named 'Hcal_"<<subdets[
i]<<
"'"<<std::endl;
813 if (subdets[i]==
"HB") me->
Fill(status_HB);
814 else if (subdets[i]==
"HE") me->
Fill(status_HE);
815 else if (subdets[i]==
"HO") me->
Fill(status_HO);
816 else if (subdets[i]==
"HF") me->
Fill(status_HF);
817 else if (subdets[i]==
"HO0") me->
Fill(status_HO0);
818 else if (subdets[i]==
"HO12") me->
Fill(status_HO12);
819 else if (subdets[i]==
"HFlumi") me->
Fill(status_HFlumi);
869 if (
debug_>0)
std::cout <<
"<HcalSummaryClient::beginRun> dqmStore does not exist!"<<std::endl;
885 std::string
subdets[7] = {
"HB",
"HE",
"HO",
"HF",
"HO0",
"HO12",
"HFlumi"};
886 for (
unsigned int i=0;
i<7;++
i)
924 "Minimum Error Rate Required For Channel To Be Counted As Problem",
948 for (
unsigned int depth=0;depth<4;++depth)
953 for (
int ieta=0;ieta<etabins;++ieta)
955 for (
int iphi=0;iphi<72;++iphi)
968 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)
static std::string subdets[11]
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)
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)
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)