17 setattr(process,
'ak8PFJetsPuppi'+postfix,ak8PFJetsPuppi.clone())
18 setattr(process,
'ak8PFJetsPuppiConstituents'+postfix, ak8PFJetsPuppiConstituents.clone(cut = cms.string(
'pt > 170.0 && abs(rapidity()) < 2.4') ))
19 setattr(process,
'ak8PFJetsPuppiSoftDrop'+postfix, ak8PFJetsPuppiSoftDrop.clone( src =
'ak8PFJetsPuppiConstituents'+postfix+
':constituents' ))
20 from RecoJets.JetProducers.ak8PFJetsPuppi_groomingValueMaps_cfi
import ak8PFJetsPuppiSoftDropMass
21 setattr(process,
'ak8PFJetsPuppiSoftDropMass'+postfix, ak8PFJetsPuppiSoftDropMass.clone())
22 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff
import run2_miniAOD_80XLegacy
23 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff
import run2_miniAOD_94XFall17
24 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff
import run2_miniAOD_UL
25 _run2_miniAOD_ANY = (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17 | run2_miniAOD_UL)
26 from Configuration.Eras.Modifier_pA_2016_cff
import pA_2016
27 from Configuration.Eras.Modifier_pp_on_AA_2018_cff
import pp_on_AA_2018
30 _rerun_puppijets_task = task.copy()
31 _rerun_puppijets_task.add(getattr(process,
'ak8PFJetsPuppi'),
32 getattr(process,
'ak8PFJetsPuppiConstituents'),
33 getattr(process,
'ak8PFJetsPuppiSoftDrop'),
34 getattr(process,
'ak8PFJetsPuppiSoftDropMass'))
35 (_run2_miniAOD_ANY | pA_2016 | pp_on_AA_2018).toReplaceWith(task, _rerun_puppijets_task)
37 task.add(getattr(process,
'ak8PFJetsPuppi'+postfix),
38 getattr(process,
'ak8PFJetsPuppiConstituents'+postfix),
39 getattr(process,
'ak8PFJetsPuppiSoftDrop'+postfix),
40 getattr(process,
'ak8PFJetsPuppiSoftDropMass'+postfix))
42 from RecoJets.JetProducers.ak8GenJets_cfi
import ak8GenJets, ak8GenJetsSoftDrop, ak8GenJetsConstituents
43 addToProcessAndTask(
'ak8GenJetsNoNuConstituents'+postfix, ak8GenJetsConstituents.clone(src=
'ak8GenJetsNoNu'), process, task )
44 addToProcessAndTask(
'ak8GenJetsNoNuSoftDrop'+postfix,ak8GenJetsSoftDrop.clone(src=cms.InputTag(
'ak8GenJetsNoNuConstituents'+postfix,
'constituents')),process,task)
46 cms.EDProducer(
"PATGenJetSlimmer",
47 src = cms.InputTag(
"ak8GenJetsNoNuSoftDrop"+postfix,
"SubJets"),
48 packedGenParticles = cms.InputTag(
"packedGenParticles"),
50 cutLoose = cms.string(
""),
51 nLoose = cms.uint32(0),
52 clearDaughters = cms.bool(
False),
53 dropSpecific = cms.bool(
True),
60 labelName =
'AK8PFPuppiSoftDrop' + postfix,
61 jetSource = cms.InputTag(
'ak8PFJetsPuppiSoftDrop'+postfix),
62 btagDiscriminators = [
'None'],
63 genJetCollection = cms.InputTag(
'slimmedGenJetsAK8'),
64 jetCorrections = (
'AK8PFPuppi', [
'L2Relative',
'L3Absolute'],
'None'),
65 getJetMCFlavour =
False
71 labelName =
'AK8PFPuppiSoftDropSubjets',
72 jetSource = cms.InputTag(
'ak8PFJetsPuppiSoftDrop'+postfix,
'SubJets'),
75 btagDiscriminators = [
'pfDeepCSVJetTags:probb',
'pfDeepCSVJetTags:probbb',
'pfCombinedInclusiveSecondaryVertexV2BJetTags',
'pfCombinedMVAV2BJetTags'],
76 jetCorrections = (
'AK4PFPuppi', [
'L2Relative',
'L3Absolute'],
'None'),
79 genJetCollection = cms.InputTag(
'slimmedGenJetsAK8SoftDropSubJets'),
80 fatJets=cms.InputTag(
'ak8PFJetsPuppi'),
81 groomedFatJets=cms.InputTag(
'ak8PFJetsPuppiSoftDrop')
86 process.load(
'RecoJets.JetProducers.ECF_cff')
87 addToProcessAndTask(
'nb1AK8PuppiSoftDrop'+postfix, process.ecfNbeta1.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix), cuts = cms.vstring(
'',
'',
'pt > 250')), process, task)
88 addToProcessAndTask(
'nb2AK8PuppiSoftDrop'+postfix, process.ecfNbeta2.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix), cuts = cms.vstring(
'',
'',
'pt > 250')), process, task)
91 from Configuration.Eras.Modifier_pp_on_AA_2018_cff
import pp_on_AA_2018
92 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff
import pp_on_XeXe_2017
93 from Configuration.Eras.Modifier_phase2_common_cff
import phase2_common
94 for e
in [pp_on_XeXe_2017, pp_on_AA_2018, phase2_common]:
95 e.toModify(getattr(process,
'nb1AK8PuppiSoftDrop'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
96 e.toModify(getattr(process,
'nb2AK8PuppiSoftDrop'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
98 from RecoJets.JetProducers.nJettinessAdder_cfi
import Njettiness
100 getattr(process,
"NjettinessAK8Subjets"+postfix).src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix,
"SubJets")
101 getattr(process,
"patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += [
'nb1AK8PuppiSoftDrop'+postfix+
':ecfN2',
'nb1AK8PuppiSoftDrop'+postfix+
':ecfN3']
102 getattr(process,
"patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += [
'nb2AK8PuppiSoftDrop'+postfix+
':ecfN2',
'nb2AK8PuppiSoftDrop'+postfix+
':ecfN3']
103 addToProcessAndTask(
'nb1AK8PuppiSoftDropSubjets'+postfix, process.ecfNbeta1.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix,
"SubJets")), process, task)
104 addToProcessAndTask(
'nb2AK8PuppiSoftDropSubjets'+postfix, process.ecfNbeta2.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix,
"SubJets")), process, task)
105 getattr(process,
"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += [
'nb1AK8PuppiSoftDropSubjets'+postfix+
':ecfN2',
'nb1AK8PuppiSoftDropSubjets'+postfix+
':ecfN3']
106 getattr(process,
"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += [
'nb2AK8PuppiSoftDropSubjets'+postfix+
':ecfN2',
'nb2AK8PuppiSoftDropSubjets'+postfix+
':ecfN3']
107 getattr(process,
"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += [
'NjettinessAK8Subjets'+postfix+
':tau1',
'NjettinessAK8Subjets'+postfix+
':tau2',
'NjettinessAK8Subjets'+postfix+
':tau3',
'NjettinessAK8Subjets'+postfix+
':tau4']
109 for e
in [pp_on_XeXe_2017, pp_on_AA_2018, phase2_common]:
110 e.toModify(getattr(process,
'nb1AK8PuppiSoftDropSubjets'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
111 e.toModify(getattr(process,
'nb2AK8PuppiSoftDropSubjets'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
116 cms.EDProducer(
"RecoJetToPatJetDeltaRValueMapProducer",
117 src = cms.InputTag(
"ak8PFJetsPuppi"+postfix),
118 matched = cms.InputTag(
"patJetsAK8PFPuppiSoftDrop"+postfix),
119 distMax = cms.double(0.8),
120 values = cms.vstring([
121 'userFloat("nb1AK8PuppiSoftDrop'+postfix+
':ecfN2")',
122 'userFloat("nb1AK8PuppiSoftDrop'+postfix+
':ecfN3")',
123 'userFloat("nb2AK8PuppiSoftDrop'+postfix+
':ecfN2")',
124 'userFloat("nb2AK8PuppiSoftDrop'+postfix+
':ecfN3")',
126 valueLabels = cms.vstring( [
127 'nb1AK8PuppiSoftDropN2',
128 'nb1AK8PuppiSoftDropN3',
129 'nb2AK8PuppiSoftDropN2',
130 'nb2AK8PuppiSoftDropN3',
136 addJetCollection(process, postfix=postfix, labelName =
'AK8Puppi',
137 jetSource = cms.InputTag(
'ak8PFJetsPuppi'+postfix),
138 algo=
'AK', rParam = 0.8,
139 jetCorrections = (
'AK8PFPuppi', cms.vstring([
'L2Relative',
'L3Absolute']),
'None'),
140 btagDiscriminators = ([
141 'pfCombinedSecondaryVertexV2BJetTags',
142 'pfCombinedInclusiveSecondaryVertexV2BJetTags',
143 'pfCombinedMVAV2BJetTags',
144 'pfDeepCSVJetTags:probb',
145 'pfDeepCSVJetTags:probc',
146 'pfDeepCSVJetTags:probudsg',
147 'pfDeepCSVJetTags:probbb',
148 'pfBoostedDoubleSecondaryVertexAK8BJetTags']),
149 genJetCollection = cms.InputTag(
'slimmedGenJetsAK8')
151 getattr(process,
"patJetsAK8Puppi"+postfix).userData.userFloats.src = []
152 getattr(process,
"selectedPatJetsAK8Puppi"+postfix).cut = cms.string(
"pt > 100")
153 getattr(process,
"selectedPatJetsAK8Puppi"+postfix).cutLoose = cms.string(
"pt > 30")
154 getattr(process,
"selectedPatJetsAK8Puppi"+postfix).nLoose = cms.uint32(3)
157 addToProcessAndTask(
'ak8PFJetsPuppiTracksAssociatorAtVertex'+postfix, cms.EDProducer(
"JetTracksAssociatorAtVertex",
158 j2tParametersVX.clone( coneSize = cms.double(0.8) ),
159 jets = cms.InputTag(
"ak8PFJetsPuppi") ),
162 src = cms.InputTag(
"ak8PFJetsPuppiTracksAssociatorAtVertex"),
163 var = cms.string(
'Pt'),
164 exp = cms.double(1.0) ),
168 getattr(process,
"patJetsAK8Puppi"+postfix).userData.userFloats.src += [
'ak8PFJetsPuppiSoftDropMass'+postfix]
169 getattr(process,
"patJetsAK8Puppi"+postfix).addTagInfos = cms.bool(
False)
170 getattr(process,
"patJetsAK8Puppi"+postfix).userData.userFloats.src += [
171 cms.InputTag(
'ak8PFJetsPuppiSoftDropValueMap'+postfix,
'nb1AK8PuppiSoftDropN2'),
172 cms.InputTag(
'ak8PFJetsPuppiSoftDropValueMap'+postfix,
'nb1AK8PuppiSoftDropN3'),
173 cms.InputTag(
'ak8PFJetsPuppiSoftDropValueMap'+postfix,
'nb2AK8PuppiSoftDropN2'),
174 cms.InputTag(
'ak8PFJetsPuppiSoftDropValueMap'+postfix,
'nb2AK8PuppiSoftDropN3'),
180 getattr(process,
"NjettinessAK8Puppi"+postfix).src = cms.InputTag(
"ak8PFJetsPuppi"+postfix)
181 getattr(process,
"patJetsAK8Puppi").userData.userFloats.src += [
'NjettinessAK8Puppi'+postfix+
':tau1',
'NjettinessAK8Puppi'+postfix+
':tau2',
'NjettinessAK8Puppi'+postfix+
':tau3',
'NjettinessAK8Puppi'+postfix+
':tau4']
185 cms.EDProducer(
"PATJetSlimmer",
186 src = cms.InputTag(
"selectedPatJetsAK8PFPuppiSoftDropSubjets"),
187 packedPFCandidates = cms.InputTag(
"packedPFCandidates"),
188 dropJetVars = cms.string(
"1"),
189 dropDaughters = cms.string(
"0"),
190 rekeyDaughters = cms.string(
"1"),
191 dropTrackRefs = cms.string(
"1"),
192 dropSpecific = cms.string(
"1"),
193 dropTagInfos = cms.string(
"1"),
194 modifyJets = cms.bool(
True),
195 mixedDaughters = cms.bool(
False),
196 modifierConfig = cms.PSet( modifications = cms.VPSet() )
203 cms.EDProducer(
"BoostedJetMerger",
204 jetSrc=cms.InputTag(
"selectedPatJetsAK8PFPuppiSoftDrop"),
205 subjetSrc=cms.InputTag(
"slimmedJetsAK8PFPuppiSoftDropSubjets")
211 jetSrc = cms.InputTag(
"selectedPatJetsAK8Puppi"+postfix),
212 distMax = cms.double(0.8),
213 algoTags = cms.VInputTag(
214 cms.InputTag(
"slimmedJetsAK8PFPuppiSoftDropPacked"+postfix)
216 algoLabels = cms.vstring(
219 fixDaughters = cms.bool(
True),
220 packedPFCandidates = cms.InputTag(
"packedPFCandidates"+postfix),
225 process.slimmedJetsAK8.rekeyDaughters =
"0"
227 process.slimmedJetsAK8.dropDaughters = cms.string(
"pt < 170")
228 process.slimmedJetsAK8.dropSpecific = cms.string(
"pt < 170")
229 process.slimmedJetsAK8.dropTagInfos = cms.string(
"pt < 170")