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

Lepton time-life info for NanoAOD #43525

Merged
merged 7 commits into from
Feb 21, 2024

Conversation

mbluj
Copy link
Contributor

@mbluj mbluj commented Dec 8, 2023

PR description:

This PR adds a customization to add lepton time-life related information to NanoAOD. The information contains:

  • (refitted) secondary vertex for 3-prong taus (with covariance matrix),
  • impact parameter vector (with significance) of the electron, muon and tau tracks wrt PV fitted with beam-spot constraint,
  • parameters of electron, muon and tau tracks (with covariance matrix),
  • primary vertex with beam-spot constraint (position and covariance matrix).

All those variables are used in the measurement of CP structure of the Higgs-tau Yukawa coupling and related analyses, e.g. measurement of polarization of Z in decays to taus.

Technically all lepton time-life variables are stored in a newly introduced data-format TrackTimeLifeInfo produced by a new producer PATLeptonTimeLifeInfoProducer (a template class instantiated for pat::Electron, pat::Muon and pat::Tau) and then added by an instance of simple table producer. The PV with BS information is stored with a new instance (for reco::Vertex) of a simple table producer.
In the case of Run-2 input samples the PV with the BS constraint is produced with a custom producer (PATRefitVertexProducer) with miniAOD inputs (a new reco::Vertex collection with one item) as vertices with BS are not available in those samples.

In case a given new variable is not computed, e.g. SV for 1-prong taus or variables for a lepton is not passing selection, zeros are stored which are then effectively compressed in an output file.

PR validation:

Validated using 2022 and 2018 TTbar samples with customized default NanoAOD workflow obtained as follows:

cmsDriver.py --python_filename NanoAOD_lifeTimeCustom_cfg.py --eventcontent NANOAODSIM --customise_commands="process.add_(cms.Service('InitRootHandlers',EnableIMT = cms.untracked.bool(False)));process.MessageLogger.cerr.FwkReport.reportEvery=1000" --datatier NANOAODSIM --fileout file:NanoAOD_lifeTimeCustom.root --conditions auto:phase1_2018_realistic --step NANO:@LepTimeLife --filein file:some_ttbar2018file.root --era Run2_2018,run2_nanoAOD_106Xv2 --no_exec --mc -n -1

Added variables increase size of NanoAOD by ~8.5% (wrt 14_0_0_pre1 default) which is distributed between taus (~3%), electrons and muons (~2% each) and PV with BS (~1%)
In the current setup the variables are added to default workflow with LepTimeLife customization defining extended NANO step like this --step NANO:@LepTimeLife.

Presentation at the XPOG meeting: link

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

It is foreseen to backport to 14_0_X.

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 8, 2023

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43525/38107

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 8, 2023

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

It involves the following packages:

  • DataFormats/NanoAOD (xpog)
  • PhysicsTools/NanoAOD (xpog)
  • PhysicsTools/PatAlgos (reconstruction, xpog)

@cmsbuild, @vlimant, @jfernan2, @simonepigazzini, @mandrenguyen can you please review it and eventually sign? Thanks.
@emilbols, @seemasharmafnal, @andrzejnovak, @mbluj, @jdolen, @gkasieczka, @JyothsnaKomaragiri, @schoef, @nhanvtran, @jdamgov, @hatakeyamak, @ahinzmann, @azotz, @rovere, @gpetruc, @Senphy, @gouskos, @Ming-Yan, @mmarionncern, @missirol, @mariadalfonso, @AnnikaStein, @AlexDeMoor, @rappoccio, @demuller this is something you requested to watch as well.
@sextonkennedy, @rappoccio, @antoniovilela you are the release manager for this.

cms-bot commands are listed here

@vlimant
Copy link
Contributor

vlimant commented Dec 11, 2023

enable nano

@vlimant
Copy link
Contributor

vlimant commented Dec 11, 2023

hell @mbluj are you able to present this at the upcoming xpog meeting (dec 13) ?

@mbluj
Copy link
Contributor Author

mbluj commented Dec 11, 2023

hell @mbluj are you able to present this at the upcoming xpog meeting (dec 13) ?

I am participating at L1 workshop, but I can try to prepare a short presentation.

@mbluj
Copy link
Contributor Author

mbluj commented Dec 13, 2023

hell @mbluj are you able to present this at the upcoming xpog meeting (dec 13) ?

I am participating at L1 workshop, but I can try to prepare a short presentation.

I prepared a couple of slides, could you, please, give me a slot in agenda of the meeting?

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43525/38289

@cmsbuild
Copy link
Contributor

Pull request #43525 was updated. @cmsbuild, @hqucms, @jfernan2, @mandrenguyen, @vlimant can you please check and sign again.

@mbluj
Copy link
Contributor Author

mbluj commented Dec 22, 2023

The two last commits address review comments (hopefully):

  • Auxillary TimeLifeInfo class moved from DataFormats/NanoAOD to DataFormats/VertexReco and renamed as suggested,
  • Definition of variables dumped to tables decoupled from definition of simple table producers,
  • Removed "heavy" use #typedef in Vertex and TimeLifeInfo table producers.

If the changes in this PR are accepted I will add newly added variables to NanoAOD DQM as this is still missing.

@mbluj
Copy link
Contributor Author

mbluj commented Jan 9, 2024

@vlimant, I wonder if you have had time to review update of this PR? Do you have any further comments?

@cmsbuild
Copy link
Contributor

Pull request #43525 was updated. @hqucms, @jfernan2, @cmsbuild, @vlimant, @mandrenguyen can you please check and sign again.

@vlimant
Copy link
Contributor

vlimant commented Feb 20, 2024

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4f2664/37588/summary.html
COMMIT: bef9e17
CMSSW: CMSSW_14_1_X_2024-02-20-1100/el8_amd64_gcc12
Additional Tests: NANO
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/43525/37588/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

NANO Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 15
  • DQMHistoTests: Total histograms compared: 16430
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 16430
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 14 files compared)
  • Checked 38 log files, 18 edm output root files, 15 DQM output files

Nano size comparison Summary:

Sample kb/ev ref kb/ev diff kb/ev ev/s/thd ref ev/s/thd diff rate mem/thd ref mem/thd
2500.0 2.551 2.551 0.000 ( +0.0% ) 5.23 5.30 -1.2% 2.237 2.221
2500.001 2.700 2.700 0.000 ( +0.0% ) 4.65 4.76 -2.3% 2.686 2.652
2500.002 2.641 2.641 0.000 ( +0.0% ) 4.87 4.91 -0.8% 2.676 2.655
2500.01 1.322 1.322 0.000 ( +0.0% ) 9.57 9.83 -2.6% 2.366 2.291
2500.011 1.745 1.745 0.000 ( +0.0% ) 5.23 5.21 +0.5% 2.547 2.468
2500.012 1.586 1.586 0.000 ( +0.0% ) 7.59 7.52 +0.8% 2.466 2.430
2500.1 2.194 2.194 0.000 ( +0.0% ) 5.32 5.32 -0.0% 2.087 2.070
2500.2 2.310 2.310 0.000 ( +0.0% ) 6.07 6.00 +1.2% 2.000 1.983
2500.21 1.185 1.185 0.000 ( +0.0% ) 4.31 4.40 -2.1% 2.294 2.260
2500.211 1.549 1.549 0.000 ( +0.0% ) 3.74 3.82 -1.9% 2.382 2.340
2500.3 2.060 2.060 0.000 ( +0.0% ) 12.71 12.68 +0.2% 1.988 1.966
2500.31 1.257 1.257 0.000 ( +0.0% ) 20.13 20.02 +0.6% 2.381 2.357
2500.311 1.646 1.646 0.000 ( +0.0% ) 12.18 12.82 -5.0% 2.461 2.409
2500.312 7.159 7.159 0.000 ( +0.0% ) 1.39 1.46 -4.8% 1.703 1.690
2500.313 1.564 1.564 0.000 ( +0.0% ) 6.78 6.69 +1.3% 1.056 1.042
2500.4 2.060 2.060 0.000 ( +0.0% ) 12.68 12.75 -0.6% 1.985 1.967
2500.5 19.575 19.575 0.000 ( +0.0% ) 1.36 1.27 +6.7% 1.372 1.354

@mandrenguyen
Copy link
Contributor

+reconstruction

@vlimant
Copy link
Contributor

vlimant commented Feb 21, 2024

+1

@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. @sextonkennedy, @rappoccio, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@vlimant
Copy link
Contributor

vlimant commented Feb 21, 2024

please prepare the backport PR asap

@mbluj
Copy link
Contributor Author

mbluj commented Feb 21, 2024

please prepare the backport PR asap

OK. Can I backport the new typed value map table producer together with this development or two separate PR should be prepared? Or the producer is already backported?

@vlimant
Copy link
Contributor

vlimant commented Feb 21, 2024

backport both at the same time please

@mbluj
Copy link
Contributor Author

mbluj commented Feb 21, 2024

For reference: backported to 14_0_X in #44040.

@rappoccio
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit aeadc17 into cms-sw:master Feb 21, 2024
13 checks passed
@vlimant
Copy link
Contributor

vlimant commented Feb 22, 2024

please work on a PR with a test workflow in the nano matrix for this feature ; following the example for MUO, EGM, etc (no need to have it in backport though)

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.

6 participants