Skip to content

Commit

Permalink
Merge pull request #31668 from mandrenguyen/hiBadParticleFilter112X
Browse files Browse the repository at this point in the history
Bad PF candidate filter for 2018 PbPb data
  • Loading branch information
cmsbuild authored Oct 21, 2020
2 parents 971861d + 307021a commit 11c67e5
Show file tree
Hide file tree
Showing 17 changed files with 316 additions and 19 deletions.
3 changes: 1 addition & 2 deletions Configuration/Eras/python/Era_Run3_pp_on_PbPb_cff.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import FWCore.ParameterSet.Config as cms

from Configuration.Eras.Era_Run3_cff import Run3
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3

Run3_pp_on_PbPb = cms.ModifierChain(Run3, pp_on_AA_2018, pp_on_PbPb_run3)
Run3_pp_on_PbPb = cms.ModifierChain(Run3, pp_on_PbPb_run3)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import FWCore.ParameterSet.Config as cms

run2_miniAOD_pp_on_AA_103X = cms.Modifier()

6 changes: 4 additions & 2 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -1954,6 +1954,7 @@ def lhegensim2018ml(fragment,howMuch):
'--datatier':'MINIAOD,DQMIO',
'--eventcontent':'MINIAOD,DQM',
'--era':'Run2_2018_pp_on_AA',
'--procModifiers':'run2_miniAOD_pp_on_AA_103X',
'--data':'',
'--processName':'PAT',
'-n':'100'
Expand Down Expand Up @@ -2501,15 +2502,16 @@ def gen2021HiMix(fragment,howMuch):
'--datatier':'MINIAODSIM,DQMIO',
'--eventcontent':'MINIAODSIM,DQM',
'-n':100,
'--era':'Run2_2018_pp_on_AA',
'--procModifiers':'run2_miniAOD_pp_on_AA_103X',
},hiDefaults2018_ppReco,step3Up2015Defaults])
steps['REMINIAODHI2018PPRECOMB']=merge([{'-s':'PAT,VALIDATION:@miniAODValidation,DQM:@miniAODDQM',
'--datatier':'MINIAODSIM,DQMIO',
'--eventcontent':'MINIAODSIM,DQM',
'-n':100,
'--era':'Run2_2018_pp_on_AA',
'--procModifiers':'genJetSubEvent',
'--procModifiers':'genJetSubEvent,run2_miniAOD_pp_on_AA_103X',
},hiDefaults2018_ppReco,step3Up2015Defaults])

