Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:31:30

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TEST")
0004 
0005 ## add message logger
0006 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0007 process.MessageLogger.cerr.threshold = 'INFO'
0008 process.MessageLogger.cerr.TtSemiLepKinFitter = cms.untracked.PSet(
0009     limit = cms.untracked.int32(-1)
0010 )
0011 process.MessageLogger.cerr.KinFitter = cms.untracked.PSet(
0012     limit = cms.untracked.int32(-1)
0013 )
0014 
0015 ## define input
0016 from TopQuarkAnalysis.TopEventProducers.tqafInputFiles_cff import relValTTbar
0017 process.source = cms.Source("PoolSource",
0018     fileNames = cms.untracked.vstring(relValTTbar)
0019 )
0020 
0021 ## define maximal number of events to loop over
0022 process.maxEvents = cms.untracked.PSet(
0023     input = cms.untracked.int32(50)
0024 
0025 )
0026 ## configure process options
0027 process.options = cms.untracked.PSet(
0028     wantSummary      = cms.untracked.bool(True)
0029 )
0030 
0031 ## configure geometry & conditions
0032 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0033 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0034 from Configuration.AlCa.GlobalTag import GlobalTag
0035 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc')
0036 process.load("Configuration.StandardSequences.MagneticField_cff")
0037 
0038 process.task = cms.Task()
0039 
0040 ## std sequence for PAT
0041 process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
0042 process.task.add(process.patCandidatesTask)
0043 process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff")
0044 process.task.add(process.selectedPatCandidatesTask)
0045 
0046 ## std sequence to produce the kinematic fit for semi-leptonic events
0047 process.load("TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Muons_cfi")
0048 process.task.add(process.kinFitTtSemiLepEvent)
0049 process.kinFitTtSemiLepEvent.constraints = [1,2]
0050 
0051 ## use object resolutions from a specific config file
0052 #from TopQuarkAnalysis.TopObjectResolutions.stringResolutions_etEtaPhi_Summer11_cff import *
0053 #process.kinFitTtSemiLepEvent.udscResolutions = udscResolutionPF.functions
0054 #process.kinFitTtSemiLepEvent.bResolutions    = bjetResolutionPF.functions
0055 #process.kinFitTtSemiLepEvent.lepResolutions  = muonResolution  .functions
0056 #process.kinFitTtSemiLepEvent.metResolutions  = metResolutionPF .functions
0057 
0058 ## configure output module
0059 process.out = cms.OutputModule("PoolOutputModule",
0060     fileName = cms.untracked.string('ttSemiLepKinFitProducer.root'),
0061     outputCommands = cms.untracked.vstring('drop *')
0062 )
0063 process.out.outputCommands += ['keep *_kinFitTtSemiLepEvent_*_*']
0064 
0065 ## output path
0066 process.outpath = cms.EndPath(process.out, process.task)