Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:23

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.TtFullHadKinFitter = 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 ## do event filtering on generator level
0047 process.load("TopQuarkAnalysis.TopSkimming.ttDecayChannelFilters_cff")
0048 process.task.add(process.ttDecayChannelFiltersTask)
0049 
0050 ## std sequence to produce the kinematic fit for full hadronic events
0051 process.load("TopQuarkAnalysis.TopKinFitter.TtFullHadKinFitProducer_cfi")
0052 process.task.add(process.kinFitTtFullHadEvent)
0053 
0054 ## process path
0055 process.p = cms.Path(
0056     process.ttFullHadronicFilter,
0057     process.task
0058 )
0059 
0060 ## configure output module
0061 process.out = cms.OutputModule("PoolOutputModule",
0062     SelectEvents   = cms.untracked.PSet(SelectEvents = cms.vstring('p') ),
0063     fileName = cms.untracked.string('ttFullHadKinFitProducer.root'),
0064     outputCommands = cms.untracked.vstring('drop *')
0065 )
0066 process.out.outputCommands += ['keep *_kinFitTtFullHadEvent_*_*']
0067 
0068 ## output path
0069 process.outpath = cms.EndPath(process.out)