29 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
30 prefixME_.append(
"/");
64 if (
debug_>2)
std::cout <<
"\t\tHcalTrigPrimClient::calculateProblems()"<<std::endl;
66 int etabins=0, phibins=0;
67 double problemvalue=0;
123 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"Good TPs_ZS'"<<std::endl;
124 else goodZS = HcalUtilsClient::getHisto<TH2F*>(
me,
cloneME_, goodZS,
debug_);
128 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"Bad TPs_ZS'"<<std::endl;
133 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"noZS/Good TPs_noZS'"<<std::endl;
134 else goodNZS = HcalUtilsClient::getHisto<TH2F*>(
me,
cloneME_, goodNZS,
debug_);
138 std::cout <<
"<HcalTrigPrimClient::calculateProblems> Could not get histogram named '"<<
subdir_<<
"noZS/Bad TPs_noZS'"<<std::endl;
139 else badNZS = HcalUtilsClient::getHisto<TH2F*>(
me,
cloneME_, badNZS,
debug_);
144 etabins=goodZS->GetNbinsX();
145 phibins=goodZS->GetNbinsY();
146 totalevents=goodNZS->GetBinContent(0);
150 etabins=goodNZS->GetNbinsX();
151 phibins=goodNZS->GetNbinsY();
152 totalevents=goodNZS->GetBinContent(0);
158 if (
debug_>2)
std::cout <<
"<HcalTrigPrimClient::calculateProblems()> Not enough events! events = "<<totalevents<<
" minimum required = "<<
minevents_<<std::endl;
165 int ieta=-99, iphi=-99;
166 int badvalZS=0, goodvalZS=0;
167 int badvalNZS=0, goodvalNZS=0;
173 badvalZS=0, goodvalZS=0;
174 badvalNZS=0, goodvalNZS=0;
176 if (badZS!=0) badvalZS=(int)badZS->GetBinContent(
eta,
phi);
177 if (badNZS!=0) badvalNZS=(int)badNZS->GetBinContent(
eta,
phi);
178 if (badvalZS+badvalNZS==0)
continue;
179 if (goodZS!=0) goodvalZS=(int)goodZS->GetBinContent(
eta,
phi);
180 if (goodNZS!=0) goodvalNZS=(int)goodNZS->GetBinContent(
eta,
phi);
184 problemvalue=badvalNZS*1./(badvalNZS+goodvalNZS);
201 for (
int i=0;
i<3;++
i)
203 newieta=
i+29+3*(
abs(ieta)-29)+1;
204 if (ieta<0) newieta*=-1;
217 problemvalue=badvalZS*1./(badvalZS+goodvalZS);
227 for (
int i=0;
i<3;++
i)
229 newieta=
i+29+3*(
abs(ieta)-29)+1;
230 if (ieta<0) newieta*=-1;
241 if (badvalZS>0 || badvalNZS>0)
247 if (badvalZS==0)
continue;
248 problemvalue=(badvalZS*1.)/(badvalZS+goodvalZS);
262 int newiphi=(iphi-2+72)%72;
266 for (
int i=0;
i<3;++
i)
268 newieta=
i+29+3*(
abs(ieta)-29)+1;
269 if (ieta<0) newieta*=-1;
290 if (
debug_>0)
std::cout <<
"<HcalTrigPrimClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
323 " Problem Trigger Primitive Rate for all HCAL;ieta;iphi",
360 if (
debug_>1)
std::cout <<
"<HcalTrigPrimClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
370 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
372 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
375 if (ieta==-9999)
continue;
385 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)
MonitorElement * get(const std::string &path)
HcalTrigPrimClient()
Constructors.
std::vector< std::string > HcalEtaPhiHistNames()
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)
void setup(DQMStore::IBooker &m_dbe, std::string Name, std::string Units="")
EtaPhiHists * ProblemsByDepthNZS_
~HcalTrigPrimClient()
Destructor.
virtual void calculateProblems(void)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
void analyze(DQMStore::IBooker &, DQMStore::IGetter &)
double getBinContent(int binx) const
get content of bin (1-D)
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
int badChannelStatusMask_
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
void setupProblemCells(DQMStore::IBooker &, DQMStore::IGetter &)