Skip to content

Commit

Permalink
Merge pull request #27748 from abdoulline/Adding_RecHits_spectra_wCle…
Browse files Browse the repository at this point in the history
…aning

HCAL DQMOffline: adding rechits spectra with enabled cleaning
  • Loading branch information
cmsbuild committed Sep 13, 2019
2 parents 8d7f054 + 565eeb3 commit 50c28af
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DQMOffline/Hcal/interface/HcalRecHitsAnalyzer.h
Expand Up @@ -180,6 +180,7 @@ class HcalRecHitsAnalyzer : public DQMEDAnalyzer {

// energy of rechits
MonitorElement *meRecHitsEnergyHB;
MonitorElement *meRecHitsCleanedEnergyHB;
MonitorElement *meRecHitsEnergyHBM0;
MonitorElement *meRecHitsEnergyHBM3;
MonitorElement *meRecHitsEnergyM2vM0HB;
Expand All @@ -188,6 +189,7 @@ class HcalRecHitsAnalyzer : public DQMEDAnalyzer {
MonitorElement *meRecHitsM2Chi2HB;

MonitorElement *meRecHitsEnergyHE;
MonitorElement *meRecHitsCleanedEnergyHE;
MonitorElement *meRecHitsEnergyHEM0;
MonitorElement *meRecHitsEnergyHEM3;
std::vector<MonitorElement *> meRecHitsEnergyHEP17;
Expand All @@ -199,8 +201,10 @@ class HcalRecHitsAnalyzer : public DQMEDAnalyzer {
MonitorElement *meRecHitsM2Chi2HE;

MonitorElement *meRecHitsEnergyHO;
MonitorElement *meRecHitsCleanedEnergyHO;

MonitorElement *meRecHitsEnergyHF;
MonitorElement *meRecHitsCleanedEnergyHF;

MonitorElement *meTE_Low_HB;
MonitorElement *meTE_HB;
Expand Down Expand Up @@ -288,6 +292,7 @@ class HcalRecHitsAnalyzer : public DQMEDAnalyzer {
std::vector<double> cz;
std::vector<uint32_t> cstwd;
std::vector<uint32_t> cauxstwd;
std::vector<int> csevlev;

// counter
int nevtot;
Expand Down
27 changes: 27 additions & 0 deletions DQMOffline/Hcal/src/HcalRecHitsAnalyzer.cc
Expand Up @@ -363,6 +363,9 @@ void HcalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker &ibooker,
sprintf(histo, "HcalRecHitTask_energy_of_rechits_HB");
meRecHitsEnergyHB = ibooker.book1DD(histo, histo, 2010, -10., 2000.);

sprintf(histo, "HcalRecHitTask_cleaned_energy_of_rechits_HB");
meRecHitsCleanedEnergyHB = ibooker.book1DD(histo, histo, 2010, -10., 2000.);

sprintf(histo, "HcalRecHitTask_energy_of_rechits_M0_HB");
meRecHitsEnergyHBM0 = ibooker.book1DD(histo, histo, 2010, -10., 2000.);

Expand Down Expand Up @@ -417,6 +420,9 @@ void HcalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker &ibooker,
sprintf(histo, "HcalRecHitTask_energy_of_rechits_HE");
meRecHitsEnergyHE = ibooker.book1DD(histo, histo, 2010, -10., 2000.);

sprintf(histo, "HcalRecHitTask_cleaned_energy_of_rechits_HE");
meRecHitsCleanedEnergyHE = ibooker.book1DD(histo, histo, 2010, -10., 2000.);

sprintf(histo, "HcalRecHitTask_energy_of_rechits_M0_HE");
meRecHitsEnergyHEM0 = ibooker.book1DD(histo, histo, 2010, -10., 2000.);

Expand Down Expand Up @@ -486,6 +492,9 @@ void HcalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker &ibooker,
sprintf(histo, "HcalRecHitTask_energy_of_rechits_HO");
meRecHitsEnergyHO = ibooker.book1DD(histo, histo, 2010, -10., 2000.);

sprintf(histo, "HcalRecHitTask_cleaned_energy_of_rechits_HO");
meRecHitsCleanedEnergyHO = ibooker.book1DD(histo, histo, 2010, -10., 2000.);

sprintf(histo, "HcalRecHitTask_timing_HO");
meTimeHO = ibooker.book1DD(histo, histo, 70, -48., 92.);

Expand Down Expand Up @@ -513,6 +522,9 @@ void HcalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker &ibooker,
sprintf(histo, "HcalRecHitTask_energy_of_rechits_HF");
meRecHitsEnergyHF = ibooker.book1DD(histo, histo, 2010, -10., 2000.);

sprintf(histo, "HcalRecHitTask_cleaned_energy_of_rechits_HF");
meRecHitsCleanedEnergyHF = ibooker.book1DD(histo, histo, 2010, -10., 2000.);

sprintf(histo, "HcalRecHitTask_timing_HF");
meTimeHF = ibooker.book1DD(histo, histo, 70, -48., 92.);

Expand Down Expand Up @@ -860,6 +872,7 @@ void HcalRecHitsAnalyzer::analyze(edm::Event const &ev, edm::EventSetup const &c
chi2_log10 = log10(chi2);
double t = ctime[i];
double depth = cdepth[i];
int sevlev = csevlev[i];

bool isHEP17 = (sub == 2) && (iphi >= 63) && (iphi <= 66) && (ieta > 0) && (hep17_);

Expand All @@ -883,6 +896,9 @@ void HcalRecHitsAnalyzer::analyze(edm::Event const &ev, edm::EventSetup const &c
if (sub == 1 && (subdet_ == 1 || subdet_ == 5)) {
meTimeHB->Fill(t);
meRecHitsEnergyHB->Fill(en);
if (sevlev <= 9)
meRecHitsCleanedEnergyHB->Fill(en);

meRecHitsEnergyHBM0->Fill(enM0);
meRecHitsEnergyHBM3->Fill(enM3);

Expand All @@ -904,6 +920,9 @@ void HcalRecHitsAnalyzer::analyze(edm::Event const &ev, edm::EventSetup const &c
meTimeHE->Fill(t);
if (!isHEP17) {
meRecHitsEnergyHE->Fill(en);
if (sevlev <= 9)
meRecHitsCleanedEnergyHE->Fill(en);

meRecHitsEnergyHEM0->Fill(enM0);
meRecHitsEnergyHEM3->Fill(enM3);
} else {
Expand All @@ -930,6 +949,8 @@ void HcalRecHitsAnalyzer::analyze(edm::Event const &ev, edm::EventSetup const &c
if (sub == 4 && (subdet_ == 4 || subdet_ == 5)) {
meTimeHF->Fill(t);
meRecHitsEnergyHF->Fill(en);
if (sevlev <= 9)
meRecHitsCleanedEnergyHF->Fill(en);

meTE_Low_HF->Fill(en, t);
meTE_HF->Fill(en, t);
Expand All @@ -939,6 +960,8 @@ void HcalRecHitsAnalyzer::analyze(edm::Event const &ev, edm::EventSetup const &c
if (sub == 3 && (subdet_ == 3 || subdet_ == 5)) {
meTimeHO->Fill(t);
meRecHitsEnergyHO->Fill(en);
if (sevlev <= 9)
meRecHitsCleanedEnergyHO->Fill(en);

meTE_HO->Fill(en, t);
meTE_High_HO->Fill(en, t);
Expand Down Expand Up @@ -981,6 +1004,7 @@ void HcalRecHitsAnalyzer::fillRecHitsTmp(int subdet_, edm::Event const &ev) {
cz.clear();
cstwd.clear();
cauxstwd.clear();
csevlev.clear();
hcalHBSevLvlVec.clear();
hcalHESevLvlVec.clear();
hcalHFSevLvlVec.clear();
Expand Down Expand Up @@ -1030,6 +1054,7 @@ void HcalRecHitsAnalyzer::fillRecHitsTmp(int subdet_, edm::Event const &ev) {
cz.push_back(zc);
cstwd.push_back(stwd);
cauxstwd.push_back(auxstwd);
csevlev.push_back(severityLevel);
}
}
}
Expand Down Expand Up @@ -1077,6 +1102,7 @@ void HcalRecHitsAnalyzer::fillRecHitsTmp(int subdet_, edm::Event const &ev) {
cz.push_back(zc);
cstwd.push_back(stwd);
cauxstwd.push_back(auxstwd);
csevlev.push_back(severityLevel);
}
}
}
Expand Down Expand Up @@ -1124,6 +1150,7 @@ void HcalRecHitsAnalyzer::fillRecHitsTmp(int subdet_, edm::Event const &ev) {
cz.push_back(zc);
cstwd.push_back(stwd);
cauxstwd.push_back(auxstwd);
csevlev.push_back(severityLevel);
}
}
}
Expand Down

0 comments on commit 50c28af

Please sign in to comment.