17 << hcalHits <<
" / "<< checkHit_
92 LogDebug(
"HcalSim") <<
"Run = " << e.
id().
run() <<
" Event = "
95 std::vector<PCaloHit> caloHits;
101 if (hitsHcal.
isValid()) getHits =
true;
104 LogDebug(
"HcalSim") <<
"HcalValidation: Input flags Hits " << getHits;
107 caloHits.insert(caloHits.end(),hitsHcal->begin(),hitsHcal->end());
108 LogDebug(
"HcalSim") <<
"HcalValidation: Hit buffer "
116 int nHit = hits.size();
117 int nHB=0, nHE=0, nHO=0, nHF=0, nBad1=0, nBad2=0, nBad=0;
118 std::vector<double> encontHB(140, 0.);
119 std::vector<double> encontHE(140, 0.);
120 std::vector<double> encontHF(140, 0.);
121 std::vector<double> encontHO(140, 0.);
122 double entotHB = 0, entotHE = 0, entotHF = 0, entotHO = 0;
124 for (
int i=0;
i<nHit;
i++) {
125 double energy = hits[
i].energy();
126 double log10en = log10(energy);
127 int log10i = int( (log10en+10.)*10. );
128 double time = hits[
i].time();
129 unsigned int id_ = hits[
i].id();
132 int subdet =
id.subdet();
133 int depth =
id.depth();
136 LogDebug(
"HcalSim") <<
"Hit[" <<
i <<
"] ID " << std::hex << id_
137 <<
std::dec <<
" Det " << det <<
" Sub "
138 << subdet <<
" depth " << depth <<
" Eta " << eta
139 <<
" Phi " << phi <<
" E " << energy <<
" time "
142 if (subdet == static_cast<int>(
HcalBarrel)) nHB++;
143 else if (subdet == static_cast<int>(
HcalEndcap)) nHE++;
144 else if (subdet == static_cast<int>(
HcalOuter)) nHO++;
145 else if (subdet == static_cast<int>(
HcalForward)) nHF++;
146 else { nBad++; nBad2++;}
147 }
else { nBad++; nBad1++;}
179 if( log10i >=0 && log10i < 140 ) encontHB[log10i] +=
energy;
181 }
else if (subdet == static_cast<int>(
HcalEndcap)) {
189 if( log10i >=0 && log10i < 140 ) encontHE[log10i] +=
energy;
191 }
else if (subdet == static_cast<int>(
HcalOuter)) {
199 if( log10i >=0 && log10i < 140 ) encontHO[log10i] +=
energy;
201 }
else if (subdet == static_cast<int>(
HcalForward)) {
209 if( log10i >=0 && log10i < 140 ) encontHF[log10i] +=
energy;
214 if( entotHB != 0 )
for(
int i=0;
i<140;
i++ )
meHBL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHB[
i]/entotHB );
215 if( entotHE != 0 )
for(
int i=0;
i<140;
i++ )
meHEL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHE[
i]/entotHE );
216 if( entotHF != 0 )
for(
int i=0;
i<140;
i++ )
meHFL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHF[
i]/entotHF );
217 if( entotHO != 0 )
for(
int i=0;
i<140;
i++ )
meHOL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHO[
i]/entotHO );
228 LogDebug(
"HcalSim") <<
"HcalSimHitStudy::analyzeHits: HB " << nHB
229 <<
" HE " << nHE <<
" HO " << nHO <<
" HF " << nHF
230 <<
" 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 * mePhiHitb_
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_