-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Modification on r-phi distribution plots and fix on under/overflow bins in GEM onlineDQM #36230
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36230/26852
|
A new Pull Request was created by @quark2 for master. It involves the following packages:
@emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
please test |
DQM/GEM/plugins/GEMRecHitSource.cc
Outdated
|
||
// 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); |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36230/26856
|
Pull request #36230 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please check and sign again. |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f04352/20731/summary.html Comparison SummarySummary:
|
Hi @jfernan2, Yep, you are right... I made a confusion between the two variables. Thanks for pointing it out! Best regards, |
please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36230/26867
|
Pull request #36230 was updated. @emanueleusai, @ahmad3213, @jfernan2, @rvenditti, @pbo0, @pmandrik can you please check and sign again. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f04352/20740/summary.html Comparison SummarySummary:
|
+1 |
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) |
+1 |
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? Best regards, |
There was a problem hiding this 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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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_; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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_; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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_; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
.
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 |
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