1 import FWCore.ParameterSet.Config
as cms
17 setattr(process,
'ak8PFJetsPuppi'+postfix,ak8PFJetsPuppi.clone())
18 setattr(process,
'ak8PFJetsPuppiConstituents'+postfix, ak8PFJetsPuppiConstituents.clone())
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.ProcessModifiers.run2_miniAOD_UL_cff
import run2_miniAOD_UL
23 _run2_miniAOD_ANY = (run2_miniAOD_UL)
24 from Configuration.Eras.Modifier_pA_2016_cff
import pA_2016
27 _rerun_puppijets_task = task.copy()
28 _rerun_puppijets_task.add(getattr(process,
'ak8PFJetsPuppi'),
29 getattr(process,
'ak8PFJetsPuppiConstituents'),
30 getattr(process,
'ak8PFJetsPuppiSoftDrop'),
31 getattr(process,
'ak8PFJetsPuppiSoftDropMass'))
32 (_run2_miniAOD_ANY | pA_2016 ).toReplaceWith(task, _rerun_puppijets_task)
33 (_run2_miniAOD_ANY | pA_2016 ).toModify(getattr(process,
'ak8PFJetsPuppiConstituents'+postfix),
34 cut = cms.string(
'pt > 170.0 && abs(rapidity()) < 2.4'))
36 task.add(getattr(process,
'ak8PFJetsPuppi'+postfix),
37 getattr(process,
'ak8PFJetsPuppiConstituents'+postfix),
38 getattr(process,
'ak8PFJetsPuppiSoftDrop'+postfix),
39 getattr(process,
'ak8PFJetsPuppiSoftDropMass'+postfix))
41 from RecoJets.JetProducers.ak8GenJets_cfi
import ak8GenJets, ak8GenJetsSoftDrop, ak8GenJetsConstituents
42 addToProcessAndTask(
'ak8GenJetsNoNuConstituents'+postfix, ak8GenJetsConstituents.clone(src=
'ak8GenJetsNoNu'), process, task )
43 addToProcessAndTask(
'ak8GenJetsNoNuSoftDrop'+postfix,ak8GenJetsSoftDrop.clone(src=cms.InputTag(
'ak8GenJetsNoNuConstituents'+postfix,
'constituents')),process,task)
45 cms.EDProducer(
"PATGenJetSlimmer",
46 src = cms.InputTag(
"ak8GenJetsNoNuSoftDrop"+postfix,
"SubJets"),
47 packedGenParticles = cms.InputTag(
"packedGenParticles"),
49 cutLoose = cms.string(
""),
50 nLoose = cms.uint32(0),
51 clearDaughters = cms.bool(
False),
52 dropSpecific = cms.bool(
True),
59 labelName =
'AK8PFPuppiSoftDrop' + postfix,
60 jetSource = cms.InputTag(
'ak8PFJetsPuppiSoftDrop'+postfix),
61 btagDiscriminators = [
'None'],
62 genJetCollection = cms.InputTag(
'slimmedGenJetsAK8'),
63 jetCorrections = (
'AK8PFPuppi', [
'L2Relative',
'L3Absolute'],
'None'),
64 getJetMCFlavour =
False 70 labelName =
'AK8PFPuppiSoftDropSubjets',
71 jetSource = cms.InputTag(
'ak8PFJetsPuppiSoftDrop'+postfix,
'SubJets'),
74 btagDiscriminators = [
'pfDeepCSVJetTags:probb',
'pfDeepCSVJetTags:probbb',
'pfCombinedInclusiveSecondaryVertexV2BJetTags',
'pfCombinedMVAV2BJetTags'],
75 jetCorrections = (
'AK4PFPuppi', [
'L2Relative',
'L3Absolute'],
'None'),
78 genJetCollection = cms.InputTag(
'slimmedGenJetsAK8SoftDropSubJets'),
79 fatJets=cms.InputTag(
'ak8PFJetsPuppi'),
80 groomedFatJets=cms.InputTag(
'ak8PFJetsPuppiSoftDrop')
83 from Configuration.Eras.Modifier_run3_common_cff
import run3_common
84 run3_common.toModify(process.patJetsAK8PFPuppiSoftDropSubjets,
85 discriminatorSources = cms.VInputTag(
86 cms.InputTag(
"pfDeepCSVJetTagsAK8PFPuppiSoftDropSubjets",
"probb"),
87 cms.InputTag(
"pfDeepCSVJetTagsAK8PFPuppiSoftDropSubjets",
"probbb")
92 process.load(
'RecoJets.JetProducers.ECF_cff')
93 addToProcessAndTask(
'nb1AK8PuppiSoftDrop'+postfix, process.ecfNbeta1.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix), cuts = cms.vstring(
'',
'',
'pt > 250')), process, task)
94 addToProcessAndTask(
'nb2AK8PuppiSoftDrop'+postfix, process.ecfNbeta2.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix), cuts = cms.vstring(
'',
'',
'pt > 250')), process, task)
97 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff
import pp_on_XeXe_2017
99 for e
in [pp_on_XeXe_2017]:
100 e.toModify(getattr(process,
'nb1AK8PuppiSoftDrop'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
101 e.toModify(getattr(process,
'nb2AK8PuppiSoftDrop'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
103 from RecoJets.JetProducers.nJettinessAdder_cfi
import Njettiness
105 getattr(process,
"NjettinessAK8Subjets"+postfix).src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix,
"SubJets")
106 getattr(process,
"patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += [
'nb1AK8PuppiSoftDrop'+postfix+
':ecfN2',
'nb1AK8PuppiSoftDrop'+postfix+
':ecfN3']
107 getattr(process,
"patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += [
'nb2AK8PuppiSoftDrop'+postfix+
':ecfN2',
'nb2AK8PuppiSoftDrop'+postfix+
':ecfN3']
108 addToProcessAndTask(
'nb1AK8PuppiSoftDropSubjets'+postfix, process.ecfNbeta1.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix,
"SubJets")), process, task)
109 addToProcessAndTask(
'nb2AK8PuppiSoftDropSubjets'+postfix, process.ecfNbeta2.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix,
"SubJets")), process, task)
110 getattr(process,
"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += [
'nb1AK8PuppiSoftDropSubjets'+postfix+
':ecfN2',
'nb1AK8PuppiSoftDropSubjets'+postfix+
':ecfN3']
111 getattr(process,
"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += [
'nb2AK8PuppiSoftDropSubjets'+postfix+
':ecfN2',
'nb2AK8PuppiSoftDropSubjets'+postfix+
':ecfN3']
112 getattr(process,
"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += [
'NjettinessAK8Subjets'+postfix+
':tau1',
'NjettinessAK8Subjets'+postfix+
':tau2',
'NjettinessAK8Subjets'+postfix+
':tau3',
'NjettinessAK8Subjets'+postfix+
':tau4']
114 for e
in [pp_on_XeXe_2017]:
115 e.toModify(getattr(process,
'nb1AK8PuppiSoftDropSubjets'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
116 e.toModify(getattr(process,
'nb2AK8PuppiSoftDropSubjets'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
120 addJetCollection(process, postfix=postfix, labelName =
'AK8Puppi',
121 jetSource = cms.InputTag(
'ak8PFJetsPuppi'+postfix),
122 algo=
'AK', rParam = 0.8,
123 jetCorrections = (
'AK8PFPuppi', cms.vstring([
'L2Relative',
'L3Absolute']),
'None'),
124 btagDiscriminators =
None,
125 genJetCollection = cms.InputTag(
'slimmedGenJetsAK8')
127 getattr(process,
"patJetsAK8Puppi"+postfix).userData.userFloats.src = []
128 getattr(process,
"selectedPatJetsAK8Puppi"+postfix).cut = cms.string(
"pt > 100")
129 getattr(process,
"selectedPatJetsAK8Puppi"+postfix).cutLoose = cms.string(
"pt > 30")
130 getattr(process,
"selectedPatJetsAK8Puppi"+postfix).nLoose = cms.uint32(3)
133 addToProcessAndTask(
'ak8PFJetsPuppiTracksAssociatorAtVertex'+postfix, cms.EDProducer(
"JetTracksAssociatorAtVertex",
134 j2tParametersVX.clone( coneSize = cms.double(0.8) ),
135 jets = cms.InputTag(
"ak8PFJetsPuppi") ),
138 src = cms.InputTag(
"ak8PFJetsPuppiTracksAssociatorAtVertex"),
139 var = cms.string(
'Pt'),
140 exp = cms.double(1.0) ),
144 getattr(process,
"patJetsAK8Puppi"+postfix).userData.userFloats.src += [
'ak8PFJetsPuppiSoftDropMass'+postfix]
145 getattr(process,
"patJetsAK8Puppi"+postfix).addTagInfos = cms.bool(
False)
150 getattr(process,
"NjettinessAK8Puppi"+postfix).src = cms.InputTag(
"ak8PFJetsPuppi"+postfix)
151 getattr(process,
"patJetsAK8Puppi").userData.userFloats.src += [
'NjettinessAK8Puppi'+postfix+
':tau1',
'NjettinessAK8Puppi'+postfix+
':tau2',
'NjettinessAK8Puppi'+postfix+
':tau3',
'NjettinessAK8Puppi'+postfix+
':tau4']
155 cms.EDProducer(
"PATJetSlimmer",
156 src = cms.InputTag(
"selectedPatJetsAK8PFPuppiSoftDropSubjets"),
157 packedPFCandidates = cms.InputTag(
"packedPFCandidates"),
158 dropJetVars = cms.string(
"1"),
159 dropDaughters = cms.string(
"0"),
160 rekeyDaughters = cms.string(
"1"),
161 dropTrackRefs = cms.string(
"1"),
162 dropSpecific = cms.string(
"1"),
163 dropTagInfos = cms.string(
"1"),
164 modifyJets = cms.bool(
True),
165 mixedDaughters = cms.bool(
False),
166 modifierConfig = cms.PSet( modifications = cms.VPSet() )
173 cms.EDProducer(
"BoostedJetMerger",
174 jetSrc=cms.InputTag(
"selectedPatJetsAK8PFPuppiSoftDrop"),
175 subjetSrc=cms.InputTag(
"slimmedJetsAK8PFPuppiSoftDropSubjets")
181 jetSrc = cms.InputTag(
"selectedPatJetsAK8Puppi"+postfix),
182 distMax = cms.double(0.8),
183 algoTags = cms.VInputTag(
184 cms.InputTag(
"slimmedJetsAK8PFPuppiSoftDropPacked"+postfix)
186 algoLabels = cms.vstring(
189 fixDaughters = cms.bool(
True),
190 packedPFCandidates = cms.InputTag(
"packedPFCandidates"+postfix),
195 process.slimmedJetsAK8.rekeyDaughters =
"0" 197 process.slimmedJetsAK8.dropDaughters = cms.string(
"pt < 170")
198 process.slimmedJetsAK8.dropSpecific = cms.string(
"pt < 170")
199 process.slimmedJetsAK8.dropTagInfos = cms.string(
"pt < 170")
def applySubstructure(process, postfix="")
def addToProcessAndTask(label, module, process, task)
def getPatAlgosToolsTask(process)