CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ##################### User floats producers, selectors ##########################
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 ## Plugin for analysing C hadrons
17 # MUST use the same particle collection as in selectedHadronsAndPartons
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 ## Producer for ttbar categorisation ID
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 ### Era dependent customization
34 run2_miniAOD_80XLegacy.toModify( matchGenBHadron, jetFlavourInfos = cms.InputTag("genJetFlavourAssociation"),)
35 run2_miniAOD_80XLegacy.toModify( matchGenCHadron, jetFlavourInfos = cms.InputTag("genJetFlavourAssociation"),)
36 
37 
38 ##################### Tables for final output and docs ##########################
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)
def ExtVar
Definition: common_cff.py:31