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

Add LHCTransport to Run3 GEN content #37470

Merged
merged 2 commits into from Apr 12, 2022

Conversation

srimanob
Copy link
Contributor

@srimanob srimanob commented Apr 5, 2022

PR description:

As reported in #37469
We can't split GEN and SIM for Run-3 because of missing
edm::HepMCProduct "LHCTransport" "" "GEN"

This PR adds it as default collection of GENRAW and GENRECO.

PR validation:

Test with 2 steps, GEN and SIM, separately wotks:
cmsDriver.py TTbar_14TeV_TuneCP5_cfi -s GEN,SIM -n 10 --conditions auto:phase1_2021_realistic --beamspot Run3RoundOptics25ns13TeVLowSigmaZ --datatier GEN-SIM --eventcontent RAWSIM --geometry DB:Extended --era Run3 --python step1_TTbar_14TeV_GEN.py --no_exec --fileout file:step1.root --nThreads 8

cmsDriver.py step2 -s SIM --conditions auto:phase1_2021_realistic --datatier GEN-SIM -n -1 --eventcontent FEVTDEBUGHLT --geometry DB:Extended --era Run3 --python step2_SIM_2021.py --no_exec --filein file:step1.root --fileout file:step2.root --nThreads 8

if this PR is a backport please specify the original PR and why you need to backport that PR:

No need of backport if we don't need to split them in the release before 12_4.

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 5, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37470/29164

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 5, 2022

A new Pull Request was created by @srimanob (Phat Srimanobhas) for master.

It involves the following packages:

  • GeneratorInterface/Configuration (generators)

@SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @alberto-sanchez can you please review it and eventually sign? Thanks.
@alberto-sanchez, @mkirsano this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@davidlange6
Copy link
Contributor

what is the cost of just adding this to all gen (reducing complexity)?


from Configuration.Eras.Modifier_run3_common_cff import run3_common
run3_common.toModify(GeneratorInterfaceRAW,
outputCommands = GeneratorInterfaceRAW.outputCommands+['keep edmHepMCProduct_LHCTransport_*_*'])
Copy link
Contributor

Choose a reason for hiding this comment

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

If I've understood correctly, the LHCTransport module is enabled to be run here

from Configuration.Eras.Modifier_ctpps_2021_cff import ctpps_2021
ctpps_2021.toReplaceWith(PPSTransportTask, cms.Task(LHCTransport))

It would be better to use the more specific modifiers. I see the run3_common being used also here

run3_common.toModify( g4SimHits, LHCTransport = True )

If that would be changed to use ctpps_2021 as well, and the definition of Run3_pp_on_PbPb

Run3_pp_on_PbPb = cms.ModifierChain(Run3_noMkFit.copyAndExclude([trackdnn, trackdnn_CKF, trackingNoLoopers]), pp_on_AA, pp_on_PbPb_run3)

to exclude ctpps_2021 (assuming that is the intention), then this fragment
##
## Disable PPS from Run 3 PbPb runs
##
from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
pp_on_PbPb_run3.toModify( g4SimHits, LHCTransport = False )

would not be needed, nor any explicit treatment for Phase2 (since ctpps_2021 is excluded from there
Phase2 = cms.ModifierChain(Run3_noMkFit.copyAndExclude([phase1Pixel,trackingPhase1,ctpps_2021,dd4hep]), phase2_common, phase2_tracker, trackingPhase2PU140, phase2_ecal, phase2_hcal, phase2_hgcal, phase2_muon, phase2_GEM, hcalHardcodeConditions, phase2_timing, phase2_timing_layer, phase2_trigger)

).

@srimanob
Copy link
Contributor Author

srimanob commented Apr 5, 2022

Hi @davidlange6 @makortel

Thanks for prompt comment. The added collection is very cheap,
Branch Name | Average Uncompressed Size (Bytes/Event) | Average Compressed Size (Bytes/Event)
edmHepMCProduct_generatorSmeared__GEN. 374795 103862
edmHepMCProduct_LHCTransport__GEN. 442.5 268.7 <<=== What is added in this PR.

