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

kt smearing for gammaUPC #47183

Open
wants to merge 6 commits into
base: CMSSW_10_6_X
Choose a base branch
from

Conversation

michael-pitt
Copy link
Contributor

PR description:

This is a copy of run_generic_tarball_cvmfs.sh with additional pT smearing for processes involving elastic photons prodiced by Madgraph or gammaUPC

PR validation:

This code was tested in production chain with 10_6_46

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @michael-pitt for CMSSW_10_6_X.

It involves the following packages:

  • GeneratorInterface/LHEInterface (generators)

@bbilin, @cmsbuild, @lviliani, @menglu21, @mkirsano can you please review it and eventually sign? Thanks.
@alberto-sanchez, @mkirsano 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

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 24, 2025

cms-bot internal usage

@stahlleiton
Copy link
Contributor

stahlleiton commented Jan 28, 2025

@michael-pitt : Considering that the bash script allows to input parameters, one could add a parameter to retrieve the "beams" parameter used by the kT smearing python script, which would generalize this to both pp and heavy ions. In addition, by using an input parameter, one would not need to create a separate "run_tarball_cvmfs_....sh" script, since if the parameter is null then that would not apply the kT smearing.

So my suggestion would be to add:

if [ -n "${8}" ]; then
  beams=${8}
fi

....


if [ -n "${beams}" ]; then
  # smear photon kT
  python3 ${CMSSW_BASE}/src/GeneratorInterface/LHEInterface/test/gamma-UPC_lhe_ktsmearing_UPC.py --file='cmsgrid_final.lhe' --out='cmsgrid_final.ktsmearing.lhe' --beams=$beams
  mv cmsgrid_final.ktsmearing.lhe $LHEWORKDIR/cmsgrid_final.lhe
fi

@cmsbuild
Copy link
Contributor

Pull request #47183 was updated. @bbilin, @cmsbuild, @lviliani, @menglu21, @mkirsano can you please check and sign again.

@DickyChant
Copy link

Hi I chatted with @stahlleiton on this, there is actually a postGenerationCommand that could help:

e.g.

postGenerationCommand = cms.untracked.vstring('gamma-UPC_lhe_ktsmearing_UPC.py',  '--file', 'cmsgrid_final.lhe', '--out', 'cmsgrid_final.lhe', '--beams', 'p p'),

This command will run the script gamma-UPC_lhe_ktsmearing_UPC.py with the commands supplied, and the script is needed to be put in a different place.

In this way we don't have to touch the big script. What do you think?

@cmsbuild
Copy link
Contributor

Pull request #47183 was updated. @bbilin, @cmsbuild, @lviliani, @menglu21, @mkirsano can you please check and sign again.

@cmsbuild
Copy link
Contributor

Pull request #47183 was updated. @bbilin, @cmsbuild, @lviliani, @menglu21, @mkirsano can you please check and sign again.

@michael-pitt
Copy link
Contributor Author

michael-pitt commented Jan 29, 2025

Hi @DickyChant

Thank you for your suggestion, I like it very much!

I moved the file to script folder, so it can be called with:

externalLHEProducer = cms.EDProducer("ExternalLHEProducer",
...
    postGenerationCommand = cms.untracked.vstring('gamma-UPC_lhe_ktsmearing_UPC.py',  '--file=cmsgrid_final.lhe', '--out=cmsgrid_final.lhe', '--beams=p p')
)

I tested the code with this fragment, and it seems to be working.

We also have a Fortran version of this script, which runs much faster, but I don't know how to add .f files to the package

@denterria
Copy link

Hi, (comment here as gamma-UPC author).

Regarding the kT smearing, the Fortran code is much faster than the python script. For large LHE files it really makes sense to use the fortran code post-generation.

thanks, david

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 1, 2025

Pull request #47183 was updated. @bbilin, @cmsbuild, @lviliani, @menglu21, @mkirsano can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 1, 2025

Pull request #47183 was updated. @bbilin, @cmsbuild, @lviliani, @menglu21, @mkirsano can you please check and sign again.

@michael-pitt
Copy link
Contributor Author

Dear @bbilin @lviliani @menglu21 @mkirsano

I've cleaned up the code and produced kT-smeared samples using Python script.

The Fortran code requires some work to be integrated into CMSSW. Since we should have a single script for kT smearing and the Fortran will take some time I would propose to merge the current RP so we can ask for central production of these samples.

@denterria: We can later on (if needed) to integrate and replace the python version with the Fortran code.

Regards,
Michael

@bbilin
Copy link
Contributor

bbilin commented Feb 10, 2025

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 12KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-34cbda/44290/summary.html
COMMIT: 5711778
CMSSW: CMSSW_10_6_X_2025-02-09-0000/slc7_amd64_gcc700
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47183/44290/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: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 3215686
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3215351
  • DQMHistoTests: Total skipped: 334
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 34 files compared)
  • Checked 144 log files, 103 edm output root files, 35 DQM output files
  • TriggerResults: no differences found

@lviliani
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_10_6_X IBs (tests are also fine) and once validation in the development release cycle CMSSW_15_1_X is complete. This pull request will now be reviewed by the release team before it's merged. @rappoccio, @sextonkennedy, @antoniovilela, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2)

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

7 participants