-
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 to move ZDC trigger spacing to TP channel parameters conditions. #46537
Conversation
cms-bot internal usage |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46537/42399 Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
Hi @hjbossi , I assume you have a new ATTN: @abdoulline @yildirayk |
Yes, I do, of course for the ZDC channels, which would need to be merged with the HCAL channels. We actually also use auxi1 for the "weight" corresponding to the fraction of OOTPU (see here), so that is non-zero as well. |
4ea6a5f
to
476bdb1
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46537/42401 |
A new Pull Request was created by @hjbossi for master. It involves the following packages:
@aloeliger, @atpathak, @cmsbuild, @consuegs, @epalencia, @perrotta can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test workflow 142 |
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 comments are not fundamental: code will be cleaner if implemented, but you can skip if you are in a hurry to merge them
int weight = tpParam->getauxi1(); | ||
int factorGeVPerCount = tpParam->getauxi2(); |
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.
int weight = tpParam->getauxi1(); | |
int factorGeVPerCount = tpParam->getauxi2(); | |
const int weight = tpParam->getauxi1(); | |
const int factorGeVPerCount = tpParam->getauxi2(); |
int lutId = getLUTId(cell); | ||
int lutId_ootpu = lutId + sizeZDC_; |
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.
int lutId = getLUTId(cell); | |
int lutId_ootpu = lutId + sizeZDC_; | |
const int lutId = getLUTId(cell); | |
const int lutId_ootpu = lutId + sizeZDC_; |
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.
took suggestion, resolved in latest version
lut[adc] = std::min(std::max(0, int((adc2fC(adc) - ped) * gain * rcalib / factorGeVPerCount)), MASK); | ||
lut_ootpu[adc] = std::min( | ||
std::max(0, int((adc2fC(adc) - ped) * gain * rcalib * weight / (factorGeVPerCount * 256))), MASK); |
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.
lut[adc] = std::min(std::max(0, int((adc2fC(adc) - ped) * gain * rcalib / factorGeVPerCount)), MASK); | |
lut_ootpu[adc] = std::min( | |
std::max(0, int((adc2fC(adc) - ped) * gain * rcalib * weight / (factorGeVPerCount * 256))), MASK); | |
auto lut_term = (adc2fC(adc) - ped) * gain * rcalib / factorGeVPerCount; | |
lut[adc] = std::clamp(int(lut_term), 0, MASK); | |
lut_ootpu[adc] = std::clamp(int(lut_term * weight / 256), 0, MASK); |
(you must #include <algorithm>
if you do so)
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.
Took suggestion, resolved in latest version
476bdb1
to
3d31f37
Compare
Thank you for your comments @perrotta ! We have implemented these in the latest version. Please let us know of any further comments! |
Then it will be printed once per run, not once per event. Which could still be quite a lot for large productions which spans over several runs (but perhaps large productions are only setup to print Errors, not Warnings, and therefore it could be still affordable). |
please test workflow 142 |
-1 Failed Tests: RelVals-INPUT
RelVals-INPUT
Expand to see more relval errors ...
Comparison SummarySummary:
|
+alca
|
ignore tests-rejected with ib-failure |
+1 |
+l1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (test failures were overridden). This pull request will be automatically merged. |
const int weight = tpParam->getauxi1(); | ||
int factorGeVPerCount = tpParam->getauxi2(); | ||
if (factorGeVPerCount == 0) { | ||
edm::LogWarning("HcaluLUTTPGCoder") |
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.
since after this PR was merged, logs of Phase 2 step2 (DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:@relvalRun4
) workflows are full of:
%MSG-w HcaluLUTTPGCoder: HcalTPGCoderULUT:HcalTPGCoderULUT@callESModule 15-Nov-2024 15:59:20 CET Run: 1 Event: 701
WARNING: ZDC trigger spacing factor, taken from auxi2 field of HCALTPChannelParameters for the cell with (zside, section, channel) = (1 , 1 , 1) is set to the default value of 0, which is an incompatible value for a spacing factor. Setting the value to 50 and continuing.
%MSG
%MSG-w HcaluLUTTPGCoder: HcalTPGCoderULUT:HcalTPGCoderULUT@callESModule 15-Nov-2024 15:59:20 CET Run: 1 Event: 701
WARNING: ZDC trigger spacing factor, taken from auxi2 field of HCALTPChannelParameters for the cell with (zside, section, channel) = (1 , 1 , 2) is set to the default value of 0, which is an incompatible value for a spacing factor. Setting the value to 50 and continuing.
%MSG
%MSG-w HcaluLUTTPGCoder: HcalTPGCoderULUT:HcalTPGCoderULUT@callESModule 15-Nov-2024 15:59:20 CET Run: 1 Event: 701
WARNING: ZDC trigger spacing factor, taken from auxi2 field of HCALTPChannelParameters for the cell with (zside, section, channel) = (1 , 1 , 3) is set to the default value of 0, which is an incompatible value for a spacing factor. Setting the value to 50 and continuing.
%MSG
%MSG-w HcaluLUTTPGCoder: HcalTPGCoderULUT:HcalTPGCoderULUT@callESModule 15-Nov-2024 15:59:20 CET Run: 1 Event: 701
WARNING: ZDC trigger spacing factor, taken from auxi2 field of HCALTPChannelParameters for the cell with (zside, section, channel) = (1 , 1 , 4) is set to the default value of 0, which is an incompatible value for a spacing factor. Setting the value to 50 and continuing.
%MSG
see, e.g. step2 of 29634.0.
@perrotta @hjbossi in the PR signature there's written:
The code will release a few lines of LogWarning message per run, until the conditions are updated with the missing content: this will be fixed at the next condition updates, and in any case LogWarning shouldn't get triggered in production-like workflows (correct?)
are we expecting this to be fixed in Phase 2 conditions as well? when is this going to happen?
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.
Thank you @mmusich for reporting. These logs are printed once per run: they are certainly annoying, but probably still affordable. In any case, certainly also the HCALTPChannelParameter
tag in the Phase2 GTs should be eventually updated to take into account the second parameter searched for in those conditions.
However, my point here would be different: why ZDC is enabled at all in Phase2 workflows? Maybe the recently merged PR #46570 from @bsunanda testifies that HCAL/ZDC people is aware of the issue and they are going to provide a mechanism to solve it?
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.
@bsunanda do you mind letting us know the status on this? I am also not sure why ZDC is enabled in Phase 2 workflows at the moment.
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 logs are printed once per run: they are certainly annoying, but probably still affordable.
in the log of e.g. step2 of 29634.0 I count these logs 13 times and not one.
In any case, I am not sure what "affordable" means in this context. If all PRs were processed by the standards of this PR, the logs of production workflows will quickly be swamped by a large amount of warnings and errors, rendering them not very useful for the whole collaboration (as when the log file is full of warnings it's difficult to spot additional, perhaps more serious, problems).
I understand that this PR might have been needed for operations, but what bothers me here, is that apparently there is no clear roadmap from the experts about the clean-up (and the PR was merged 2 weeks ago).
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.
In the log of e.g. step2 of 29634.0, as in all other logs affected, there are warnings for the 13 ZDC channels printed once per run, as I wrote. Having the warnings printed only once per run was something that we wanted to get assured during the review, in order not to flood the outputs with too much output even during this intermediate period before all relevant GTs could get updated.
This is certainly annoying, as I wrote, and it must be fixed (thank you again for having pointed it out for the Phase2 case, where it was indeed overlooked because I did not think that ZDC would have been digitized in Phase2 workflows). For "affordable" I mean that having those warnings listed only once at the begin of run should have probably still allowed to spot other warning messages, certainly in the other events of the runs, but quite likely also at that begin of run.
As examples of much less affordable warning reports let me point out (from some more or less randomly chosen workflows) the continuously repeated messages from ElectronSeedProducer:ecalDrivenElectronSeeds
in step3 of wf 136.874, or the ones from TrackRefitter
or PrimaryVertexAnalyzer4PUSlimmed
(and probably also a few more) from step3 of wf 181.1, which are there from long time and apparently nobody cares about.
Hi all, For Phase2 - I've suggested to @bsunanda to make ZDC Digi switching off not an option, but just a permanent modification... |
HcalTPChannelParameters_2024_v2.0_mc has been created by replacing the auxi2 values of ZDC channels by 50 and uploaded to the database and queued to the 142X_mcRun3_2025* tags. |
PR description:
This PR takes a parameter hard-coded in the HCAL LUT generation for the ZDC and replaces it with a second auxiliary parameter from the HCAL TP Channel Parameters conditions. This is in order to change the granularity of the ZDC trigger decision (currently set to 1 count = 50 GeV) in coordination with ZDC gain changes set forth by changing the operating voltage. Whenever the conditions are updated to modify this parameter, this will also require a modification of the L1 menu. Therefore this PR will need to be carefully synchronized for deployment.
PR validation:
This PR was tested locally on 2024 HI data taken with spurious collisions over the weekend.
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:
This PR is intended for HI data-taking and will require backport to CMSSW_14_1_X.
Tagging @mandrenguyen , @JHiltbrand, and @Michael-Krohn.