CMS 3D CMS Logo

jetFlavourId_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 patJetPartonsLegacy = cms.EDProducer("PartonSelector",
4  withLeptons = cms.bool(False),
5  src = cms.InputTag("genParticles")
6 )
7 
8 patJetPartonAssociationLegacy = cms.EDProducer("JetPartonMatcher",
9  jets = cms.InputTag("ak4PFJetsCHS"),
10  partons = cms.InputTag("patJetPartonsLegacy"),
11  coneSizeToAssociate = cms.double(0.3),
12 )
13 
14 patJetFlavourAssociationLegacy = cms.EDProducer("JetFlavourIdentifier",
15  srcByReference = cms.InputTag("patJetPartonAssociationLegacy"),
16  physicsDefinition = cms.bool(False)
17 )
18 
19 patJetPartons = cms.EDProducer('HadronAndPartonSelector',
20  src = cms.InputTag("generator"),
21  particles = cms.InputTag("genParticles"),
22  partonMode = cms.string("Auto"),
23  fullChainPhysPartons = cms.bool(True)
24 )
25 
26 patJetFlavourAssociation = cms.EDProducer("JetFlavourClustering",
27  jets = cms.InputTag("ak4PFJetsCHS"),
28  bHadrons = cms.InputTag("patJetPartons","bHadrons"),
29  cHadrons = cms.InputTag("patJetPartons","cHadrons"),
30  partons = cms.InputTag("patJetPartons","physicsPartons"),
31  leptons = cms.InputTag("patJetPartons","leptons"),
32  jetAlgorithm = cms.string("AntiKt"),
33  rParam = cms.double(0.4),
34  ghostRescaling = cms.double(1e-18),
35  hadronFlavourHasPriority = cms.bool(False)
36 )
37 
38 # default PAT sequence for jet flavour identification
39 patJetFlavourIdLegacyTask = cms.Task(patJetPartonsLegacy, patJetPartonAssociationLegacy, patJetFlavourAssociationLegacy)
40 patJetFlavourIdLegacy = cms.Sequence(patJetFlavourIdLegacyTask)
41 
42 patJetFlavourIdTask = cms.Task(patJetPartons, patJetFlavourAssociation)
43 patJetFlavourId = cms.Sequence(patJetFlavourIdTask)
44 
45 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
46 pp_on_AA.toModify(patJetPartons, particles = "hiSignalGenParticles")
47 pp_on_AA.toModify(patJetFlavourAssociation,
48  jets = 'akCs4PFJets',
49  rParam = 0.4,
50 )
51 pp_on_AA.toModify(patJetPartonAssociationLegacy,
52  jets = "akCs4PFJets",
53  partons = "allPartons",
54 )