17 << hcalHits <<
" / "<< checkHit_
89 LogDebug(
"HcalSim") <<
"Run = " << e.
id().
run() <<
" Event = "
92 std::vector<PCaloHit> caloHits;
98 if (hitsHcal.
isValid()) getHits =
true;
101 LogDebug(
"HcalSim") <<
"HcalValidation: Input flags Hits " << getHits;
104 caloHits.insert(caloHits.end(),hitsHcal->begin(),hitsHcal->end());
105 LogDebug(
"HcalSim") <<
"HcalValidation: Hit buffer "
113 int nHit = hits.size();
114 int nHB=0, nHE=0, nHO=0, nHF=0, nBad1=0, nBad2=0, nBad=0;
115 std::vector<double> encontHB(140, 0.);
116 std::vector<double> encontHE(140, 0.);
117 std::vector<double> encontHF(140, 0.);
118 std::vector<double> encontHO(140, 0.);
119 double entotHB = 0, entotHE = 0, entotHF = 0, entotHO = 0;
121 for (
int i=0;
i<nHit;
i++) {
122 double energy = hits[
i].energy();
123 double log10en = log10(energy);
124 int log10i = int( (log10en+10.)*10. );
125 double time = hits[
i].time();
126 unsigned int id_ = hits[
i].id();
129 int subdet =
id.subdet();
130 int depth =
id.depth();
133 LogDebug(
"HcalSim") <<
"Hit[" <<
i <<
"] ID " << std::hex << id_
134 <<
std::dec <<
" Det " << det <<
" Sub "
135 << subdet <<
" depth " << depth <<
" Eta " << eta
136 <<
" Phi " << phi <<
" E " << energy <<
" time "
139 if (subdet == static_cast<int>(
HcalBarrel)) nHB++;
140 else if (subdet == static_cast<int>(
HcalEndcap)) nHE++;
141 else if (subdet == static_cast<int>(
HcalOuter)) nHO++;
142 else if (subdet == static_cast<int>(
HcalForward)) nHF++;
143 else { nBad++; nBad2++;}
144 }
else { nBad++; nBad1++;}
163 if( log10i >=0 && log10i < 140 ) encontHB[log10i] +=
energy;
165 }
else if (subdet == static_cast<int>(
HcalEndcap)) {
173 if( log10i >=0 && log10i < 140 ) encontHE[log10i] +=
energy;
175 }
else if (subdet == static_cast<int>(
HcalOuter)) {
183 if( log10i >=0 && log10i < 140 ) encontHO[log10i] +=
energy;
185 }
else if (subdet == static_cast<int>(
HcalForward)) {
193 if( log10i >=0 && log10i < 140 ) encontHF[log10i] +=
energy;
198 if( entotHB != 0 )
for(
int i=0;
i<140;
i++ )
meHBL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHB[
i]/entotHB );
199 if( entotHE != 0 )
for(
int i=0;
i<140;
i++ )
meHEL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHE[
i]/entotHE );
200 if( entotHF != 0 )
for(
int i=0;
i<140;
i++ )
meHFL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHF[
i]/entotHF );
201 if( entotHO != 0 )
for(
int i=0;
i<140;
i++ )
meHOL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHO[
i]/entotHO );
212 LogDebug(
"HcalSim") <<
"HcalSimHitStudy::analyzeHits: HB " << nHB
213 <<
" HE " << nHE <<
" HO " << nHO <<
" HF " << nHF
214 <<
" Bad " << nBad <<
" All " << nHit;
MonitorElement * mePhiHit_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meHEDepHit_
MonitorElement * meHOL10Ene_
MonitorElement * meHOPhiHit_
MonitorElement * bookProfile(Args &&...args)
MonitorElement * meDetectHit_
MonitorElement * meHFNHit_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * meHFEtaHit_
MonitorElement * meHFL10EneP_
MonitorElement * meHFEneHit2_
MonitorElement * meHOL10EneP_
MonitorElement * meHBNHit_
MonitorElement * meHFTimHit_
MonitorElement * meHBEneHit2_
MonitorElement * meHONHit_
MonitorElement * meAllNHit_
MonitorElement * meHBL10Ene_
MonitorElement * meBadDetHit_
MonitorElement * meHFL10Ene_
MonitorElement * meHETimHit_
MonitorElement * meTimeHit_
void analyzeHits(std::vector< PCaloHit > &)
MonitorElement * meHFDepHit_
MonitorElement * meHBTimHit_
MonitorElement * book1D(Args &&...args)
MonitorElement * meTimeWHit_
MonitorElement * meHBDepHit_
void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * meBadSubHit_
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
MonitorElement * meHENHit_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * meBadIdHit_
MonitorElement * meHEL10EneP_
MonitorElement * meEnergyHit_
MonitorElement * meHOEtaHit_
MonitorElement * meEtaHit_
MonitorElement * meHBEneHit_
MonitorElement * meHOTimHit_
MonitorElement * meHBL10EneP_
MonitorElement * meHEEneHit2_
MonitorElement * meHFPhiHit_
MonitorElement * meDepthHit_
MonitorElement * meHBEtaHit_
MonitorElement * meHODepHit_
MonitorElement * meHEL10Ene_
MonitorElement * meHEEneHit_
MonitorElement * meHEPhiHit_
HcalSimHitStudy(const edm::ParameterSet &ps)
MonitorElement * meSubdetHit_
MonitorElement * meHBPhiHit_
MonitorElement * meHFEneHit_
MonitorElement * meHEEtaHit_
MonitorElement * meHOEneHit_
MonitorElement * meHOEneHit2_