Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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.TopHitFit=dict()
0009 process.MessageLogger.TtSemiLepKinFitter=dict()
0010 process.MessageLogger.cerr.TtSemiLeptonicEvent = cms.untracked.PSet(
0011     limit = cms.untracked.int32(-1)
0012 )
0013 
0014 ## define input
0015 from TopQuarkAnalysis.TopEventProducers.tqafInputFiles_cff import relValTTbar
0016 process.source = cms.Source("PoolSource",
0017     fileNames = cms.untracked.vstring(relValTTbar)
0018 )
0019 
0020 ## define maximal number of events to loop over
0021 process.maxEvents = cms.untracked.PSet(
0022     input = cms.untracked.int32(50)
0023 )
0024 
0025 ## configure process options
0026 process.options = cms.untracked.PSet(
0027     wantSummary      = cms.untracked.bool(True)
0028 )
0029 
0030 ## configure geometry & conditions
0031 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0032 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0033 from Configuration.AlCa.GlobalTag import GlobalTag
0034 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc')
0035 process.load("Configuration.StandardSequences.MagneticField_cff")
0036 
0037 process.task = cms.Task()
0038 
0039 ## std sequence for PAT
0040 process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
0041 process.task.add(process.patCandidatesTask)
0042 #Temporary customize to the unit tests that fail due to old input samples
0043 process.patTaus.skipMissingTauID = True
0044 process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff")
0045 process.task.add(process.selectedPatCandidatesTask)
0046 
0047 ## std sequence to produce the ttGenEvt
0048 process.load("TopQuarkAnalysis.TopEventProducers.sequences.ttGenEvent_cff")
0049 process.task.add(process.makeGenEvtTask)
0050 
0051 ## std sequence to produce the ttSemiLepEvent
0052 process.load("TopQuarkAnalysis.TopEventProducers.sequences.ttSemiLepEvtBuilder_cff")
0053 process.task.add(process.makeTtSemiLepEventTask)
0054 process.ttSemiLepEvent.verbosity = 1
0055 
0056 ## choose which hypotheses to produce
0057 from TopQuarkAnalysis.TopEventProducers.sequences.ttSemiLepEvtBuilder_cff import *
0058 addTtSemiLepHypotheses(process,
0059                        ["kGeom", "kWMassDeltaTopMass", "kWMassMaxSumPt", "kMaxSumPtWMass", "kMVADisc", "kKinFit", "kHitFit"]
0060                        )
0061 #removeTtSemiLepHypGenMatch(process)
0062 
0063 #process.kinFitTtSemiLepEventHypothesis.match = "findTtSemiLepJetCombGeom"
0064 #process.kinFitTtSemiLepEventHypothesis.useOnlyMatch = True
0065 
0066 ## change maximum number of jets taken into account per event (default: 4)
0067 #setForAllTtSemiLepHypotheses(process, "maxNJets", 5)
0068 
0069 ## solve kinematic equation to determine neutrino pz
0070 #setForAllTtSemiLepHypotheses(process, "neutrinoSolutionType", 2)
0071 
0072 ## change maximum number of jet combinations taken into account per event (default: 1)
0073 #process.findTtSemiLepJetCombMVA.maxNComb        = -1
0074 #process.kinFitTtSemiLepEventHypothesis.maxNComb = -1
0075 
0076 ## use electrons instead of muons for the hypotheses
0077 #useElectronsForAllTtSemiLepHypotheses(process)
0078 #process.task.add(process.kinFitTtSemiLepEventHypothesis)
0079 #process.task.add(process.hitFitTtSemiLepEventHypothesis)
0080 
0081 ## configure output module
0082 process.out = cms.OutputModule("PoolOutputModule",
0083     fileName     = cms.untracked.string('ttSemiLepEvtBuilder.root'),
0084     outputCommands = cms.untracked.vstring('drop *'),
0085     dropMetaData = cms.untracked.string('DROPPED')
0086 )
0087 process.outpath = cms.EndPath(process.out, process.task)
0088 
0089 ## PAT content
0090 from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning
0091 process.out.outputCommands += patEventContentNoCleaning
0092 ## TQAF content
0093 from TopQuarkAnalysis.TopEventProducers.tqafEventContent_cff import tqafEventContent
0094 process.out.outputCommands += tqafEventContent