Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:34:59

0001 # PYTHON configuration file.
0002 # Description:  Example of Filtering events in a range of Monte Carlo ptHat.
0003 # Author: R. Harris
0004 # Date:  28 - October - 2008
0005 import FWCore.ParameterSet.Config as cms
0006 
0007 process = cms.Process("Filter")
0008 process.load("FWCore.MessageService.MessageLogger_cfi")
0009 #############   Set the number of events #############
0010 process.maxEvents = cms.untracked.PSet(
0011     input = cms.untracked.int32(-1)
0012 )
0013 #############   Define the source file ###############
0014 process.source = cms.Source("PoolSource",
0015     fileNames = cms.untracked.vstring(
0016 'file:/uscms_data/d1/rharris/CMSSW_2_1_8/src/Configuration/GenProduction/test/PYTHIA6_QCDpt_0_15_10TeV_GEN_100Kevts.root')
0017 )
0018 #############   pt_hat Filter  #####
0019 process.filter = cms.EDFilter("ptHatFilter",
0020     ptHatLowerCut     = cms.double(0.0),
0021     ptHatUpperCut     = cms.double(15.0) 
0022 )
0023 ################### Output definition #########################3
0024 process.output = cms.OutputModule("PoolOutputModule",
0025     outputCommands = cms.untracked.vstring(
0026         'drop *',
0027         'keep *_sisCone5GenJets_*_*',
0028         'keep *_sisCone7GenJets_*_*',
0029         'keep *_iterativeCone5GenJets_*_*',
0030         'keep *_genEventScale_*_*',
0031         'keep *_genParticles_*_*',
0032     'keep edmGenInfoProduct_*_*_*',),
0033     fileName = cms.untracked.string('/uscms_data/d1/rharris/CMSSW_2_1_8/src/Configuration/GenProduction/test/PYTHIA6_QCDpt_0_15_10TeV_GEN_100Kevts_ptHatFiltered.root'),
0034     SelectEvents = cms.untracked.PSet(
0035         SelectEvents = cms.vstring('p1')
0036     ),
0037 )
0038 #############   Path       ###########################
0039 process.p1 = cms.Path(process.filter)
0040 process.outpath = cms.EndPath(process.output)
0041 process.schedule = cms.Schedule(process.p1,process.outpath)
0042 #############   Format MessageLogger #################
0043 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0044