Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-25 02:29:18

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