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

Unify vertex association between CHS and PUPPI #33885

Merged
merged 19 commits into from Sep 14, 2021

Conversation

ahinzmann
Copy link
Contributor

@ahinzmann ahinzmann commented May 28, 2021

PR description:

Track-vertex association handling is quite inhomogeneous across CMSSW.
While the ultimate goal is to fully unify vertex association across CHS and PUPPI for Run3 and the use of timing information in CHS and PUPPI for Phase-2, this PR enables technically to study+synchronize them, while not significantly changing the current behavior of CHS and PUPPI.

  1. Use a single module in CMSSW for all track-vertex association done for PackedCandidates and CHS and PUPPI:
    "CommonTools/RecoAlgos/src/PrimaryVertexAssignment.cc"
  2. Move "PhysicsTools.PatAlgos.slimming.primaryVertexAssociation_cfi" to "CommonTools.RecoAlgos.primaryVertexAssociation_cfi"
  3. Remove usage of fromPV for CHS and PUPPI, and instead make use of a common track vertex association map in a common config file:
    "packedPrimaryVertexAssociationJME"
    "CommonTools/ParticleFlow/python/pfCHS_cff.py"
  4. Enable CHS to use advanced track-vertex association via a map like PackedCandidates and PUPPI, via two producers at AOD and MiniAOD level:
    "CommonTools/ParticleFlow/plugins/PFPileUp.cc" (AOD)
    "CommonTools/ParticleFlow/plugins/PFNoPileUpPacked.cc" (MiniAOD)
  5. The behavior of CHS is slightly modified by applying a criterion to recover cases where the primary vertex is split in sync with PUPPI (Now L71 in CommonTools/RecoAlgos/src/PrimaryVertexAssignment.cc). In this way, vertex association based on UsedInFit is the same for PUPPI and CHS and they only differ (until further unified) in additional requirements based on dz for PUPPI.

Performance tested in CMSSW_11_1_8 using HLT-TDR samples with this backport:
https://github.com/cms-sw/cmssw/compare/CMSSW_11_1_X...ahinzmann:primaryVertexAssociationJME?expand=1
Validation presented at RECO on Aug 20th and PF meetings on June 4th:
https://indico.cern.ch/event/1067481/#67-unified-vertex-association
https://indico.cern.ch/event/1045967/#40-track-primary-vertex-associ

PR validation:

scram b runtests

runTheMatrix -l limited

MiniAOD output of 25202.0 CHS jets were found to agree 100%. PUPPI jets were found to agree within <1%.

if this PR is a backport please specify the original PR and why you need to backport that PR:

No backport planned.
Will provide a synchronized analysis recipe for studies based on HLT-TDR samples.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33885/22925

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @ahinzmann for master.

It involves the following packages:

CommonTools/ParticleFlow
CommonTools/PileupAlgos
CommonTools/RecoAlgos
PhysicsTools/PatAlgos
PhysicsTools/PatUtils
RecoBTag/ONNXRuntime
RecoJets/JetProducers

@perrotta, @jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@rappoccio, @gouskos, @yslai, @abbiendi, @emilbols, @mbluj, @seemasharmafnal, @mmarionncern, @makortel, @jhgoh, @jdolen, @ferencek, @jdamgov, @nhanvtran, @gkasieczka, @schoef, @mariadalfonso, @clelange, @swozniewski, @JyothsnaKomaragiri, @hatakeyamak, @cbernet, @gpetruc, @andrzejnovak this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@slava77
Copy link
Contributor

slava77 commented May 29, 2021

@ahinzmann
there are merge conflicts in PhysicsTools/PatAlgos/python/slimming/ primaryVertexAssociation_cfi and slimming_cff files

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33885/22954

@cmsbuild
Copy link
Contributor

Pull request #33885 was updated. @perrotta, @andrius-k, @jordan-martins, @kmaeshima, @wajidalikhan, @ErnestaP, @kpedro88, @cmsbuild, @chayanit, @srimanob, @jfernan2, @ahmad3213, @slava77, @jpata, @rvenditti can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 6, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33885/25091

  • This PR adds an extra 36KB to repository

  • Found files with invalid states:

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 6, 2021

Pull request #33885 was updated. @jpata, @cmsbuild, @slava77 can you please check and sign again.

@jpata
Copy link
Contributor

jpata commented Sep 6, 2021

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 6, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ae744e/18334/summary.html
COMMIT: d216e83
CMSSW: CMSSW_12_1_X_2021-09-05-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/33885/18334/install.sh to create a dev area with all the needed externals and cmssw changes.

CMS StaticAnalyzer warnings: There are 4 EventSetupRecord::get warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ae744e/18334/llvm-analysis/esrget-sa.txt for details.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 7943 differences found in the comparisons
  • DQMHistoTests: Total files compared: 39
  • DQMHistoTests: Total histograms compared: 3001001
  • DQMHistoTests: Total failures: 6676
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2994302
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 38 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 165 log files, 37 edm output root files, 39 DQM output files
  • TriggerResults: found differences in 1 / 38 workflows

@jpata
Copy link
Contributor

jpata commented Sep 9, 2021

Going through the reco changes, I still see the changes to puppi MET, which I understand is expected: #33885 (comment)
image
https://cmssdt.cern.ch/SDT/jenkins-artifacts/baseLineComparisons/CMSSW_12_1_X_2021-09-05-2300+ae744e/45242/validateJR/all_OldVSNew_TTbar13nanoEDM106Xv1in2017wf1325p81/all_OldVSNew_TTbar13nanoEDM106Xv1in2017wf1325p81c_nanoaodFlatTable_puppiMetTable__DQM_obj_floats__pt_341.png

There are also slight changes PF jets, isolations and btags, per the presentation at the reco meeting on August 20, I understand this is expected.
image
https://cmssdt.cern.ch/SDT/jenkins-artifacts/baseLineComparisons/CMSSW_12_1_X_2021-09-05-2300+ae744e/45242/validateJR/all_OldVSNew_TTbar14TeV2023wf12434p0/all_OldVSNew_TTbar14TeV2023wf12434p0c_log10recoPFJets_ak4PFJetsCHS__RECO_obj_et.png

I don't notice any unrelated changes in the reco checks.

@ahinzmann could you please update the PR description with the slide link to the reco meeting ("validation presented at PF meeting on June 4th" seems like it didn't happen). Nevermind, I see the presentation was given by Anna.

@jpata
Copy link
Contributor

jpata commented Sep 13, 2021

+reconstruction

  • for d216e83
  • unifies the vertex association between CHS and Puppi (details in the slides linked in the description)
  • consequently, small changes expected and observed in CHS and Puppi jets and Puppi MET, b-taggers
  • no other reco changes observed

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

+1

  • Small changes in CHS and Puppi jets and Puppi MET, b-taggers are expected, due to the unification of the vertex association code

@arizzi
Copy link
Contributor

arizzi commented Oct 7, 2021

can you clarify if the association information can be retrieved from MiniAOD and if this is breaking the usage of PackedCandidate format PV related accessors?

iVertex = vtxIdMinSignif;
// protect high pT particles from association to pileup vertices and assign them to the first vertex
if ((fPtMaxCharged_ > 0) && (vtxIdMinSignif >= 0) && (track->pt() > fPtMaxCharged_)) {
iVertex = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

how can we correctly compute the score of the PV for ranking if we protect "iVertex = 0 " ??

Copy link
Contributor

Choose a reason for hiding this comment

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

in fact why this need to be done here? the pt check / protection can be done in the calling code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants