36 std::string divisions[25]={
"HB0",
"HB1",
"HE0+z",
"HE1+z",
"HE2+z",
"HE0-z",
"HE1-z",
37 "HE2-z",
"HO0",
"HFL0+z",
"HFS0+z",
"HFL1+z",
"HFS1+z",
38 "HFL2+z",
"HFS2+z",
"HFL3+z",
"HFS3+z",
"HFL0-z",
"HFS0-z",
39 "HFL1-z",
"HFS1-z",
"HFL2-z",
"HFS2-z",
"HFL3-z",
"HFS3-z"};
40 double etaLow[25]={-16,-16,16,16,16,-29,-29,-29,-15,29,29,29,29,29,29,29,29,
41 -41,-41,-41,-41,-41,-41,-41,-41};
42 double etaHigh[25]={16,16,30,30,30,-30,-30,-30,15,41,41,41,41,41,41,41,41,
43 -29,-29,-29,-29,-29,-29,-29,-29};
44 int etaBins[25]={32,32,14,14,14,14,14,14,30,12,12,12,12,12,12,12,12,
45 12,12,12,12,12,12,12,12};
47 for (
int i=0;
i<25; ++
i) {
48 sprintf (name,
"HcalHitEta%s", divisions[
i].c_str());
49 sprintf (name,
"Hit energy as a function of eta tower index in %s", divisions[
i].c_str());
59 LogDebug(
"HitsValidationHcal") <<
"Run = " << e.
id().
run() <<
" Event = "
62 std::vector<PCaloHit> caloHits;
67 if (hitsHcal.
isValid()) getHits =
true;
69 LogDebug(
"HitsValidationHcal") <<
"HcalValidation: Input flags Hits " << getHits;
72 caloHits.insert(caloHits.end(),hitsHcal->begin(),hitsHcal->end());
73 LogDebug(
"HitsValidationHcal") <<
"HcalValidation: Hit buffer "
81 int nHit = hits.size();
82 double entotHB = 0, entotHE = 0, entotHF = 0, entotHO = 0;
83 int nHB=0, nHE=0, nHO=0, nHF=0;
85 for (
int i=0;
i<nHit;
i++) {
86 double energy = hits[
i].energy();
87 double time = hits[
i].time();
88 unsigned int id_ = hits[
i].id();
91 int subdet =
id.subdet();
92 int depth =
id.depth();
95 unsigned int dep = hits[
i].depth();
101 }
else if (subdet == static_cast<int>(
HcalEndcap)) {
105 if (eta < 0) type += 3;
106 }
else if (subdet == static_cast<int>(
HcalOuter)) {
110 }
else if (subdet == static_cast<int>(
HcalForward)) {
113 type = depth+8+2*dep;
114 if (eta < 0) type += 8;
116 LogDebug(
"HitsValidationHcal") <<
"Hit[" <<
i <<
"] ID " << std::hex << id_
117 << std::dec <<
" Det " << det <<
" Sub "
118 << subdet <<
" depth " << depth <<
" depthX "
119 << dep <<
" Eta " << eta <<
" Phi " << phi
120 <<
" E " << energy <<
" time " << time
122 double etax = eta - 0.5;
123 if (eta < 0) etax += 1;
124 if (
dbe_ && type >= 0) {
142 LogDebug(
"HitsValidationHcal") <<
"SimHitsValidationHcal::analyzeHits: HB " << nHB
143 <<
" HE " << nHE <<
" HO " << nHO <<
" HF " << nHF
SimHitsValidationHcal(const edm::ParameterSet &ps)
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void analyze(const edm::Event &e, const edm::EventSetup &c)
void setVerbose(unsigned level)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void showDirStructure(void) const
MonitorElement * meHcalHitEta_[25]
void setCurrentFolder(const std::string &fullpath)
void analyzeHits(std::vector< PCaloHit > &)