31 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
32 prefixME_.append(
"/");
58 if (
debug_>2)
std::cout <<
"\tHcalCoarsePedestalClient::analyze()"<<std::endl;
64 if (
debug_>2)
std::cout <<
"\t\tHcalCoarsePedestalClient::calculateProblems()"<<std::endl;
67 int etabins=0, phibins=0, zside=0;
68 double problemvalue=0;
92 TH2F* CoarsePedestalsSumByDepth[4];
93 TH2F* CoarsePedestalsOccByDepth[4];
106 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::calculateProblems> Could not get histogram with name "<<s<<std::endl;
108 CoarsePedestalsSumByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, CoarsePedestalsSumByDepth[
i],
debug_);
110 s=
subdir_+
"CoarsePedestalSumPlots/"+name[
i]+
"Coarse Pedestal Occupancy Map";
115 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::calculateProblems> Could not get histogram with name "<<s<<std::endl;
117 CoarsePedestalsOccByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, CoarsePedestalsOccByDepth[
i],
debug_);
121 if (gothistos==
false)
123 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::calculateProblems> Unable to get all necessary histograms to evaluate problem rate"<<std::endl;
133 if (CoarsePedestalsSumByDepth[d]==0 ||
134 CoarsePedestalsOccByDepth[d]==0 ||
145 if (ieta==-9999)
continue;
148 if (
abs(ieta)>20 && (
phi+1)%2==0)
150 if (
abs(ieta)>39 && (
phi+1)%4!=3)
152 numevents=(int)CoarsePedestalsOccByDepth[d]->GetBinContent(
eta+1,
phi+1);
156 std::cout <<
"NOT ENOUGH EVENTS for channel ("<<ieta<<
", "<<
phi+1<<
", "<<d+1<<
") numevents = "<<numevents<<
" minevents = "<<
minevents_<<std::endl;
160 problemvalue=1.*CoarsePedestalsSumByDepth[d]->GetBinContent(
eta+1,
phi+1)/numevents;
164 problemvalue=fabs(problemvalue);
168 if (
debug_>0 && problemvalue==1)
169 std::cout <<
"<HcalCoarsePedestalClient> Problem found for channel ("<<ieta<<
", "<<
phi+1<<
", "<<d+1<<
")"<<std::endl;
172 ieta<0 ? zside = -1 : zside = 1;
194 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
222 std::cout <<
"<HcalCoarsePedestalClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
234 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::beginRun> dqmStore does not exist!"<<std::endl;
245 " Problem Coarse Pedestal Rate for all HCAL;ieta;iphi",
260 for (
int i=0;
i<4;++
i)
266 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::beginRun> Could not get histogram with name "<<s<<std::endl;
275 std::cout <<
"<HcalCoarsePedestalClient::beginRun> Could not get value with name "<<s<<std::endl;
279 s=
subdir_+
"CoarsePedestal_parameters/minEventsNeededForPedestalCalculation";
287 std::cout <<
"<HcalCoarsePedestalClient::beginRun> Could not get value with name "<<s<<
"\n\t Continuing on using default 'minevents' value of "<<
minevents_<<std::endl;
295 std::cout <<
"<HcalCoarsePedestalClient::beginRun> Specified client 'minevents' value of "<<
minevents_<<
" is less than minimum task 'minevents' value of "<<temp<<
"\n\t Setting client 'minevents' to "<<temp<<std::endl;
309 if (
debug_>1)
std::cout <<
"<HcalCoarsePedestalClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
315 for (
int depth=0;depth<4; ++depth)
319 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
321 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
324 if (ieta==-9999)
continue;
334 if (problemcount>0)
return true;
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)
MonitorElement * CoarsePedDiff
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
HcalCoarsePedestalClient()
Constructors.
std::vector< std::string > HcalEtaPhiHistNames()
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
TH2F * DatabasePedestalsADCByDepth[4]
bool isHE(int etabin, int depth)
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
std::vector< std::string > problemnames_
EtaPhiHists * ProblemCellsByDepth
double getFloatValue(void) const
~HcalCoarsePedestalClient()
Destructor.
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 hasWarnings_Temp(void)
bool hasErrors_Temp(void)
bool isHF(int etabin, int depth)
int64_t getIntValue(void) const
std::map< HcalDetId, unsigned int > badstatusmap
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
void calculateProblems(void)
double getBinContent(int binx) const
get content of bin (1-D)
void showDirStructure(void) const
int badChannelStatusMask_
TH2F * getTH2F(void) const
EtaPhiHists * CoarsePedestalsByDepth
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)