-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Run3-hcx373 Correct the HcalTopology class for 2 new geometry modes #46308
Conversation
cms-bot internal usage |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46308/42132
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46308/42133
|
A new Pull Request was created by @bsunanda for master. It involves the following packages:
@Dr15Jones, @atpathak, @bsunanda, @civanch, @cmsbuild, @consuegs, @francescobrivio, @kpedro88, @makortel, @mdhildreth, @perrotta can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild Please test |
It would seem to me that instead of having |
+geometry |
@perrotta Please approve this |
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 PR includes some updates/fixes with respect to the HcalTopology currently in CMSSW: please add the description of the rationale of those changes/fixes in the PR description, so that it can also remain as a future documentation (besides helping now the poor reviewer of the PR).
As far as I understand, the fixes are the following ones:
- (1) Avoid undefined behaviour at L75 for modes different from
LHC
andSLHC
- (2) Remove
Run3
from the Phase2 modes, as it is erroneously now the case in the release
Then I remain with my doubt about L198 that I expect you can explain here (or fix, if needed)
((mode == HcalTopologyMode::SLHC) || (mode_ == HcalTopologyMode::Run3) || (mode_ == HcalTopologyMode::Run4)) | ||
? 500 | ||
: 87) { | ||
numberOfShapes_((mode_ == HcalTopologyMode::LHC) ? 87 : 500) { |
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.
If I want to reproduce what in L82 I should write here:
numberOfShapes_((mode_ == HcalTopologyMode::LHC) ? 87 : 500) { | |
numberOfShapes_((mode_ == HcalTopologyMode::LHC) ? 87 : ((maxPhiHE_ > 72) ? 1200 : 500)) { |
Could you please explain why they are different, if they need to be so? Or fix the wrong one, if they have to be the same?
@@ -571,8 +567,7 @@ bool HcalTopology::validRaw(const HcalDetId& id) const { | |||
|
|||
if (ok) { | |||
if (subdet == HcalBarrel) { | |||
if ((mode_ == HcalTopologyMode::SLHC) || (mode_ == HcalTopologyMode::H2HE) || (mode_ == HcalTopologyMode::Run3) || | |||
(mode_ == HcalTopologyMode::Run4)) { | |||
if (phase2() || (mode_ == HcalTopologyMode::H2HE)) { |
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.
Ok, I understand now that this is the fix: previously Run3 was erroneously counted together with the Phase2 modes.
Please, write it in the PR description, so that one can understand from there what you are fixing.
So I removed the constructor cmssw/Geometry/CaloTopology/interface/HcalTopology.h Lines 29 to 32 in 9668a4d
from the class, did The other reason to remove that constructor is it can lead to an instance of HcalTopology which will crash on certain calls because large number of member data expect the member data hcons_ to be set, which does not happen with that constructor. |
Thank you @Dr15Jones , I second your proposal. |
@perrotta Please sign this. I am preparing the correct implementation of HcalTopology given what I wrote earlier for different eras of HCAL. This version is adequate for CMSSW_14_1_X. |
@bsunanda could you please at least reply to my question in #46308 (comment) ? Since there are two different computations of the same quantity in the two different constructors I think it is mandatory to understand whether it is correct that they are such different, and if not the wrong one must be fixed (or even removed, as suggested by @Dr15Jones ) |
@perrotta At the moment the second constructor is not used and it won't create a mess. I shall surely remove it in the next version. It was left there because when we were changing the HcalTopology (some 10-12 years ago), some of the codes were still using HcalTopology without accessing Hcal..Const from EventSetup. That practice has disappeared as seen by Chris's test. So it is safe to remove it. If I remove this in this PR, this will trigger the tests and the whole process of integration |
Fine.
|
@perrotta The first constructor is the right one. I shall remove the second constructor in my next PR |
+db
|
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. @antoniovilela, @sextonkennedy, @rappoccio, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2) |
urgent |
+1 |
PR description:
Correct the HcalTopology class for 2 new geometry modes. Geometry mode is used to specify the detector scenario. LHC was the fixed version of the legacy detector. New modes are defined to specify the current situation with new ZDC assignment with the RPD detector (Run3) and the Phase2 setup (Run4) with no HE detector. It will be expanded in future to mark when HF DetIds were enlarged (2016), HE started expansion (2017) and HB had several depths (post LS2). Some of this is reflected in this version of HcalTopology. The usage of the modes was not correctly interpreted in the earlier version of the HcalTopology code.
PR validation:
Use the runTheMatrix test workflows
If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
Backport to 14_1_X using #46309