|
|
Go to the documentation of this file.
58 int iEtaMax = (iEtaHBMax > iEtaHEMax ? iEtaHBMax : iEtaHEMax);
88 ib.setCurrentFolder(
"HcalHitsV/HcalSimHitsTask");
92 meAllNHit_ =
ib.book1D(
"Hit01",
"Number of Hits in HCal", 20000, 0., 20000.);
93 meBadDetHit_ =
ib.book1D(
"Hit02",
"Hits with wrong Det", 100, 0., 100.);
94 meBadSubHit_ =
ib.book1D(
"Hit03",
"Hits with wrong Subdet", 100, 0., 100.);
95 meBadIdHit_ =
ib.book1D(
"Hit04",
"Hits with wrong ID", 100, 0., 100.);
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.);
101 meSubdetHit_ =
ib.book1D(
"Hit10",
"Subdetectors in HCal", 50, 0., 50.);
102 meDepthHit_ =
ib.book1D(
"Hit11",
"Depths in HCal", 20, 0., 20.);
107 sprintf(hname,
"Hit12bd%d",
depth);
108 sprintf(htitle,
"Eta-phi in HCal d%d",
depth);
116 meEnergyHit_ =
ib.book1D(
"Hit14",
"Energy in HCal", 2000, 0., 20.);
117 meTimeHit_ =
ib.book1D(
"Hit15",
"Time in HCal", 528, 0., 528.);
118 meTimeWHit_ =
ib.book1D(
"Hit16",
"Time in HCal (E wtd)", 528, 0., 528.);
119 meHBDepHit_ =
ib.book1D(
"Hit17",
"Depths in HB", 20, 0., 20.);
120 meHEDepHit_ =
ib.book1D(
"Hit18",
"Depths in HE", 20, 0., 20.);
121 meHODepHit_ =
ib.book1D(
"Hit19",
"Depths in HO", 20, 0., 20.);
122 meHFDepHit_ =
ib.book1D(
"Hit20",
"Depths in HF", 20, 0., 20.);
123 meHFDepHitw_ =
ib.book1D(
"Hit20b",
"Depths in HF (p.e. weighted)", 20, 0., 20.);
132 meHBEneHit_ =
ib.book1D(
"Hit29",
"Energy in HB", 2000, 0., 20.);
133 meHEEneHit_ =
ib.book1D(
"Hit30",
"Energy in HE", 500, 0., 5.);
135 meHOEneHit_ =
ib.book1D(
"Hit31",
"Energy in HO", 500, 0., 5.);
136 meHFEneHit_ =
ib.book1D(
"Hit32",
"Energy in HF", 1001, -0.5, 1000.5);
150 meHBEneSum_ =
ib.book1D(
"HBEneSum",
"HBEneSum", 2000, 0., 20.);
151 meHEEneSum_ =
ib.book1D(
"HEEneSum",
"HEEneSum", 500, 0., 5.);
152 meHOEneSum_ =
ib.book1D(
"HOEneSum",
"HOEneSum", 500, 0., 5.);
153 meHFEneSum_ =
ib.book1D(
"HFEneSum",
"HFEneSum", 1001, -0.5, 1000.5);
164 meHBTimHit_ =
ib.book1D(
"Hit33",
"Time in HB", 528, 0., 528.);
165 meHETimHit_ =
ib.book1D(
"Hit34",
"Time in HE", 528, 0., 528.);
166 meHOTimHit_ =
ib.book1D(
"Hit35",
"Time in HO", 528, 0., 528.);
167 meHFTimHit_ =
ib.book1D(
"Hit36",
"Time in HF", 528, 0., 528.);
169 meHBEneHit2_ =
ib.book1D(
"Hit37",
"Energy in HB 2", 100, 0., 0.0001);
170 meHEEneHit2_ =
ib.book1D(
"Hit38",
"Energy in HE 2", 100, 0., 0.0001);
172 meHOEneHit2_ =
ib.book1D(
"Hit39",
"Energy in HO 2", 100, 0., 0.0001);
173 meHFEneHit2_ =
ib.book1D(
"Hit40",
"Energy in HF 2", 100, 0.5, 100.5);
174 meHBL10Ene_ =
ib.book1D(
"Hit41",
"Log10Energy in HB", 140, -10., 4.);
175 meHEL10Ene_ =
ib.book1D(
"Hit42",
"Log10Energy in HE", 140, -10., 4.);
176 meHFL10Ene_ =
ib.book1D(
"Hit43",
"Log10Energy in HF", 50, -1., 4.);
177 meHOL10Ene_ =
ib.book1D(
"Hit44",
"Log10Energy in HO", 140, -10., 4.);
178 meHBL10EneP_ =
ib.bookProfile(
"Hit45",
"Log10Energy in HB vs Hit contribution", 140, -10., 4., 100, 0., 1.);
179 meHEL10EneP_ =
ib.bookProfile(
"Hit46",
"Log10Energy in HE vs Hit contribution", 140, -10., 4., 100, 0., 1.);
180 meHFL10EneP_ =
ib.bookProfile(
"Hit47",
"Log10Energy in HF vs Hit contribution", 140, -10., 4., 100, 0., 1.);
181 meHOL10EneP_ =
ib.bookProfile(
"Hit48",
"Log10Energy in HO vs Hit contribution", 140, -10., 4., 100, 0., 1.);
190 LogDebug(
"HcalSim") <<
"Run = " <<
e.id().run() <<
" Event = " <<
e.id().event();
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++) {
257 double log10en = log10(
energy);
258 int log10i =
int((log10en + 10.) * 10.);
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;
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;
365 }
else if (subdet == static_cast<int>(
HcalOuter)) {
373 if (log10i >= 0 && log10i < 140)
374 encontHO[log10i] +=
energy;
379 }
else if (subdet == static_cast<int>(
HcalForward)) {
388 if (log10i >= 0 && log10i < 140)
389 encontHF[log10i] +=
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 * 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_
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_
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_
T getParameter(std::string const &) const
DetId relabel(const uint32_t testId) const
const HcalDDDRecConstants * hcons
MonitorElement * meHEDepHit_
MonitorElement * meBadDetHit_
std::pair< int, int > getEtaRange(const int &i) const
MonitorElement * meDepthHit_
MonitorElement * meHEPhiHit_
MonitorElement * meHBNHit_
MonitorElement * meEtaHit_
MonitorElement * meHOPhiHit_
MonitorElement * meHOEneSum_
MonitorElement * meHFNHit_
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)