29 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
30 prefixME_.append(
"/");
59 if (
debug_>2)
std::cout <<
"\t\tHcalTrigPrimClient::calculateProblems()"<<std::endl;
62 int etabins=0, phibins=0;
63 double problemvalue=0;
119 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"Good TPs_ZS'"<<std::endl;
120 else goodZS = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, goodZS,
debug_);
124 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"Bad TPs_ZS'"<<std::endl;
125 else badZS = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, badZS,
debug_);
129 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"noZS/Good TPs_noZS'"<<std::endl;
130 else goodNZS = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, goodNZS,
debug_);
134 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"noZS/Bad TPs_noZS'"<<std::endl;
135 else badNZS = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, badNZS,
debug_);
140 etabins=goodZS->GetNbinsX();
141 phibins=goodZS->GetNbinsY();
142 totalevents=goodNZS->GetBinContent(0);
146 etabins=goodNZS->GetNbinsX();
147 phibins=goodNZS->GetNbinsY();
148 totalevents=goodNZS->GetBinContent(0);
154 if (
debug_>2)
std::cout <<
"<HcalTrigPrimClient::calculateProblems()> Not enough events! events = "<<totalevents<<
" minimum required = "<<
minevents_<<std::endl;
161 int ieta=-99, iphi=-99;
162 int badvalZS=0, goodvalZS=0;
163 int badvalNZS=0, goodvalNZS=0;
169 badvalZS=0, goodvalZS=0;
170 badvalNZS=0, goodvalNZS=0;
172 if (badZS!=0) badvalZS=(int)badZS->GetBinContent(
eta,
phi);
173 if (badNZS!=0) badvalNZS=(int)badNZS->GetBinContent(
eta,
phi);
174 if (badvalZS+badvalNZS==0)
continue;
175 if (goodZS!=0) goodvalZS=(int)goodZS->GetBinContent(
eta,
phi);
176 if (goodNZS!=0) goodvalNZS=(int)goodNZS->GetBinContent(
eta,
phi);
180 problemvalue=badvalNZS*1./(badvalNZS+goodvalNZS);
197 for (
int i=0;
i<3;++
i)
199 newieta=
i+29+3*(
abs(ieta)-29)+1;
200 if (ieta<0) newieta*=-1;
213 problemvalue=badvalZS*1./(badvalZS+goodvalZS);
223 for (
int i=0;
i<3;++
i)
225 newieta=
i+29+3*(
abs(ieta)-29)+1;
226 if (ieta<0) newieta*=-1;
237 if (badvalZS>0 || badvalNZS>0)
243 if (badvalZS==0)
continue;
244 problemvalue=(badvalZS*1.)/(badvalZS+goodvalZS);
258 int newiphi=(iphi-2+72)%72;
262 for (
int i=0;
i<3;++
i)
264 newieta=
i+29+3*(
abs(ieta)-29)+1;
265 if (ieta<0) newieta*=-1;
286 if (
debug_>0)
std::cout <<
"<HcalTrigPrimClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
314 std::cout <<
"<HcalTrigPrimClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
325 if (
debug_>0)
std::cout <<
"<HcalTrigPrimClient::beginRun> dqmStore does not exist!"<<std::endl;
333 " Problem Trigger Primitive Rate for all HCAL;ieta;iphi",
363 if (
debug_>1)
std::cout <<
"<HcalTrigPrimClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
369 for (
int depth=0;depth<4; ++depth)
373 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
375 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
378 if (ieta==-9999)
continue;
388 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)
Abs< T >::type abs(const T &t)
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)