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 ##################### 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.GenTtbarCategorizer_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 
36 run2_miniAOD_80XLegacy.toModify( matchGenCHadron, jetFlavourInfos = cms.InputTag("genJetFlavourAssociation"),)
37 
38 
39 ##################### Tables for final output and docs ##########################
40 ttbarCategoryTable = cms.EDProducer("GlobalVariablesTableProducer",
41  variables = cms.PSet(
42  genTtbarId = ExtVar( cms.InputTag("categorizeGenTtbar:genTtbarId"), "int", doc = "ttbar categorization")
43  )
44 )
45 
46 ttbarCatMCProducers = cms.Sequence(matchGenBHadron + matchGenCHadron + categorizeGenTtbar)
def ExtVar(tag, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:31