[Run2_2017_V17] Save minimal set of gen particles
Created by: aperloff
This PR adds a new way to store a collection of gen particles. Previously we were storing a very large set of particles. Now we will only save a small subset of important decays (i.e. tops, W, Z, H, etc.) We will also save SUSY particles and particles important for semi-visible jets. A flag to switch between the two methods has been added to makeTreeFromMiniAOD.
Currently this has been tested using semi-leptonic TTJets decays. The command to do this was:
cmsRun runMakeTreeFromMiniAOD_cfg.py scenario=Fall17 inputFilesConfig=Fall17.TTJets_SingleLeptFromT_TuneCP5_13TeV-madgraphMLM-pythia8 nstart=0 nfiles=1 outfile=Fall17.TTJets_SingleLeptFromT_TuneCP5_13TeV-madgraphMLM-pythia8 numevents=100 saveMinimalGenParticles=True
Merge request reports
Activity
Testing:
Using the sample
Fall17.TTJets_SingleLeptFromT_TuneCP5_13TeV-madgraphMLM-pythia8
A handful of events produce warnings like this:
%MSG %MSG-i TreeMaker: GenParticlesProducer:genParticles 25-Mar-2019 13:41:26 CDT Run: 1 Event: 49842344 WARNING The last particle in the chain (1) does not have a status that corresponds to its type (status=23) %MSG %MSG-i TreeMaker: GenParticlesProducer:genParticles 25-Mar-2019 13:41:48 CDT Run: 1 Event: 49842754 WARNING The last particle in the chain (5) does not have a status that corresponds to its type (status=73) %MSG
Without this option,
GenParticles
is the largest single branch and the second-largest family of branches (1.58 and 1.74 kb/evt, resp.). The total event size is 8.39 kb/evt.With this option,
GenParticles
goes down to the third-largest branch and fourth-largest family of branches (0.33 and 0.35 kb/evt, resp.). The total event size is 7.03 kb/evt.This represents a reduction in size of 16.2%. The corresponding savings in the V16 MC ntuples would be roughly 8TB (assuming the same reduction for all samples).
Comments:
- enable the option by default
- add the option to the list in README.md
164 childIds = cms.vint32(1,2,3,4,5,11,12,13,14,15,16,22), 165 parentIds = cms.vint32( 166 1,2,6,23,24,25, 167 1000021,1000022,1000023,1000024,1000025,1000035,1000037,1000039, 168 1000001,1000002,1000003,1000004,1000005,1000006, 169 2000001,2000002,2000003,2000004,2000005,2000006, 170 4900021,4900023,4900101,4900102,4900111,4900113,4900211,4900213,51,52,53, 171 5000001,5000002, 172 ), 173 keepIds = cms.vint32(6,23,24,25), 174 keepFirst = cms.bool(True), 175 keepMinimal = cms.bool(False), 176 ) 177 # store gluons for signals with Higgs 178 if "T5qqqqZH" in process.source.fileNames[0]: process.genParticles.childIds.append(21) 157 179 self.VectorTLorentzVector.append("genParticles(GenParticles)") 164 childIds = cms.vint32(1,2,3,4,5,11,12,13,14,15,16,22), 165 parentIds = cms.vint32( 166 1,2,6,23,24,25, 167 1000021,1000022,1000023,1000024,1000025,1000035,1000037,1000039, 168 1000001,1000002,1000003,1000004,1000005,1000006, 169 2000001,2000002,2000003,2000004,2000005,2000006, 170 4900021,4900023,4900101,4900102,4900111,4900113,4900211,4900213,51,52,53, 171 5000001,5000002, 172 ), 173 keepIds = cms.vint32(6,23,24,25), 174 keepFirst = cms.bool(True), 175 keepMinimal = cms.bool(False), 176 ) 177 # store gluons for signals with Higgs 178 if "T5qqqqZH" in process.source.fileNames[0]: process.genParticles.childIds.append(21) 157 179 self.VectorTLorentzVector.append("genParticles(GenParticles)")