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);
bool isHO(int etabin, int depth)
MonitorElement * meHFEnergyThresh_1D
MonitorElement * meHOEnergyRMS_1D
MonitorElement * meHEEnergyRMS_1D
MonitorElement * meHFEnergyRMS_1D
MonitorElement * meHEEnergyRMSThresh_1D
std::vector< std::string > HcalEtaPhiHistNames()
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
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
bool isHF(int etabin, int depth)
MonitorElement * meHFEnergy_1D
EtaPhiHists * meEnergyByDepth
MonitorElement * meHBEnergyThresh_1D
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
void calculateProblems(void)
EtaPhiHists * meTimeByDepth
MonitorElement * meHBEnergyRMSThresh_1D
void Reset(void)
reset ME (ie. contents, errors, etc)
Power< A, B >::type pow(const A &a, const B &b)
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)