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 feature to save generator protons from pile-up for standard mixing and premixing #18347

Conversation

antoniovilela
Copy link
Contributor

Add feature to save generator protons from pile-up, related to simulation/analysis with proton detectors.

  • In PhysicsTools/HepMCCandAlgos, add GenPUProtonProducer and customisation functions to run with cmsDriver;
  • In SimGeneral/DataMixingModule, update DataMixingModule with optional list of GenParticle collections from premixing sample, to save in the main event. Also add customisation function to run with cmsDriver.

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 12, 2017

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

It involves the following packages:

PhysicsTools/HepMCCandAlgos
SimGeneral/DataMixingModule

@cmsbuild, @civanch, @monttj, @mdhildreth, @davidlange6 can you please review it and eventually sign? Thanks.
@Muzaffar, @davidlange6, @smuzaffar you are the release manager for this.

cms-bot commands are listed here

@mdhildreth
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 15, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/19189/console Started: 2017/04/15 05:21

size_t idx_particle = 0;
idx_mix = 0;
// Fill collection
for( mixHepMC_itr = cfhepmcprod->begin() ; mixHepMC_itr != cfhepmcprod->end() ; ++mixHepMC_itr, ++idx_mix ){
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need two loops over the genParticles? It looks like you could just push back the protons onto the particle vector without needing to know how big it will eventually be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mdhildreth Indeed the first loop in the HepMC products could be suppressed. It is reminiscent of the initial structure used as a basis for this module. I added below [1] some time report lines when running the premixing sample with these modules with few events in lxplus. The cmsDriver command is also shown below [2]. The 'genPUProtons*' modules added each around 1.5 ms. Of course the module that dominates the processing time is the mixing module (~30 s in this case).
Please let me know if I should update the module and prepare a new request or a fix could be added later.
Thanks.
[1]
TimeReport ---------- Event Summary ---[sec]----
TimeReport event loop CPU/event = 30.289363
TimeReport event loop Real/event = 52.353183
TimeReport sum Streams Real/event = 49.928158
TimeReport efficiency CPU/Real/thread = 0.578558

TimeReport ---------- Modules in Path: digitisation_step ---[Real sec]----
TimeReport per event per visit Name
TimeReport 0.000000 0.000000 generator
TimeReport 19.516880 19.516880 cpuSpender
TimeReport 0.000031 0.000031 generatorSmeared
TimeReport 0.000584 0.000584 genParticles
TimeReport 0.000225 0.000225 genParticlesForJets
TimeReport 0.000009 0.000009 genParticlesForJetsNoNu
TimeReport 0.000539 0.000539 ak4GenJets
TimeReport 0.000018 0.000018 ak8GenJets
TimeReport 0.000008 0.000008 ak4GenJetsNoNu
TimeReport 0.000006 0.000006 ak8GenJetsNoNu
TimeReport 0.000007 0.000007 genCandidatesForMET
TimeReport 0.000021 0.000021 genParticlesForMETAllVisible
TimeReport 0.000141 0.000141 genMetCalo
TimeReport 0.000006 0.000006 genMetTrue
TimeReport 0.000000 0.000000 randomEngineStateProducer
TimeReport 29.127603 29.127603 mix
TimeReport 0.000000 0.000000 generatorSmeared
TimeReport 0.055196 0.055196 simEcalTriggerPrimitiveDigis
TimeReport 0.020653 0.020653 simEcalDigis
TimeReport 0.000828 0.000828 simHcalDigis
TimeReport 0.142470 0.142470 simMuonCSCDigis
TimeReport 0.000838 0.000838 simMuonDTDigis
TimeReport 0.013858 0.013858 simMuonRPCDigis
TimeReport 0.000217 0.000217 addPileupInfo
TimeReport 0.001565 0.001565 genPUProtonsBx0
TimeReport 0.001450 0.001450 genPUProtonsBxm1
TimeReport 0.001455 0.001455 genPUProtonsBxp1

[2]
cmsDriver.py Configuration/Generator/python/SingleNuE10_cfi.py --fileout file:file_out_premixing.root --pileup_input dbs:/RelValProdMinBias_13/CMSSW_9_0_0-90X_mcRun2_asymptotic_v5-v1/GEN-SIM --mc --eventcontent PREMIX --pileup 2016_25ns_Moriond17MC_PoissonOOTPU --datatier GEN-SIM-DIGI-RAW --conditions 90X_mcRun2_asymptotic_v5 --step GEN,SIM,DIGIPREMIX,L1,DIGI2RAW --era Run2_2016 -n 30 --customise PhysicsTools/HepMCCandAlgos/addGenPUProtons.customiseGenPUProtons,PhysicsTools/HepMCCandAlgos/addGenPUProtonsEventContent.customiseGenPUProtonsEventContent


@mdhildreth
Copy link
Contributor

@antoniovilela please see comments in code

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-18347/19189/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 1630 differences found in the comparisons
  • DQMHistoTests: Total files compared: 23
  • DQMHistoTests: Total histograms compared: 1819408
  • DQMHistoTests: Total failures: 38977
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 1780258
  • DQMHistoTests: Total skipped: 173
  • DQMHistoTests: Total Missing objects: 0
  • Checked 94 log files, 14 edm output root files, 23 DQM output files

@mdhildreth
Copy link
Contributor

+1

@davidlange6
Copy link
Contributor

Hi @antoniovilela @mdhildreth
what is the data volume impact of this ?(eg, if enabled on some standard events)

@antoniovilela
Copy link
Contributor Author

Hi @davidlange6, @mdhildreth,

Here is a size estimate per event (from a test with 50 events and a default Minimum Bias sample):

Branch Name | Average Uncompressed Size (Bytes/Event) | Average Compressed Size (Bytes/Event)
recoGenParticles_mixData_genPUProtonsBxp1_HLT. 970.82 194.04
recoGenParticles_mixData_genPUProtonsBxm1_HLT. 951.92 191.88
recoGenParticles_mixData_genPUProtonsBx0_HLT. 872.22 179.48

This was run with the 2016 PU configuration. In this case it gives less than 600 bytes (compressed) per event.
Thanks.

@davidlange6
Copy link
Contributor

Thanks. To avoid introducing additional complexity, I would propose we just keep this information by default. (As it's <0.1%)

@smuzaffar smuzaffar added this to the CMSSW_9_2_X milestone May 4, 2017
@smuzaffar smuzaffar removed this from the CMSSW_9_1_X milestone May 4, 2017
@smuzaffar smuzaffar modified the milestones: CMSSW_9_3_X, CMSSW_9_2_X Jun 26, 2017
@perrozzi
Copy link

Hi, this PR is stuck since long time, probably without a real reason.
Can you please finalize the review?
This PR is very important to integrate the forward proton information for the TOTEM simulation.
Thanks
Luca

@antoniovilela
Copy link
Contributor Author

As agreed with CT-PPS simulation conveners, a new PR was created: #20172

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.

6 participants