If OK, I can put it in the GEN collection by default.
And I will recheck and update modifiers in other places (maybe in the separated PR).

FYI @civanch

@civanch
Copy link
Contributor

civanch commented Apr 6, 2022

@srimanob , LHCTransport return list of particles after Hector transport in beam pipe. This allows making simulation of interaction of protons with PPS detectors in Geant4. We add these protons after Hector transport to the list of primary for Geant4. So, Hector transport plugin should run before OscarProducer. It may have from 0 to 2 protons only, so the size is negligible.

If it is unavoidable to do this transport at GEN step it is fine what you propose. However, logically I would make Hector transport within SIM step not GEN step.

@civanch
Copy link
Contributor

civanch commented Apr 6, 2022

I would say more: Hector transport is usually known after the experiment not before, so having Hector transport inside GEN may be a problem.

@srimanob
Copy link
Contributor Author

srimanob commented Apr 6, 2022

Hi @civanch
Thanks for the comment, but I'm not sure I understand correctly.

When you say "so having Hector transport inside GEN may be a problem.", do you mean it is not done properly now (before this PR)? Since this PR does not touch what currently happen in GEN and SIM, so I understand that what to be fixed is moving the LHCTransport out from GEN.

My goal is clear, I would like to make sure we can decouple GEN and SIM step. This is how it runs now, at the end of GEN step before entering SIM.
https://github.com/cms-sw/cmssw/blob/master/Configuration/StandardSequences/python/Generator_cff.py#L59
pgen = cms.Sequence(cms.SequencePlaceholder("randomEngineStateProducer")+VertexSmearing+GenSmeared+GeneInfo+genJetMET, PPSTransportTask)

@civanch
Copy link
Contributor

civanch commented Apr 6, 2022

@srimanob , properties of beam optics are taken from Run-2 and during Run-3 some modifications may be required (or not). It is a typical problem of PPS, may be after first few beams these parameters may be tuned as the beam spot, we need to communicate PPS peoples to clarify that. It is why my suggesting to have the Hector transport at the SIM step is not strong: if it is easy, better to do it at the SIM step, because Hector is a kind of simulation. If it is too complicate now - let us left Hector at the GEN step.

@srimanob
Copy link
Contributor Author

srimanob commented Apr 6, 2022

OK, so I fix this PR by make it by default as @davidlange6 suggests.
And I will open another PR to review the use of customization as suggested by @makortel

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 6, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37470/29176

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 6, 2022

Pull request #37470 was updated. @SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @alberto-sanchez can you please check and sign again.

@srimanob
Copy link
Contributor Author

srimanob commented Apr 6, 2022

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 6, 2022

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5e7f5c/23682/summary.html
COMMIT: d7f99e7
CMSSW: CMSSW_12_4_X_2022-04-05-2300/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/37470/23682/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
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3593039
  • DQMHistoTests: Total failures: 8
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3593009
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 200 log files, 45 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@civanch
Copy link
Contributor

civanch commented Apr 9, 2022

@GurpreetSinghChahal, @SiewYan, @mkirsano, @Saptaparna, @alberto-sanchez, please, consider this PR, comment or sign.

It is needed to have step0 - GEN only. This is useful for many tests, because allows reusing the same sample of primary generated events in different runs, let say, FastSim/FullSim. The problem for Run-3 is that for PPS sub-detector simulation it is needed making Hector transport of very forward protons in magnetic system of LHC from IR to PPS stations at ~200 m away before doing Geant4 simulation. This update should not affect any WF result.

@SiewYan
Copy link
Contributor

SiewYan commented Apr 11, 2022

+1

I am fine with the changes. Changes suggested by @makortel will be implemented on different PR by @srimanob .

@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. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@srimanob
Copy link
Contributor Author

Thanks @SiewYan
Yes, update on modifier will go with the next PR (to review modifier of ctpps)

@qliphy
Copy link
Contributor

qliphy commented Apr 12, 2022

+1

@cmsbuild cmsbuild merged commit 34e13fc into cms-sw:master Apr 12, 2022
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