29 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
30 prefixME_.append(
"/");
58 if (
debug_>2)
std::cout <<
"\tHcalCoarsePedestalClient::analyze()"<<std::endl;
65 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];
102 me=ig.
get(s.c_str());
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";
111 me=ig.
get(s.c_str());
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;
235 " Problem Coarse Pedestal Rate for all HCAL;ieta;iphi",
250 for (
int i=0;
i<4;++
i)
253 me=ig.
get(s.c_str());
256 if (
debug_>0)
std::cout <<
"<HcalCoarsePedestalClient::beginRun> Could not get histogram with name "<<s<<std::endl;
261 me=ig.
get(s.c_str());
265 std::cout <<
"<HcalCoarsePedestalClient::beginRun> Could not get value with name "<<s<<std::endl;
269 s=
subdir_+
"CoarsePedestal_parameters/minEventsNeededForPedestalCalculation";
271 me=ig.
get(s.c_str());
277 std::cout <<
"<HcalCoarsePedestalClient::beginRun> Could not get value with name "<<s<<
"\n\t Continuing on using default 'minevents' value of "<<
minevents_<<std::endl;
285 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;
302 if (
debug_>1)
std::cout <<
"<HcalCoarsePedestalClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
312 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
314 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
317 if (ieta==-9999)
continue;
327 if (problemcount>0)
return true;
bool isHO(int etabin, int depth)
void analyze(DQMStore::IBooker &, DQMStore::IGetter &)
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 * get(const std::string &path)
HcalCoarsePedestalClient()
Constructors.
std::vector< std::string > HcalEtaPhiHistNames()
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
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
void setupCoarsePedestal(DQMStore::IBooker &, DQMStore::IGetter &)
double getFloatValue(void) const
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
void setup(DQMStore::IBooker &m_dbe, std::string Name, std::string Units="")
~HcalCoarsePedestalClient()
Destructor.
bool isHB(int etabin, int depth)
bool hasWarnings_Temp(void)
bool hasErrors_Temp(void)
virtual void calculateProblems(void)
bool isHF(int etabin, int depth)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
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)
int badChannelStatusMask_
TH2F * getTH2F(void) const
EtaPhiHists * CoarsePedestalsByDepth
void Reset(void)
reset ME (ie. contents, errors, etc)