Skip to content

Rpc digi dev v9#47447

Open
bapavlov wants to merge 11 commits into
cms-sw:masterfrom
bapavlov:rpc_digi_dev_v9
Open

Rpc digi dev v9#47447
bapavlov wants to merge 11 commits into
cms-sw:masterfrom
bapavlov:rpc_digi_dev_v9

Conversation

@bapavlov
Copy link
Copy Markdown
Contributor

PR description:

We would like to introduce some new code for the RPC Phase 2 upgrade.
So far, the digitization for both the currently installed RPCs and the ones planned for the Phase 2 upgrade have used the same data format, which was developed for the Muon upgrade TDR. However, this format is no longer adequate due to the changes planned for the RPC Phase 2 upgrade.
In short, the RPC Phase 2 upgrade includes two major changes:

  • Improved readout electronics for all currently installed RPCs, allowing for more precise timing measurements.
  • Installation of a new type of RPCs, called iRPCs (an abbreviation for “improved RPC”), in the endcap stations RE3/1 and RE4/1.

We would like to introduce these changes into the software as well. We will keep the current digi format intact, but we plan to add two additional digi formats, called RPCDigiPhase2 and IRPCDigi. Below is a brief description of the proposed changes:

  • The readout of signals from all existing RPCs will be modified. Currently, the signal is digitized with a 40 MHz clock, corresponding to exactly 1 Bunch Crossing (BX) or a 25 ns time interval. After the Phase 2 upgrade, the RPCs will be read out with a much finer clock, allowing for sub-BX resolution. Thus, we aim to add a new data format for the RPC Phase 2 upgrade that enables sub-BX resolution. The new digi format is DataFormats/RPCDigi/interface/RPCDigiPhase2.h
  • In addition, the new iRPCs (improved RPCs) will be introduced in the CMS endcaps. The major difference between RPCs and iRPCs is that iRPC strips will be read out from both ends, allowing precise estimation of the muon impact point on the strip and very accurate time measurement. We have also prepared a new format for iRPCs, and the code DataFormats/IRPCDigi
  • We will keep the current digitization code intact, but we would like to add a digitization code for the Phase 2 RPC upgrade and iRPCs. The code is available here SimMuon/RPCDigitizer

PR validation:

At the moment, our colleagues are using the code from my repository and are developing the code for the next steps (e.g., trigger emulators). The code is tested and works as expected. Results have been reported during several RPC DPG and RPC Trigger meetings:
RPC DPG May 8, 2024
RPC Trigger Oct 2, 2024
RPC DPG Jan 22, 2025
RPC DPG Feb 5, 2025

I would like to emphasize again that we have taken special care not to interfere with the present simulation in any way.

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented Feb 25, 2025

cms-bot internal usage

@cmsbuild
Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47447/43859

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

@cmsbuild
Copy link
Copy Markdown
Contributor

@cmsbuild
Copy link
Copy Markdown
Contributor

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

It involves the following packages:

  • DataFormats/IRPCDigi (****)
  • DataFormats/RPCDigi (simulation)
  • IOMC/RandomEngine (core)
  • SimMuon/Configuration (simulation)
  • SimMuon/RPCDigitizer (simulation)

The following packages do not have a category, yet:

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

@Dr15Jones, @civanch, @cmsbuild, @kpedro88, @makortel, @mdhildreth, @smuzaffar can you please review it and eventually sign? Thanks.
@CeliaFernandez, @Fedespring, @HuguesBrun, @abbiendi, @andrea21z, @battibass, @cericeci, @fabiocos, @giovanni-mocellin, @jhgoh, @makortel, @missirol, @mmusich, @rovere, @slomeo, @trocino, @wddgit this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@kpedro88
Copy link
Copy Markdown
Contributor

@bapavlov some initial questions/comments:

  1. Please create a companion PR to https://github.com/cms-sw/cms-bot to add your new package to categories_map.py
  2. Is there a workflow that executes this code? If not, please add one for testing purposes.

@civanch
Copy link
Copy Markdown
Contributor

civanch commented Feb 26, 2025

@bapavlov , @kpedro88 , I would propose do not create IRPCDigi directory. I may be wrong but in a long term it will create more problems than benefits. At least, please, consider this option.