steps['ALCARECOHI2018PPRECO']=merge([hiDefaults2018_ppReco,{'-s':'ALCA:TkAlMinBias+SiStripCalMinBias',
'--datatier':'ALCARECO',
'--eventcontent':'ALCARECO'
Expand Down
3 changes: 2 additions & 1 deletion Configuration/StandardSequences/python/Reconstruction_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,15 @@
# AA data with pp reco
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
from RecoHI.HiTracking.HILowPtConformalPixelTracks_cfi import *
from RecoHI.HiCentralityAlgos.HiCentrality_cfi import hiCentrality
from RecoHI.HiCentralityAlgos.HiClusterCompatibility_cfi import hiClusterCompatibility
_highlevelreco_HITask = highlevelrecoTask.copy()
_highlevelreco_HITask.add(hiConformalPixelTracksTaskPhase1)
_highlevelreco_HITask.add(hiCentrality)
_highlevelreco_HITask.add(hiClusterCompatibility)
(pp_on_XeXe_2017 | pp_on_AA_2018).toReplaceWith(highlevelrecoTask, _highlevelreco_HITask)
(pp_on_XeXe_2017 | pp_on_AA_2018 | pp_on_PbPb_run3).toReplaceWith(highlevelrecoTask, _highlevelreco_HITask)
pp_on_AA_2018.toReplaceWith(highlevelrecoTask,highlevelrecoTask.copyAndExclude([PFTauTask]))

# not commisoned and not relevant in FastSim (?):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
selectedPatCandidates = cms.Sequence(selectedPatCandidateSummary, selectedPatCandidatesTask)

from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
pp_on_AA_2018.toReplaceWith(selectedPatCandidatesTask, selectedPatCandidatesTask.copyAndExclude([selectedPatOOTPhotons]))
pp_on_AA_2018.toModify(selectedPatCandidateSummary.candidates, func = lambda list: list.remove(cms.InputTag("selectedPatOOTPhotons")) )
from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
(pp_on_AA_2018 | pp_on_PbPb_run3).toReplaceWith(selectedPatCandidatesTask, selectedPatCandidatesTask.copyAndExclude([selectedPatOOTPhotons]))
(pp_on_AA_2018 | pp_on_PbPb_run3).toModify(selectedPatCandidateSummary.candidates, func = lambda list: list.remove(cms.InputTag("selectedPatOOTPhotons")) )
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@

_pp_on_AA_extraCommands = [
'keep patPackedCandidates_hiPixelTracks_*_*',
'keep patPackedCandidates_packedPFCandidatesRemoved_*_*',
'keep *_packedCandidateMuonID_*_*',
'keep *_slimmedJets_pfCandidates_*',
'keep floatedmValueMap_packedPFCandidateTrackChi2_*_*',
Expand Down
2 changes: 2 additions & 0 deletions PhysicsTools/PatAlgos/python/slimming/lostTracks_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@
from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
phase1Pixel.toModify(lostTracks, covarianceVersion =1 )

from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
run2_miniAOD_pp_on_AA_103X.toModify(lostTracks,inputCandidates = 'cleanedParticleFlow')
11 changes: 11 additions & 0 deletions PhysicsTools/PatAlgos/python/slimming/packedPFCandidates_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@
pfPileUpPFBRECO,
pfNoPileUpPFBRECO
)

from RecoHI.HiJetAlgos.HiBadParticleCleaner_cfi import cleanedParticleFlow

packedPFCandidatesRemoved = packedPFCandidates.clone(
inputCollection = "cleanedParticleFlow:removed",
vertexAssociator = "primaryVertexAssociationCleaned:original"
)

_pp_on_AA_2018_packedPFCandidatesTask = cms.Task(cleanedParticleFlow,packedPFCandidatesRemoved,packedPFCandidatesTask.copy())
from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
run2_miniAOD_pp_on_AA_103X.toReplaceWith(packedPFCandidatesTask,_pp_on_AA_2018_packedPFCandidatesTask)
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,8 @@
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
(pp_on_AA_2018 | pp_on_PbPb_run3).toModify(packedPFCandidates, PuppiSrc = "", PuppiNoLepSrc = "")
from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
run2_miniAOD_pp_on_AA_103X.toModify(packedPFCandidates,
inputCollection = "cleanedParticleFlow",
chargedHadronIsolation = ""
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
produceNoPileUpCollection = cms.bool(False)
)

from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
run2_miniAOD_pp_on_AA_103X.toModify(primaryVertexAssociation,particles = "cleanedParticleFlow")
primaryVertexAssociationCleaned = primaryVertexAssociation.clone(particles = "cleanedParticleFlow:removed")
5 changes: 5 additions & 0 deletions PhysicsTools/PatAlgos/python/slimming/slimmedMuons_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@
from Configuration.ProcessModifiers.miniAOD_skip_trackExtras_cff import miniAOD_skip_trackExtras

(run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17 | pp_on_AA_2018 | miniAOD_skip_trackExtras).toModify(slimmedMuons, trackExtraAssocs = ["slimmedMuonTrackExtras"])
from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
run2_miniAOD_pp_on_AA_103X.toModify(slimmedMuons,
packedPFCandidates = ["packedPFCandidates","packedPFCandidatesRemoved"],
pfCandidates = ["cleanedParticleFlow","cleanedParticleFlow:removed"]
)
4 changes: 3 additions & 1 deletion PhysicsTools/PatAlgos/python/slimming/slimming_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
)

from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
pp_on_AA_2018.toReplaceWith(slimmingTask, slimmingTask.copyAndExclude([slimmedOOTPhotons]))
from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
(pp_on_AA_2018 | pp_on_PbPb_run3).toReplaceWith(slimmingTask, slimmingTask.copyAndExclude([slimmedOOTPhotons]))
from PhysicsTools.PatAlgos.slimming.hiPixelTracks_cfi import hiPixelTracks
(pp_on_AA_2018 | pp_on_PbPb_run3).toReplaceWith(slimmingTask, cms.Task(slimmingTask.copy(), hiPixelTracks))

Expand All @@ -78,6 +78,8 @@
(pp_on_AA_2018 | pp_on_PbPb_run3).toReplaceWith(
slimmingTask,
cms.Task(slimmingTask.copy(), packedCandidateMuonID, packedPFCandidateTrackChi2, lostTrackChi2, centralityBin, hiHFfilters))
from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
run2_miniAOD_pp_on_AA_103X.toReplaceWith(slimmingTask,cms.Task(primaryVertexAssociationCleaned,slimmingTask.copy()))

from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
_phase2_timing_slimmingTask = cms.Task(slimmingTask.copy(),
Expand Down
14 changes: 7 additions & 7 deletions RecoHI/HiCentralityAlgos/python/HiCentrality_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
for e in [pp_on_XeXe_2017, pp_on_AA_2018]:
e.toModify(hiCentrality,
producePixelTracks = True,
srcPixelTracks = "hiConformalPixelTracks",
srcTracks = cms.InputTag("generalTracks"),
srcVertex = cms.InputTag("offlinePrimaryVertices")
)
from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
(pp_on_XeXe_2017 | pp_on_AA_2018 | pp_on_PbPb_run3).toModify(hiCentrality,
producePixelTracks = True,
srcPixelTracks = "hiConformalPixelTracks",
srcTracks = "generalTracks",
srcVertex = "offlinePrimaryVertices"
)

Loading

0 comments on commit 11c67e5

Please sign in to comment.