Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:11

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TQAF")
0004 
0005 ## configure message logger
0006 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0007 process.MessageLogger.cerr.threshold = 'INFO'
0008 
0009 ## define input
0010 from PhysicsTools.PatAlgos.patInputFiles_cff import filesSingleMuRECO
0011 process.source = cms.Source("PoolSource",
0012     fileNames = cms.untracked.vstring( filesSingleMuRECO )
0013 )
0014 ## define maximal number of events to loop over
0015 process.maxEvents = cms.untracked.PSet(
0016     input = cms.untracked.int32(100)
0017 )
0018 ## configure process options
0019 process.options = cms.untracked.PSet(
0020     wantSummary      = cms.untracked.bool(True)
0021 )
0022 
0023 ## configure geometry & conditions
0024 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0025 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0026 from Configuration.AlCa.GlobalTag import GlobalTag
0027 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:com10_7E33v4')
0028 process.load("Configuration.StandardSequences.MagneticField_cff")
0029 
0030 #-------------------------------------------------
0031 # PAT and TQAF configuration
0032 #-------------------------------------------------
0033 
0034 process.task = cms.Task()
0035 
0036 ## std sequence for PAT
0037 process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
0038 process.task.add(process.patCandidatesTask)
0039 #Temporary customize to the unit tests that fail due to old input samples
0040 process.patTaus.skipMissingTauID = True
0041 process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff")
0042 process.task.add(process.selectedPatCandidatesTask)
0043 
0044 ## std sequence for TQAF
0045 process.load("TopQuarkAnalysis.TopEventProducers.tqafSequences_cff")
0046 process.task.add(process.tqafTtSemiLeptonicTask)
0047 
0048 ## remove MC specific stuff in TQAF
0049 from TopQuarkAnalysis.TopEventProducers.sequences.ttSemiLepEvtBuilder_cff import addTtSemiLepHypotheses
0050 addTtSemiLepHypotheses(process, ["kGeom", "kWMassMaxSumPt", "kMaxSumPtWMass"])
0051 
0052 ## configure output module
0053 process.out = cms.OutputModule("PoolOutputModule",
0054     fileName       = cms.untracked.string('tqaf_woGeneratorInfo.root'),
0055     outputCommands = cms.untracked.vstring('drop *'),
0056     dropMetaData   = cms.untracked.string("DROPPED")  ## NONE    for none
0057                                                       ## DROPPED for drop for dropped data
0058 )
0059 process.outpath = cms.EndPath(process.out, process.task)
0060 
0061 ## data specific
0062 from PhysicsTools.PatAlgos.tools.coreTools import runOnData
0063 runOnData( process )
0064 from TopQuarkAnalysis.TopEventProducers.sequences.ttSemiLepEvtBuilder_cff import removeTtSemiLepHypGenMatch
0065 removeTtSemiLepHypGenMatch(process)
0066 
0067 ## PAT content
0068 from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning
0069 process.out.outputCommands += patEventContentNoCleaning
0070 process.out.outputCommands += [ 'drop recoGenJets_*_*_*' ]
0071 
0072 ## TQAF content
0073 from TopQuarkAnalysis.TopEventProducers.tqafEventContent_cff import tqafEventContent
0074 process.out.outputCommands += tqafEventContent
0075 process.out.outputCommands += [ 'drop *_tt*HypGenMatch_*_*',
0076                                 'drop *_decaySubset_*_*',
0077                                 'drop *_initSubset_*_*',
0078                                 'drop *_genEvt_*_*' ]