diff --git a/[refs] b/[refs] index ae39056faa1b7..2980aff6277f6 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e -"refs/heads/CMSSW_7_1_X": fbc8bd7e7fa9c5f5f4abe9f2730c1f7fc72fa908 +"refs/heads/CMSSW_7_1_X": 11c7551f5413449c426735028ea04bb0fdf9af76 diff --git a/trunk/PhysicsTools/PFCandProducer/python/PF2PAT_cff.py b/trunk/PhysicsTools/PFCandProducer/python/PF2PAT_cff.py index 745270a995f68..e6e60852d4dd5 100644 --- a/trunk/PhysicsTools/PFCandProducer/python/PF2PAT_cff.py +++ b/trunk/PhysicsTools/PFCandProducer/python/PF2PAT_cff.py @@ -1,7 +1,5 @@ import FWCore.ParameterSet.Config as cms -from PhysicsTools.PFCandProducer.GeneratorTools.genMetTrue_cff import * - from PhysicsTools.PFCandProducer.pfMET_cfi import * from PhysicsTools.PFCandProducer.pfNoPileUp_cff import * from PhysicsTools.PFCandProducer.pfElectrons_cff import * @@ -17,7 +15,7 @@ from PhysicsTools.PFCandProducer.TopProjectors.pfNoTau_cfi import * # generator tools -from PhysicsTools.PFCandProducer.GeneratorTools.sortGenParticles_cff import * +from PhysicsTools.PFCandProducer.genForPF2PAT_cff import * # To reconstruct genjets without the neutrinos from RecoJets.Configuration.GenJetParticles_cff import * @@ -44,12 +42,7 @@ pfJetSequence + pfNoJet + pfTauSequence + - pfNoTau + pfNoTau + +# putting the following in the sequence, as we don't want to leave the responsibility to forget it to the user. + genForPF2PATSequence ) - - -genForPF2PAT = cms.Sequence( - genMetTrueSequence + - genJetParticles + - iterativeCone5GenJets -) diff --git a/trunk/PhysicsTools/PFCandProducer/python/Tools/jetTools.py b/trunk/PhysicsTools/PFCandProducer/python/Tools/jetTools.py new file mode 100644 index 0000000000000..f73dcc1f757ac --- /dev/null +++ b/trunk/PhysicsTools/PFCandProducer/python/Tools/jetTools.py @@ -0,0 +1,17 @@ +import FWCore.ParameterSet.Config as cms + +import RecoJets.JetProducers.ak5PFJets_cfi +import RecoJets.JetProducers.ic5PFJets_cfi + +def jetAlgo( algo ): + + print 'PF2PAT: selecting jet algorithm ', algo + + if algo == 'IC5': +#allPfJets = RecoJets.JetProducers.ic5PFJets_cfi.iterativeCone5PFJets.clone() + jetAlgo = RecoJets.JetProducers.ic5PFJets_cfi.iterativeCone5PFJets.clone() + elif algo == 'AK5': + jetAlgo = RecoJets.JetProducers.ak5PFJets_cfi.ak5PFJets.clone() + + jetAlgo.src = 'pfNoElectron' + return jetAlgo diff --git a/trunk/PhysicsTools/PFCandProducer/python/genForPF2PAT_cff.py b/trunk/PhysicsTools/PFCandProducer/python/genForPF2PAT_cff.py new file mode 100644 index 0000000000000..312b888173923 --- /dev/null +++ b/trunk/PhysicsTools/PFCandProducer/python/genForPF2PAT_cff.py @@ -0,0 +1,24 @@ +import FWCore.ParameterSet.Config as cms + +from PhysicsTools.PFCandProducer.GeneratorTools.genMetTrue_cff import * + +#not necessary? +from PhysicsTools.PFCandProducer.GeneratorTools.sortGenParticles_cff import * + +# To reconstruct genjets without the neutrinos +from RecoJets.Configuration.GenJetParticles_cff import * +from RecoJets.Configuration.RecoGenJets_cff import * +genParticlesForJets.ignoreParticleIDs.append(14) +genParticlesForJets.ignoreParticleIDs.append(12) +genParticlesForJets.ignoreParticleIDs.append(16) +genParticlesForJets.excludeResonances = False + +ak5GenJetsNoNu.src = "genParticlesForJets" +iterativeCone5GenJetsNoNu.src = "genParticlesForJets" + +genForPF2PATSequence = cms.Sequence( + genMetTrueSequence + + genJetParticles + + ak5GenJetsNoNu + + iterativeCone5GenJetsNoNu +) diff --git a/trunk/PhysicsTools/PFCandProducer/python/pfJets_cff.py b/trunk/PhysicsTools/PFCandProducer/python/pfJets_cff.py index 8ad4f8977e6be..7dab967f92880 100644 --- a/trunk/PhysicsTools/PFCandProducer/python/pfJets_cff.py +++ b/trunk/PhysicsTools/PFCandProducer/python/pfJets_cff.py @@ -1,11 +1,11 @@ import FWCore.ParameterSet.Config as cms -import RecoJets.JetProducers.ic5PFJets_cfi from PhysicsTools.PFCandProducer.ParticleSelectors.ptMinPFJetSelector_cfi import ptMinPFJets as pfJets +from PhysicsTools.PFCandProducer.Tools.jetTools import jetAlgo -allPfJets = RecoJets.JetProducers.ic5PFJets_cfi.iterativeCone5PFJets.clone() -allPfJets.src = 'pfNoElectron' +#allPfJets = RecoJets.JetProducers.ic5PFJets_cfi.iterativeCone5PFJets.clone() +allPfJets = jetAlgo('IC5') pfJets.src = 'allPfJets' pfJets.ptMin = 10