1 import FWCore.ParameterSet.Config
as cms
10 jetColName=
"ak"+str(int(coneSize*10))+
"PFJets"
11 internalPfCandColl=pfCandCollection
13 setattr( process,
"tmpPFCandCollPtr"+postfix,
14 cms.EDProducer(
"PFCandidateFwdPtrProducer",
15 src = cms.InputTag(pfCandCollection) )
17 process.load(
"CommonTools.ParticleFlow.pfNoPileUpJME_cff")
19 getattr(process,
"pfPileUpJME"+postfix).PFCandidates = cms.InputTag(
"tmpPFCandCollPtr"+postfix)
20 getattr(process,
"pfNoPileUpJME"+postfix).bottomCollection = cms.InputTag(
"tmpPFCandCollPtr"+postfix)
22 internalPfCandColl =
"pfNoPileUpJME"+postfix
25 setattr(process, jetColName+postfix, getattr(process,
"ak4PFJets").
clone(
26 src = cms.InputTag(internalPfCandColl),
27 rParam=cms.double(coneSize),
34 label = jetCollection.label()
35 setattr(process, label+
"AllEvents", jetCollection.clone())
36 process.globalReplace(label,
37 cms.EDProducer(
"PFJetCollectionReducer",
38 writeEmptyCollection = cms.bool(
True),
39 jetCollection = cms.InputTag(label+
"AllEvents"),
40 triggeringCollections=badMuons,
45 label = jetCollection.label()
46 setattr(process, label+
"AllEvents", jetCollection.clone())
47 process.globalReplace(label,
48 cms.EDProducer(
"PATJetCollectionReducer",
49 writeEmptyCollection = cms.bool(
False),
50 jetCollection = cms.InputTag(label+
"AllEvents"),
51 triggeringCollections=badMuons,
57 """Take snapshots of the sequences before we change the PFCandidates"""
58 process.originalAK4JetSequence =
listDependencyChain(process, process.slimmedJets, (
'particleFlow',
'muons'))
60 process.originalAK4PuppiJetSequence =
listDependencyChain(process, process.slimmedJetsPuppi, (
'particleFlow',
'muons'))
62 process.originalAK8JetSequence =
listDependencyChain(process, process.slimmedJetsAK8, (
'particleFlow',
'muons'))
64 return {
'AK4':backupAK4JetSequence,
'AK4Puppi':backupAK4PuppiJetSequence,
'AK8':backupAK8JetSequence }
68 """Deploy the snapshots after the change of PFCandidates"""
70 for sequence
in sequences.itervalues():
77 process.patJetsBackup.userData.userInts.labelPostfixesToStrip = cms.vstring(
"Backup",)
78 process.patJetsBackup.userData.userFloats.labelPostfixesToStrip = cms.vstring(
"Backup",)
79 process.patJetsAK8Backup.userData.userFloats.labelPostfixesToStrip = cms.vstring(
"Backup",)
80 process.patJetsAK8PuppiBackup.userData.userFloats.labelPostfixesToStrip = cms.vstring(
"Backup",)
84 process.slimmedJetsBackup.mixedDaughters =
True
85 process.slimmedJetsBackup.packedPFCandidates = cms.InputTag(
"oldPFCandToPackedOrDiscarded")
86 process.slimmedJetsAK8PFCHSSoftDropSubjetsBackup.mixedDaughters =
True
87 process.slimmedJetsAK8PFCHSSoftDropSubjetsBackup.packedPFCandidates = cms.InputTag(
"oldPFCandToPackedOrDiscarded")
89 process.slimmedJetsPuppiBackup.dropDaughters =
'1'
90 process.slimmedJetsAK8PFPuppiSoftDropSubjetsBackup.dropDaughters =
'1'
92 process.packedPatJetsAK8Backup.fixDaughters =
False
93 process.slimmedJetsAK8Backup.rekeyDaughters =
'1'
94 process.slimmedJetsAK8Backup.mixedDaughters =
True
95 process.slimmedJetsAK8Backup.packedPFCandidates = cms.InputTag(
"oldPFCandToPackedOrDiscarded")
102 "keep *_slimmedJets_*_*",
103 [
"keep *_slimmedJetsBackup_*_*"],
106 [
"keep *_slimmedJetsPuppiBackup_*_*"],
109 "keep *_slimmedJetsAK8_*_*",
110 [
"keep *_slimmedJetsAK8Backup_*_*"],
112 addKeepStatement(process,
"keep *_slimmedJetsAK8PFCHSSoftDropPacked_SubJets_*",
113 [
"keep *_slimmedJetsAK8PFCHSSoftDropPackedBackup_SubJets_*"],
115 addKeepStatement(process,
"keep *_slimmedJetsAK8PFPuppiSoftDropPacked_SubJets_*",
116 [
"keep *_slimmedJetsAK8PFPuppiSoftDropPackedBackup_SubJets_*"],
def cloneProcessingSnippet
def massSearchReplaceAnyInputTag
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)