18 edm::LogInfo(
"HcalSim") <<
"Module Label: " <<
g4Label <<
" Hits: " << hcalHits <<
" / " << checkHit_
58 int iEtaMax = (iEtaHBMax > iEtaHEMax ? iEtaHBMax : iEtaHEMax);
59 iEtaMax = (iEtaMax > iEtaHFMax ? iEtaMax : iEtaHFMax);
60 iEtaMax = (iEtaMax > iEtaHOMax ? iEtaMax : iEtaHOMax);
92 meAllNHit_ = ib.
book1D(
"Hit01",
"Number of Hits in HCal", 20000, 0., 20000.);
96 meHBNHit_ = ib.
book1D(
"Hit05",
"Number of Hits in HB", 20000, 0., 20000.);
97 meHENHit_ = ib.
book1D(
"Hit06",
"Number of Hits in HE", 10000, 0., 10000.);
98 meHONHit_ = ib.
book1D(
"Hit07",
"Number of Hits in HO", 10000, 0., 10000.);
99 meHFNHit_ = ib.
book1D(
"Hit08",
"Number of Hits in HF", 10000, 0., 10000.);
107 sprintf(hname,
"Hit12bd%d",
depth);
108 sprintf(htitle,
"Eta-phi in HCal d%d",
depth);
192 std::vector<PCaloHit> caloHits;
195 bool getHits =
false;
202 LogDebug(
"HcalSim") <<
"HcalValidation: Input flags Hits " << getHits;
205 caloHits.insert(caloHits.end(), hitsHcal->begin(), hitsHcal->end());
206 LogDebug(
"HcalSim") <<
"HcalValidation: Hit buffer " << caloHits.size();
212 int nHit = hits.size();
213 int nHB = 0, nHE = 0, nHO = 0, nHF = 0, nBad1 = 0, nBad2 = 0, nBad = 0;
214 std::vector<double> encontHB(140, 0.);
215 std::vector<double> encontHE(140, 0.);
216 std::vector<double> encontHF(140, 0.);
217 std::vector<double> encontHO(140, 0.);
218 double entotHB = 0, entotHE = 0, entotHF = 0, entotHO = 0;
255 for (
int i = 0;
i < nHit;
i++) {
256 double energy = hits[
i].energy();
257 double log10en = log10(energy);
258 int log10i =
int((log10en + 10.) * 10.);
259 double time = hits[
i].time();
260 unsigned int id_ = hits[
i].id();
273 LogDebug(
"HcalSim") <<
"Hit[" <<
i <<
"] ID " << std::hex << id_ <<
std::dec <<
" Det " << det <<
" Sub " << subdet
274 <<
" depth " << depth <<
" Eta " << eta <<
" Phi " << phi <<
" E " << energy <<
" time " 279 else if (subdet == static_cast<int>(
HcalEndcap))
281 else if (subdet == static_cast<int>(
HcalOuter))
306 else if (subdet == static_cast<int>(
HcalEndcap))
308 else if (subdet == static_cast<int>(
HcalOuter))
332 if (log10i >= 0 && log10i < 140)
333 encontHB[log10i] +=
energy;
336 HBEneMap[eta + eta_offset_HB][phi - 1] +=
energy;
338 }
else if (subdet == static_cast<int>(
HcalEndcap)) {
343 bool isHEP17 = (phi >= 63) && (phi <= 66) && (eta > 0);
359 if (log10i >= 0 && log10i < 140)
360 encontHE[log10i] +=
energy;
363 HEEneMap[eta + eta_offset_HE][phi - 1] +=
energy;
365 }
else if (subdet == static_cast<int>(
HcalOuter)) {
373 if (log10i >= 0 && log10i < 140)
374 encontHO[log10i] +=
energy;
377 HOEneMap[eta + eta_offset_HO][phi - 1] +=
energy;
379 }
else if (subdet == static_cast<int>(
HcalForward)) {
388 if (log10i >= 0 && log10i < 140)
389 encontHF[log10i] +=
energy;
392 HFEneMap[eta + eta_offset_HF][phi - 1] +=
energy;
397 for (
int i = 0;
i < 140;
i++)
400 for (
int i = 0;
i < 140;
i++)
403 for (
int i = 0;
i < 140;
i++)
406 for (
int i = 0;
i < 140;
i++)
420 if (HBEneMap[
i][j] != 0) {
430 if (HEEneMap[
i][j] != 0) {
440 if (HOEneMap[
i][j] != 0) {
450 if (HFEneMap[
i][j] != 0) {
458 LogDebug(
"HcalSim") <<
"HcalSimHitStudy::analyzeHits: HB " << nHB <<
" HE " << nHE <<
" HO " << nHO <<
" HF " << nHF
459 <<
" Bad " << nBad <<
" All " << nHit;
MonitorElement * mePhiHit_
MonitorElement * meHBEneMap_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
T getParameter(std::string const &) const
EventNumber_t event() const
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_
void setCurrentFolder(std::string const &fullpath)
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_
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_
std::vector< MonitorElement * > meEtaPhiHitDepth_
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_