29 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
30 prefixME_.append(
"/");
57 TH2F* OccupancyByDepth[4];
58 TH2F* SumEnergyByDepth[4];
59 TH2F* SumTimeByDepth[4];
60 TH2F* SqrtSumEnergy2ByDepth[4];
62 TH2F* OccupancyThreshByDepth[4];
63 TH2F* SumEnergyThreshByDepth[4];
64 TH2F* SumTimeThreshByDepth[4];
65 TH2F* SqrtSumEnergy2ThreshByDepth[4];
76 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
77 OccupancyByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, OccupancyByDepth[
i],
debug_);
78 s=
subdir_+
"Distributions_AllRecHits/sumplots/"+name[
i]+
"RecHit Summed Energy GeV";
80 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
81 SumEnergyByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SumEnergyByDepth[
i],
debug_);
82 s=
subdir_+
"Distributions_AllRecHits/sumplots/"+name[
i]+
"RecHit Summed Time nS";
84 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
85 SumTimeByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SumTimeByDepth[
i],
debug_);
86 s=
subdir_+
"Distributions_AllRecHits/sumplots/"+name[
i]+
"RecHit Sqrt Summed Energy2 GeV";
88 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
89 SqrtSumEnergy2ByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SqrtSumEnergy2ByDepth[
i],
debug_);
92 s=
subdir_+
"Distributions_PassedMinBias/"+name[
i]+
"Above Threshold RecHit Occupancy";
94 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
95 OccupancyThreshByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, OccupancyThreshByDepth[
i],
debug_);
96 s=
subdir_+
"Distributions_PassedMinBias/sumplots/"+name[
i]+
"Above Threshold RecHit Summed Energy GeV";
98 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
99 SumEnergyThreshByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SumEnergyThreshByDepth[
i],
debug_);
100 s=
subdir_+
"Distributions_PassedMinBias/sumplots/"+name[
i]+
"Above Threshold RecHit Summed Time nS";
102 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
103 SumTimeThreshByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SumTimeThreshByDepth[
i],
debug_);
104 s=
subdir_+
"Distributions_PassedMinBias/sumplots/"+name[
i]+
"Above Threshold RecHit Sqrt Summed Energy2 GeV";
106 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
107 SqrtSumEnergy2ThreshByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SqrtSumEnergy2ThreshByDepth[
i],
debug_);
109 if (gotHistos==
false)
111 if (
debug_>0)
std::cout <<
"<HcalRecHitClient::calculateProblems()> Not all histograms could be found; skipping normalization"<<std::endl;
133 for (
int mydepth=0;mydepth<4;++mydepth)
135 for (
int eta=0;
eta<OccupancyByDepth[mydepth]->GetNbinsX();++
eta)
142 if (OccupancyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)>0)
150 meHBEnergyRMS_1D->
Fill(
sqrt(
pow(SqrtSumEnergy2ByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)/OccupancyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)-
pow(SumEnergyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)/OccupancyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)));
159 meHEEnergyRMS_1D->
Fill(
sqrt(
pow(SqrtSumEnergy2ByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)/OccupancyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)-
pow(SumEnergyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)/OccupancyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)));
167 meHOEnergyRMS_1D->
Fill(
sqrt(
pow(SqrtSumEnergy2ByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)/OccupancyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)-
pow(SumEnergyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)/OccupancyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)));
175 meHFEnergyRMS_1D->
Fill(
sqrt(
pow(SqrtSumEnergy2ByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)/OccupancyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)-
pow(SumEnergyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)/OccupancyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)));
184 if (OccupancyThreshByDepth[mydepth]==0)
continue;
185 if (OccupancyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)>0)
193 double RMS=
pow(SqrtSumEnergy2ThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)/OccupancyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)-
pow(SumEnergyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)/OccupancyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2);
194 RMS=
pow(fabs(RMS),0.5);
204 double RMS=
pow(SqrtSumEnergy2ThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)/OccupancyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)-
pow(SumEnergyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)/OccupancyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2);
205 RMS=
pow(fabs(RMS),0.5);
214 double RMS=
pow(SqrtSumEnergy2ThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)/OccupancyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)-
pow(SumEnergyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)/OccupancyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2);
215 RMS=
pow(fabs(RMS),0.5);
224 double RMS=
pow(SqrtSumEnergy2ThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2)/OccupancyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)-
pow(SumEnergyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)/OccupancyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1),2);
225 RMS=
pow(fabs(RMS),0.5);
247 if (
debug_>2)
std::cout <<
"\t\tHcalRecHitClient::calculateProblems()"<<std::endl;
249 double totalevents=0;
250 int etabins=0, phibins=0, zside=0;
251 double problemvalue=0;
286 if (totalevents==0 || totalevents<
minevents_)
continue;
293 if (ieta==-9999)
continue;
301 if (problemvalue==0)
continue;
302 problemvalue/=totalevents;
303 problemvalue =
std::min(1.,problemvalue);
307 ieta<0 ? zside = -1 : zside = 1;
332 if (
debug_>0)
std::cout <<
"<HcalRecHitClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
358 std::cout <<
"<HcalRecHitClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
370 if (
debug_>0)
std::cout <<
"<HcalRecHitClient::beginRun> dqmStore does not exist!"<<std::endl;
376 "Problem RecHit Rate for all HCAL;ieta;iphi",
402 for (
int x=1;
x<=etabins;++
x)
403 for (
int y=1;
y<=phibins;++
y)
419 for (
int x=1;
x<=etabins;++
x)
420 for (
int y=1;
y<=phibins;++
y)
460 if (
debug_>1)
std::cout <<
"<HcalRecHitClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
466 for (
int depth=0;depth<4; ++depth)
470 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
472 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
475 if (ieta==-9999)
continue;
484 if (problemcount>0)
return true;
bool isHO(int etabin, int depth)
MonitorElement * meHFEnergyThresh_1D
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 * meHOEnergyRMS_1D
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * meHEEnergyRMS_1D
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
MonitorElement * meHFEnergyRMS_1D
MonitorElement * meHEEnergyRMSThresh_1D
std::vector< std::string > HcalEtaPhiHistNames()
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
HcalRecHitClient()
Constructors.
MonitorElement * meHBEnergyRMS_1D
bool isHE(int etabin, int depth)
EtaPhiHists * meTimeThreshByDepth
MonitorElement * meHFEnergyRMSThresh_1D
MonitorElement * meHEEnergy_1D
MonitorElement * meHBEnergy_1D
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
MonitorElement * meHOEnergyRMSThresh_1D
bool hasErrors_Temp(void)
std::vector< std::string > problemnames_
EtaPhiHists * ProblemCellsByDepth
EtaPhiHists * meEnergyThreshByDepth
MonitorElement * meHOEnergyThresh_1D
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)
MonitorElement * meHOEnergy_1D
MonitorElement * meHEEnergyThresh_1D
~HcalRecHitClient()
Destructor.
bool isHF(int etabin, int depth)
MonitorElement * meHFEnergy_1D
EtaPhiHists * meEnergyByDepth
MonitorElement * meHBEnergyThresh_1D
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)
EtaPhiHists * meTimeByDepth
MonitorElement * meHBEnergyRMSThresh_1D
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)
bool hasWarnings_Temp(void)
Power< A, B >::type pow(const A &a, const B &b)
void setCurrentFolder(const std::string &fullpath)
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)