-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Calo towers L1 scouting data format update #48093
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?
Conversation
|
This PR contains too many commits (400 >= 240) and will not be processed. |
|
cms-bot internal usage |
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48093/44845 ERROR: Build errors found during clang-tidy run. |
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48093/44855
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-48093/47582
|
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48093/47583
|
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48093/47585
|
missirol
left a comment
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.
Two more comments (hopefully, the last ones).
Thanks for changing the position of mass in the jet data format.
| #define DataFormats_L1Scouting_L1ScoutingCaloTower_h | ||
|
|
||
| #include "DataFormats/L1Scouting/interface/OrbitCollection.h" | ||
|
|
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.
Because of int16_t, this file should now include
#include <cstdint>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.
Done. Do you know why the compiler does not complain about 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.
Not really. I guess it's because OrbitCollection.h (which is also included) happens to include itself cstdint.
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.
So should I still add it to this file, or is it not needed? Thanks
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.
Generally the best practice is for every header and source file to #include the headers that it needs rather than rely on transitive #includes. E.g. hypothetically changing OrbitCollection.h to not #include <cstdint> would result in compilation failures here.
| erBits = ((ct_raw >> l1ScoutingRun3::calol2::shiftsCaloTowers::erBits) & | ||
| l1ScoutingRun3::calol2::masksCaloTowers::erBits); | ||
| miscBits = ((ct_raw >> l1ScoutingRun3::calol2::shiftsCaloTowers::miscBits) & | ||
| l1ScoutingRun3::calol2::masksCaloTowers::miscBits); |
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.
Let's see if I get it (maybe I do not).
erBitsis shifted by 9 and the mask is0x000e == 1110, so the selected bits are (10,11,12).miscBitsis shifted by 12 and the mask is0x000f == 1111, so the selected bits are (12,13,14,15).
It looks like bit 12 is used for both. Is that right ? If so, intended ?
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 Marino
I understand it as the following:
- erBits is shifted by 9 and the mask is 0x000e == 1110 , so the selected bits are (9,10,11).
- miscBits is shifted by 12 and the mask is 0x000f == 1111, so the selected bits are (12,13,14,15).
So there is no overlap.
Thanks a lot
Best regards
Thomas
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 @tj710. What @missirol is saying is correct and that pointed to a bug in the code
Firstly, this is the format of the tower as it is sent by the scouting readout boards
| bits | content |
|---|---|
| 31-24 | ieta (signed, int8_t) |
| 23-16 | iphi (unsigned, uint8_t) |
| 15 | Ecal fine-grain flag |
| 14 | Hcal feature flag |
| 13 | E-over-H flag |
| 12 | Denominator=0 flag |
| 11-9 | Energy ratio |
| 0-8 | Total energy (Ecal + Hcal) |
The mask for the energy ratio (erBits) is currently 0x000e and the shift is 9. Now that I am looking again at this, this is not correct (it was a typo made in a commit where I have introduced the shifts) and it indeed causes what Marino is describing. The correct mask should be 0x0007 if we use 9 as shift. Can you update?
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 Rocco, thanks for explaining.
It's now fixed.
| }; | ||
| } // namespace bmtf | ||
|
|
||
| namespace calol2 { |
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.
Maybe we should change namespace name to calol1?
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.
changed
| namespace calol2 { | ||
| struct masksCaloTowers { | ||
| static constexpr uint32_t ET = 0x01ff; | ||
| static constexpr uint32_t erBits = 0x000e; |
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 mask should be 0x0007 (mea culpa)
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.
fixed
| }; | ||
| } // namespace bmtf | ||
|
|
||
| namespace calol2 { |
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.
Same as before, maybe this namespace should be calol1
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.
changed
| static constexpr uint32_t zeroFlag = 0x0001; | ||
| static constexpr uint32_t eohrFlag = 0x0002; | ||
| static constexpr uint32_t hcalFlag = 0x0004; | ||
| static constexpr uint32_t ecalFlag = 0x0008; |
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.
Not as relevant as before, but all these masks should be 0x0001. It is not a big deal as we unpack all of them together in miscBits rather than one by one
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.
fixed
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48093/47606
|
|
@cms-sw/l1-l2 , do you have any further comments on this PR ?
@tj710, before this gets merged, could you please squash this PR into one (or, just a few) commits, to have a cleaner |
PR description:
We add new data formats for L1 Scouting, which will this year be collecting the L1 Calo Trigger 'towers', in addition to the contents of the previous years.
PR validation:
The tests are documented in /DataFormats/L1Scouting/test/TestL1ScoutingFormat.sh
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:
We require backport to CMSSW 16_1_X for data taking purposes from start of 2026 data taking.
Before submitting your pull requests, make sure you followed this checklist:
Associated data files are in: cms-data/DataFormats-L1Scouting#5