Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding offlineVerticesWithBS to miniAOD #33778

Merged
merged 6 commits into from
May 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
'drop *_*_genJets_*',
'keep *_offlineBeamSpot_*_*',
'keep *_offlineSlimmedPrimaryVertices_*_*',
'keep *_offlineSlimmedPrimaryVerticesWithBS_*_*',
'keep patPackedCandidates_packedPFCandidates_*_*',
'keep *_isolatedTracks_*_*',
# low energy conversions for BPH
Expand All @@ -66,8 +67,8 @@
'keep *_l1extraParticles_*_*',
'keep L1GlobalTriggerReadoutRecord_gtDigis_*_*',
# stage 2 L1 trigger
'keep GlobalExtBlkBXVector_simGtExtUnprefireable_*_*',
'keep *_gtStage2Digis__*',
'keep GlobalExtBlkBXVector_simGtExtUnprefireable_*_*',
'keep *_gtStage2Digis__*',
'keep *_gmtStage2Digis_Muon_*',
'keep *_caloStage2Digis_Jet_*',
'keep *_caloStage2Digis_Tau_*',
Expand Down Expand Up @@ -172,6 +173,7 @@
cms.untracked.PSet(branch = cms.untracked.string("patPackedGenParticles_packedGenParticles__*"),splitLevel=cms.untracked.int32(99)),
cms.untracked.PSet(branch = cms.untracked.string("patJets_slimmedJets__*"),splitLevel=cms.untracked.int32(99)),
cms.untracked.PSet(branch = cms.untracked.string("recoVertexs_offlineSlimmedPrimaryVertices__*"),splitLevel=cms.untracked.int32(99)),
cms.untracked.PSet(branch = cms.untracked.string("recoVertexs_offlineSlimmedPrimaryVerticesWithBS__*"),splitLevel=cms.untracked.int32(99)),
cms.untracked.PSet(branch = cms.untracked.string("recoCaloClusters_reducedEgamma_reducedESClusters_*"),splitLevel=cms.untracked.int32(99)),
cms.untracked.PSet(branch = cms.untracked.string("EcalRecHitsSorted_reducedEgamma_reducedEBRecHits_*"),splitLevel=cms.untracked.int32(99)),
cms.untracked.PSet(branch = cms.untracked.string("EcalRecHitsSorted_reducedEgamma_reducedEERecHits_*"),splitLevel=cms.untracked.int32(99)),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import FWCore.ParameterSet.Config as cms

offlineSlimmedPrimaryVerticesWithBS = cms.EDProducer("PATVertexSlimmer",
src = cms.InputTag("offlinePrimaryVerticesWithBS"),
score = cms.InputTag("primaryVertexWithBSAssociation","original"),
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
from CommonTools.RecoAlgos.sortedPFPrimaryVertices_cfi import sortedPFPrimaryVertices

primaryVertexAssociation = sortedPFPrimaryVertices.clone(
qualityForPrimary = cms.int32(2),
produceSortedVertices = cms.bool(False),
producePileUpCollection = cms.bool(False),
produceNoPileUpCollection = cms.bool(False)
qualityForPrimary = 2,
produceSortedVertices = False,
producePileUpCollection = False,
produceNoPileUpCollection = False
)

primaryVertexWithBSAssociation = primaryVertexAssociation.clone(
vertices = "offlinePrimaryVerticesWithBS"
)

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")

run2_miniAOD_pp_on_AA_103X.toModify(primaryVertexWithBSAssociation,particles = "cleanedParticleFlow")
primaryVertexWithBSAssociationCleaned = primaryVertexWithBSAssociation.clone(particles = "cleanedParticleFlow:removed")
Comment on lines +18 to +20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sincerely I placed it for consistency, for me we may erase it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mandrenguyen @abaty could you please give your advice about the possible need of these offlineVerticesWithBS for HI?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have offlinePrimaryVerticesWithBS in HI miniAOD as well. I checked the increase in size on 100 events of wf 140.5611 and it looks negligible, around 0.1%. PU is so low in PbPb that multiple vertices are more likely to come from vertex splitting. So perhaps this is not unexpected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have offlinePrimaryVerticesWithBS in HI miniAOD as well. I checked the increase in size on 100 events of wf 140.5611 and it looks negligible, around 0.1%. PU is so low in PbPb that multiple vertices are more likely to come from vertex splitting. So perhaps this is not unexpected.

Great, thank you Matt,
Therefore, this part can remain as it is,

6 changes: 5 additions & 1 deletion PhysicsTools/PatAlgos/python/slimming/slimming_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from PhysicsTools.PatAlgos.slimming.lostTracks_cfi import *
from PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVertices_cfi import *
from PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVertices4D_cfi import *
from PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVerticesWithBS_cfi import *
from PhysicsTools.PatAlgos.slimming.primaryVertexAssociation_cfi import *
from PhysicsTools.PatAlgos.slimming.genParticles_cff import *
from PhysicsTools.PatAlgos.slimming.selectedPatTrigger_cfi import *
Expand Down Expand Up @@ -34,7 +35,9 @@
lostTracks,
isolatedTracks,
offlineSlimmedPrimaryVertices,
offlineSlimmedPrimaryVerticesWithBS,
primaryVertexAssociation,
primaryVertexWithBSAssociation,
genParticlesTask,
selectedPatTrigger,
slimmedPatTrigger,
Expand Down Expand Up @@ -82,10 +85,11 @@
lostTrackChi2 = packedPFCandidateTrackChi2.clone(candidates = "lostTracks", doLostTracks = True)

pp_on_AA.toReplaceWith(
slimmingTask,
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()))
run2_miniAOD_pp_on_AA_103X.toReplaceWith(slimmingTask,cms.Task(primaryVertexWithBSAssociationCleaned,slimmingTask.copy()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here: insertion to be agreed with @mandrenguyen @abaty


from RecoHI.HiTracking.miniAODVertexRecovery_cff import offlinePrimaryVerticesRecovery, offlineSlimmedPrimaryVerticesRecovery
pp_on_AA.toReplaceWith(
Expand Down