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_run3_common_cff import run3_common
103 run3_common.toModify(_patJets,
104  jetSource = "ak4PFJetsCHS",
105  genJetMatch = "patJetGenJetMatch",
106  genPartonMatch = "patJetPartonMatch",
107  JetFlavourInfoSource = "patJetFlavourAssociation",
108  JetPartonMapSource = "patJetFlavourAssociationLegacy",
109  jetCorrFactorsSource = ["patJetCorrFactors"],
110  addBTagInfo = True,
111  addDiscriminators = True,
112  discriminatorSources = ["pfJetBProbabilityBJetTags",
113  "pfJetProbabilityBJetTags",
114  "pfTrackCountingHighEffBJetTags",
115  # DeepFlavour
116  'pfDeepCSVJetTags:probb',
117  'pfDeepCSVJetTags:probc',
118  'pfDeepCSVJetTags:probudsg',
119  'pfDeepCSVJetTags:probbb',
120  # New DeepFlavour (commented until available in RelVals)
121  #'pfDeepFlavourJetTags:probb',
122  #'pfDeepFlavourJetTags:probbb',
123  #'pfDeepFlavourJetTags:problepb',
124  #'pfDeepFlavourJetTags:probc',
125  #'pfDeepFlavourJetTags:probuds',
126  #'pfDeepFlavourJetTags:probg'
127  #'pfDeepFlavourJetTags:probuds',
128  #'pfDeepFlavourJetTags:probg'
129  ],
130  addTagInfos = False,
131  tagInfoSources = [],
132  # track association
133  addAssociatedTracks = True,
134  trackAssociationSource = "ak4JetTracksAssociatorAtVertexPF",
135  # jet charge
136  addJetCharge = True,
137  jetChargeSource = "patJetCharge",
138 
139  addJetID = False,
140  jetIDMap = "ak4JetID",
141 )
142 
143 from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
144 pp_on_AA_2018.toModify(_patJets,
145  jetSource = "akCs4PFJets",
146  genJetMatch = "patJetGenJetMatch",
147  genPartonMatch = "patJetPartonMatch",
148  JetFlavourInfoSource = "patJetFlavourAssociation",
149  JetPartonMapSource = "patJetFlavourAssociationLegacy",
150  jetCorrFactorsSource = ["patJetCorrFactors"],
151  trackAssociationSource = "ak5JetTracksAssociatorAtVertex",
152  useLegacyJetMCFlavour = True,
153  discriminatorSources = [
154  "simpleSecondaryVertexHighEffBJetTags",
155  "simpleSecondaryVertexHighPurBJetTags",
156  "combinedSecondaryVertexV2BJetTags",
157  "jetBProbabilityBJetTags",
158  "jetProbabilityBJetTags",
159  "trackCountingHighEffBJetTags",
160  "trackCountingHighPurBJetTags",
161  ],
162  addJetCharge = False,
163 )
164 
165 from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
166 pp_on_PbPb_run3.toModify(_patJets,
167  jetSource = "akCs4PFJets",
168  genJetMatch = "patJetGenJetMatch",
169  genPartonMatch = "patJetPartonMatch",
170  JetFlavourInfoSource = "patJetFlavourAssociation",
171  JetPartonMapSource = "patJetFlavourAssociationLegacy",
172  jetCorrFactorsSource = ["patJetCorrFactors"],
173  trackAssociationSource = "",
174  useLegacyJetMCFlavour = True,
175  discriminatorSources = [],
176  tagInfoSources = [],
177  addJetCharge = False,
178  addTagInfos = False,
179  addDiscriminators = False,
180  addAssociatedTracks = False,
181 )
182 
183 patJets = _patJets.clone()