Skip to content

Commit

Permalink
Merge pull request #977 from vadler/62X-metUncertaintiesIntegrationTest
Browse files Browse the repository at this point in the history
62 x met uncertainties integration test
  • Loading branch information
davidlt committed Oct 6, 2013
2 parents 734cf9d + b4095c1 commit ba5587e
Show file tree
Hide file tree
Showing 3 changed files with 159 additions and 115 deletions.
42 changes: 42 additions & 0 deletions PhysicsTools/PatAlgos/test/patTuple_metUncertainties_cfg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## import skeleton process
from PhysicsTools.PatAlgos.patTemplate_cfg import *
## switch to uncheduled mode
process.options.allowUnscheduled = cms.untracked.bool(True)

process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff")
process.load("PhysicsTools.PatUtils.patPFMETCorrections_cff")

from PhysicsTools.PatAlgos.tools.jetTools import switchJetCollection
switchJetCollection(process,cms.InputTag('ak5PFJets'),
jetCorrections = ('AK5PF', ['L1FastJet', 'L2Relative', 'L3Absolute'], '')
)

## let it run
process.p = cms.Path(
process.selectedPatCandidates
)

# apply type I/type I + II PFMEt corrections to pat::MET object
# and estimate systematic uncertainties on MET
from PhysicsTools.PatUtils.tools.metUncertaintyTools import runMEtUncertainties
runMEtUncertainties(process)

## ------------------------------------------------------
# In addition you usually want to change the following
# parameters:
## ------------------------------------------------------
#
# process.GlobalTag.globaltag = ... ## (according to https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions)
# ##
## switch to RECO input
from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValProdTTbarAODSIM
process.source.fileNames = filesRelValProdTTbarAODSIM
# ##
process.maxEvents.input = 10
# ##
# process.out.outputCommands = [ ... ] ## (e.g. taken from PhysicsTools/PatAlgos/python/patEventContent_cff.py)
# ##
process.out.fileName = 'patTuple_metUncertainties.root'
# ##
# process.options.wantSummary = False ## (to suppress the long output at the end of the job)
2 changes: 2 additions & 0 deletions PhysicsTools/PatAlgos/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ cmsRun ${LOCAL_TEST_DIR}/patTuple_addVertexInfo_cfg.py || die 'Failure using pat

# cmsRun ${LOCAL_TEST_DIR}/patTuple_userData_cfg.py || die 'Failure using patTuple_userData_cfg.py' $?

cmsRun ${LOCAL_TEST_DIR}/patTuple_metUncertainties_cfg.py || die 'Failure using patTuple_metUncertainties_cfg.py' $?

# Not needed in IBs
# cmsRun ${LOCAL_TEST_DIR}/patTuple_onlyElectrons_cfg.py || die 'Failure using patTuple_onlyElectrons_cfg.py' $?
# cmsRun ${LOCAL_TEST_DIR}/patTuple_onlyJets_cfg.py || die 'Failure using patTuple_onlyJets_cfg.py' $?
Expand Down

0 comments on commit ba5587e

Please sign in to comment.