Skip to content

Commit

Permalink
Merge pull request #45808 from quark2/GEM-DQMOnline_bugfix_summaryplo…
Browse files Browse the repository at this point in the history
…t_14_1_0_preX

[14_1_0] Fix for the cosmetic issue for the GEM DQM summary plot (backport)
  • Loading branch information
cmsbuild authored Aug 31, 2024
2 parents f128481 + c9b766a commit b8d34ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DQM/GEM/plugins/GEMDQMHarvester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,13 @@ void GEMDQMHarvester::getGeometryInfo(edm::Service<DQMStore> &store, MonitorElem
if (h2Src != nullptr) { // For online and offline
Int_t nBinY = h2Src->getNbinsY();
listLayer_.push_back("");
Int_t nNumMerge = std::max((Int_t)(h2Src->getBinContent(0, 0) + 0.5), 1);

for (Int_t i = 1; i <= nBinY; i++) {
std::string strLabelFull = h2Src->getTH2F()->GetYaxis()->GetBinLabel(i);
auto nPos = strLabelFull.find(';');
auto strLayer = strLabelFull.substr(nPos + 1);
Int_t nBinXActual = (Int_t)(h2Src->getBinContent(0, i) + 0.5);
Int_t nBinXActual = ((Int_t)(h2Src->getBinContent(0, i) + 0.5)) / nNumMerge;
if (nBinXActual > 108) { // When the number seems wrong
if (strLayer.find("GE11") != std::string::npos) {
nBinXActual = 36;
Expand Down
2 changes: 2 additions & 0 deletions DQM/GEM/src/GEMDQMBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ dqm::impl::MonitorElement* GEMDQMBase::CreateSummaryHist(DQMStore::IBooker& iboo
h2Res->setBinContent(0, i, nNumCh);
}

h2Res->setBinContent(0, 0, 1.0);

return h2Res;
}

Expand Down

0 comments on commit b8d34ab

Please sign in to comment.