29 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
30 prefixME_.append(
"/");
56 if (
debug_>2)
std::cout <<
"\tHcalCoarsePedestalClient::analyze()"<<std::endl;
62 if (
debug_>2)
std::cout <<
"\t\tHcalCoarsePedestalClient::calculateProblems()"<<std::endl;
65 int etabins=0, phibins=0, zside=0;
66 double problemvalue=0;
90 TH2F* CoarsePedestalsSumByDepth[4];
91 TH2F* CoarsePedestalsOccByDepth[4];
104 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::calculateProblems> Could not get histogram with name "<<s<<std::endl;
106 CoarsePedestalsSumByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, CoarsePedestalsSumByDepth[
i],
debug_);
108 s=
subdir_+
"CoarsePedestalSumPlots/"+name[
i]+
"Coarse Pedestal Occupancy Map";
113 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::calculateProblems> Could not get histogram with name "<<s<<std::endl;
115 CoarsePedestalsOccByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, CoarsePedestalsOccByDepth[
i],
debug_);
119 if (gothistos==
false)
121 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::calculateProblems> Unable to get all necessary histograms to evaluate problem rate"<<std::endl;
131 if (CoarsePedestalsSumByDepth[d]==0 ||
132 CoarsePedestalsOccByDepth[d]==0 ||
143 if (ieta==-9999)
continue;
146 if (
abs(ieta)>20 && (
phi+1)%2==0)
148 if (
abs(ieta)>39 && (
phi+1)%4!=3)
150 numevents=(int)CoarsePedestalsOccByDepth[d]->GetBinContent(
eta+1,
phi+1);
154 std::cout <<
"NOT ENOUGH EVENTS for channel ("<<ieta<<
", "<<
phi+1<<
", "<<d+1<<
") numevents = "<<numevents<<
" minevents = "<<
minevents_<<std::endl;
158 problemvalue=1.*CoarsePedestalsSumByDepth[d]->GetBinContent(
eta+1,
phi+1)/numevents;
162 problemvalue=fabs(problemvalue);
166 if (
debug_>0 && problemvalue==1)
167 std::cout <<
"<HcalCoarsePedestalClient> Problem found for channel ("<<ieta<<
", "<<
phi+1<<
", "<<d+1<<
")"<<std::endl;
170 ieta<0 ? zside = -1 : zside = 1;
192 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
220 std::cout <<
"<HcalCoarsePedestalClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
232 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::beginRun> dqmStore does not exist!"<<std::endl;
243 " Problem Coarse Pedestal Rate for all HCAL;ieta;iphi",
258 for (
int i=0;
i<4;++
i)
264 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::beginRun> Could not get histogram with name "<<s<<std::endl;
273 std::cout <<
"<HcalCoarsePedestalClient::beginRun> Could not get value with name "<<s<<std::endl;
277 s=
subdir_+
"CoarsePedestal_parameters/minEventsNeededForPedestalCalculation";
285 std::cout <<
"<HcalCoarsePedestalClient::beginRun> Could not get value with name "<<s<<
"\n\t Continuing on using default 'minevents' value of "<<
minevents_<<std::endl;
293 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;
307 if (
debug_>1)
std::cout <<
"<HcalCoarsePedestalClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
313 for (
int depth=0;depth<4; ++depth)
317 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
319 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
322 if (ieta==-9999)
continue;
332 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
Abs< T >::type abs(const T &t)
~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)