Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification on r-phi distribution plots and fix on under/overflow bins in GEM onlineDQM #36230

Merged
merged 3 commits into from
Nov 25, 2021

Conversation

quark2
Copy link
Contributor

@quark2 quark2 commented Nov 24, 2021

PR description:

Some requests on r-phi distributions are applied; finer binning on phi direction, more plots for digi.

Also, the under/overflow bins of 1D histograms are not displayed well. It has been fixed.

PR validation:

Tests are done and one can check again by runTheMatrix workflows

@jshlee @watson-ij

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36230/26852

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @quark2 for master.

It involves the following packages:

  • DQM/GEM (dqm)

@emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please review it and eventually sign? Thanks.
@watson-ij this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@jshlee
Copy link
Contributor

jshlee commented Nov 24, 2021

please test

@jfernan2
Copy link
Contributor

please test


// Filling of RecHit occupancy
mapTotalRecHit_layer_.Fill(key3, chamber, eId.ieta());

// Filling of R-Phi occupancy
Float_t fR = fRadiusMin_ + (fRadiusMax_ - fRadiusMin_) * (eId.ieta() - 0.5) / stationInfo.nNumEtaPartitions_;
mapRecHitWheel_layer_.Fill(key3, fPhi, fR);
Float_t fPhiShift = (fPhi >= stationInfo.fMinPhi_ ? fPhi : fPhi + 2 * 3.141592);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use M_PI instead of 3.14...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sroychow,

Thanks for your advice. All 3.141592 have been replaced. Please let me know if there is any missed.

Best regards,
Byeonghak Ko

