31 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
32 prefixME_.append(
"/");
59 TH2F* OccupancyByDepth[4];
60 TH2F* SumEnergyByDepth[4];
61 TH2F* SumTimeByDepth[4];
62 TH2F* SqrtSumEnergy2ByDepth[4];
64 TH2F* OccupancyThreshByDepth[4];
65 TH2F* SumEnergyThreshByDepth[4];
66 TH2F* SumTimeThreshByDepth[4];
67 TH2F* SqrtSumEnergy2ThreshByDepth[4];
76 std::string
s=
subdir_+
"Distributions_AllRecHits/"+name[
i]+
"RecHit Occupancy";
78 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
79 OccupancyByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, OccupancyByDepth[
i],
debug_);
80 s=
subdir_+
"Distributions_AllRecHits/sumplots/"+name[
i]+
"RecHit Summed Energy GeV";
82 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
83 SumEnergyByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SumEnergyByDepth[
i],
debug_);
84 s=
subdir_+
"Distributions_AllRecHits/sumplots/"+name[
i]+
"RecHit Summed Time nS";
86 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
87 SumTimeByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SumTimeByDepth[
i],
debug_);
88 s=
subdir_+
"Distributions_AllRecHits/sumplots/"+name[
i]+
"RecHit Sqrt Summed Energy2 GeV";
90 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
91 SqrtSumEnergy2ByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SqrtSumEnergy2ByDepth[
i],
debug_);
94 s=
subdir_+
"Distributions_PassedMinBias/"+name[
i]+
"Above Threshold RecHit Occupancy";
96 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
97 OccupancyThreshByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, OccupancyThreshByDepth[
i],
debug_);
98 s=
subdir_+
"Distributions_PassedMinBias/sumplots/"+name[
i]+
"Above Threshold RecHit Summed Energy GeV";
100 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
101 SumEnergyThreshByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SumEnergyThreshByDepth[
i],
debug_);
102 s=
subdir_+
"Distributions_PassedMinBias/sumplots/"+name[
i]+
"Above Threshold RecHit Summed Time nS";
104 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
105 SumTimeThreshByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SumTimeThreshByDepth[
i],
debug_);
106 s=
subdir_+
"Distributions_PassedMinBias/sumplots/"+name[
i]+
"Above Threshold RecHit Sqrt Summed Energy2 GeV";
108 if (me==0) {
if (
debug_>0)
std::cout <<
"Could not get histogram "<<s<<std::endl; gotHistos=
false;
break;}
109 SqrtSumEnergy2ThreshByDepth[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, SqrtSumEnergy2ThreshByDepth[
i],
debug_);
111 if (gotHistos==
false)
113 if (
debug_>0)
std::cout <<
"<HcalRecHitClient::calculateProblems()> Not all histograms could be found; skipping normalization"<<std::endl;
135 for (
int mydepth=0;mydepth<4;++mydepth)
137 for (
int eta=0;
eta<OccupancyByDepth[mydepth]->GetNbinsX();++
eta)
144 if (OccupancyByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)>0)
152 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)));
161 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)));
169 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)));
177 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)));
186 if (OccupancyThreshByDepth[mydepth]==0)
continue;
187 if (OccupancyThreshByDepth[mydepth]->GetBinContent(
eta+1,
phi+1)>0)
195 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);
196 RMS=
pow(fabs(RMS),0.5);
206 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);
207 RMS=
pow(fabs(RMS),0.5);
216 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);
217 RMS=
pow(fabs(RMS),0.5);
226 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);
227 RMS=
pow(fabs(RMS),0.5);
249 if (
debug_>2)
std::cout <<
"\t\tHcalRecHitClient::calculateProblems()"<<std::endl;
251 double totalevents=0;
252 int etabins=0, phibins=0, zside=0;
253 double problemvalue=0;
288 if (totalevents==0 || totalevents<
minevents_)
continue;
295 if (ieta==-9999)
continue;
303 if (problemvalue==0)
continue;
304 problemvalue/=totalevents;
305 problemvalue =
std::min(1.,problemvalue);
309 ieta<0 ? zside = -1 : zside = 1;
334 if (
debug_>0)
std::cout <<
"<HcalRecHitClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
360 std::cout <<
"<HcalRecHitClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
372 if (
debug_>0)
std::cout <<
"<HcalRecHitClient::beginRun> dqmStore does not exist!"<<std::endl;
378 "Problem RecHit Rate for all HCAL;ieta;iphi",
404 for (
int x=1;
x<=etabins;++
x)
405 for (
int y=1;
y<=phibins;++
y)
421 for (
int x=1;
x<=etabins;++
x)
422 for (
int y=1;
y<=phibins;++
y)
462 if (
debug_>1)
std::cout <<
"<HcalRecHitClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
468 for (
int depth=0;depth<4; ++depth)
472 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
474 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
477 if (ieta==-9999)
continue;
486 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)