Skip to content
Snippets Groups Projects

[Run2_2017_V17] Save minimal set of gen particles

Merged Alexx Perloff requested to merge github/fork/aperloff/saveMinimalGenParticles into Run2_2017_V17

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 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
  • Author Contributor

    Created by: aperloff

    The option has bee added to the README and the default is now set to True.

  • Author Contributor

    Created by: aperloff

    I have added status code 23 and 73 to the list of possible final state quark status codes.

  • For Fall17.GJets_HT-400To600_TuneCP5_13TeV-madgraphMLM-pythia8, the reduction is 10% (7.18 kb/evt -> 6.43 kb/evt).

  • Kevin Pedro
  • Kevin Pedro
    Kevin Pedro @pedrok started a thread on commit 5ff295c6
  • 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)")
  • Alexx Perloff @aperloff started a thread on commit 5ff295c6
  • 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)")
  • Author Contributor

    Created by: aperloff

    Retested the code to see that it is removing the TTFlag branch and the updated status code warning is working. Everything looks good from my side.

  • Please register or sign in to reply
    Loading