Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-08-09 22:38:32

0001 # Import configurations
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 
0005 process = cms.Process("testFlavorHistoryProducer")
0006 
0007         
0008 # set the number of events
0009 process.maxEvents = cms.untracked.PSet(
0010     input = cms.untracked.int32(100)
0011 )
0012 
0013 
0014 
0015 
0016 # initialize MessageLogger and output report
0017 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0018 process.MessageLogger.cerr.threshold = 'INFO'
0019 process.MessageLogger.PATLayer0Summary=dict()
0020 process.MessageLogger.cerr.INFO = cms.untracked.PSet(
0021     default          = cms.untracked.PSet( limit = cms.untracked.int32(0)  )
0022 )
0023 process.options   = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0024 
0025 # Load geometry
0026 process.load("Configuration.StandardSequences.GeometryDB_cff")
0027 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0028 process.GlobalTag.globaltag = cms.string( autoCond[ 'phase1_2022_realistic' ] )
0029 process.load("Configuration.StandardSequences.MagneticField_cff")
0030 
0031 # input MC stuff
0032 process.load( "SimGeneral.HepPDTESSource.pythiapdt_cfi")
0033 process.load( "PhysicsTools.HepMCCandAlgos.genParticles_cfi")
0034 process.load( "PhysicsTools.HepMCCandAlgos.genEventWeight_cfi")
0035 process.load( "PhysicsTools.HepMCCandAlgos.genEventScale_cfi")
0036 
0037 process.load( "RecoJets.Configuration.GenJetParticles_cff")
0038 process.load( "RecoJets.JetProducers.SISConeJetParameters_cfi" )
0039 process.load( "RecoJets.JetProducers.GenJetParameters_cfi" )
0040 process.load( "RecoJets.JetProducers.FastjetParameters_cfi" )
0041 process.load( "RecoJets.JetProducers.sisCone5GenJets_cff")
0042 
0043 
0044 # input flavor history stuff
0045 process.load("PhysicsTools.HepMCCandAlgos.flavorHistoryPaths_cfi")
0046 
0047 process.printList = cms.EDAnalyzer( "ParticleListDrawer",
0048                                     src =  cms.InputTag( "genParticles" ),
0049                                     maxEventsToPrint = cms.untracked.int32( 10 )
0050 #                                    printOnlyHardInteraction = cms.untracked.bool( True )
0051 )
0052 
0053 
0054 
0055 
0056 # request a summary at the end of the file
0057 process.options = cms.untracked.PSet(
0058     wantSummary = cms.untracked.bool(True)
0059 )
0060 
0061 # define the source, from reco input
0062 
0063 process.source = cms.Source("PoolSource",
0064                         debugVerbosity = cms.untracked.uint32(200),
0065                         debugFlag = cms.untracked.bool(True),
0066                         
0067                         fileNames = cms.untracked.vstring(
0068         '/store/mc/Summer08/WJets-madgraph/USER/IDEAL_V9_PAT_v4/0015/D8AE36D9-F6EC-DD11-B688-001A92971AA8.root'
0069         )
0070                         )
0071 
0072 
0073 # define event selection to be that which satisfies 'p'
0074 process.eventSel = cms.PSet(
0075     SelectEvents = cms.untracked.PSet(
0076         SelectEvents = cms.vstring('p')
0077     )
0078 )
0079 
0080 
0081 
0082 # load the different paths to make the different HF selections
0083 
0084 
0085 import PhysicsTools.HepMCCandAlgos.flavorHistoryPaths_cfi as flavortools
0086 
0087 
0088 process.p         = cms.Path( flavortools.flavorHistorySeq )
0089 
0090 
0091 # Set the threshold for output logging to 'info'
0092 process.MessageLogger.cerr.threshold = 'INFO'
0093 
0094 
0095 # talk to output module
0096 
0097 
0098 process.out = cms.OutputModule( "PoolOutputModule",
0099   process.eventSel,
0100   fileName = cms.untracked.string( "testFlavorHistoryProducer.root" ),
0101   outputCommands= cms.untracked.vstring(
0102     "drop *",
0103     "keep *_sisCone5GenJets_*_*",
0104     "keep *_genParticles_*_*",
0105     "keep *_genEventWeight_*_*",
0106     "keep *_bFlavorHistoryProducer_*_*",
0107     "keep *_cFlavorHistoryProducer_*_*",
0108     "keep *_flavorHistoryFilter_*_*"
0109     )
0110                                 )
0111 
0112 
0113 # define output path
0114 process.outpath = cms.EndPath(process.out)