30 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
31 prefixME_.append(
"/");
69 if (
debug_>2)
std::cout <<
"\t\tHcalDeadCellClient::calculateProblems()"<<std::endl;
74 int excludeFromHOring2 = 0;
79 std::cout <<
"Read 'excludeFromHOring2' from HcalMonitorTask output; value = "<<excludeFromHOring2<<std::endl;
85 std::cout <<
"Could not read excludeFromHOring2 from HcalMonitorTasks; using value from cfg file: "<<excludeFromHOring2<<std::endl;
116 double totalevents=0;
117 int etabins=0, phibins=0,
zside=0;
118 double problemvalue=0;
138 TH2F* DigiPresentByDepth[4];
139 TH2F* RecentMissingDigisByDepth[4];
140 TH2F* RecHitsPresentByDepth[4];
141 TH2F* RecentMissingRecHitsByDepth[4];
146 for (
int i=0;
i<4;++
i)
149 DigiPresentByDepth[
i]=0;
150 RecentMissingDigisByDepth[
i]=0;
151 RecHitsPresentByDepth[
i]=0;
152 RecentMissingRecHitsByDepth[
i]=0;
155 me=ig.
get(s.c_str());
156 if (me!=0) DigiPresentByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, DigiPresentByDepth[
i],
debug_);
158 s=
subdir_+
"dead_digi_often_missing/"+name[
i]+
"Dead Cells with No Digis";
159 me=ig.
get(s.c_str());
160 if (me!=0) RecentMissingDigisByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecentMissingDigisByDepth[
i],
debug_);
162 s=
subdir_+
"dead_rechit_never_present/"+name[
i]+
"RecHit Above Threshold At Least Once";
163 me=ig.
get(s.c_str());
164 if (me!=0) RecHitsPresentByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecHitsPresentByDepth[
i],
debug_);
166 s=
subdir_+
"dead_rechit_often_missing/"+name[
i]+
"RecHits Failing Energy Threshold Test";
167 me=ig.
get(s.c_str());
168 if (me!=0)RecentMissingRecHitsByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, RecentMissingRecHitsByDepth[
i],
debug_);
179 if (DigiPresentByDepth[
d]==0)
continue;
182 totalevents=DigiPresentByDepth[
d]->GetBinContent(0);
183 if (totalevents==0 || totalevents<
minevents_)
continue;
191 if (ieta==-9999)
continue;
206 if (DigiPresentByDepth[
d]!=0 && DigiPresentByDepth[
d]->GetBinContent(
eta+1,
phi+1)==0)
207 problemvalue=totalevents;
210 else if (RecHitsPresentByDepth[
d]!=0)
212 if (RecHitsPresentByDepth[
d]->GetBinContent(
eta+1,
phi+1)==0)
213 problemvalue=totalevents;
214 else if (RecHitsPresentByDepth[
d]->GetBinContent(
eta+1,
phi+1)>1)
215 RecHitsPresentByDepth[
d]->SetBinContent(
eta+1,
phi+1,1);
219 if (RecentMissingDigisByDepth[
d]!=0)
220 problemvalue+=RecentMissingDigisByDepth[
d]->GetBinContent(
eta+1,
phi+1);
221 if (RecentMissingRecHitsByDepth[
d]!=0)
222 problemvalue+=RecentMissingRecHitsByDepth[
d]->GetBinContent(
eta+1,
phi+1);
225 if (problemvalue==0)
continue;
227 problemvalue/=totalevents;
228 problemvalue =
std::min(1.,problemvalue);
232 ieta<0 ?
zside = -1 : zside = 1;
255 if (
debug_>0)
std::cout <<
"<HcalDeadCellClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
284 " Problem Dead Cell Rate for all HCAL;ieta;iphi",
320 if (
debug_>1)
std::cout <<
"<HcalDeadCellClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
330 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
332 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
335 if (ieta==-9999)
continue;
344 if (problemcount>0)
return true;
369 std::cout <<
"<HcalDeadCellClient> Summary of Dead Cells in Run: "<<std::endl;
372 for (
int d=0;
d<4;++
d)
376 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
379 if (ieta==-9999)
continue;
380 for (
int hist_phi=0;hist_phi<phibins;++hist_phi)
390 if (
isHB(hist_eta,
d+1))
392 else if (
isHE(hist_eta,
d+1))
394 else if (
isHF(hist_eta,
d+1))
411 if (deadcell==1 &&
debug_>0)
412 std::cout <<
"Dead Cell : subdetector = "<<subdet<<
" (eta,phi,depth) = ("<<ieta<<
", "<<iphi<<
", "<<
d+1<<
"): "<<binval*100.<<
"%"<<std::endl;
415 if (myqual.find(myid)==myqual.end())
427 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
void setupProblemCells(DQMStore::IBooker &, DQMStore::IGetter &)
MonitorElement * ProblemCells
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * get(const std::string &path)
std::vector< std::string > HcalEtaPhiHistNames()
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)
void setup(DQMStore::IBooker &m_dbe, std::string Name, std::string Units="")
bool isHB(int etabin, int depth)
bool excludeHOring2_backup_
virtual void calculateProblems(void)
bool isHF(int etabin, int depth)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
~HcalDeadCellClient()
Destructor.
int64_t getIntValue(void) const
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 analyze(DQMStore::IBooker &, DQMStore::IGetter &)
int badChannelStatusMask_
TH2F * getTH2F(void) const
void Reset(void)
reset ME (ie. contents, errors, etc)
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
HcalDeadCellClient()
Constructors.
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)