Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ## import skeleton process
0002 from PhysicsTools.PatAlgos.patTemplate_cfg import *
0003 
0004 process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
0005 patAlgosToolsTask.add(process.patCandidatesTask)
0006 #Temporary customize to the unit tests that fail due to old input samples
0007 process.patTaus.skipMissingTauID = True
0008 
0009 process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff")
0010 patAlgosToolsTask.add(process.selectedPatCandidatesTask)
0011 
0012 process.load("PhysicsTools.PatUtils.patPFMETCorrections_cff")
0013 
0014 from PhysicsTools.PatAlgos.tools.jetTools import switchJetCollection
0015 switchJetCollection(process,
0016                     jetSource = cms.InputTag('ak4PFJets'),
0017                     jetCorrections = ('AK4PF', ['L1FastJet', 'L2Relative', 'L3Absolute'], '')
0018                     )
0019 
0020 # apply type I PFMEt corrections to pat::MET object
0021 # and estimate systematic uncertainties on MET
0022 from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties import runMETCorrectionsAndUncertainties
0023 
0024 runMETCorrectionsAndUncertainties(process, metType="PF",
0025                                   correctionLevel=["T1"],
0026                                   computeUncertainties=True,
0027                                   produceIntermediateCorrections=False,
0028                                   addToPatDefaultSequence=False,
0029                                   jetCollectionUnskimmed="patJets",
0030                                   jetSelection="pt>15 && abs(eta)<9.9",
0031                                   postfix="",
0032                                   )
0033     
0034 
0035 ## ------------------------------------------------------
0036 #  In addition you usually want to change the following
0037 #  parameters:
0038 ## ------------------------------------------------------
0039 #
0040 #   process.GlobalTag.globaltag =  ...    ##  (according to https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions)
0041 #                                         ##
0042 ## switch to RECO input
0043 from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValProdTTbarAODSIM
0044 process.source.fileNames = filesRelValProdTTbarAODSIM
0045 #                                         ##
0046 process.maxEvents.input = 10
0047 #                                         ##
0048 #   process.out.outputCommands = [ ... ]  ##  (e.g. taken from PhysicsTools/PatAlgos/python/patEventContent_cff.py)
0049 #                                         ##
0050 process.out.fileName = 'patTuple_metUncertainties.root'
0051 #                                         ##
0052 #   process.options.wantSummary = False   ##  (to suppress the long output at the end of the job)