CMS 3D CMS Logo

ttbarCategorization_cff.py
Go to the documentation of this file.
1 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
2 
3 
4 import FWCore.ParameterSet.Config as cms
6 
7 
8 
9 
10 from PhysicsTools.JetMCAlgos.GenHFHadronMatcher_cff import matchGenBHadron
11 matchGenBHadron = matchGenBHadron.clone(
12  genParticles = cms.InputTag("prunedGenParticles"),
13  jetFlavourInfos = cms.InputTag("slimmedGenJetsFlavourInfos"),
14 )
15 
16 
18 from PhysicsTools.JetMCAlgos.GenHFHadronMatcher_cff import matchGenCHadron
19 matchGenCHadron = matchGenCHadron.clone(
20  genParticles = cms.InputTag("prunedGenParticles"),
21  jetFlavourInfos = cms.InputTag("slimmedGenJetsFlavourInfos"),
22 )
23 
24 
25 from TopQuarkAnalysis.TopTools.categorizeGenTtbar_cfi import categorizeGenTtbar
26 categorizeGenTtbar = categorizeGenTtbar.clone(
27  genJetPtMin = 20.,
28  genJetAbsEtaMax = 2.4,
29  genJets = cms.InputTag("slimmedGenJets"),
30 )
31 
32 
33 
34 run2_miniAOD_80XLegacy.toModify( matchGenBHadron, jetFlavourInfos = cms.InputTag("genJetFlavourAssociation"),)
35 run2_miniAOD_80XLegacy.toModify( matchGenCHadron, jetFlavourInfos = cms.InputTag("genJetFlavourAssociation"),)
36 
37 
38 
39 ttbarCategoryTable = cms.EDProducer("GlobalVariablesTableProducer",
40  variables = cms.PSet(
41  genTtbarId = ExtVar( cms.InputTag("categorizeGenTtbar:genTtbarId"), "int", doc = "ttbar categorization")
42  )
43 )
44 
45 ttbarCategoryTableTask = cms.Task(ttbarCategoryTable)
46 ttbarCatMCProducersTask = cms.Task(matchGenBHadron,matchGenCHadron,categorizeGenTtbar)
common_cff
common_cff.ExtVar
def ExtVar(tag, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:31