Skip to content
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

Calo-L1 unpacker modified to read 5BX payload format #36259

Merged
merged 2 commits into from Dec 17, 2021

Conversation

hftsoi
Copy link
Contributor

@hftsoi hftsoi commented Nov 26, 2021

PR description:

This PR is about the trigger Calo-L1 unpacker modified to read ECAL's 5BX FAT events properly. The current central unpacker for FAT events is assuming a payload size of 192 * 32-bit words and the same structure as for normal events, repeated itself one after another five times for each FAT event, and each Calo fragment contains one BX only. However this is not compatible with the actual current payload format which has a larger size of 5 * 192 * 32-bit words, where each Calo fragment contains all 5 BX already, stacked in the order BX-2, -1, 0, +1, +2 inside.

The modification involves duplication of all necessary unpacker functions from normal events unpacking, then to make changes there for FAT events unpacking. The idea is to have two separate unpackers, one for unpacking normal events only, and another for unpacking FAT events only, in order to minimize risk.

Note: UCTCTP7RawData5BX.h is duplicated from UCTCTP7RawData.h, which contains the index equations for locating Calo fragments in payload data, offsets are modified for 5BX, while geometry, word structure and etc. remain the same.

PR validation:

Validated by running private online DQM on recent CRUZET runs, all DQM plots looked expected with modified unpacker. Also asked the central DQM team to include these changes into temporary production for this last week of running, all tests ran fine and DQM plots looked expected.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36259/26919

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @hftsoi (Ho-Fung Tsoi) for master.

It involves the following packages:

  • EventFilter/L1TRawToDigi (l1)

@cmsbuild, @rekovic, @cecilecaillol can you please review it and eventually sign? Thanks.
@dinyar, @missirol, @thomreis, @Martin-Grunewald this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@rekovic
Copy link
Contributor

rekovic commented Nov 29, 2021

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a5271c/20821/summary.html
COMMIT: f0ef55d
CMSSW: CMSSW_12_2_X_2021-11-28-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/36259/20821/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 3247873
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3247845
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 41 files compared)
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

Copy link
Contributor

@perrotta perrotta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some (minor) comment for some (very minor) code optimization

Comment on lines +249 to +251
bool negativeEta = false;
if (cEta < 0)
negativeEta = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool negativeEta = false;
if (cEta < 0)
negativeEta = true;
bool negativeEta = (cEta < 0);

Comment on lines +303 to +305
bool negativeEta = false;
if (cEta < 0)
negativeEta = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool negativeEta = false;
if (cEta < 0)
negativeEta = true;
bool negativeEta = (cEta < 0);

Comment on lines +348 to +350
bool negativeEta = false;
if (side == 0)
negativeEta = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool negativeEta = false;
if (side == 0)
negativeEta = true;
bool negativeEta = (cEta < 0);

Comment on lines +403 to +405
bool negativeEta = false;
if (side == 0)
negativeEta = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool negativeEta = false;
if (side == 0)
negativeEta = true;
bool negativeEta = (cEta < 0);

Comment on lines +408 to +410
uint32_t lEta = 10 - region; // GCT eta goes 0-21, 0-3 -HF, 4-10 -B/E, 11-17 +B/E, 18-21 +HF
if (!negativeEta)
lEta = region + 11;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uint32_t lEta = 10 - region; // GCT eta goes 0-21, 0-3 -HF, 4-10 -B/E, 11-17 +B/E, 18-21 +HF
if (!negativeEta)
lEta = region + 11;
// GCT eta goes 0-21, 0-3 -HF, 4-10 -B/E, 11-17 +B/E, 18-21 +HF
uint32_t lEta = negativeEta? 10 - region: region + 11;

Comment on lines +304 to +311
uint32_t tower = iPhi;
if ((cEta % 2) == 0)
tower += 4;
if (cType == HF) {
tower = (cEta - 30);
if (cEta == 41)
tower = 10;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uint32_t tower = iPhi;
if ((cEta % 2) == 0)
tower += 4;
if (cType == HF) {
tower = (cEta - 30);
if (cEta == 41)
tower = 10;
}
uint32_t tower;
if (cType == HF) {
tower = (cEta != 41? cEta - 30: 10);
} else {
tower = iPhi;
if ((cEta % 2) == 0)
tower += 4;
}

@hftsoi
Copy link
Contributor Author

hftsoi commented Dec 5, 2021

Some (minor) comment for some (very minor) code optimization

Thanks for your review and suggestion! I guess at this stage we hope to keep the duplicated parts (for 5BX unpacking only) with changes as minimal as possible compared to the original (for normal unpacking only), even if it is for code optimization, just to have a more consistent comparison in case things arise. We will consider it later for both duplicated and original parts the same time.

@smuzaffar smuzaffar modified the milestones: CMSSW_12_2_X, CMSSW_12_3_X Dec 6, 2021
@cecilecaillol
Copy link
Contributor

+l1

@cmsbuild
Copy link
Contributor

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)

@cecilecaillol
Copy link
Contributor

@hftsoi Ok, please keep in mind the comments when you change both the original and duplicated parts

@perrotta
Copy link
Contributor

+1

  • I understand that code cleaning will be dealt with in a separate PR

@cmsbuild cmsbuild merged commit 4cd114c into cms-sw:master Dec 17, 2021
cmsbuild added a commit that referenced this pull request Feb 17, 2022
[backport of #36259] Calo-L1 unpacker modified to read 5BX payload format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants