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

Update beamspot option in ConfigBuilder #47188

Merged
merged 4 commits into from
Jan 31, 2025

Conversation

francescobrivio
Copy link
Contributor

@francescobrivio francescobrivio commented Jan 26, 2025

PR description:

Addressing issue #47182.

In this PR I'm updating the ConfigBuilder script to make sure that an exception is raised in case a cmsDriver command for MC is launched without the --beamspot parameter in the GEN step.
Additionally I:

  • Unified the VtxSmearedDefaultKey and VtxSmearedHIDefaultKey default values to be DBrealistic
  • Updated the TSG MC addOnTests with --beamspot DBrealistic
  • Updated the PREMIX workflow steps that were missing the --beamspot option

PR validation:

I have tested this PR in multiple conditions (Data,MC) x (pp,HI,cosmics) and verified that it behaves as expected with:

runTheMatrix.py -l 16834.0,312.0,8.0,145.713,4.22,142.0 -j 12 --ibeos
addOnTests.py

Additionally I verified that the command:

cmsDriver.py Configuration/GenProduction/python/GEN-Run3Winter25wmLHEGS-00006-fragment.py \
  --python_filename test_1_GS_MC.py \
  --eventcontent RAWSIM,LHE --customise Configuration/DataProcessing/Utils.addMonitoring \
  --datatier GEN-SIM,LHE --fileout file:GEN-Run3Winter25wmLHEGS-00006.root \
  --conditions 142X_mcRun3_2025_realistic_v4 \
  --customise_commands process.RandomNumberGeneratorService.externalLHEProducer.initialSeed="int(${SEED})"\\nprocess.source.numberEventsInLuminosityBlock="cms.untracked.uint32(100)" \
  --step LHE,GEN,SIM --geometry DB:Extended \
  --era Run3_2024 --no_exec --mc -n 1

(where the --beamspot option is missing) raises the following exception:

LHE,GEN,SIM,ENDJOB
Traceback (most recent call last):
  File "/afs/cern.ch/work/f/fbrivio/beamSpot/2025/fix_default_VtxSmearing/CMSSW_15_0_X_2025-01-26-0000/bin/el9_amd64_gcc12/cmsDriver.py", line 40, in <module>
    run()
  File "/afs/cern.ch/work/f/fbrivio/beamSpot/2025/fix_default_VtxSmearing/CMSSW_15_0_X_2025-01-26-0000/bin/el9_amd64_gcc12/cmsDriver.py", line 14, in run
    configBuilder = ConfigBuilder(options, with_output = True, with_input = True)
  File "/afs/cern.ch/work/f/fbrivio/beamSpot/2025/fix_default_VtxSmearing/CMSSW_15_0_X_2025-01-26-0000/src/Configuration/Applications/python/ConfigBuilder.py", line 258, in __init__
    self.define_Configs()
  File "/afs/cern.ch/work/f/fbrivio/beamSpot/2025/fix_default_VtxSmearing/CMSSW_15_0_X_2025-01-26-0000/src/Configuration/Applications/python/ConfigBuilder.py", line 1064, in define_Configs
    raise Exception("Missing \'--beamspot\' option in the cmsDriver command!")
Exception: Missing '--beamspot' option in the cmsDriver command!

Backport:

Not a backport, but backports can be opened in case @cms-sw/pdmv-l2 experts think it could be useful.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 26, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47188/43427

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

  • Configuration/Applications (operations)

@antoniovilela, @cmsbuild, @davidlange6, @fabiocos, @mandrenguyen, @rappoccio can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @fabiocos, @makortel, @missirol 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

@Martin-Grunewald
Copy link
Contributor

Hmm well, this PR will render unusable any/all cmsDriver commands not specifying a beamspot. While that is arguable great for costly MC production, for many technical tests this just creates work to fix. Anyway, can you please suggest here a valid (default?) beamspot parameter for generic use?

@francescobrivio
Copy link
Contributor Author

Hmm well, this PR will render unusable any/all cmsDriver commands not specifying a beamspot.

Hi Martin, here you mean all steps after GEN-SIM right? Because GS step should always specify a beamspot.
Or are there other cases I'm not aware of?

In any case, I will update the PR to provide a default --beamspot value for steps >= GEN-SIM.

@Martin-Grunewald
Copy link
Contributor

Martin-Grunewald commented Jan 27, 2025

We have some (technical) TSG tests using cmsDriver which now fail, post GEN-SIM, such as with cmsDriver steps:

DIGI:pdigi,L1,DIGI2RAW,ENDJOB
DIGI:pdigi,L1,DIGI2RAW,HLT:GRun,ENDJOB
HLT:GRun,ENDJOB
HLT:GRun,RAW2DIGI,L1Reco,RECO,ENDJOB
RAW2DIGI,L1Reco,RECO,PAT,VALIDATION,DQM

@Martin-Grunewald
Copy link
Contributor

We also have some GEN-SIM steps here where we would need a generic beamspot parameter now:
https://github.com/cms-sw/cmssw/blob/master/Configuration/HLT/python/addOnTestsHLT.py

@mmusich
Copy link
Contributor

mmusich commented Jan 27, 2025

Anyway, can you please suggest here a valid (default?) beamspot parameter for generic use?

I think we should just add:

--beamspot DBrealistic to the commands in the TSG addOnTests and we should be OK.

@mmusich
Copy link
Contributor

mmusich commented Jan 27, 2025

Or, we could just change the default in

VtxSmearedDefaultKey='Realistic50ns13TeVCollision'

as suggested at #47182 (comment) as option 1. (which I quite frankly prefer).

@francescobrivio
Copy link
Contributor Author

Thanks @Martin-Grunewald and @mmusich !
What I'm doing right now is to:

  • make sure the exception is raised in ConfigBuilder only if the step is GEN-SIM
  • Change the VtxSmearedDefaultKey to be DBrealistic

This would still mean that the addOnTests need to be updated...Marco, Martin I could include it in this PR if you want, just let me know.

@Martin-Grunewald
Copy link
Contributor

Please make the change in this PR as the addOn tests are run by the PR testing bot.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47188/43429

@cmsbuild
Copy link
Contributor

Pull request #47188 was updated. @Martin-Grunewald, @antoniovilela, @cmsbuild, @davidlange6, @fabiocos, @mandrenguyen, @mmusich, @rappoccio can you please check and sign again.

@Martin-Grunewald
Copy link
Contributor

Hmm, I guess VtxSmearedHIDefaultKey should be kept - with the same new default?

@cmsbuild
Copy link
Contributor

Pull request #47188 was updated. @AdrianoDee, @Martin-Grunewald, @Moanwar, @antoniovilela, @cmsbuild, @davidlange6, @DickyChant, @fabiocos, @mandrenguyen, @miquork, @mmusich, @rappoccio, @srimanob, @subirsarkar can you please check and sign again.

@mmusich
Copy link
Contributor

mmusich commented Jan 28, 2025

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 92KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-37b57c/43998/summary.html
COMMIT: 142a0ab
CMSSW: CMSSW_15_0_X_2025-01-27-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47188/43998/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
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3994126
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3994100
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 218 log files, 189 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@mmusich
Copy link
Contributor

mmusich commented Jan 28, 2025

+hlt

@Moanwar
Copy link
Contributor

Moanwar commented Jan 29, 2025

+Upgrade

@francescobrivio
Copy link
Contributor Author

a kind ping @cms-sw/pdmv-l2

@AdrianoDee
Copy link
Contributor

+pdmv
(and thanks @francescobrivio)

@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. @antoniovilela, @sextonkennedy, @rappoccio, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2)

@mandrenguyen
Copy link
Contributor

+1

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

8 participants