31 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
32 prefixME_.append(
"/");
61 if (
debug_>2)
std::cout <<
"\t\tHcalDeadCellClient::calculateProblems()"<<std::endl;
95 int etabins=0, phibins=0, zside=0;
96 double problemvalue=0;
116 TH2F* DigiPresentByDepth[4];
117 TH2F* RecentMissingDigisByDepth[4];
118 TH2F* RecHitsPresentByDepth[4];
119 TH2F* RecentMissingRecHitsByDepth[4];
124 for (
int i=0;
i<4;++
i)
127 DigiPresentByDepth[
i]=0;
128 RecentMissingDigisByDepth[
i]=0;
129 RecHitsPresentByDepth[
i]=0;
130 RecentMissingRecHitsByDepth[
i]=0;
132 std::string
s=
subdir_+
"dead_digi_never_present/"+name[
i]+
"Digi Present At Least Once";
134 if (me!=0) DigiPresentByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, DigiPresentByDepth[
i],
debug_);
136 s=
subdir_+
"dead_digi_often_missing/"+name[
i]+
"Dead Cells with No Digis";
138 if (me!=0) RecentMissingDigisByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecentMissingDigisByDepth[
i],
debug_);
140 s=
subdir_+
"dead_rechit_never_present/"+name[
i]+
"RecHit Above Threshold At Least Once";
142 if (me!=0) RecHitsPresentByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecHitsPresentByDepth[
i],
debug_);
144 s=
subdir_+
"dead_rechit_often_missing/"+name[
i]+
"RecHits Failing Energy Threshold Test";
146 if (me!=0)RecentMissingRecHitsByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecentMissingRecHitsByDepth[
i],
debug_);
157 if (DigiPresentByDepth[d]==0)
continue;
160 totalevents=DigiPresentByDepth[d]->GetBinContent(0);
161 if (totalevents==0 || totalevents<
minevents_)
continue;
169 if (ieta==-9999)
continue;
180 if (DigiPresentByDepth[d]!=0 && DigiPresentByDepth[d]->GetBinContent(
eta+1,
phi+1)==0)
181 problemvalue=totalevents;
183 else if (RecHitsPresentByDepth[d]!=0)
185 if (RecHitsPresentByDepth[d]->GetBinContent(
eta+1,
phi+1)==0)
186 problemvalue=totalevents;
187 else if (RecHitsPresentByDepth[d]->GetBinContent(
eta+1,
phi+1)>1)
188 RecHitsPresentByDepth[d]->SetBinContent(
eta+1,
phi+1,1);
192 if (RecentMissingDigisByDepth[d]!=0)
193 problemvalue+=RecentMissingDigisByDepth[d]->GetBinContent(
eta+1,
phi+1);
194 if (RecentMissingRecHitsByDepth[d]!=0)
195 problemvalue+=RecentMissingRecHitsByDepth[d]->GetBinContent(
eta+1,
phi+1);
197 if (problemvalue==0)
continue;
198 problemvalue/=totalevents;
199 problemvalue =
std::min(1.,problemvalue);
203 ieta<0 ? zside = -1 : zside = 1;
227 if (
debug_>0)
std::cout <<
"<HcalDeadCellClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
253 std::cout <<
"<HcalDeadCellClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
268 if (
debug_>0)
std::cout <<
"<HcalDeadCellClient::beginRun> dqmStore does not exist!"<<std::endl;
274 " Problem Dead Cell Rate for all HCAL;ieta;iphi",
298 if (
debug_>1)
std::cout <<
"<HcalDeadCellClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
304 for (
int depth=0;depth<4; ++depth)
308 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
310 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
313 if (ieta==-9999)
continue;
322 if (problemcount>0)
return true;
347 std::cout <<
"<HcalDeadCellClient> Summary of Dead Cells in Run: "<<std::endl;
350 for (
int d=0;d<4;++d)
354 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
357 if (ieta==-9999)
continue;
358 for (
int hist_phi=0;hist_phi<phibins;++hist_phi)
368 if (
isHB(hist_eta,d+1))
370 else if (
isHE(hist_eta,d+1))
372 else if (
isHF(hist_eta,d+1))
389 if (deadcell==1 &&
debug_>0)
390 std::cout <<
"Dead Cell : subdetector = "<<subdet<<
" (eta,phi,depth) = ("<<ieta<<
", "<<iphi<<
", "<<d+1<<
"): "<<binval*100.<<
"%"<<std::endl;
393 if (myqual.find(myid)==myqual.end())
405 myqual[myid] &=~mask;
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)
std::vector< std::string > HcalEtaPhiHistNames()
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
bool isHE(int etabin, int depth)
std::vector< MonitorElement * > depth
std::vector< std::string > problemnames_
EtaPhiHists * ProblemCellsByDepth
bool hasWarnings_Temp(void)
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)
int CalcIeta(int subdet, int eta, int depth)
bool isHF(int etabin, int depth)
int64_t getIntValue(void) const
void calculateProblems(void)
void FillUnphysicalHEHFBins(EtaPhiHists &hh)
std::map< HcalDetId, unsigned int > badstatusmap
double getBinContent(int binx) const
get content of bin (1-D)
bool hasErrors_Temp(void)
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 Reset(void)
reset ME (ie. contents, errors, etc)
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
void setCurrentFolder(const std::string &fullpath)
HcalDeadCellClient()
Constructors.
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)