Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:48

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 def customise(process):
0004     REDIGIInputEventSkimming= cms.PSet(
0005         inputCommands=cms.untracked.vstring('drop *')
0006         )
0007 
0008     GeneratorInterfaceRAWNoGenParticles = process.GeneratorInterfaceRAW.outputCommands
0009     for item in GeneratorInterfaceRAWNoGenParticles:
0010       if 'genParticles' in item:
0011         GeneratorInterfaceRAWNoGenParticles.remove(item) 
0012 
0013     REDIGIInputEventSkimming.inputCommands.extend(process.SimG4CoreRAW.outputCommands) 
0014     REDIGIInputEventSkimming.inputCommands.extend(GeneratorInterfaceRAWNoGenParticles) 
0015     REDIGIInputEventSkimming.inputCommands.extend(process.IOMCRAW.outputCommands) 
0016 
0017     process.source.inputCommands = REDIGIInputEventSkimming.inputCommands
0018     process.source.dropDescendantsOfDroppedBranches=cms.untracked.bool(False)
0019     
0020     process.RandomNumberGeneratorService.restoreStateLabel = cms.untracked.string('randomEngineStateProducer')
0021     process.mix.playback = cms.untracked.bool(True)
0022 
0023     # Remove the old RNGState product on output
0024     RNGStateCleaning= cms.PSet(
0025         outputCommands=cms.untracked.vstring('drop RandomEngineStates_*_*_*',
0026                                              'keep RandomEngineStates_*_*_'+process.name_())
0027         )
0028 
0029     for item in process.outputModules_().values():
0030         item.outputCommands.extend(RNGStateCleaning.outputCommands)
0031 
0032     # REDO the GenJets etc. in case labels have been changed
0033     process.load('Configuration/StandardSequences/Generator_cff')
0034     process.fixGenInfo = cms.Path(process.GeneInfo * process.genJetMET)
0035     process.schedule.append(process.fixGenInfo)
0036 
0037     return(process)