|
|
Go to the documentation of this file.
17 tok_HRNDC_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
57 int iEtaMax = (iEtaHBMax > iEtaHEMax ? iEtaHBMax : iEtaHEMax);
87 ib.setCurrentFolder(
"HcalHitsV/HcalSimHitsTask");
91 meAllNHit_ =
ib.book1D(
"Hit01",
"Number of Hits in HCal", 20000, 0., 20000.);
92 meBadDetHit_ =
ib.book1D(
"Hit02",
"Hits with wrong Det", 100, 0., 100.);
93 meBadSubHit_ =
ib.book1D(
"Hit03",
"Hits with wrong Subdet", 100, 0., 100.);
94 meBadIdHit_ =
ib.book1D(
"Hit04",
"Hits with wrong ID", 100, 0., 100.);
95 meHBNHit_ =
ib.book1D(
"Hit05",
"Number of Hits in HB", 20000, 0., 20000.);
96 meHENHit_ =
ib.book1D(
"Hit06",
"Number of Hits in HE", 10000, 0., 10000.);
97 meHONHit_ =
ib.book1D(
"Hit07",
"Number of Hits in HO", 10000, 0., 10000.);
98 meHFNHit_ =
ib.book1D(
"Hit08",
"Number of Hits in HF", 10000, 0., 10000.);
100 meSubdetHit_ =
ib.book1D(
"Hit10",
"Subdetectors in HCal", 50, 0., 50.);
101 meDepthHit_ =
ib.book1D(
"Hit11",
"Depths in HCal", 20, 0., 20.);
106 sprintf(hname,
"Hit12bd%d",
depth);
107 sprintf(htitle,
"Eta-phi in HCal d%d",
depth);
115 meEnergyHit_ =
ib.book1D(
"Hit14",
"Energy in HCal", 2000, 0., 20.);
116 meTimeHit_ =
ib.book1D(
"Hit15",
"Time in HCal", 528, 0., 528.);
117 meTimeWHit_ =
ib.book1D(
"Hit16",
"Time in HCal (E wtd)", 528, 0., 528.);
118 meHBDepHit_ =
ib.book1D(
"Hit17",
"Depths in HB", 20, 0., 20.);
119 meHEDepHit_ =
ib.book1D(
"Hit18",
"Depths in HE", 20, 0., 20.);
120 meHODepHit_ =
ib.book1D(
"Hit19",
"Depths in HO", 20, 0., 20.);
121 meHFDepHit_ =
ib.book1D(
"Hit20",
"Depths in HF", 20, 0., 20.);
122 meHFDepHitw_ =
ib.book1D(
"Hit20b",
"Depths in HF (p.e. weighted)", 20, 0., 20.);
131 meHBEneHit_ =
ib.book1D(
"Hit29",
"Energy in HB", 2000, 0., 20.);
132 meHEEneHit_ =
ib.book1D(
"Hit30",
"Energy in HE", 500, 0., 5.);
134 meHOEneHit_ =
ib.book1D(
"Hit31",
"Energy in HO", 500, 0., 5.);
135 meHFEneHit_ =
ib.book1D(
"Hit32",
"Energy in HF", 1001, -0.5, 1000.5);
149 meHBEneSum_ =
ib.book1D(
"HBEneSum",
"HBEneSum", 2000, 0., 20.);
150 meHEEneSum_ =
ib.book1D(
"HEEneSum",
"HEEneSum", 500, 0., 5.);
151 meHOEneSum_ =
ib.book1D(
"HOEneSum",
"HOEneSum", 500, 0., 5.);
152 meHFEneSum_ =
ib.book1D(
"HFEneSum",
"HFEneSum", 1001, -0.5, 1000.5);
163 meHBTimHit_ =
ib.book1D(
"Hit33",
"Time in HB", 528, 0., 528.);
164 meHETimHit_ =
ib.book1D(
"Hit34",
"Time in HE", 528, 0., 528.);
165 meHOTimHit_ =
ib.book1D(
"Hit35",
"Time in HO", 528, 0., 528.);
166 meHFTimHit_ =
ib.book1D(
"Hit36",
"Time in HF", 528, 0., 528.);
168 meHBEneHit2_ =
ib.book1D(
"Hit37",
"Energy in HB 2", 100, 0., 0.0001);
169 meHEEneHit2_ =
ib.book1D(
"Hit38",
"Energy in HE 2", 100, 0., 0.0001);
171 meHOEneHit2_ =
ib.book1D(
"Hit39",
"Energy in HO 2", 100, 0., 0.0001);
172 meHFEneHit2_ =
ib.book1D(
"Hit40",
"Energy in HF 2", 100, 0.5, 100.5);
173 meHBL10Ene_ =
ib.book1D(
"Hit41",
"Log10Energy in HB", 140, -10., 4.);
174 meHEL10Ene_ =
ib.book1D(
"Hit42",
"Log10Energy in HE", 140, -10., 4.);
175 meHFL10Ene_ =
ib.book1D(
"Hit43",
"Log10Energy in HF", 50, -1., 4.);
176 meHOL10Ene_ =
ib.book1D(
"Hit44",
"Log10Energy in HO", 140, -10., 4.);
177 meHBL10EneP_ =
ib.bookProfile(
"Hit45",
"Log10Energy in HB vs Hit contribution", 140, -10., 4., 100, 0., 1.);
178 meHEL10EneP_ =
ib.bookProfile(
"Hit46",
"Log10Energy in HE vs Hit contribution", 140, -10., 4., 100, 0., 1.);
179 meHFL10EneP_ =
ib.bookProfile(
"Hit47",
"Log10Energy in HF vs Hit contribution", 140, -10., 4., 100, 0., 1.);
180 meHOL10EneP_ =
ib.bookProfile(
"Hit48",
"Log10Energy in HO vs Hit contribution", 140, -10., 4., 100, 0., 1.);
189 edm::LogVerbatim(
"HcalSim") <<
"Run = " <<
e.id().run() <<
" Event = " <<
e.id().event();
191 std::vector<PCaloHit> caloHits;
194 bool getHits =
false;
201 edm::LogVerbatim(
"HcalSim") <<
"HcalValidation: Input flags Hits " << getHits;
204 caloHits.insert(caloHits.end(), hitsHcal->begin(), hitsHcal->end());
205 edm::LogVerbatim(
"HcalSim") <<
"HcalValidation: Hit buffer " << caloHits.size();
211 int nHit =
hits.size();
212 int nHB = 0, nHE = 0, nHO = 0, nHF = 0, nBad1 = 0, nBad2 = 0, nBad = 0;
213 std::vector<double> encontHB(140, 0.);
214 std::vector<double> encontHE(140, 0.);
215 std::vector<double> encontHF(140, 0.);
216 std::vector<double> encontHO(140, 0.);
217 double entotHB = 0, entotHE = 0, entotHF = 0, entotHO = 0;
254 for (
int i = 0;
i < nHit;
i++) {
256 double log10en = log10(
energy);
257 int log10i =
int((log10en + 10.) * 10.);
259 unsigned int id =
hits[
i].id();
273 << subdet <<
" depth " <<
depth <<
" Eta " <<
eta <<
" Phi " <<
phi <<
" E " <<
energy
278 else if (subdet == static_cast<int>(
HcalEndcap))
280 else if (subdet == static_cast<int>(
HcalOuter))
305 else if (subdet == static_cast<int>(
HcalEndcap))
307 else if (subdet == static_cast<int>(
HcalOuter))
331 if (log10i >= 0 && log10i < 140)
332 encontHB[log10i] +=
energy;
337 }
else if (subdet == static_cast<int>(
HcalEndcap)) {
342 bool isHEP17 = (
phi >= 63) && (
phi <= 66) && (
eta > 0);
358 if (log10i >= 0 && log10i < 140)
359 encontHE[log10i] +=
energy;
364 }
else if (subdet == static_cast<int>(
HcalOuter)) {
372 if (log10i >= 0 && log10i < 140)
373 encontHO[log10i] +=
energy;
378 }
else if (subdet == static_cast<int>(
HcalForward)) {
387 if (log10i >= 0 && log10i < 140)
388 encontHF[log10i] +=
energy;
396 for (
int i = 0;
i < 140;
i++)
399 for (
int i = 0;
i < 140;
i++)
402 for (
int i = 0;
i < 140;
i++)
405 for (
int i = 0;
i < 140;
i++)
419 if (HBEneMap[
i][
j] != 0) {
429 if (HEEneMap[
i][
j] != 0) {
439 if (HOEneMap[
i][
j] != 0) {
449 if (HFEneMap[
i][
j] != 0) {
457 edm::LogVerbatim(
"HcalSim") <<
"HcalSimHitStudy::analyzeHits: HB " << nHB <<
" HE " << nHE <<
" HO " << nHO <<
" HF "
458 << nHF <<
" Bad " << nBad <<
" All " << nHit;
MonitorElement * meEtaPhiHit_
~HcalSimHitStudy() override
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * meHODepHit_
constexpr int iphi() const
get the cell iphi
MonitorElement * meHEEneSum_
MonitorElement * meHOL10EneP_
MonitorElement * meHOEneSum_vs_ieta_
MonitorElement * meHOEneMap_
MonitorElement * meHENHit_
constexpr Detector det() const
get the detector field from this detid
MonitorElement * meHFEneSum_vs_ieta_
const HcalDDDRecConstants * hcons_
MonitorElement * meHEL10Ene_
constexpr int depth() const
get the tower depth
MonitorElement * meHOEtaHit_
T getUntrackedParameter(std::string const &, T const &) const
int getNPhi(const int &type) const
MonitorElement * meHEEneMap_
Log< level::Info, false > LogInfo
MonitorElement * meHBEneSum_vs_ieta_
MonitorElement * meHEL10EneP_
MonitorElement * meHOTimHit_
MonitorElement * meHBL10EneP_
MonitorElement * meHFEneMap_
MonitorElement * meHOEneHit_
MonitorElement * mePhiHit_
MonitorElement * meHFTimHit_
MonitorElement * meHEEneHit2_
std::vector< MonitorElement * > meEtaPhiHitDepth_
MonitorElement * meHBEneMap_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meHBEneHit2_
MonitorElement * meSubdetHit_
MonitorElement * meHONHit_
MonitorElement * meHFDepHit_
MonitorElement * meBadIdHit_
MonitorElement * meHEP17EneHit_
MonitorElement * meHFL10Ene_
MonitorElement * meHFPhiHit_
MonitorElement * meHFEneSum_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
MonitorElement * meHBDepHit_
constexpr int ieta() const
get the cell ieta
MonitorElement * meHFEneHit2_
MonitorElement * meTimeHit_
MonitorElement * meHOL10Ene_
MonitorElement * meHBEneSum_
MonitorElement * meHETimHit_
MonitorElement * meHBPhiHit_
MonitorElement * meEnergyHit_
void analyzeHits(std::vector< PCaloHit > &)
constexpr HcalSubdetector subdet() const
get the subdetector
MonitorElement * meHEEneSum_vs_ieta_
MonitorElement * meHOEneHit2_
MonitorElement * meDetectHit_
MonitorElement * meTimeWHit_
MonitorElement * mePhiHitb_
MonitorElement * meHBL10Ene_
MonitorElement * meBadSubHit_
bool getData(T &iHolder) const
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_HRNDC_
DetId relabel(const uint32_t testId) const
MonitorElement * meHEDepHit_
MonitorElement * meBadDetHit_
std::pair< int, int > getEtaRange(const int &i) const
MonitorElement * meDepthHit_
MonitorElement * meHEPhiHit_
Log< level::Info, true > LogVerbatim
MonitorElement * meHBNHit_
MonitorElement * meEtaHit_
MonitorElement * meHOPhiHit_
MonitorElement * meHOEneSum_
MonitorElement * meHFNHit_
T getParameter(std::string const &) const
MonitorElement * meHBEneHit_
MonitorElement * meHEP17EneHit2_
int getMaxDepth(const int &type) const
MonitorElement * meAllNHit_
MonitorElement * meHFL10EneP_
MonitorElement * meHFDepHitw_
MonitorElement * meHFEtaHit_
MonitorElement * meHFEneHit_
MonitorElement * meHEEtaHit_
MonitorElement * meHBTimHit_
MonitorElement * meHEEneHit_
MonitorElement * meHBEtaHit_
HcalSimHitStudy(const edm::ParameterSet &ps)