92 tok_HRNDC_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
94 edm::LogInfo(
"HcalSim") <<
"Module Label: " <<
g4Label <<
" Hits: " << hcalHits <<
" / " << checkHit_
132 int iEtaMax = (iEtaHBMax > iEtaHEMax ? iEtaHBMax : iEtaHEMax);
133 iEtaMax = (iEtaMax > iEtaHFMax ? iEtaMax : iEtaHFMax);
134 iEtaMax = (iEtaMax > iEtaHOMax ? iEtaMax : iEtaHOMax);
166 meAllNHit_ = ib.
book1D(
"Hit01",
"Number of Hits in HCal", 20000, 0., 20000.);
170 meHBNHit_ = ib.
book1D(
"Hit05",
"Number of Hits in HB", 20000, 0., 20000.);
171 meHENHit_ = ib.
book1D(
"Hit06",
"Number of Hits in HE", 10000, 0., 10000.);
172 meHONHit_ = ib.
book1D(
"Hit07",
"Number of Hits in HO", 10000, 0., 10000.);
173 meHFNHit_ = ib.
book1D(
"Hit08",
"Number of Hits in HF", 10000, 0., 10000.);
181 sprintf(hname,
"Hit12bd%d",
depth);
182 sprintf(htitle,
"Eta-phi in HCal d%d",
depth);
266 std::vector<PCaloHit> caloHits;
269 bool getHits =
false;
276 edm::LogVerbatim(
"HcalSim") <<
"HcalValidation: Input flags Hits " << getHits;
279 caloHits.insert(caloHits.end(), hitsHcal->begin(), hitsHcal->end());
280 edm::LogVerbatim(
"HcalSim") <<
"HcalValidation: Hit buffer " << caloHits.size();
286 int nHit = hits.size();
287 int nHB = 0, nHE = 0, nHO = 0, nHF = 0, nBad1 = 0, nBad2 = 0, nBad = 0;
288 std::vector<double> encontHB(140, 0.);
289 std::vector<double> encontHE(140, 0.);
290 std::vector<double> encontHF(140, 0.);
291 std::vector<double> encontHO(140, 0.);
292 double entotHB = 0, entotHE = 0, entotHF = 0, entotHO = 0;
329 for (
int i = 0;
i < nHit;
i++) {
330 double energy = hits[
i].energy();
331 double log10en = log10(energy);
332 int log10i = int((log10en + 10.) * 10.);
333 double time = hits[
i].time();
334 unsigned int id = hits[
i].id();
348 << subdet <<
" depth " << depth <<
" Eta " << eta <<
" Phi " << phi <<
" E " << energy
353 else if (subdet == static_cast<int>(
HcalEndcap))
355 else if (subdet == static_cast<int>(
HcalOuter))
380 else if (subdet == static_cast<int>(
HcalEndcap))
382 else if (subdet == static_cast<int>(
HcalOuter))
406 if (log10i >= 0 && log10i < 140)
407 encontHB[log10i] +=
energy;
410 HBEneMap[eta + eta_offset_HB][phi - 1] +=
energy;
412 }
else if (subdet == static_cast<int>(
HcalEndcap)) {
417 bool isHEP17 = (phi >= 63) && (phi <= 66) && (eta > 0);
433 if (log10i >= 0 && log10i < 140)
434 encontHE[log10i] +=
energy;
437 HEEneMap[eta + eta_offset_HE][phi - 1] +=
energy;
439 }
else if (subdet == static_cast<int>(
HcalOuter)) {
447 if (log10i >= 0 && log10i < 140)
448 encontHO[log10i] +=
energy;
451 HOEneMap[eta + eta_offset_HO][phi - 1] +=
energy;
453 }
else if (subdet == static_cast<int>(
HcalForward)) {
462 if (log10i >= 0 && log10i < 140)
463 encontHF[log10i] +=
energy;
466 HFEneMap[eta + eta_offset_HF][phi - 1] +=
energy;
471 for (
int i = 0;
i < 140;
i++)
474 for (
int i = 0;
i < 140;
i++)
477 for (
int i = 0;
i < 140;
i++)
480 for (
int i = 0;
i < 140;
i++)
494 if (HBEneMap[
i][
j] != 0) {
504 if (HEEneMap[
i][
j] != 0) {
514 if (HOEneMap[
i][
j] != 0) {
524 if (HFEneMap[
i][
j] != 0) {
532 edm::LogVerbatim(
"HcalSim") <<
"HcalSimHitStudy::analyzeHits: HB " << nHB <<
" HE " << nHE <<
" HO " << nHO <<
" HF "
533 << nHF <<
" Bad " << nBad <<
" All " << nHit;
MonitorElement * mePhiHit_
MonitorElement * meHBEneMap_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meHEDepHit_
MonitorElement * meHOL10Ene_
MonitorElement * meHOEneSum_vs_ieta_
const edm::EventSetup & c
MonitorElement * meHOEneSum_
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * meHOPhiHit_
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_
#define DEFINE_FWK_MODULE(type)
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_HRNDC_
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_
MonitorElement * meHBEneHit2_
MonitorElement * meHONHit_
MonitorElement * meAllNHit_
bool getData(T &iHolder) const
MonitorElement * meHBL10Ene_
MonitorElement * meHEEneSum_
constexpr HcalSubdetector subdet() const
get the subdetector
MonitorElement * meBadDetHit_
MonitorElement * meHEP17EneHit2_
MonitorElement * meHFL10Ene_
MonitorElement * mePhiHitb_
constexpr int iphi() const
get the cell iphi
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * meHETimHit_
MonitorElement * meTimeHit_
void analyzeHits(std::vector< PCaloHit > &)
const HcalDDDRecConstants * hcons_
MonitorElement * meHFDepHit_
MonitorElement * meHBEneSum_
MonitorElement * meHOEneMap_
MonitorElement * meHBTimHit_
MonitorElement * meHFEneSum_vs_ieta_
constexpr int ieta() const
get the cell ieta
MonitorElement * meTimeWHit_
MonitorElement * meHBDepHit_
MonitorElement * meHFEneSum_
MonitorElement * meHFEneMap_
MonitorElement * meBadSubHit_
Log< level::Info, false > LogInfo
MonitorElement * meHENHit_
MonitorElement * meBadIdHit_
MonitorElement * meHEL10EneP_
MonitorElement * meEnergyHit_
int getMaxDepth(const int &type) const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
T getParameter(std::string const &) 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
constexpr int depth() const
get the tower depth
std::pair< int, int > getEtaRange(const int &i) const
MonitorElement * meHEEneHit_
MonitorElement * meHEPhiHit_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
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_