@kpedro88
Copy link
Copy Markdown
Contributor

I have no strong opinion about the new package either way. To me, it is up to the DPG to decide how they want to organize their code at this level. That said, my detailed code review is waiting on responses to the initial questions above.

@kpedro88
Copy link
Copy Markdown
Contributor

kpedro88 commented Mar 3, 2025

@bapavlov just to be clear, I am waiting on your replies to #47447 (comment) before further review or testing.

@bapavlov
Copy link
Copy Markdown
Contributor Author

bapavlov commented Mar 3, 2025

@kpedro88, @civanch We discussed your comments #47447 (comment) within the RPC group and decided to follow Vladimir's suggestion to move IRPCDigi to the DataFormats/RPCDigi directory. I assume that, in this case, there is no need of a companion PR to https://github.com/cms-sw/cms-bot.

Regarding your question about the workflow: currently, only the DIGI step for RPCPhase2 and IRPC is implemented, and no dedicated workflow is included yet. I have a technical question about how to proceed with implementing the workflow.

  • Should I create a new Era to include this workflow, or is there another recommended approach?
  • What should the workflow consist of? Should it also include the RECO step?

Your guidance on this would be greatly appreciated.

@kpedro88
Copy link
Copy Markdown
Contributor

kpedro88 commented Mar 3, 2025

@bapavlov indeed, if there is no new package, then no PR to cms-bot is needed.

For now, you should create a new Modifier to enable this change in the DIGI step. Then you can add a special workflow, as documented at https://github.com/cms-sw/cmssw/tree/master/Configuration/PyReleaseValidation. You can follow the phase2_ecal_devel example, which is very similar to yours; they also have removed downstream steps from the special workflow until the development advances and they are ready to run those steps again.

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented Mar 3, 2025

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47447/43939

  • Found files with invalid states:

@civanch
Copy link
Copy Markdown
Contributor

civanch commented Apr 18, 2026

@cms-sw/core-l2, @cms-sw/pdmv-l2, this old PR seems to be ready. The upgrade cannot sign any more, so @cms-sw/orp-l2 please ignore upgrade.

Comment thread DataFormats/RPCDigi/src/classes_def.xml Outdated
Comment thread DataFormats/RPCDigi/src/classes_def.xml Outdated
bapavlov and others added 2 commits April 20, 2026 16:37
Co-authored-by: Matti Kortelainen <matti.kortelainen@cern.ch>
Co-authored-by: Matti Kortelainen <matti.kortelainen@cern.ch>
@cmsbuild
Copy link
Copy Markdown
Contributor

@cmsbuild
Copy link
Copy Markdown
Contributor

@makortel
Copy link
Copy Markdown
Contributor

@cmsbuild, please test

@cmsbuild
Copy link
Copy Markdown
Contributor

-1

Failed Tests: RelVals-INPUT
Size: This PR adds an extra 24KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4e2202/52774/summary.html
COMMIT: 526f678
CMSSW: CMSSW_17_0_X_2026-04-20-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47447/52774/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed RelVals-INPUT

  • 136.897DAS Error

Comparison Summary

Summary:

  • You potentially added 2 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 499 differences found in the comparisons
  • DQMHistoTests: Total files compared: 53
  • DQMHistoTests: Total histograms compared: 4186853
  • DQMHistoTests: Total failures: 37
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4186796
  • 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

@makortel
Copy link
Copy Markdown
Contributor

+core

The core parts are fine (thanks for the ping)

@civanch
Copy link
Copy Markdown
Contributor

civanch commented Apr 21, 2026

+1

@mandrenguyen
Copy link
Copy Markdown
Contributor

mandrenguyen commented Apr 21, 2026

ignore tests-rejected with manual-override

@mandrenguyen
Copy link
Copy Markdown
Contributor

@cms-sw/pdmv-l2 kindly have a look. It's just you left, since upgrade doesn't exist anymore.

@bapavlov
Copy link
Copy Markdown
Contributor Author

bapavlov commented May 5, 2026

I just wanted to kindly ask if there is any update on the PR, or an estimate of when it might be merged?

@AdrianoDee
Copy link
Copy Markdown
Contributor

test parameters:

  • addpkg = SimG4Core/CustomPhysics
  • relval_opt = -w upgrade
  • workflow = 34434.62

@AdrianoDee
Copy link
Copy Markdown
Contributor

please test
(it seems to me the new wf was never actually tested)

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 5, 2026

+1

Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4e2202/53078/summary.html
COMMIT: 526f678
CMSSW: CMSSW_17_0_X_2026-05-05-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47447/53078/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 321 differences found in the comparisons
  • DQMHistoTests: Total files compared: 53
  • DQMHistoTests: Total histograms compared: 4187168
  • DQMHistoTests: Total failures: 582
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4186566
  • 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

@AdrianoDee
Copy link
Copy Markdown
Contributor

AdrianoDee commented May 5, 2026 via email

@kpedro88
Copy link
Copy Markdown
Contributor

@bapavlov this needs to be rebased. (sorry! likely caused by #50886)

@kpedro88
Copy link
Copy Markdown
Contributor

unassign upgrade

@cmsbuild
Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47447/49336

ERROR: Build errors found during clang-tidy run.

      |   crossingFrameTokens
--
src/SimMuon/RPCDigitizer/src/RPCDigiProducer.cc:58:22: error: no viable overloaded '=' [clang-diagnostic-error]
   58 |   crossingFrameToken = consumes<CrossingFrame<PSimHit>>(edm::InputTag(mix_, collection_for_XF));
      |   ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02941/el8_amd64_gcc13/external/gcc/13.4.0-6908cfdf803923e783448096ca4f0923/lib/gcc/x86_64-redhat-linux-gnu/13.4.0/../../../../include/c++/13.4.0/bits/stl_vector.h:751:7: note: candidate function not viable: no known conversion from 'EDGetTokenT<CrossingFrame<PSimHit>>' to 'const vector<edm::EDGetTokenT<CrossingFrame<PSimHit>>>' for 1st argument
--
src/SimMuon/RPCDigitizer/src/RPCDigiProducer.cc:58:57: error: no matching constructor for initialization of 'edm::InputTag' [clang-diagnostic-error]
   58 |   crossingFrameToken = consumes<CrossingFrame<PSimHit>>(edm::InputTag(mix_, collection_for_XF));
      |                                                         ^             ~~~~~~~~~~~~~~~~~~~~~~~
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02941/el8_amd64_gcc13/cms/cmssw/CMSSW_17_0_X_2026-05-13-1100/src/FWCore/Utilities/interface/InputTag.h:15:5: note: candidate constructor not viable: no known conversion from 'const std::set<std::string>' (aka 'const set<basic_string<char>>') to 'const std::string' (aka 'const basic_string<char>') for 2nd argument
--
src/SimMuon/RPCDigitizer/src/RPCDigiProducer.cc:58:71: error: use of undeclared identifier 'mix_'; did you mean 'mix'? [clang-diagnostic-error]
   58 |   crossingFrameToken = consumes<CrossingFrame<PSimHit>>(edm::InputTag(mix_, collection_for_XF));
      |                                                                       ^~~~
      |                                                                       mix
--
src/SimMuon/RPCDigitizer/src/RPCDigiProducer.cc:58:77: error: use of undeclared identifier 'collection_for_XF'; did you mean 'collections_for_XF'? [clang-diagnostic-error]
   58 |   crossingFrameToken = consumes<CrossingFrame<PSimHit>>(edm::InputTag(mix_, collection_for_XF));
      |                                                                             ^~~~~~~~~~~~~~~~~
      |                                                                             collections_for_XF
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@kpedro88
Copy link
Copy Markdown
Contributor

@bapavlov please consult the changes at https://github.com/cms-sw/cmssw/pull/50886/changes#diff-6bd7598a7b8f0244909bffa30f3e7f7024101268c2986aa5bd32d93715dab15d to see how to update this PR correctly. (also, rebase is preferred rather than merge; see tutorial)

@bapavlov
Copy link
Copy Markdown
Contributor Author

@kpedro88 I removed the merge and will follow the instructions to rebase the code

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.

10 participants