Int_t GEMDQMHarvester::assessOneBin(Float_t fAll, Float_t fNumOcc, Float_t fNumWarn, Float_t fNumErr) {
if (fNumErr > 0.05 * fAll) // The error status criterion
Int_t GEMDQMHarvester::assessOneBin(
std::string strName, Int_t nIdxX, Int_t nIdxY, Float_t fAll, Float_t fNumOcc, Float_t fNumWarn, Float_t fNumErr) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the role of strName here? It is not used in this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they are not used currently, but I let them leave for future usage.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36230/26856

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

Pull request #36230 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please check and sign again.

@sroychow
Copy link
Contributor

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f04352/20731/summary.html
COMMIT: 020e5f2
CMSSW: CMSSW_12_2_X_2021-11-23-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/36230/20731/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 3247025
  • DQMHistoTests: Total failures: 114
  • DQMHistoTests: Total nulls: 83
  • DQMHistoTests: Total successes: 3246806
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 108.283 KiB( 41 files compared)
  • DQMHistoSizes: changed ( 10024.0,... ): 1.969 KiB GEM/RecHits
  • DQMHistoSizes: changed ( 11634.0,... ): 3.938 KiB GEM/RecHits
  • DQMHistoSizes: changed ( 23234.0,... ): 7.875 KiB GEM/RecHits
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • DQMHistoSizes: changed ( 35034.0,... ): 19.688 KiB GEM/RecHits
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

@quark2
Copy link
Contributor Author

quark2 commented Nov 24, 2021

Hi @jfernan2,

Yep, you are right... I made a confusion between the two variables. Thanks for pointing it out!

Best regards,
Byeonghak Ko

@jfernan2
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36230/26867

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

Pull request #36230 was updated. @emanueleusai, @ahmad3213, @jfernan2, @rvenditti, @pbo0, @pmandrik can you please check and sign again.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f04352/20740/summary.html
COMMIT: acc4357
CMSSW: CMSSW_12_2_X_2021-11-23-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/36230/20740/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 3247025
  • DQMHistoTests: Total failures: 45
  • DQMHistoTests: Total nulls: 82
  • DQMHistoTests: Total successes: 3246876
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 108.287 KiB( 41 files compared)
  • DQMHistoSizes: changed ( 10024.0,... ): 1.969 KiB GEM/RecHits
  • DQMHistoSizes: changed ( 11634.0,... ): 3.938 KiB GEM/RecHits
  • DQMHistoSizes: changed ( 23234.0,... ): 7.875 KiB GEM/RecHits
  • DQMHistoSizes: changed ( 35034.0,... ): 19.688 KiB GEM/RecHits
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

@jfernan2
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Nov 25, 2021

+1

@cmsbuild cmsbuild merged commit d69b215 into cms-sw:master Nov 25, 2021
@quark2
Copy link
Contributor Author

quark2 commented Nov 25, 2021

Hi @jfernan2,

It is already merged, but I have a question about its backport, to make sure. The version to the backport is still 12_0_X, isn't it?
Thanks!

Best regards,
Byeonghak Ko

Copy link
Contributor

@perrotta perrotta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were a few comments I supposed to have sent yesterday, but they remained pending in my laptop instead. I list them now here, because there is quite likely a bug to be fixed in them, together with some suggestion for possible code performance improvement (which I understand is not the priority for this code, but let me list them anihow, and you'll decide whether to implement them or not: several other improvements are also possible in the parts of the code not touched by this PR).

Besides them, please also consider and fix the dead initialization issue reported by the static analyzer in line 221 of DQM/GEM/plugins/GEMDQMHarvester.cc

Since this one have been merged already, please implement at least the bug fix and the resolution of the issue reported by SA in a separate PR


// Filling of RecHit (iEta)
mapRecHitOcc_ieta_.Fill(key3, eId.ieta());

// Filling of RecHit (phi)
Float_t fPhiDeg = fPhi * 180.0 / 3.141592;
Float_t fPhiDeg = fPhi * 180.0 / M_PI;
fPhiDeg = (fPhiDeg >= -0.5 ? fPhiDeg : fPhiDeg + 360);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUG
The histo mapRecHitOcc_phi_ goes between "-5" and "355", and it is filled with fPhiDeg that goes from "-0.5" to "360"
I think it would be far simpler (and less error prone) mapping everything between 0 and 360.

Copy link
Contributor Author

@quark2 quark2 Nov 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, thanks. It's a silly bug... Btw is there any nice internal function (ROOT or gcc or anything) for this task?

But I don't get your upper bound. The range of fPhiDeg before line 214 is in [-180, 180] (except one of 180 and -180), and line 214 shifts values in [-180, -5] to [180, 355] (if the wrong value -0.5 is replaced by -5). Am I corrent?

Int_t assessOneBin(
std::string strName, Int_t nIdxX, Int_t nIdxY, Float_t fAll, Float_t fNumOcc, Float_t fNumWarn, Float_t fNumErr);

Float_t fCutErr_, fCutWarnErr_, fCutWarn_;

Float_t fReportSummary_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only used inside GEMDQMHarvester::drawSummaryHistogram, no need to make it a class member

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, you're right. It would be better to let it be local.

Int_t assessOneBin(
std::string strName, Int_t nIdxX, Int_t nIdxY, Float_t fAll, Float_t fNumOcc, Float_t fNumWarn, Float_t fNumErr);

Float_t fCutErr_, fCutWarnErr_, fCutWarn_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These floats are only used inside GEMDQMHarvester::assessOneBin: I think they should be made configurable, but if you don't you can make them local constexpr in that method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's a good idea to make them configurable. Thanks!

Int_t assessOneBin(
std::string strName, Int_t nIdxX, Int_t nIdxY, Float_t fAll, Float_t fNumOcc, Float_t fNumWarn, Float_t fNumErr);

Float_t fCutErr_, fCutWarnErr_, fCutWarn_;

Float_t fReportSummary_;
std::string strOutFile_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these string can also made const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or I'll remove it. I think it is a legacy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, I thought you mentioned strOutFile_ . I'll make strDirSummary_ and strDirRecHit_ and strDirStatus_ const, then. Thanks!

@@ -26,8 +26,14 @@ void GEMDigiSource::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&,

nBXMin_ = -10;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these do not need to be class member: make them local const variable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nBXMin_ and nBXMax_ could be const (but not local since they are used in another method). I'll do that.

But fRadiusMin_ and fRadiusMax_ are more complicated. They depend on the geometry (GE11 and GE21 and ME0 have different radius ranges) and I have a plan to set these ranges from the configuration directly. So they cannot be const.

@jfernan2
Copy link
Contributor

It is already merged, but I have a question about its backport, to make sure. The version to the backport is still 12_0_X, isn't it? Thanks!

Yes, in current data taking we are using 12_0_X, but from January it is expected to switch to 12_2_X (current master). Please consider merging this PR and the changes requested by @perrotta in a single PR if you plan to backport. Thanks

@quark2
Copy link
Contributor Author

quark2 commented Nov 25, 2021

Hi @jfernan2,

Thanks! I've made an update for the comments of @perrotta. I'll also make a backport PR soon.

Best regards,
Byeonghak Ko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants