Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-29 01:21:40

0001 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
0002 
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 from PhysicsTools.NanoAOD.common_cff import *
0006 
0007 
0008 ##################### User floats producers, selectors ##########################
0009 
0010 from PhysicsTools.JetMCAlgos.GenHFHadronMatcher_cff import matchGenBHadron
0011 matchGenBHadron = matchGenBHadron.clone(
0012     genParticles = cms.InputTag("prunedGenParticles"),
0013     jetFlavourInfos = cms.InputTag("slimmedGenJetsFlavourInfos"),
0014 )
0015 
0016 ## Plugin for analysing C hadrons
0017 # MUST use the same particle collection as in selectedHadronsAndPartons
0018 from PhysicsTools.JetMCAlgos.GenHFHadronMatcher_cff import matchGenCHadron
0019 matchGenCHadron = matchGenCHadron.clone(
0020     genParticles = cms.InputTag("prunedGenParticles"),
0021     jetFlavourInfos = cms.InputTag("slimmedGenJetsFlavourInfos"),
0022 )
0023 
0024 ## Producer for ttbar categorisation ID
0025 from TopQuarkAnalysis.TopTools.categorizeGenTtbar_cfi import categorizeGenTtbar
0026 categorizeGenTtbar = categorizeGenTtbar.clone(
0027     genJetPtMin = 20.,
0028     genJetAbsEtaMax = 2.4,
0029     genJets = cms.InputTag("slimmedGenJets"),
0030 )
0031 
0032 
0033 ### Era dependent customization
0034 run2_miniAOD_80XLegacy.toModify( matchGenBHadron, jetFlavourInfos = cms.InputTag("genJetFlavourAssociation"),)
0035 run2_miniAOD_80XLegacy.toModify( matchGenCHadron, jetFlavourInfos = cms.InputTag("genJetFlavourAssociation"),)
0036 
0037 
0038 ##################### Tables for final output and docs ##########################
0039 ttbarCategoryTable = cms.EDProducer("GlobalVariablesTableProducer",
0040                                     variables = cms.PSet(
0041                                         genTtbarId = ExtVar( cms.InputTag("categorizeGenTtbar:genTtbarId"), "int", doc = "ttbar categorization")
0042                                     )
0043 )
0044 
0045 ttbarCategoryTableTask = cms.Task(ttbarCategoryTable)
0046 ttbarCatMCProducersTask = cms.Task(matchGenBHadron,matchGenCHadron,categorizeGenTtbar)