Skip to content

Commit

Permalink
Configuration was out of sync, fixed now.
Browse files Browse the repository at this point in the history
  • Loading branch information
rappoccio committed Jun 22, 2017
1 parent 68013b6 commit a7f4cda
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 21 deletions.
18 changes: 15 additions & 3 deletions PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,22 @@ def applySubstructure( process, postfix="" ) :



#add AK8 from PUPPI
from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJetsPuppi
from RecoJets.JetProducers.ak8PFJets_cfi import ak8PFJetsPuppi
addToProcessAndTask('ak4PFJetsPuppi'+postfix,ak4PFJetsPuppi.clone(), process, task)
addToProcessAndTask('ak8PFJetsPuppi'+postfix,ak8PFJetsPuppi.clone(), process, task)
from RecoJets.Configuration.RecoPFJets_cff import ak8PFJetsPuppiSoftDrop
addToProcessAndTask('ak8PFJetsPuppiSoftDrop'+postfix, ak8PFJetsPuppiSoftDrop.clone(), process, task)
getattr(process,"ak8PFJetsPuppi").doAreaFastjet = True # even for standard ak8PFJets this is overwritten in RecoJets/Configuration/python/RecoPFJets_cff


#add AK8 from PUPPI
#from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJetsPuppi
from RecoJets.Configuration.RecoPFJets_cff import ak8PFJetsPuppi, ak8PFJetsPuppiSoftDrop, ak8PFJetsPuppiConstituents, ak8PFJetsCHSConstituents
#addToProcessAndTask('ak4PFJetsPuppi'+postfix,ak4PFJetsPuppi.clone(), process, task)
from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJetsPuppi
from RecoJets.JetProducers.ak8PFJets_cfi import ak8PFJetsPuppi, ak8PFJetsPuppiSoftDrop, ak8PFJetsPuppiConstituents, ak8PFJetsCHSConstituents

#from RecoJets.Configuration.RecoPFJets_cff import ak8PFJetsPuppi, ak8PFJetsPuppiSoftDrop, ak8PFJetsPuppiConstituents, ak8PFJetsCHSConstituents
addToProcessAndTask('ak4PFJetsPuppi'+postfix,ak4PFJetsPuppi.clone(), process, task)
addToProcessAndTask('ak8PFJetsPuppiConstituents', ak8PFJetsPuppiConstituents.clone(), process, task )
addToProcessAndTask('ak8PFJetsCHSConstituents', ak8PFJetsCHSConstituents.clone(), process, task )
addToProcessAndTask('ak8PFJetsPuppi'+postfix,ak8PFJetsPuppi.clone(), process, task)
Expand Down
11 changes: 1 addition & 10 deletions PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,20 +260,11 @@ def miniAOD_customizeCommon(process):
#---------------------------------------------------------------------------

# Adding puppi jets
<<<<<<< HEAD
if not hasattr(process, 'ak4PFJetsPuppi'): #MM: avoid confilct with substructure call
process.load('RecoJets.JetProducers.ak4PFJetsPuppi_cfi')
task.add(process.ak4PFJets)
task.add(process.ak4PFJetsPuppi)
=======
#if not hasattr(process, 'ak4PFJetsPuppi'): #MM: avoid confilct with substructure call
from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets, ak4PFJetsPuppi
addToProcessAndTask('ak4PFJetsPuppi',ak4PFJetsPuppi.clone(), process, task)
addToProcessAndTask('ak4PFJets',ak4PFJets.clone(), process, task)
task.add(process.ak4PFJets)
task.add(process.ak4PFJetsPuppi)

>>>>>>> A few miniaod inconsistencies fixed
process.ak4PFJetsPuppi.doAreaFastjet = True # even for standard ak4PFJets this is overwritten in RecoJets/Configuration/python/RecoPFJets_cff
from RecoJets.JetAssociationProducers.j2tParametersVX_cfi import j2tParametersVX
process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer("JetTracksAssociatorAtVertex",
j2tParametersVX,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1462,11 +1462,11 @@ def ak4JetReclustering(self,process, pfCandCollection, patMetModuleSequence, pos

jetColName+=postfix
if not hasattr(process, jetColName):
process.load("RecoJets.JetProducers.ak4PFJets_cfi")
task.add(process.ak4PFJets)

#process.load("RecoJets.JetProducers.ak4PFJets_cfi")
#task.add(process.ak4PFJets)
from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets
#if chs:
addToProcessAndTask(jetColName, getattr(process,"ak4PFJets").clone(), process, task)
addToProcessAndTask(jetColName, ak4PFJets.clone(), process, task)
getattr(process, jetColName).src = pfCandColl
getattr(process, jetColName).doAreaFastjet = True

Expand Down
4 changes: 3 additions & 1 deletion RecoJets/Configuration/python/RecoPFJets_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from RecoJets.JetProducers.kt4PFJets_cfi import *
from RecoJets.JetProducers.kt6PFJets_cfi import *
from RecoJets.JetProducers.ca15PFJets_cfi import *
from RecoJets.JetProducers.caTopTaggers_cff import cmsTopTagPFJetsCHS
from CommonTools.ParticleFlow.pfNoPileUpJME_cff import *
from CommonTools.PileupAlgos.Puppi_cff import puppi
from CommonTools.PileupAlgos.softKiller_cfi import softKiller
Expand Down Expand Up @@ -38,7 +39,8 @@
ak8PFJetsCHS+
ak8PFJetsCHSConstituents+
ak8PFJetsCHSSoftDrop+
ak8PFJetsCHSSoftDropMass
ak8PFJetsCHSSoftDropMass+
cmsTopTagPFJetsCHS
)

recoAllPFJets=cms.Sequence(fixedGridRhoAll+
Expand Down
2 changes: 1 addition & 1 deletion RecoJets/JetProducers/python/PFJetParameters_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#nSigmaPU = cms.double(1.0),
#radiusPU = cms.double(0.5),
# fastjet-style pileup
doAreaFastjet = cms.bool( False),
doAreaFastjet = cms.bool( True ),
doRhoFastjet = cms.bool( False),
doAreaDiskApprox = cms.bool( False),
Active_Area_Repeats = cms.int32( 1),
Expand Down
5 changes: 4 additions & 1 deletion RecoJets/JetProducers/python/ak8PFJets_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
##############################################################################
# Standard AK8 Jets####################################################
##########################
ak8PFJets = ak4PFJets.clone( rParam = cms.double(0.8) )
ak8PFJets = ak4PFJets.clone(
rParam = cms.double(0.8),
jetPtMin = cms.double(50.0)
)

##############################################################################
# AK8 jets with various pileup subtraction schemes
Expand Down
2 changes: 1 addition & 1 deletion RecoJets/JetProducers/python/caTopTaggers_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# with adjacency
cmsTopTagPFJetsCHS = cms.EDProducer(
"CATopJetProducer",
PFJetParameters.clone( src = cms.InputTag('pfNoPileUpJME'),
PFJetParameters.clone( src = cms.InputTag("ak8PFJetsCHSConstituents", "constituents"),
doAreaFastjet = cms.bool(True),
doRhoFastjet = cms.bool(False),
jetPtMin = cms.double(100.0)
Expand Down

0 comments on commit a7f4cda

Please sign in to comment.