Skip to content

MTD: initial implementation of BTL electronics/cabling mapping#50918

Open
martinamalberti wants to merge 9 commits into
cms-sw:masterfrom
martinamalberti:mm_20260511_BtlMapping
Open

MTD: initial implementation of BTL electronics/cabling mapping#50918
martinamalberti wants to merge 9 commits into
cms-sw:masterfrom
martinamalberti:mm_20260511_BtlMapping

Conversation

@martinamalberti
Copy link
Copy Markdown
Contributor

PR description:

This PR introduces a new CondFormat package for MTD under CondFormat/MTDObjects. It adds an initial version of the BTL cabling mapping in BTLElectronicsMapping.h, providing the link identifiers required for the BTL RAW data payload [1], including e-link, HS-link, and S-link ID. The S-link identifiers (which will eventually correspond to FED IDs) are currently assigned temporarily in the [0–11] range and will be updated once the official FED IDs are defined. This work is a prerequisite to start the development of the BTL packer/unpacker. A testing script has also been added in CondFormat/MTDObjects/test to verify the mapping and validate the behaviour of all implemented functions.
[1] slide 5 of https://indico.cern.ch/event/1484764/contributions/6257318/attachments/2983853/5254667/MTD_DAQ_PCD_CMS_WEEK.pdf

PR validation:

The code compiles successfully and was tested with CondFormats/MTDObjects/test/testBTLElectronicsMapping.py, to validate the mapping and verify that the implemented functions work as expected.

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 12, 2026

cms-bot internal usage

@cmsbuild
Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50918/49300

@cmsbuild
Copy link
Copy Markdown
Contributor

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

It involves the following packages:

  • CondFormats/MTDObjects (****)
  • Geometry/MTDCommonData (geometry)

The following packages do not have a category, yet:

CondFormats/MTDObjects
Please create a PR for https://github.com/cms-sw/cms-bot/blob/master/categories_map.py to assign category

@Dr15Jones, @bsunanda, @civanch, @cmsbuild, @kpedro88, @makortel, @mdhildreth can you please review it and eventually sign? Thanks.
@bsunanda, @fabiocos, @seemasharmafnal 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

@fabiocos
Copy link
Copy Markdown
Contributor

please test

@fabiocos
Copy link
Copy Markdown
Contributor

if accepted, the new package should be added to https://github.com/cms-sw/cms-bot/blob/master/categories_map.py

@cmsbuild
Copy link
Copy Markdown
Contributor

+1

Size: This PR adds an extra 40KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8f4a5e/53201/summary.html
COMMIT: cb51d53
CMSSW: CMSSW_17_0_X_2026-05-12-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/50918/53201/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 4 lines to the logs
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 53
  • DQMHistoTests: Total histograms compared: 4187168
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4187148
  • 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

@fabiocos
Copy link
Copy Markdown
Contributor

@cms-sw/alca-l2 @cms-sw/db-l2 the package added by this PR normally should belong to your domains

Copy link
Copy Markdown
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.

Not yet a review, just a couple of trivial findings spotted after a quick glance

Comment on lines +1 to +2
#ifndef DATAFORMATS_BTLELECTRONICSMAPPING_H
#define DATAFORMATS_BTLELECTRONICSMAPPING_H 1
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.

Suggested change
#ifndef DATAFORMATS_BTLELECTRONICSMAPPING_H
#define DATAFORMATS_BTLELECTRONICSMAPPING_H 1
#ifndef CONDFORMATS_MTDOBJECTS_BTLELECTRONICSMAPPING_H
#define CONDFORMATS_MTDOBJECTS_BTLELECTRONICSMAPPING_H 1

@@ -1,5 +1,6 @@
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "Geometry/MTDCommonData/interface/BTLElectronicsMapping.h"
//#include "Geometry/MTDCommonData/interface/BTLElectronicsMapping.h"
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.

Suggested change
//#include "Geometry/MTDCommonData/interface/BTLElectronicsMapping.h"

@cmsbuild
Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50918/49325

@cmsbuild
Copy link
Copy Markdown
Contributor

Pull request #50918 was updated. @Dr15Jones, @bsunanda, @civanch, @cmsbuild, @kpedro88, @makortel, @mdhildreth can you please check and sign again.

perrotta added a commit to perrotta/cms-bot that referenced this pull request May 14, 2026
Copy link
Copy Markdown
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.

Once you are done with the updates, it wouldn't be bad to squeeze all commits into one

// TEMPORARY MAPPING: within a group of 6 trays ( = supertray): tray 0 --> first block of 12 links, tray 1--> second block of 12 links, etc.
// For the first block (FF_N5), channel ids of the optical tx are reversed.

/* struct Tx {
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.

Just to understand your plans: when do you intend to uncomment these lines of code?

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.

What about adding a unit test here, similar to the ones that you removed from CondFormats/MTDObjects/test/TestBTLElectronicsMapping.cc ?

@cmsbuild
Copy link
Copy Markdown
Contributor

Pull request #50918 was updated. @Alejandro1400, @Dr15Jones, @JanChyczynski, @arunhep, @atpathak, @bsunanda, @civanch, @cmsbuild, @francescobrivio, @kpedro88, @makortel, @mdhildreth, @perrotta can you please check and sign again.

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.

Please add

<use name="rootcling"/>

to the BuildFIle (following what is being merged in #50916)

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.

No ROOT dictionaries are requested in this package though?

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.

No ROOT dictionaries are requested in this package though?

Ah ok...
I had not clear the rationale then: it looked to me the same as https://github.com/cms-sw/cmssw/pull/50916/changes#diff-7ba615a6382d50ce403a4051572e48f79a25feadcefaceab675efdb90a317743R1
Ok, I let you advise about it.

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.

it looked to me the same as https://github.com/cms-sw/cmssw/pull/50916/changes#diff-7ba615a6382d50ce403a4051572e48f79a25feadcefaceab675efdb90a317743R1

To me that link lead to DataFormats/DetId/BuildFile.xml (which requests dictionaries). Just to make sure, did you mean that or some other package?

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.

I exactly meant DataFormats/DetId/BuildFile.xml (which looked to me a pretty almost identical BuildFile than the one in this PR)

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.

Thanks for the clarification. The difference is that DataFormats/DetId/src has classes_def.xml for the dictionaries, whereas this added CondFormats/MTDObjects does not seem to have.

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.

Thank you @perrotta @makortel for your comments. This was an initial porting from the original Geometry/MTDCommonData/interface/BTLElectronicsMapping.h with simple functions based on static arrays. We are now considering to evolve it in a way more aligned with the general structure of conditions packages. We put this PR on hold for now.

@martinamalberti
Copy link
Copy Markdown
Contributor Author

hold

@cmsbuild
Copy link
Copy Markdown
Contributor

Pull request has been put on hold by @martinamalberti
They need to issue an unhold command to remove the hold state or L1 can unhold it for all

@cmsbuild cmsbuild added the hold label May 15, 2026
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