16 setattr(process,
'ak8PFJetsPuppi'+postfix,ak8PFJetsPuppi.clone())
17 setattr(process,
'ak8PFJetsPuppiConstituents'+postfix, ak8PFJetsPuppiConstituents.clone())
18 setattr(process,
'ak8PFJetsPuppiSoftDrop'+postfix, ak8PFJetsPuppiSoftDrop.clone( src =
'ak8PFJetsPuppiConstituents'+postfix+
':constituents' ))
19 from RecoJets.JetProducers.ak8PFJetsPuppi_groomingValueMaps_cfi
import ak8PFJetsPuppiSoftDropMass
20 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
26 _rerun_puppijets_task = task.copy()
27 _rerun_puppijets_task.add(getattr(process,
'ak8PFJetsPuppi'+postfix),
28 getattr(process,
'ak8PFJetsPuppiConstituents'+postfix),
29 getattr(process,
'ak8PFJetsPuppiSoftDrop'+postfix),
30 getattr(process,
'ak8PFJetsPuppiSoftDropMass'+postfix))
31 (_run2_miniAOD_ANY | pA_2016 ).toReplaceWith(task, _rerun_puppijets_task)
33 from RecoJets.JetProducers.ak8GenJets_cfi
import ak8GenJets, ak8GenJetsSoftDrop, ak8GenJetsConstituents
34 addToProcessAndTask(
'ak8GenJetsNoNuConstituents'+postfix, ak8GenJetsConstituents.clone(src=
'ak8GenJetsNoNu'), process, task )
35 addToProcessAndTask(
'ak8GenJetsNoNuSoftDrop'+postfix,ak8GenJetsSoftDrop.clone(src=cms.InputTag(
'ak8GenJetsNoNuConstituents'+postfix,
'constituents')),process,task)
37 cms.EDProducer(
"PATGenJetSlimmer",
38 src = cms.InputTag(
"ak8GenJetsNoNuSoftDrop"+postfix,
"SubJets"),
39 packedGenParticles = cms.InputTag(
"packedGenParticles"),
41 cutLoose = cms.string(
""),
42 nLoose = cms.uint32(0),
43 clearDaughters = cms.bool(
False),
44 dropSpecific = cms.bool(
True),
50 labelName =
'AK8PFPuppiSoftDrop'+postfix,
51 jetSource = cms.InputTag(
'ak8PFJetsPuppiSoftDrop'+postfix),
52 btagDiscriminators = [
'None'],
53 genJetCollection = cms.InputTag(
'slimmedGenJetsAK8'),
54 jetCorrections = (
'AK8PFPuppi', [
'L2Relative',
'L3Absolute'],
'None'),
55 getJetMCFlavour =
False 61 labelName =
'AK8PFPuppiSoftDropSubjets'+postfix,
62 jetSource = cms.InputTag(
'ak8PFJetsPuppiSoftDrop'+postfix,
'SubJets'),
65 jetCorrections = (
'AK4PFPuppi', [
'L2Relative',
'L3Absolute'],
'None'),
68 genJetCollection = cms.InputTag(
'slimmedGenJetsAK8SoftDropSubJets'),
69 fatJets=cms.InputTag(
'ak8PFJetsPuppi'),
70 groomedFatJets=cms.InputTag(
'ak8PFJetsPuppiSoftDrop')
74 process.load(
'RecoJets.JetProducers.ECF_cff')
75 addToProcessAndTask(
'nb1AK8PuppiSoftDrop'+postfix, process.ecfNbeta1.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix), cuts = cms.vstring(
'',
'',
'pt > 250')), process, task)
76 addToProcessAndTask(
'nb2AK8PuppiSoftDrop'+postfix, process.ecfNbeta2.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix), cuts = cms.vstring(
'',
'',
'pt > 250')), process, task)
79 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff
import pp_on_XeXe_2017
81 for e
in [pp_on_XeXe_2017]:
82 e.toModify(getattr(process,
'nb1AK8PuppiSoftDrop'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
83 e.toModify(getattr(process,
'nb2AK8PuppiSoftDrop'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
85 from RecoJets.JetProducers.nJettinessAdder_cfi
import Njettiness
87 getattr(process,
"NjettinessAK8Subjets"+postfix).src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix,
"SubJets")
88 getattr(process,
"patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += [
'nb1AK8PuppiSoftDrop'+postfix+
':ecfN2',
'nb1AK8PuppiSoftDrop'+postfix+
':ecfN3']
89 getattr(process,
"patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += [
'nb2AK8PuppiSoftDrop'+postfix+
':ecfN2',
'nb2AK8PuppiSoftDrop'+postfix+
':ecfN3']
90 addToProcessAndTask(
'nb1AK8PuppiSoftDropSubjets'+postfix, process.ecfNbeta1.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix,
"SubJets")), process, task)
91 addToProcessAndTask(
'nb2AK8PuppiSoftDropSubjets'+postfix, process.ecfNbeta2.clone(src = cms.InputTag(
"ak8PFJetsPuppiSoftDrop"+postfix,
"SubJets")), process, task)
92 getattr(process,
"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += [
'nb1AK8PuppiSoftDropSubjets'+postfix+
':ecfN2',
'nb1AK8PuppiSoftDropSubjets'+postfix+
':ecfN3']
93 getattr(process,
"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += [
'nb2AK8PuppiSoftDropSubjets'+postfix+
':ecfN2',
'nb2AK8PuppiSoftDropSubjets'+postfix+
':ecfN3']
94 getattr(process,
"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += [
'NjettinessAK8Subjets'+postfix+
':tau1',
'NjettinessAK8Subjets'+postfix+
':tau2',
'NjettinessAK8Subjets'+postfix+
':tau3',
'NjettinessAK8Subjets'+postfix+
':tau4']
96 for e
in [pp_on_XeXe_2017]:
97 e.toModify(getattr(process,
'nb1AK8PuppiSoftDropSubjets'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
98 e.toModify(getattr(process,
'nb2AK8PuppiSoftDropSubjets'+postfix), cuts = [
'pt > 999999',
'pt > 999999',
'pt > 999999'] )
102 addJetCollection(process, labelName =
'AK8Puppi'+postfix,
103 jetSource = cms.InputTag(
'ak8PFJetsPuppi'+postfix),
104 algo=
'AK', rParam = 0.8,
105 jetCorrections = (
'AK8PFPuppi', cms.vstring([
'L2Relative',
'L3Absolute']),
'None'),
106 btagDiscriminators =
None,
107 genJetCollection = cms.InputTag(
'slimmedGenJetsAK8')
109 getattr(process,
"patJetsAK8Puppi"+postfix).userData.userFloats.src = []
110 getattr(process,
"selectedPatJetsAK8Puppi"+postfix).cut = cms.string(
"pt > 100")
111 getattr(process,
"selectedPatJetsAK8Puppi"+postfix).cutLoose = cms.string(
"pt > 30")
112 getattr(process,
"selectedPatJetsAK8Puppi"+postfix).nLoose = cms.uint32(3)
115 addToProcessAndTask(
'ak8PFJetsPuppiTracksAssociatorAtVertex'+postfix, cms.EDProducer(
"JetTracksAssociatorAtVertex",
116 j2tParametersVX.clone( coneSize = cms.double(0.8) ),
117 jets = cms.InputTag(
"ak8PFJetsPuppi") ),
120 src = cms.InputTag(
"ak8PFJetsPuppiTracksAssociatorAtVertex"),
121 var = cms.string(
'Pt'),
122 exp = cms.double(1.0) ),
126 getattr(process,
"patJetsAK8Puppi"+postfix).userData.userFloats.src += [
'ak8PFJetsPuppiSoftDropMass'+postfix]
127 getattr(process,
"patJetsAK8Puppi"+postfix).addTagInfos = cms.bool(
False)
132 getattr(process,
"NjettinessAK8Puppi"+postfix).src = cms.InputTag(
"ak8PFJetsPuppi"+postfix)
133 getattr(process,
"patJetsAK8Puppi").userData.userFloats.src += [
'NjettinessAK8Puppi'+postfix+
':tau1',
'NjettinessAK8Puppi'+postfix+
':tau2',
'NjettinessAK8Puppi'+postfix+
':tau3',
'NjettinessAK8Puppi'+postfix+
':tau4']
136 addToProcessAndTask(
"slimmedJetsAK8PFPuppiSoftDropSubjetsNoDeepTags"+postfix, cms.EDProducer(
"PATJetSlimmer",
137 src = cms.InputTag(
"selectedPatJetsAK8PFPuppiSoftDropSubjets"),
138 packedPFCandidates = cms.InputTag(
"packedPFCandidates"),
139 dropJetVars = cms.string(
"1"),
140 dropDaughters = cms.string(
"0"),
141 rekeyDaughters = cms.string(
"1"),
142 dropTrackRefs = cms.string(
"1"),
143 dropSpecific = cms.string(
"1"),
144 dropTagInfos = cms.string(
"1"),
145 modifyJets = cms.bool(
True),
146 mixedDaughters = cms.bool(
False),
147 modifierConfig = cms.PSet( modifications = cms.VPSet() )
153 _btagDiscriminatorsSubjets = cms.PSet(
155 'pfDeepFlavourJetTags:probb',
156 'pfDeepFlavourJetTags:probbb',
157 'pfDeepFlavourJetTags:problepb',
158 'pfUnifiedParticleTransformerAK4DiscriminatorsJetTags:BvsAll' 163 labelName =
'AK8PFPuppiSoftDropSubjets',
164 postfix =
'SlimmedDeepFlavour'+postfix,
165 jetSource = cms.InputTag(
'slimmedJetsAK8PFPuppiSoftDropSubjetsNoDeepTags'),
168 pfCandidates = cms.InputTag(
'packedPFCandidates'),
169 pvSource = cms.InputTag(
'offlineSlimmedPrimaryVertices'),
170 svSource = cms.InputTag(
'slimmedSecondaryVertices'),
171 muSource = cms.InputTag(
'slimmedMuons'),
172 elSource = cms.InputTag(
'slimmedElectrons'),
173 jetCorrections = (
'AK4PFPuppi', [
'L2Relative',
'L3Absolute'],
'None'),
174 printWarning =
False,
175 btagDiscriminators = _btagDiscriminatorsSubjets.names.value(),
179 addToProcessAndTask(
"slimmedJetsAK8PFPuppiSoftDropPacked"+postfix, cms.EDProducer(
"BoostedJetMerger",
180 jetSrc=cms.InputTag(
"selectedPatJetsAK8PFPuppiSoftDrop"+postfix),
181 subjetSrc=cms.InputTag(
"selectedUpdatedPatJetsAK8PFPuppiSoftDropSubjetsSlimmedDeepFlavour"+postfix)
186 jetSrc = cms.InputTag(
"selectedPatJetsAK8Puppi"+postfix),
187 distMax = cms.double(0.8),
188 algoTags = cms.VInputTag(
189 cms.InputTag(
"slimmedJetsAK8PFPuppiSoftDropPacked"+postfix)
191 algoLabels = cms.vstring(
194 fixDaughters = cms.bool(
True),
195 packedPFCandidates = cms.InputTag(
"packedPFCandidates"),
200 process.slimmedJetsAK8.rekeyDaughters =
"0" 202 process.slimmedJetsAK8.dropDaughters = cms.string(
"pt < 170")
203 process.slimmedJetsAK8.dropSpecific = cms.string(
"pt < 170")
204 process.slimmedJetsAK8.dropTagInfos = cms.string(
"pt < 170")
205
def applySubstructure(process, postfix="")
def addToProcessAndTask(label, module, process, task)
def getPatAlgosToolsTask(process)