30 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
31 prefixME_.append(
"/");
66 if (
debug_>2)
std::cout <<
"\t\tHcalDeadCellClient::calculateProblems()"<<std::endl;
76 int excludeFromHOring2 = 0;
81 std::cout <<
"Read 'excludeFromHOring2' from HcalMonitorTask output; value = "<<excludeFromHOring2<<std::endl;
87 std::cout <<
"Could not read excludeFromHOring2 from HcalMonitorTasks; using value from cfg file: "<<excludeFromHOring2<<std::endl;
118 double totalevents=0;
119 int etabins=0, phibins=0,
zside=0;
120 double problemvalue=0;
140 TH2F* DigiPresentByDepth[4];
141 TH2F* RecentMissingDigisByDepth[4];
142 TH2F* RecHitsPresentByDepth[4];
143 TH2F* RecentMissingRecHitsByDepth[4];
148 for (
int i=0;
i<4;++
i)
151 DigiPresentByDepth[
i]=0;
152 RecentMissingDigisByDepth[
i]=0;
153 RecHitsPresentByDepth[
i]=0;
154 RecentMissingRecHitsByDepth[
i]=0;
158 if (me!=0) DigiPresentByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, DigiPresentByDepth[
i],
debug_);
160 s=
subdir_+
"dead_digi_often_missing/"+name[
i]+
"Dead Cells with No Digis";
162 if (me!=0) RecentMissingDigisByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecentMissingDigisByDepth[
i],
debug_);
164 s=
subdir_+
"dead_rechit_never_present/"+name[
i]+
"RecHit Above Threshold At Least Once";
166 if (me!=0) RecHitsPresentByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecHitsPresentByDepth[
i],
debug_);
168 s=
subdir_+
"dead_rechit_often_missing/"+name[
i]+
"RecHits Failing Energy Threshold Test";
170 if (me!=0)RecentMissingRecHitsByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecentMissingRecHitsByDepth[
i],
debug_);
181 if (DigiPresentByDepth[d]==0)
continue;
184 totalevents=DigiPresentByDepth[d]->GetBinContent(0);
185 if (totalevents==0 || totalevents<
minevents_)
continue;
193 if (ieta==-9999)
continue;
199 if (
isHO(
eta,d+1) && excludeFromHOring2>0 &&
isSiPM(ieta,
phi+1,d+1)==
false &&
abs(ieta)>10)
208 if (DigiPresentByDepth[d]!=0 && DigiPresentByDepth[d]->GetBinContent(
eta+1,
phi+1)==0)
209 problemvalue=totalevents;
212 else if (RecHitsPresentByDepth[d]!=0)
214 if (RecHitsPresentByDepth[d]->GetBinContent(
eta+1,
phi+1)==0)
215 problemvalue=totalevents;
216 else if (RecHitsPresentByDepth[d]->GetBinContent(
eta+1,
phi+1)>1)
217 RecHitsPresentByDepth[d]->SetBinContent(
eta+1,
phi+1,1);
221 if (RecentMissingDigisByDepth[d]!=0)
222 problemvalue+=RecentMissingDigisByDepth[d]->GetBinContent(
eta+1,
phi+1);
223 if (RecentMissingRecHitsByDepth[d]!=0)
224 problemvalue+=RecentMissingRecHitsByDepth[d]->GetBinContent(
eta+1,
phi+1);
227 if (problemvalue==0)
continue;
229 problemvalue/=totalevents;
230 problemvalue =
std::min(1.,problemvalue);
234 ieta<0 ?
zside = -1 : zside = 1;
257 if (
debug_>0)
std::cout <<
"<HcalDeadCellClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
283 std::cout <<
"<HcalDeadCellClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
298 if (
debug_>0)
std::cout <<
"<HcalDeadCellClient::beginRun> dqmStore does not exist!"<<std::endl;
304 " Problem Dead Cell Rate for all HCAL;ieta;iphi",
328 if (
debug_>1)
std::cout <<
"<HcalDeadCellClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
334 for (
int depth=0;depth<4; ++depth)
338 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
340 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
343 if (ieta==-9999)
continue;
352 if (problemcount>0)
return true;
377 std::cout <<
"<HcalDeadCellClient> Summary of Dead Cells in Run: "<<std::endl;
380 for (
int d=0;d<4;++d)
384 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
387 if (ieta==-9999)
continue;
388 for (
int hist_phi=0;hist_phi<phibins;++hist_phi)
398 if (
isHB(hist_eta,d+1))
400 else if (
isHE(hist_eta,d+1))
402 else if (
isHF(hist_eta,d+1))
419 if (deadcell==1 &&
debug_>0)
420 std::cout <<
"Dead Cell : subdetector = "<<subdet<<
" (eta,phi,depth) = ("<<ieta<<
", "<<iphi<<
", "<<d+1<<
"): "<<binval*100.<<
"%"<<std::endl;
423 if (myqual.find(myid)==myqual.end())
435 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)
bool isSiPM(int ieta, int iphi, int depth)
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
std::vector< std::string > problemnames_
EtaPhiHists * ProblemCellsByDepth
Abs< T >::type abs(const T &t)
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)
bool excludeHOring2_backup_
bool isHF(int etabin, int depth)
~HcalDeadCellClient()
Destructor.
int64_t getIntValue(void) const
void calculateProblems(void)
std::map< HcalDetId, unsigned int > badstatusmap
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
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)