29 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
30 prefixME_.append(
"/");
64 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;
108 me=ig.
get(s.c_str());
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";
112 me=ig.
get(s.c_str());
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";
116 me=ig.
get(s.c_str());
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";
120 me=ig.
get(s.c_str());
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";
124 me=ig.
get(s.c_str());
125 if (me!=0)HotNeighborsByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, HotNeighborsByDepth[
i],
debug_);
126 s=
subdir_+
"hot_neighbortest/NeighborTestEnabled";
127 me=ig.
get(s.c_str());
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;
227 " Problem Hot Cell Rate for all HCAL;ieta;iphi",
258 if (
debug_>1)
std::cout <<
"<HcalHotCellClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
268 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
270 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
273 if (ieta==-9999)
continue;
282 if (problemcount>0)
return true;
305 std::cout <<
"<HcalHotCellClient> Summary of Hot Cells in Run: "<<std::endl;
308 for (
int d=0;
d<4;++
d)
312 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
315 if (ieta==-9999)
continue;
316 for (
int hist_phi=0;hist_phi<phibins;++hist_phi)
326 if (
isHB(hist_eta,
d+1))
328 else if (
isHE(hist_eta,
d+1))
330 else if (
isHF(hist_eta,
d+1))
347 if (hotcell==1 &&
debug_>0)
348 std::cout <<
"Hot Cell : subdetector = "<<subdet<<
" (eta,phi,depth) = ("<<ieta<<
", "<<iphi<<
", "<<
d+1<<
"): "<<binval*100.<<
"%"<<std::endl;
351 if (myqual.find(myid)==myqual.end())
365 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)
bool hasWarnings_Temp(void)
MonitorElement * get(const std::string &path)
std::vector< std::string > HcalEtaPhiHistNames()
bool isHE(int etabin, int depth)
void setupProblemCells(DQMStore::IBooker &, DQMStore::IGetter &)
HcalHotCellClient()
Constructors.
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
std::vector< std::string > problemnames_
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
~HcalHotCellClient()
Destructor.
EtaPhiHists * ProblemCellsByDepth
bool hasErrors_Temp(void)
void setup(DQMStore::IBooker &m_dbe, std::string Name, std::string Units="")
bool isHB(int etabin, int depth)
void analyze(DQMStore::IBooker &, DQMStore::IGetter &)
virtual void calculateProblems(void)
bool isHF(int etabin, int depth)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
std::map< HcalDetId, unsigned int > badstatusmap
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
double getBinContent(int binx) const
get content of bin (1-D)
int badChannelStatusMask_
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)