32 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
33 prefixME_.append(
"/");
68 if (
debug_>2)
std::cout <<
"\t\tHcalDeadCellClient::calculateProblems()"<<std::endl;
78 int excludeFromHOring2 = 0;
83 std::cout <<
"Read 'excludeFromHOring2' from HcalMonitorTask output; value = "<<excludeFromHOring2<<std::endl;
89 std::cout <<
"Could not read excludeFromHOring2 from HcalMonitorTasks; using value from cfg file: "<<excludeFromHOring2<<std::endl;
120 double totalevents=0;
121 int etabins=0, phibins=0, zside=0;
122 double problemvalue=0;
142 TH2F* DigiPresentByDepth[4];
143 TH2F* RecentMissingDigisByDepth[4];
144 TH2F* RecHitsPresentByDepth[4];
145 TH2F* RecentMissingRecHitsByDepth[4];
150 for (
int i=0;
i<4;++
i)
153 DigiPresentByDepth[
i]=0;
154 RecentMissingDigisByDepth[
i]=0;
155 RecHitsPresentByDepth[
i]=0;
156 RecentMissingRecHitsByDepth[
i]=0;
160 if (me!=0) DigiPresentByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, DigiPresentByDepth[
i],
debug_);
162 s=
subdir_+
"dead_digi_often_missing/"+name[
i]+
"Dead Cells with No Digis";
164 if (me!=0) RecentMissingDigisByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecentMissingDigisByDepth[
i],
debug_);
166 s=
subdir_+
"dead_rechit_never_present/"+name[
i]+
"RecHit Above Threshold At Least Once";
168 if (me!=0) RecHitsPresentByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecHitsPresentByDepth[
i],
debug_);
170 s=
subdir_+
"dead_rechit_often_missing/"+name[
i]+
"RecHits Failing Energy Threshold Test";
172 if (me!=0)RecentMissingRecHitsByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecentMissingRecHitsByDepth[
i],
debug_);
183 if (DigiPresentByDepth[d]==0)
continue;
186 totalevents=DigiPresentByDepth[d]->GetBinContent(0);
187 if (totalevents==0 || totalevents<
minevents_)
continue;
195 if (ieta==-9999)
continue;
201 if (
isHO(
eta,d+1) && excludeFromHOring2>0 &&
isSiPM(ieta,
phi+1,d+1)==
false &&
abs(ieta)>10)
210 if (DigiPresentByDepth[d]!=0 && DigiPresentByDepth[d]->GetBinContent(
eta+1,
phi+1)==0)
211 problemvalue=totalevents;
214 else if (RecHitsPresentByDepth[d]!=0)
216 if (RecHitsPresentByDepth[d]->GetBinContent(
eta+1,
phi+1)==0)
217 problemvalue=totalevents;
218 else if (RecHitsPresentByDepth[d]->GetBinContent(
eta+1,
phi+1)>1)
219 RecHitsPresentByDepth[d]->SetBinContent(
eta+1,
phi+1,1);
223 if (RecentMissingDigisByDepth[d]!=0)
224 problemvalue+=RecentMissingDigisByDepth[d]->GetBinContent(
eta+1,
phi+1);
225 if (RecentMissingRecHitsByDepth[d]!=0)
226 problemvalue+=RecentMissingRecHitsByDepth[d]->GetBinContent(
eta+1,
phi+1);
229 if (problemvalue==0)
continue;
231 problemvalue/=totalevents;
232 problemvalue =
std::min(1.,problemvalue);
236 ieta<0 ? zside = -1 : zside = 1;
259 if (
debug_>0)
std::cout <<
"<HcalDeadCellClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
285 std::cout <<
"<HcalDeadCellClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
300 if (
debug_>0)
std::cout <<
"<HcalDeadCellClient::beginRun> dqmStore does not exist!"<<std::endl;
306 " Problem Dead Cell Rate for all HCAL;ieta;iphi",
330 if (
debug_>1)
std::cout <<
"<HcalDeadCellClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
336 for (
int depth=0;depth<4; ++depth)
340 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
342 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
345 if (ieta==-9999)
continue;
354 if (problemcount>0)
return true;
379 std::cout <<
"<HcalDeadCellClient> Summary of Dead Cells in Run: "<<std::endl;
382 for (
int d=0;d<4;++d)
386 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
389 if (ieta==-9999)
continue;
390 for (
int hist_phi=0;hist_phi<phibins;++hist_phi)
400 if (
isHB(hist_eta,d+1))
402 else if (
isHE(hist_eta,d+1))
404 else if (
isHF(hist_eta,d+1))
421 if (deadcell==1 &&
debug_>0)
422 std::cout <<
"Dead Cell : subdetector = "<<subdet<<
" (eta,phi,depth) = ("<<ieta<<
", "<<iphi<<
", "<<d+1<<
"): "<<binval*100.<<
"%"<<std::endl;
425 if (myqual.find(myid)==myqual.end())
437 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
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)