Skip to content

Commit 0d53ac7

Browse files
authored
Merge pull request #45531 from quark2/GEM-DQMOnline_bugfix_summaryplot_14_1_0_preX
Fix for the cosmetic issue for the GEM DQM summary plot
2 parents f55b7ac + c9b766a commit 0d53ac7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

DQM/GEM/plugins/GEMDQMHarvester.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,13 @@ void GEMDQMHarvester::getGeometryInfo(edm::Service<DQMStore> &store, MonitorElem
349349
if (h2Src != nullptr) { // For online and offline
350350
Int_t nBinY = h2Src->getNbinsY();
351351
listLayer_.push_back("");
352+
Int_t nNumMerge = std::max((Int_t)(h2Src->getBinContent(0, 0) + 0.5), 1);
352353

353354
for (Int_t i = 1; i <= nBinY; i++) {
354355
std::string strLabelFull = h2Src->getTH2F()->GetYaxis()->GetBinLabel(i);
355356
auto nPos = strLabelFull.find(';');
356357
auto strLayer = strLabelFull.substr(nPos + 1);
357-
Int_t nBinXActual = (Int_t)(h2Src->getBinContent(0, i) + 0.5);
358+
Int_t nBinXActual = ((Int_t)(h2Src->getBinContent(0, i) + 0.5)) / nNumMerge;
358359
if (nBinXActual > 108) { // When the number seems wrong
359360
if (strLayer.find("GE11") != std::string::npos) {
360361
nBinXActual = 36;

DQM/GEM/src/GEMDQMBase.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ dqm::impl::MonitorElement* GEMDQMBase::CreateSummaryHist(DQMStore::IBooker& iboo
189189
h2Res->setBinContent(0, i, nNumCh);
190190
}
191191

192+
h2Res->setBinContent(0, 0, 1.0);
193+
192194
return h2Res;
193195
}
194196

0 commit comments

Comments
 (0)