31 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
32 prefixME_.append(
"/");
63 if (
debug_>2)
std::cout <<
"\t\tHcalHotCellClient::calculateProblems()"<<std::endl;
66 int etabins=0, phibins=0, zside=0;
67 double problemvalue=0;
87 TH2F* HotAboveThresholdByDepth[4];
88 TH2F* HotAlwaysAboveThresholdByDepth[4];
89 TH2F* HotAboveETThresholdByDepth[4];
90 TH2F* HotAlwaysAboveETThresholdByDepth[4];
91 TH2F* HotNeighborsByDepth[4];
95 bool neighbortest=
false;
101 HotAboveThresholdByDepth[
i]=0;
102 HotAlwaysAboveThresholdByDepth[
i]=0;
103 HotAboveETThresholdByDepth[
i]=0;
104 HotAlwaysAboveETThresholdByDepth[
i]=0;
105 HotNeighborsByDepth[
i]=0;
109 if (me!=0)HotAboveETThresholdByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotAboveETThresholdByDepth[
i],
debug_);
111 s=
subdir_+
"hot_rechit_always_above_threshold/"+name[
i]+
"Hot Cells Persistently Above ET Threshold";
113 if (me!=0)HotAlwaysAboveETThresholdByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotAlwaysAboveETThresholdByDepth[
i],
debug_);
115 s=
subdir_+
"hot_rechit_above_threshold/"+name[
i]+
"Hot Cells Above Energy Threshold";
117 if (me!=0)HotAboveThresholdByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotAboveThresholdByDepth[
i],
debug_);
119 s=
subdir_+
"hot_rechit_always_above_threshold/"+name[
i]+
"Hot Cells Persistently Above Energy Threshold";
121 if (me!=0)HotAlwaysAboveThresholdByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotAlwaysAboveThresholdByDepth[
i],
debug_);
123 s=
subdir_+
"hot_neighbortest/"+name[
i]+
"Hot Cells Failing Neighbor Test";
125 if (me!=0)HotNeighborsByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotNeighborsByDepth[
i],
debug_);
126 s=
subdir_+
"hot_neighbortest/NeighborTestEnabled";
128 if (me!=0 && me->getIntValue()==1)
140 if (HotAboveETThresholdByDepth[d]) totalevents =
std::max(totalevents, HotAboveETThresholdByDepth[d]->GetBinContent(0));
141 else if (HotAlwaysAboveETThresholdByDepth[d]) totalevents =
std::max(totalevents, HotAlwaysAboveETThresholdByDepth[d]->GetBinContent(0));
142 else if (HotAboveThresholdByDepth[d]) totalevents =
std::max(totalevents, HotAboveThresholdByDepth[d]->GetBinContent(0));
143 else if (HotAlwaysAboveThresholdByDepth[d]) totalevents =
std::max(totalevents, HotAlwaysAboveThresholdByDepth[d]->GetBinContent(0));
144 else if (neighbortest==
true && HotNeighborsByDepth[d]) totalevents =
std::max(totalevents, HotNeighborsByDepth[d]->GetBinContent(0));
145 else if (
debug_>0)
std::cout <<
"<HcalHotCellClient::calculateProblems> No evaluation histograms found; no valid hot tests enabled?" << std::endl;
146 if (totalevents==0 || totalevents<
minevents_)
continue;
154 if (ieta==-9999)
continue;
159 if (HotAboveETThresholdByDepth[d]!=0)
160 problemvalue+=HotAboveETThresholdByDepth[d]->GetBinContent(
eta+1,
phi+1);
161 if (HotAboveThresholdByDepth[d]!=0)
162 problemvalue+=HotAboveThresholdByDepth[d]->GetBinContent(
eta+1,
phi+1);
163 if (HotAlwaysAboveThresholdByDepth[d]!=0)
164 problemvalue+=HotAlwaysAboveThresholdByDepth[d]->GetBinContent(
eta+1,
phi+1);
165 if (neighbortest==
true && HotNeighborsByDepth[d]!=0)
166 problemvalue+=HotNeighborsByDepth[d]->GetBinContent(
eta+1,
phi+1);
167 if (problemvalue==0)
continue;
168 problemvalue/=totalevents;
169 problemvalue =
std::min(1.,problemvalue);
173 ieta<0 ? zside = -1 : zside = 1;
196 if (
debug_>0)
std::cout <<
"<HcalHotCellClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
223 std::cout <<
"<HcalHotCellClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
235 if (
debug_>0)
std::cout <<
"<HcalHotCellClient::beginRun> dqmStore does not exist!"<<std::endl;
241 " Problem Hot Cell Rate for all HCAL;ieta;iphi",
265 if (
debug_>1)
std::cout <<
"<HcalHotCellClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
271 for (
int depth=0;depth<4; ++depth)
275 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
277 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
280 if (ieta==-9999)
continue;
289 if (problemcount>0)
return true;
312 std::cout <<
"<HcalHotCellClient> Summary of Hot Cells in Run: "<<std::endl;
315 for (
int d=0;d<4;++d)
319 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
322 if (ieta==-9999)
continue;
323 for (
int hist_phi=0;hist_phi<phibins;++hist_phi)
333 if (
isHB(hist_eta,d+1))
335 else if (
isHE(hist_eta,d+1))
337 else if (
isHF(hist_eta,d+1))
354 if (hotcell==1 &&
debug_>0)
355 std::cout <<
"Hot Cell : subdetector = "<<subdet<<
" (eta,phi,depth) = ("<<ieta<<
", "<<iphi<<
", "<<d+1<<
"): "<<binval*100.<<
"%"<<std::endl;
358 if (myqual.find(myid)==myqual.end())
372 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)