-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Infrastructure for using channel-dependent pulse shapes for HB/HE #45995
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
base: master
Are you sure you want to change the base?
Infrastructure for using channel-dependent pulse shapes for HB/HE #45995
Conversation
cms-bot internal usage |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45995/41766
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-45995/41767
|
A new Pull Request was created by @igv4321 for master. It involves the following packages:
@cmsbuild, @consuegs, @jfernan2, @mandrenguyen, @perrotta, @saumyaphor4252 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
# indicating whether we are using it | ||
channelShapesLabel = cms.string("HcalDataShapes"), | ||
useChannelShapes = cms.bool(False), | ||
|
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, I'm not a reviewer, I just have a general question on these developments.
What is their target (if there is one) for going in production ? 2025 data-taking ?
Are these changes only needed for the HCAL offline reconstruction, or are they also supposed to be used at HLT ?
Ever since the heterogeneous version of the HCAL local reconstruction was ported to Alpaka (#44910), the plugin HBHEPhase1Reconstructor
is not used anymore in the Run-3 HLT menus (in other words, HLT is blind to this PR, as far as I understand).
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 will be useful for 2023 and 2024 re-reco as well as for the future data taking. Unfortunately, at the moment we don't have an alpaka expert in the HCAL DPG, so there is no concrete plan how to get this to work in the HLT. Of course, help from Martin Kwok (or any other alpaka expert) would be appreciated.
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 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.
I have to say that this
for the future data taking
combined with
there is no concrete plan how to get this to work in the HLT.
sounds to me like the HCAL DPG is not taking full ownership of the HCAL code running in production today in the HLT. I don't know the quantitative impact of these channel-dependent pulse shapes, but I would assume that we (well, HCAL specifically) should make an effort to keep HLT and offline as close as possible to each other.
+1 Size: This PR adds an extra 16KB to repository Comparison SummarySummary:
|
label = cms.string('default'), | ||
t0 = cms.uint32(0), | ||
pulse = cms.vdouble( | ||
5.22174e-12, 7.04852e-10, 3.49584e-08, 7.78029e-07, 9.11847e-06, |
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.
wouldn't this large amount of parameters be better stored in the database, or at least in some external cms-data
repository? This makes this file ~ unreadable.
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, this was discussed with the Hcal calibration group. However, this is the first time we are introducing this channel-by-channel dependence since the beginning of CMS operations, and the pulse shapes are not expected to change more often than once per era, so it was decided to keep the information in a config file. While this file is large (and, of course, computer-generated), its structure is rather simple, as can be seen from the "fillDescriptions" function of the HcalPulseShapesEP.cc code.
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 approach is not acceptable.
Please move the pulse shapes either to a text file in an external cms-data
package, or to a database payload.
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.
Could you please substantiate your statement? Haven't seen anything against this approach in CMSSW guidelines and can't understand why it can be harmful.
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.
Have you seen many other modules with a configuration that takes twelve thousand lines of python code ?
Co-authored-by: Andrea Bocci <[email protected]>
Pull request #45995 was updated. @cmsbuild, @consuegs, @jfernan2, @mandrenguyen, @perrotta, @saumyaphor4252 can you please check and sign again. |
assign alca Please review the misuse of python configurations for detector calibrations, e.g. in |
Perhaps, I should point out that these are not "detector calibrations" in the usual sense of the word. Pulse shapes can change, but the expected frequency is about the same as the frequency with which the detector composition is modified (once per shutdown), or front end electronics and/or firmware are swapped. The "eras" were invented precisely to permit such infrequent modifications in a reasonable way. |
Perfect, so they can be put in a database object that will not need to be updated frequently. |
Yes, a database object can be developed, but that requires an extra level of complexity. What are the advantages of it? |
Some examples.
|
That assumes that the python-based approach would stay, and a database approach would be added. So, a database approach does not require an "extra_ level of complexity", it only requires a different approach. As to why adding a 1 MB python file with 50'000 parameters should be discouraged:
To put it simply: this is not a configuration, this is data, and it should be treated accordingly. |
As a temporary "get though" workaround which was mentioned by Andrea above and which I've suggested ca a year ago - /cvmfs/cms.cern.ch/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_0_pre1/external/el8_amd64_gcc12/data/RecoLocalCalo/HcalRecAlgos/data ( HcalRecAlgos/data doesn't exist yet) ? |
Indeed this would avoid some of nastiest consequences of having a 12k lines python configuration fragment to load at runtime as well as making this slightly more maintainable (Marino and Andrea have given reasons enough above why this is really undesirable).
|
@igv4321 since you are developing this part of the code anew please consider using the condition database option that was suggested, whose advantage has been thoroughly detailed here above. |
I'm afraid HCAL (three) names are obsolete. Yildiray Komurcu to replace them. |
Milestone for this pull request has been moved to CMSSW_15_0_X. Please open a backport if it should also go in to CMSSW_14_2_X. |
type hcal |
Milestone for this pull request has been moved to CMSSW_15_1_X. Please open a backport if it should also go in to CMSSW_15_0_X. |
PR description:
Adding infrastructure for modeling Hcal front-end pulse shapes channel-by-channel. The pulse shapes were determined by phase scans, as described in https://indico.cern.ch/event/1336438/contributions/5626382/attachments/2733633/4753627/HBHE_Pulse_shape_study.pdf. The new pulse shapes have not yet been turned on, pending final timing adjustment.
PR validation:
The usual matrix text were run. Also, privately, the new pulse shapes were switched on (parameter "useChannelShapes" in HBHEPhase1Reconstructor_cfi.py was set True), and the code appears to produce reasonable results on the 2023 data workflow, as indicated by the subsequent Hcal rechit dump.