-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add feature to save generator protons from pile-up for standard mixing and premixing #18347
Conversation
A new Pull Request was created by @antoniovilela for master. It involves the following packages: PhysicsTools/HepMCCandAlgos @cmsbuild, @civanch, @monttj, @mdhildreth, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
size_t idx_particle = 0; | ||
idx_mix = 0; | ||
// Fill collection | ||
for( mixHepMC_itr = cfhepmcprod->begin() ; mixHepMC_itr != cfhepmcprod->end() ; ++mixHepMC_itr, ++idx_mix ){ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
@antoniovilela please see comments in code |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
Hi @antoniovilela @mdhildreth |
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) This was run with the 2016 PU configuration. In this case it gives less than 600 bytes (compressed) per event. |
Thanks. To avoid introducing additional complexity, I would propose we just keep this information by default. (As it's <0.1%) |
Hi, this PR is stuck since long time, probably without a real reason. |
As agreed with CT-PPS simulation conveners, a new PR was created: #20172 |
Add feature to save generator protons from pile-up, related to simulation/analysis with proton detectors.