Skip to content

Gtt jet finding geometry readout - #50908

Open
ccahoughton wants to merge 5 commits into
cms-sw:masterfrom
ccahoughton:GTTJetFindingGeometryReadout
Open

Gtt jet finding geometry readout#50908
ccahoughton wants to merge 5 commits into
cms-sw:masterfrom
ccahoughton:GTTJetFindingGeometryReadout

Conversation

@ccahoughton

Copy link
Copy Markdown
Contributor

PR description:

  • Added valid bit to TkJetWord object
  • TkJetWord now contains 64 bits of data as opposed to 63 before
  • Changed track jet ordering on readout to GTT pattern file to reflect the same order as the firmware (was sorted by pT before, now sorted first by phi then by eta)
  • Added extra output file when running createFirmwareInputFiles_cfg.py called FirmwareGeometryFile.vh. If any of the JetFinding parameters change like eta bin centers or cuts on track multiplicity, regenerate FirmwareGeometryFile.vh and place it in the /algo/components/jet/firmware/hdl/ directory of the JetFinding firmware.
  • Presentation of changes in a talk coming soon

PR validation:

  • Valid bit present in track jet words in GTT test vector files
  • Used FirmwareGeometryFile.vh in the firmware and checked emulator test vector output against firmware. They match.

@cmsbuild

cmsbuild commented May 8, 2026

Copy link
Copy Markdown
Contributor

cms-bot internal usage

@cmsbuild

cmsbuild commented May 8, 2026

Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50908/49269

  • There are other open Pull requests which might conflict with changes you have proposed:

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild

cmsbuild commented May 8, 2026

Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50908/49271

  • There are other open Pull requests which might conflict with changes you have proposed:

@cmsbuild

cmsbuild commented May 8, 2026

Copy link
Copy Markdown
Contributor

A new Pull Request was created by @ccahoughton for master.

It involves the following packages:

  • DataFormats/L1Trigger (l1)
  • L1Trigger/DemonstratorTools (l1)
  • L1Trigger/L1TTrackMatch (l1)

@BenjaminRS, @cmsbuild, @quinnanm can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @eyigitba, @missirol, @mmusich, @rovere, @thomreis this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@quinnanm

quinnanm commented May 8, 2026

Copy link
Copy Markdown
Contributor

please test

@cmsbuild

cmsbuild commented May 8, 2026

Copy link
Copy Markdown
Contributor

+1

Size: This PR adds an extra 48KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5cf094/53153/summary.html
COMMIT: 8bc438b
CMSSW: CMSSW_17_0_X_2026-05-08-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/50908/53153/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: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 53
  • DQMHistoTests: Total histograms compared: 4187168
  • DQMHistoTests: Total failures: 60
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4187088
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 52 files compared)
  • Checked 227 log files, 197 edm output root files, 53 DQM output files
  • TriggerResults: no differences found

@BenjaminRS

Copy link
Copy Markdown
Contributor

Hi Connor - to let you know. PR #49003 will soon be closed and this also modified L1Trigger/DemonstratorTools/test/gtt/createFirmwareInputFiles_cfg.py. So I suggest we wait until that one is in and we will ask you to rebase on-top of that PR. In the mean time we can review the other files modified.

@quinnanm quinnanm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for this PR! Just a few comments so far.

// ----------constants, enums and typedefs ---------
static constexpr double MAX_Z0 = 30.;
static constexpr double MAX_ETA = 8.;
static constexpr double MAX_ETA = 2 * M_PI;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is max eta 2pi?

@ccahoughton ccahoughton May 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This comes from the GTT interface document specifying that the max eta for the prompt jet word is 2*pi (see attached screenshot)

Image

int minTrkJetTrackMultiplicity_,
float minTrkJetpT_) {
ofstream FirmwareGeometryFile;
FirmwareGeometryFile.open("./FirmwareGeometryFile.vh");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

May be useful add a check here to make sure the file is open

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay, I put in a simple solution:

if (FirmwareGeometryFile.is_open()) {
...
...
...
} else {
std::cout << "Failed to open firmware geometry export file" << std::endl;
}

Let me know if you had something else in mind!

//out as bit words to the geometry file
for (int i = 0; i < etaBins_; i++) {
unsigned int EtaBitInt = DoubleToBit(
eta_bin_centers[i], l1t::TkJetWord::TkJetBitWidths::kGlbEtaSize, l1t::TkJetWord::MAX_ETA * pow(2, -13));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should l1t::TkJetWord::MAX_ETA * pow(2, -13) be derived from kGlbEtaSize to avoid magic numbers? For example: (2 * MAX_ETA) / (1 << kGlbEtaSize)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will change it.

DoubleToBit(double(mzb.clusters[j].eta),
TkJetWord::TkJetBitWidths::kGlbEtaSize,
2 * TkJetWord::MAX_ETA / (1 << TkJetWord::TkJetBitWidths::kGlbEtaSize));
// TkJetWord::MAX_ETA / (1 << TkJetWord::TkJetBitWidths::kGlbEtaSize));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could this comment be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will remove it.

@cmsbuild

cmsbuild commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Milestone for this pull request has been moved to CMSSW_20_0_X. Please open a backport if it should also go in to CMSSW_17_0_X.

@cmsbuild cmsbuild modified the milestones: CMSSW_17_0_X, CMSSW_20_0_X Jun 5, 2026
@makortel

makortel commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Just checking, is this PR intended for Phase 2 (20_1_X) or Run 3 legacy (17_0_X) or both?

@cmsbuild

cmsbuild commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50908/49647

@cmsbuild

cmsbuild commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Pull request #50908 was updated. @BenjaminRS, @cmsbuild, @quinnanm can you please check and sign again.

@quinnanm

quinnanm commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

this is intended for Phase 2 (20_1_X)

@makortel

makortel commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Thanks. Then no further action is needed for this PR regarding the target branch.

@cmsbuild

cmsbuild commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Milestone for this pull request has been moved to CMSSW_20_1_X. Please open a backport if it should also go in to CMSSW_20_0_X.

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.

5 participants