29 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
30 prefixME_.append(
"/");
61 if (
debug_>2)
std::cout <<
"\t\tHcalHotCellClient::calculateProblems()"<<std::endl;
64 int etabins=0, phibins=0, zside=0;
65 double problemvalue=0;
85 TH2F* HotAboveThresholdByDepth[4];
86 TH2F* HotAlwaysAboveThresholdByDepth[4];
87 TH2F* HotAboveETThresholdByDepth[4];
88 TH2F* HotAlwaysAboveETThresholdByDepth[4];
89 TH2F* HotNeighborsByDepth[4];
93 bool neighbortest=
false;
99 HotAboveThresholdByDepth[
i]=0;
100 HotAlwaysAboveThresholdByDepth[
i]=0;
101 HotAboveETThresholdByDepth[
i]=0;
102 HotAlwaysAboveETThresholdByDepth[
i]=0;
103 HotNeighborsByDepth[
i]=0;
107 if (me!=0)HotAboveETThresholdByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotAboveETThresholdByDepth[
i],
debug_);
109 s=
subdir_+
"hot_rechit_always_above_threshold/"+name[
i]+
"Hot Cells Persistently Above ET Threshold";
111 if (me!=0)HotAlwaysAboveETThresholdByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotAlwaysAboveETThresholdByDepth[
i],
debug_);
113 s=
subdir_+
"hot_rechit_above_threshold/"+name[
i]+
"Hot Cells Above Energy Threshold";
115 if (me!=0)HotAboveThresholdByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotAboveThresholdByDepth[
i],
debug_);
117 s=
subdir_+
"hot_rechit_always_above_threshold/"+name[
i]+
"Hot Cells Persistently Above Energy Threshold";
119 if (me!=0)HotAlwaysAboveThresholdByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotAlwaysAboveThresholdByDepth[
i],
debug_);
121 s=
subdir_+
"hot_neighbortest/"+name[
i]+
"Hot Cells Failing Neighbor Test";
123 if (me!=0)HotNeighborsByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotNeighborsByDepth[
i],
debug_);
124 s=
subdir_+
"hot_neighbortest/NeighborTestEnabled";
126 if (me!=0 && me->getIntValue()==1)
138 if (HotAboveETThresholdByDepth[d]) totalevents =
std::max(totalevents, HotAboveETThresholdByDepth[d]->GetBinContent(0));
139 else if (HotAlwaysAboveETThresholdByDepth[d]) totalevents =
std::max(totalevents, HotAlwaysAboveETThresholdByDepth[d]->GetBinContent(0));
140 else if (HotAboveThresholdByDepth[d]) totalevents =
std::max(totalevents, HotAboveThresholdByDepth[d]->GetBinContent(0));
141 else if (HotAlwaysAboveThresholdByDepth[d]) totalevents =
std::max(totalevents, HotAlwaysAboveThresholdByDepth[d]->GetBinContent(0));
142 else if (neighbortest==
true && HotNeighborsByDepth[d]) totalevents =
std::max(totalevents, HotNeighborsByDepth[d]->GetBinContent(0));
143 else if (
debug_>0)
std::cout <<
"<HcalHotCellClient::calculateProblems> No evaluation histograms found; no valid hot tests enabled?" << std::endl;
144 if (totalevents==0 || totalevents<
minevents_)
continue;
152 if (ieta==-9999)
continue;
157 if (HotAboveETThresholdByDepth[d]!=0)
158 problemvalue+=HotAboveETThresholdByDepth[d]->GetBinContent(
eta+1,
phi+1);
159 if (HotAboveThresholdByDepth[d]!=0)
160 problemvalue+=HotAboveThresholdByDepth[d]->GetBinContent(
eta+1,
phi+1);
161 if (HotAlwaysAboveThresholdByDepth[d]!=0)
162 problemvalue+=HotAlwaysAboveThresholdByDepth[d]->GetBinContent(
eta+1,
phi+1);
163 if (neighbortest==
true && HotNeighborsByDepth[d]!=0)
164 problemvalue+=HotNeighborsByDepth[d]->GetBinContent(
eta+1,
phi+1);
165 if (problemvalue==0)
continue;
166 problemvalue/=totalevents;
167 problemvalue =
std::min(1.,problemvalue);
171 ieta<0 ? zside = -1 : zside = 1;
194 if (
debug_>0)
std::cout <<
"<HcalHotCellClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
221 std::cout <<
"<HcalHotCellClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
233 if (
debug_>0)
std::cout <<
"<HcalHotCellClient::beginRun> dqmStore does not exist!"<<std::endl;
239 " Problem Hot Cell Rate for all HCAL;ieta;iphi",
263 if (
debug_>1)
std::cout <<
"<HcalHotCellClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
269 for (
int depth=0;depth<4; ++depth)
273 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
275 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
278 if (ieta==-9999)
continue;
287 if (problemcount>0)
return true;
310 std::cout <<
"<HcalHotCellClient> Summary of Hot Cells in Run: "<<std::endl;
313 for (
int d=0;d<4;++d)
317 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
320 if (ieta==-9999)
continue;
321 for (
int hist_phi=0;hist_phi<phibins;++hist_phi)
331 if (
isHB(hist_eta,d+1))
333 else if (
isHE(hist_eta,d+1))
335 else if (
isHF(hist_eta,d+1))
352 if (hotcell==1 &&
debug_>0)
353 std::cout <<
"Hot Cell : subdetector = "<<subdet<<
" (eta,phi,depth) = ("<<ieta<<
", "<<iphi<<
", "<<d+1<<
"): "<<binval*100.<<
"%"<<std::endl;
356 if (myqual.find(myid)==myqual.end())
370 myqual[myid] &=~mask;
bool isHO(int etabin, int depth)
void calculateProblems(void)
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 hasWarnings_Temp(void)
std::vector< std::string > HcalEtaPhiHistNames()
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
bool isHE(int etabin, int depth)
HcalHotCellClient()
Constructors.
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
const T & max(const T &a, const T &b)
std::vector< std::string > problemnames_
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
~HcalHotCellClient()
Destructor.
EtaPhiHists * ProblemCellsByDepth
bool hasErrors_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)
bool isHF(int etabin, int depth)
std::map< HcalDetId, unsigned int > badstatusmap
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
double getBinContent(int binx) const
get content of bin (1-D)
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 setCurrentFolder(const std::string &fullpath)
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)