Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:03

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 # add the trigger information to the configuration
0016 from PhysicsTools.PatAlgos.tools.trigTools import *
0017 switchOnTrigger( process )
0018 from PhysicsTools.PatAlgos.patEventContent_cff import patTriggerEventContent
0019 
0020 # add the flavor history
0021 process.load("PhysicsTools.HepMCCandAlgos.flavorHistoryPaths_cfi")
0022 
0023 # switch from "ak5" to "antikt5" if running on 31x samples. 
0024 run33xOn31xMC = False
0025 if run33xOn31xMC :
0026     switchJetCollection(process, 
0027                     cms.InputTag('antikt5CaloJets'),   
0028                     doJTA            = True,            
0029                     doBTagging       = True,            
0030                     jetCorrLabel     = ('AK5','Calo'),  
0031                     doType1MET       = True,            
0032                     genJetCollection = cms.InputTag("antikt5GenJets")
0033                     )
0034     process.cFlavorHistoryProducer.matchedSrc = cms.InputTag("antikt5GenJets")
0035     process.bFlavorHistoryProducer.matchedSrc = cms.InputTag("antikt5GenJets")
0036 
0037 
0038 # shrink the event content
0039 # jets
0040 process.allLayer1Jets.tagInfoSources  = cms.VInputTag(
0041         cms.InputTag("secondaryVertexTagInfos")
0042     )
0043 process.selectedLayer1Jets.cut = cms.string("pt > 20 & abs(eta) < 5")
0044 process.allLayer1Jets.embedGenJetMatch = cms.bool(False)
0045 # electrons
0046 process.allLayer1Electrons.isoDeposits = cms.PSet()
0047 process.allLayer1Electrons.embedGsfTrack = cms.bool(False)
0048 process.allLayer1Electrons.embedSuperCluster = cms.bool(False)
0049 # muons
0050 process.allLayer1Muons.isoDeposits = cms.PSet()
0051 # photons
0052 process.allLayer1Photons.isoDeposits = cms.PSet()
0053 process.allLayer1Photons.embedSuperCluster = cms.bool(False)
0054 #taus
0055 process.allLayer1Taus.isoDeposits = cms.PSet()
0056 
0057 # let it run
0058 process.p = cms.Path(
0059     process.flavorHistorySeq *
0060     process.patDefaultSequence
0061     )
0062 
0063 # In addition you usually want to change the following parameters:
0064 #
0065 #   process.GlobalTag.globaltag =  ...    ##  (according to https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions)
0066 process.source.fileNames = [
0067     '/store/relval/CMSSW_3_3_0_pre2/RelValTTbar/GEN-SIM-RECO/STARTUP31X_V7-v1/0002/BA958CA5-B19B-DE11-90C6-0018F3D0961A.root'
0068     ]
0069 #   process.maxEvents.input = ...         ##  (e.g. -1 to run on all events)
0070 process.out.outputCommands += ['keep *_flavorHistoryFilter_*_*']
0071 process.out.outputCommands += patTriggerEventContent
0072 process.out.dropMetaData = cms.untracked.string("DROPPED")
0073 #process.out.outputCommands += patTriggerStandAloneEventContent
0074 process.out.fileName = 'vplusjets.root'
0075 process.options.wantSummary = True        ##  (to suppress the long output at the end of the job)