31 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
32 prefixME_.append(
"/");
61 if (
debug_>2)
std::cout <<
"\t\tHcalTrigPrimClient::calculateProblems()"<<std::endl;
64 int etabins=0, phibins=0;
65 double problemvalue=0;
121 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"Good TPs_ZS'"<<std::endl;
122 else goodZS = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, goodZS,
debug_);
126 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"Bad TPs_ZS'"<<std::endl;
127 else badZS = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, badZS,
debug_);
131 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"noZS/Good TPs_noZS'"<<std::endl;
132 else goodNZS = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, goodNZS,
debug_);
136 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"noZS/Bad TPs_noZS'"<<std::endl;
137 else badNZS = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, badNZS,
debug_);
142 etabins=goodZS->GetNbinsX();
143 phibins=goodZS->GetNbinsY();
144 totalevents=goodNZS->GetBinContent(0);
148 etabins=goodNZS->GetNbinsX();
149 phibins=goodNZS->GetNbinsY();
150 totalevents=goodNZS->GetBinContent(0);
156 if (
debug_>2)
std::cout <<
"<HcalTrigPrimClient::calculateProblems()> Not enough events! events = "<<totalevents<<
" minimum required = "<<
minevents_<<std::endl;
163 int ieta=-99, iphi=-99;
164 int badvalZS=0, goodvalZS=0;
165 int badvalNZS=0, goodvalNZS=0;
171 badvalZS=0, goodvalZS=0;
172 badvalNZS=0, goodvalNZS=0;
174 if (badZS!=0) badvalZS=(int)badZS->GetBinContent(
eta,
phi);
175 if (badNZS!=0) badvalNZS=(int)badNZS->GetBinContent(
eta,
phi);
176 if (badvalZS+badvalNZS==0)
continue;
177 if (goodZS!=0) goodvalZS=(int)goodZS->GetBinContent(
eta,
phi);
178 if (goodNZS!=0) goodvalNZS=(int)goodNZS->GetBinContent(
eta,
phi);
182 problemvalue=badvalNZS*1./(badvalNZS+goodvalNZS);
199 for (
int i=0;
i<3;++
i)
201 newieta=
i+29+3*(
abs(ieta)-29)+1;
202 if (ieta<0) newieta*=-1;
215 problemvalue=badvalZS*1./(badvalZS+goodvalZS);
225 for (
int i=0;
i<3;++
i)
227 newieta=
i+29+3*(
abs(ieta)-29)+1;
228 if (ieta<0) newieta*=-1;
239 if (badvalZS>0 || badvalNZS>0)
245 if (badvalZS==0)
continue;
246 problemvalue=(badvalZS*1.)/(badvalZS+goodvalZS);
260 int newiphi=(iphi-2+72)%72;
264 for (
int i=0;
i<3;++
i)
266 newieta=
i+29+3*(
abs(ieta)-29)+1;
267 if (ieta<0) newieta*=-1;
288 if (
debug_>0)
std::cout <<
"<HcalTrigPrimClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
316 std::cout <<
"<HcalTrigPrimClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
327 if (
debug_>0)
std::cout <<
"<HcalTrigPrimClient::beginRun> dqmStore does not exist!"<<std::endl;
335 " Problem Trigger Primitive Rate for all HCAL;ieta;iphi",
365 if (
debug_>1)
std::cout <<
"<HcalTrigPrimClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
371 for (
int depth=0;depth<4; ++depth)
375 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
377 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
380 if (ieta==-9999)
continue;
390 if (problemcount>0)
return true;
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)
HcalTrigPrimClient()
Constructors.
std::vector< std::string > HcalEtaPhiHistNames()
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
EtaPhiHists * ProblemsByDepthZS_
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
std::vector< std::string > problemnames_
EtaPhiHists * ProblemCellsByDepth
bool hasErrors_Temp(void)
bool hasWarnings_Temp(void)
EtaPhiHists * ProblemsByDepthNZS_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
~HcalTrigPrimClient()
Destructor.
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
double getBinContent(int binx) const
get content of bin (1-D)
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
void showDirStructure(void) const
int badChannelStatusMask_
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 calculateProblems(void)
void Reset(void)
reset ME (ie. contents, errors, etc)
void setCurrentFolder(const std::string &fullpath)