Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:09

0001 # This is an example PAT configuration showing the usage of PAT on full sim samples
0002 
0003 # Starting with a skeleton process which gets imported with the following line
0004 from PhysicsTools.PatAlgos.patTemplate_cfg import *
0005 
0006 # note that you can use a bunch of core tools of PAT 
0007 # to taylor your PAT configuration; for a few examples
0008 # uncomment the following lines
0009 
0010 from PhysicsTools.PatAlgos.tools.coreTools import *
0011 #removeMCMatching(process, 'Muons')
0012 #removeAllPATObjectsBut(process, ['Muons'])
0013 #removeSpecificPATObjects(process, ['Electrons', 'Muons', 'Taus'])
0014 
0015 
0016 
0017 # switch from "ak5" to "antikt5" if running on 31x samples. 
0018 run33xOn31xMC = False
0019 if run33xOn31xMC :
0020     switchJetCollection(process, 
0021                     cms.InputTag('antikt5CaloJets'),   
0022                     doJTA            = True,            
0023                     doBTagging       = True,            
0024                     jetCorrLabel     = ('AK5','Calo'),  
0025                     doType1MET       = True,            
0026                     genJetCollection = cms.InputTag("antikt5GenJets")
0027                     )
0028     process.cFlavorHistoryProducer.matchedSrc = cms.InputTag("antikt5GenJets")
0029     process.bFlavorHistoryProducer.matchedSrc = cms.InputTag("antikt5GenJets")
0030 
0031 
0032 process.load("PhysicsTools.PatExamples.patJPsiProducer_cfi")
0033 
0034 # let it run
0035 process.p = cms.Path(
0036     process.patDefaultSequence*
0037     process.patJPsiCandidates
0038     )
0039 
0040 # In addition you usually want to change the following parameters:
0041 #
0042 #   process.GlobalTag.globaltag =  ...    ##  (according to https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions)
0043 process.source.fileNames = [
0044     '/store/relval/CMSSW_3_3_0_pre2/RelValTTbar/GEN-SIM-RECO/STARTUP31X_V7-v1/0002/BA958CA5-B19B-DE11-90C6-0018F3D0961A.root'
0045     ]
0046 #   process.maxEvents.input = ...         ##  (e.g. -1 to run on all events)
0047 process.out.dropMetaData = cms.untracked.string("DROPPED")
0048 process.out.outputCommands += ['keep *_patJPsiCandidates_*_*']
0049 process.out.fileName = 'jpsi.root'
0050 process.options.wantSummary = True        ##  (to suppress the long output at the end of the job)    
0051 
0052