20 << hcalHits <<
" / "<< checkHit_
61 int iEtaMax = (iEtaHBMax > iEtaHEMax ? iEtaHBMax : iEtaHEMax);
62 iEtaMax = (iEtaMax > iEtaHFMax ? iEtaMax : iEtaHFMax);
63 iEtaMax = (iEtaMax > iEtaHOMax ? iEtaMax : iEtaHOMax);
108 sprintf(hname,
"Hit12bd%d",
depth);
109 sprintf(htitle,
"Eta-phi in HCal d%d",
depth);
185 LogDebug(
"HcalSim") <<
"Run = " << e.
id().
run() <<
" Event = " 188 std::vector<PCaloHit> caloHits;
191 bool getHits =
false;
194 if (hitsHcal.
isValid()) getHits =
true;
197 LogDebug(
"HcalSim") <<
"HcalValidation: Input flags Hits " << getHits;
200 caloHits.insert(caloHits.end(),hitsHcal->begin(),hitsHcal->end());
201 LogDebug(
"HcalSim") <<
"HcalValidation: Hit buffer " 209 int nHit = hits.size();
210 int nHB=0, nHE=0, nHO=0, nHF=0, nBad1=0, nBad2=0, nBad=0;
211 std::vector<double> encontHB(140, 0.);
212 std::vector<double> encontHE(140, 0.);
213 std::vector<double> encontHF(140, 0.);
214 std::vector<double> encontHO(140, 0.);
215 double entotHB = 0, entotHE = 0, entotHF = 0, entotHO = 0;
252 for (
int i=0;
i<nHit;
i++) {
253 double energy = hits[
i].energy();
254 double log10en = log10(energy);
255 int log10i =
int( (log10en+10.)*10. );
256 double time = hits[
i].time();
257 unsigned int id_ = hits[
i].id();
268 LogDebug(
"HcalSim") <<
"Hit[" <<
i <<
"] ID " << std::hex << id_
269 <<
std::dec <<
" Det " << det <<
" Sub " 270 << subdet <<
" depth " << depth <<
" Eta " << eta
271 <<
" Phi " << phi <<
" E " << energy <<
" time " 274 if (subdet == static_cast<int>(
HcalBarrel)) nHB++;
275 else if (subdet == static_cast<int>(
HcalEndcap)) nHE++;
276 else if (subdet == static_cast<int>(
HcalOuter)) nHO++;
277 else if (subdet == static_cast<int>(
HcalForward)) nHF++;
278 else { nBad++; nBad2++;}
279 }
else { nBad++; nBad1++;}
313 if( log10i >=0 && log10i < 140 ) encontHB[log10i] += energy;
316 HBEneMap[eta + eta_offset_HB][phi-1] += energy;
318 }
else if (subdet == static_cast<int>(
HcalEndcap)) {
323 bool isHEP17 = (phi>=63)&&(phi<=66)&&(eta>0);
339 if( log10i >=0 && log10i < 140 ) encontHE[log10i] += energy;
342 HEEneMap[eta + eta_offset_HE][phi-1] += energy;
344 }
else if (subdet == static_cast<int>(
HcalOuter)) {
352 if( log10i >=0 && log10i < 140 ) encontHO[log10i] += energy;
355 HOEneMap[eta + eta_offset_HO][phi-1] += energy;
357 }
else if (subdet == static_cast<int>(
HcalForward)) {
366 if( log10i >=0 && log10i < 140 ) encontHF[log10i] += energy;
369 HFEneMap[eta + eta_offset_HF][phi-1] += energy;
374 if( entotHB != 0 )
for(
int i=0;
i<140;
i++ )
meHBL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHB[
i]/entotHB );
375 if( entotHE != 0 )
for(
int i=0;
i<140;
i++ )
meHEL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHE[
i]/entotHE );
376 if( entotHF != 0 )
for(
int i=0;
i<140;
i++ )
meHFL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHF[
i]/entotHF );
377 if( entotHO != 0 )
for(
int i=0;
i<140;
i++ )
meHOL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontHO[
i]/entotHO );
391 if(HBEneMap[
i][j] != 0){
403 if(HEEneMap[
i][j] != 0){
415 if(HOEneMap[
i][j] != 0){
427 if(HFEneMap[
i][j] != 0){
436 LogDebug(
"HcalSim") <<
"HcalSimHitStudy::analyzeHits: HB " << nHB
437 <<
" HE " << nHE <<
" HO " << nHO <<
" HF " << nHF
438 <<
" Bad " << nBad <<
" All " << nHit;
MonitorElement * mePhiHit_
MonitorElement * meHBEneMap_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
T getParameter(std::string const &) const
EventNumber_t event() const
std::vector< MonitorElement * > meEtaPhiHitDepth_
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meHEDepHit_
MonitorElement * meHOL10Ene_
MonitorElement * meHOEneSum_vs_ieta_
MonitorElement * meHOEneSum_
HcalSubdetector subdet() const
get the subdetector
MonitorElement * meHOPhiHit_
MonitorElement * bookProfile(Args &&...args)
MonitorElement * meDetectHit_
MonitorElement * meHFNHit_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * meHFEtaHit_
MonitorElement * meHFL10EneP_
MonitorElement * meHBEneSum_vs_ieta_
MonitorElement * meHFEneHit2_
MonitorElement * meHOL10EneP_
MonitorElement * meHFDepHitw_
MonitorElement * meHBNHit_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meHFTimHit_
MonitorElement * meHEEneSum_vs_ieta_
std::pair< int, int > getEtaRange(const int &i) const
MonitorElement * meHBEneHit2_
MonitorElement * meHONHit_
MonitorElement * meAllNHit_
const HcalDDDRecConstants * hcons
MonitorElement * meHBL10Ene_
MonitorElement * meHEEneSum_
MonitorElement * meBadDetHit_
MonitorElement * meHEP17EneHit2_
int depth() const
get the tower depth
MonitorElement * meHFL10Ene_
MonitorElement * mePhiHitb_
MonitorElement * meHETimHit_
MonitorElement * meTimeHit_
void analyzeHits(std::vector< PCaloHit > &)
MonitorElement * meHFDepHit_
MonitorElement * meHBEneSum_
int ieta() const
get the cell ieta
MonitorElement * meHOEneMap_
MonitorElement * meHBTimHit_
MonitorElement * book1D(Args &&...args)
MonitorElement * meHFEneSum_vs_ieta_
MonitorElement * meTimeWHit_
MonitorElement * meHBDepHit_
MonitorElement * meHFEneSum_
MonitorElement * meHFEneMap_
MonitorElement * meBadSubHit_
int iphi() const
get the cell iphi
MonitorElement * meHENHit_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
MonitorElement * meBadIdHit_
MonitorElement * meHEL10EneP_
MonitorElement * meEnergyHit_
int getMaxDepth(const int &type) const
MonitorElement * meHOEtaHit_
MonitorElement * meEtaPhiHit_
MonitorElement * meHEEneMap_
MonitorElement * meEtaHit_
MonitorElement * meHBEneHit_
MonitorElement * meHOTimHit_
MonitorElement * meHBL10EneP_
MonitorElement * meHEEneHit2_
MonitorElement * meHFPhiHit_
MonitorElement * meDepthHit_
MonitorElement * meHBEtaHit_
MonitorElement * meHODepHit_
MonitorElement * meHEL10Ene_
DetId relabel(const uint32_t testId) const
MonitorElement * meHEEneHit_
MonitorElement * meHEPhiHit_
HcalSimHitStudy(const edm::ParameterSet &ps)
MonitorElement * meSubdetHit_
MonitorElement * meHBPhiHit_
MonitorElement * meHEP17EneHit_
MonitorElement * meHFEneHit_
~HcalSimHitStudy() override
int getNPhi(const int &type) const
MonitorElement * meHEEtaHit_
MonitorElement * meHOEneHit_
constexpr Detector det() const
get the detector field from this detid
MonitorElement * meHOEneHit2_