Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:00

0001 from __future__ import print_function
0002 # official example for PF2PAT
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 process = cms.Process("PF2PAT")
0007 
0008 
0009 process.maxEvents = cms.untracked.PSet(
0010     input = cms.untracked.int32(1000)
0011 )
0012 
0013 process.source = cms.Source("PoolSource",
0014     fileNames = cms.untracked.vstring(
0015     'file:/uscms/home/rappocc/nobackup/analysis/GED/CMSSW_6_1_0_pre3/src/401.0_TTbar+TTbarFSPU2/step1.root'
0016 
0017     ))
0018 
0019 
0020 
0021 print(process.source)
0022 
0023 # path ---------------------------------------------------------------
0024 
0025 
0026 process.load("CommonTools.ParticleFlow.PF2PAT_cff")
0027 
0028 #from CommonTools.ParticleFlow.Tools.enablePileUpCorrection import enablePileUpCorrectionInPF2PAT
0029 
0030 # the following is advocated by JetMET, but leads to include very far tracks in the no pile up collection
0031 #enablePileUpCorrectionInPF2PAT( process, postfix='')
0032 
0033 process.dump = cms.EDAnalyzer("EventContentAnalyzer")
0034 
0035 process.p = cms.Path(
0036     process.PF2PAT
0037     )
0038 
0039 # output ------------------------------------------------------------
0040 
0041 #process.load("FastSimulation.Configuration.EventContent_cff")
0042 process.load("Configuration.EventContent.EventContent_cff")
0043 process.pf2pat = cms.OutputModule("PoolOutputModule",
0044                                   #    process.AODSIMEventContent,
0045                                   outputCommands = cms.untracked.vstring('keep *'),
0046                                   fileName = cms.untracked.string('PF2PAT.root')
0047 )
0048 process.aod = cms.OutputModule("PoolOutputModule",
0049                                process.AODSIMEventContent,
0050                                #outputCommands = cms.untracked.vstring('drop *'),
0051                                fileName = cms.untracked.string('aod.root')
0052 )
0053 process.load("CommonTools.ParticleFlow.PF2PAT_EventContent_cff")
0054 process.pf2pat.outputCommands.extend( process.PF2PATEventContent.outputCommands )
0055 process.pf2pat.outputCommands.extend( process.PF2PATStudiesEventContent.outputCommands )
0056 
0057 process.outpath = cms.EndPath(
0058     process.pf2pat
0059 #    process.aod
0060     )
0061 
0062 
0063 # other stuff
0064 
0065 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0066 process.MessageLogger.cerr.FwkReport.reportEvery = 10
0067 
0068 # the following are necessary for taus:
0069 
0070 # process.load("Configuration.StandardSequences.GeometryPilot2_cff")
0071 # process.load("Configuration.StandardSequences.MagneticField_cff")
0072 # process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0073 
0074 # do not forget to set the global tag according to the
0075 # release you are using and the sample you are reading (data or MC)
0076 # global tags can be found here:
0077 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions#Valid_Global_Tags_by_Release
0078 # process.GlobalTag.globaltag = cms.string('GR09_R_34X_V2::All')