CMS 3D CMS Logo

jetProducer_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import PhysicsTools.PatAlgos.PATJetProducer_cfi as _mod
3 
4 _patJets = _mod.PATJetProducer.clone(
5  # input
6  jetSource = "ak4PFJetsCHS",
7  # add user data
8  userData = dict(
9  # add custom classes here
10  userClasses = cms.PSet(
11  src = cms.VInputTag('')
12  ),
13  # add doubles here
14  userFloats = cms.PSet(
15  src = cms.VInputTag('')
16  ),
17  # add ints here
18  userInts = cms.PSet(
19  src = cms.VInputTag('')
20  ),
21  # add candidate ptrs here
22  userCands = cms.PSet(
23  src = cms.VInputTag('')
24  ),
25  # add "inline" functions here
26  userFunctions = [],
27  userFunctionLabels = []
28  ),
29  # embedding of RECO items (do not use on AOD input!)
30  #embedCaloTowers = cms.bool(False), # optional
31  # embedding of AOD items
32  embedPFCandidates = False,
33  # jet energy corrections
34  addJetCorrFactors = True,
35  jetCorrFactorsSource = ["patJetCorrFactors" ],
36  # btag information
37  addBTagInfo = True,
38  addDiscriminators = True,
39  discriminatorSources = ["pfJetBProbabilityBJetTags",
40  "pfJetProbabilityBJetTags",
41  "pfTrackCountingHighEffBJetTags",
42  "pfSimpleSecondaryVertexHighEffBJetTags",
43  "pfSimpleInclusiveSecondaryVertexHighEffBJetTags",
44  "pfCombinedSecondaryVertexV2BJetTags",
45  "pfCombinedInclusiveSecondaryVertexV2BJetTags",
46  "softPFMuonBJetTags",
47  "softPFElectronBJetTags",
48  "pfCombinedMVAV2BJetTags",
49  # CTagging
50  'pfCombinedCvsLJetTags',
51  'pfCombinedCvsBJetTags',
52  # DeepFlavour
53  'pfDeepCSVJetTags:probb',
54  'pfDeepCSVJetTags:probc',
55  'pfDeepCSVJetTags:probudsg',
56  'pfDeepCSVJetTags:probbb',
57  # New DeepFlavour (commented until available in RelVals)
58  #'pfDeepFlavourJetTags:probb',
59  #'pfDeepFlavourJetTags:probbb',
60  #'pfDeepFlavourJetTags:problepb',
61  #'pfDeepFlavourJetTags:probc',
62  #'pfDeepFlavourJetTags:probuds',
63  #'pfDeepFlavourJetTags:probg'
64  ],
65  # clone tag infos ATTENTION: these take lots of space!
66  # usually the discriminators from the default algos
67  # are sufficient
68  addTagInfos = False,
69  tagInfoSources = [],
70  # track association
71  addAssociatedTracks = True,
72  trackAssociationSource = "ak4JetTracksAssociatorAtVertexPF",
73  # jet charge
74  addJetCharge = True,
75  jetChargeSource = "patJetCharge",
76  # add jet ID for calo jets. This should be of type ak4JetID, ak7JetID, ...
77  addJetID = False,
78  jetIDMap = "ak4JetID",
79  # mc matching
80  addGenPartonMatch = True,
81  embedGenPartonMatch = True,
82  genPartonMatch = "patJetPartonMatch",
83  addGenJetMatch = True,
84  embedGenJetMatch = True,
85  genJetMatch = "patJetGenJetMatch",
86  addPartonJetMatch = False,
87  partonJetSource = "NOT_IMPLEMENTED",
89  getJetMCFlavour = True,
90  useLegacyJetMCFlavour = False,
91  addJetFlavourInfo = True,
92  JetPartonMapSource = "patJetFlavourAssociationLegacy",
93  JetFlavourInfoSource = "patJetFlavourAssociation",
94  # efficiencies
95  addEfficiencies = False,
96  efficiencies = dict(),
97  # resolution
98  addResolutions = False,
99  resolutions = dict()
100 )
101 
102 from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
103 pp_on_AA_2018.toModify(_patJets,
104  jetSource = "akCs4PFJets",
105  genJetMatch = "patJetGenJetMatch",
106  genPartonMatch = "patJetPartonMatch",
107  JetFlavourInfoSource = "patJetFlavourAssociation",
108  JetPartonMapSource = "patJetFlavourAssociationLegacy",
109  jetCorrFactorsSource = ["patJetCorrFactors"],
110  trackAssociationSource = "ak5JetTracksAssociatorAtVertex",
111  useLegacyJetMCFlavour = True,
112  discriminatorSources = [
113  "simpleSecondaryVertexHighEffBJetTags",
114  "simpleSecondaryVertexHighPurBJetTags",
115  "combinedSecondaryVertexV2BJetTags",
116  "jetBProbabilityBJetTags",
117  "jetProbabilityBJetTags",
118  "trackCountingHighEffBJetTags",
119  "trackCountingHighPurBJetTags",
120  ],
121  addJetCharge = False,
122 )
123 
124 from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
125 pp_on_PbPb_run3.toModify(_patJets,
126  jetSource = "akCs4PFJets",
127  genJetMatch = "patJetGenJetMatch",
128  genPartonMatch = "patJetPartonMatch",
129  JetFlavourInfoSource = "patJetFlavourAssociation",
130  JetPartonMapSource = "patJetFlavourAssociationLegacy",
131  jetCorrFactorsSource = ["patJetCorrFactors"],
132  trackAssociationSource = "",
133  useLegacyJetMCFlavour = True,
134  discriminatorSources = [],
135  tagInfoSources = [],
136  addJetCharge = False,
137  addTagInfos = False,
138  addDiscriminators = False,
139  addAssociatedTracks = False,
140 )
141 
142 patJets = _patJets.clone()