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];
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);
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)