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

TauSpinner weight table producer for HTT #45828

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

mbluj
Copy link
Contributor

@mbluj mbluj commented Aug 28, 2024

PR description:

This PR adds and enables in NanoAOD workflow a TauSpinner weight table producer for H->tau,tau samples. The TauSpinner weights allow to weight H->tau,tau events accordingly to different CP hypotheses.

The producer initializes the TauSpinner tool and then produces relevant weight tables only for events with the single-H->tau,tau decays, while for other event types tables are not produced. Therefore, size increase happens only for single-H->tau,tau samples and it is, with proposed setup with 5 different CP hypotheses and 2 weights per hypothesis, ~1.5% (measured with 1k VBF H->tau,tau events).

PR validation:

Validated with standard NanoAOD configuration with H->tau,tau and no H->tau,tau samples.

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:

Backport to 14_1 series is foreseen.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 28, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

  • PhysicsTools/NanoAOD (xpog)

@cmsbuild, @ftorrresd, @hqucms, @vlimant can you please review it and eventually sign? Thanks.
@AnnikaStein, @gpetruc this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@hqucms
Copy link
Contributor

hqucms commented Aug 28, 2024

enable nano

src = 'prunedGenParticles',
name = 'TauSpinner',
theta = [0, 0.25, 0.5, -0.25, 0.375],
pdfSet = 'NNPDF31_nnlo_hessian_pdfas',
Copy link
Contributor

Choose a reason for hiding this comment

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

How is the pdfSet used? Does it need to match the PDF used in the sample production?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that PDFSet used by TauSpinner is relevant when TauSpinner is used to weight Z polarization, but not in the case of CP in the H->tau,tau decays. I will check it and confirm here.
After said this, I think that it will be good to match it with PDF used for sample production, but I don't think it is possible to check it automatically. Is it possible. Anyway, is it not NNPDF 3.1 NNLO which is used by default in current MC productions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked it again and I confirm that PDFSet and cmsE are important only for weighting Z/gamma* events. It is as polarization of Z/gamma* and then taus from its decays depends on production process where PDFSet and cmsE are important inputs. It is not the case for H->tau,tau.
As an "experimental" confirmation of this fact I ran the module with three different PDF sets and different collision energy, and I got identical results.
Because the parameters are irrelevant, I will remove them from list of configurable parameters, and set them to "sensible" defaults with an appropriate comment. When one will want to extend the module for Z/gamma*->tau,tau will clearly know what should be done.

globalTablesTask = cms.Task(beamSpotTable, rhoTable)
globalTablesMCTask = cms.Task(puTable,genTable,genFilterTable)
globalTablesMCTask = cms.Task(puTable,genTable,genFilterTable,tauSpinnerTable)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to add this to genparticles_cff.py instead of globals_cff.

Copy link
Contributor Author

@mbluj mbluj Aug 29, 2024

Choose a reason for hiding this comment

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

TauSpinner weights are global event weights similar to weights for PDF set replicas, etc. But if you think that genparticles_cff.py is better place for it I can move it - please confirm.

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case it probably fits better in genWeightsTable_cfi.py.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll move it there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After checking some thinking I found the the following:

  • the genWeightsTable_cfi.py defines only one module (it is cfi file), namely genWeightsTable producer, and adding other module into this cfi will be misleading (also because of the name of the file);
  • one can prepare a separate cfi file for tauSpinnerTable producer (similar to the genWeightsTable_cfi.py) or keep the producer where it is, i.e. in globals_cff.py, as the TauSpinner weights are global in similar sense as generator weights stored by genTable producer. I prefer the latter option, but I will prepare a new cfi if it is found better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Finally, I decided to create a new dedicated cfi file for tauSpinnerTable producer.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45828/41575

@cmsbuild
Copy link
Contributor

Pull request #45828 was updated. @cmsbuild, @ftorrresd, @hqucms, @vlimant can you please check and sign again.

@mbluj
Copy link
Contributor Author

mbluj commented Sep 2, 2024

ping

@hqucms
Copy link
Contributor

hqucms commented Sep 2, 2024

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2024

+1

Size: This PR adds an extra 12KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ca8557/41225/summary.html
COMMIT: 73e7e05
CMSSW: CMSSW_14_2_X_2024-09-02-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/45828/41225/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 1359 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 79 differences found in the comparisons
  • DQMHistoTests: Total files compared: 44
  • DQMHistoTests: Total histograms compared: 3328315
  • DQMHistoTests: Total failures: 4595
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3323700
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 43 files compared)
  • Checked 193 log files, 163 edm output root files, 44 DQM output files
  • TriggerResults: no differences found

NANO Comparison Summary

Summary:

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.001 2.788 2.788 0.000 ( +0.0% ) 3.31 3.35 -1.4% 6.046 6.115
2500.002 2.901 2.901 0.000 ( +0.0% ) 2.94 3.00 -2.0% 6.472 6.403
2500.003 2.848 2.848 0.000 ( +0.0% ) 3.08 3.11 -0.9% 6.387 6.360
2500.011 1.450 1.450 0.000 ( +0.0% ) 5.75 5.84 -1.6% 2.411 2.403
2500.012 1.909 1.909 0.000 ( +0.0% ) 3.09 3.18 -2.7% 2.220 2.590
2500.013 1.765 1.765 0.000 ( +0.0% ) 4.53 4.60 -1.6% 2.512 2.484
2500.021 0.022 0.022 0.000 ( +0.0% ) 0.97 0.99 -1.8% 2.222 2.208
2500.022 0.022 0.022 0.000 ( +0.0% ) 0.93 0.95 -1.8% 2.223 2.206
2500.023 0.022 0.022 0.000 ( +0.0% ) 0.93 0.94 -1.4% 2.177 2.154
2500.024 0.022 0.022 0.000 ( +0.0% ) 0.69 0.72 -4.5% 2.311 2.313
2500.031 0.035 0.035 0.000 ( +0.0% ) 0.87 0.87 -0.1% 2.313 2.306
2500.032 0.036 0.036 0.000 ( +0.0% ) 0.88 0.91 -3.3% 2.265 2.257
2500.033 0.037 0.037 0.000 ( +0.0% ) 0.80 0.81 -1.8% 2.363 2.354
2500.034 0.036 0.036 0.000 ( +0.0% ) 0.79 0.83 -4.9% 2.343 2.330
2500.101 2.646 2.646 0.000 ( +0.0% ) 8.72 8.99 -3.0% 6.293 6.891
2500.111 1.330 1.330 0.000 ( +0.0% ) 20.02 20.89 -4.2% 2.225 2.218
2500.112 1.735 1.735 0.000 ( +0.0% ) 14.68 13.68 +7.3% 2.130 2.122
2500.131 5.194 5.194 0.000 ( +0.0% ) 15.52 15.87 -2.3% 1.540 1.534
2500.201 2.478 2.478 0.000 ( +0.0% ) 7.37 7.67 -3.9% 6.130 6.127
2500.211 1.592 1.592 0.000 ( +0.0% ) 16.98 17.80 -4.6% 2.089 2.105
2500.212 2.033 2.033 0.000 ( +0.0% ) 13.54 14.12 -4.1% 2.139 2.121
2500.221 2.006 2.006 0.000 ( +0.0% ) 7.58 7.67 -1.3% 2.282 2.236
2500.222 3.206 3.206 0.000 ( +0.0% ) 6.82 7.47 -8.7% 2.336 2.294
2500.223 8.888 8.888 0.000 ( +0.0% ) 2.73 2.80 -2.3% 2.321 2.307
2500.224 5.515 5.515 0.000 ( +0.0% ) 1.09 1.10 -0.4% 2.559 2.386
2500.225 5.533 5.533 0.000 ( +0.0% ) 0.98 1.02 -4.2% 2.434 2.407
2500.226 2.973 2.973 0.000 ( +0.0% ) 7.30 7.62 -4.2% 2.316 2.284
2500.227 8.972 8.972 0.000 ( +0.0% ) 10.06 10.32 -2.5% 1.406 1.365
2500.231 1.407 1.407 0.000 ( +0.0% ) 12.89 13.46 -4.2% 1.944 1.957
2500.232 2.237 2.237 0.000 ( +0.0% ) 12.95 13.81 -6.2% 2.008 2.023
2500.233 4.670 4.670 0.000 ( +0.0% ) 4.77 4.94 -3.4% 2.016 2.019
2500.234 3.307 3.307 0.000 ( +0.0% ) 1.49 1.52 -2.1% 2.065 2.054
2500.235 3.317 3.317 0.000 ( +0.0% ) 1.38 1.39 -0.7% 2.094 2.084
2500.236 2.085 2.085 0.000 ( +0.0% ) 13.59 13.99 -2.9% 2.017 2.022
2500.237 7.977 7.977 0.000 ( +0.0% ) 14.43 14.67 -1.6% 1.416 1.398
2500.241 9.405 9.405 0.000 ( +0.0% ) 3.72 3.80 -2.3% 1.767 1.760
2500.242 10.331 10.331 0.000 ( +0.0% ) 0.89 0.91 -2.1% 1.728 1.720
2500.243 2.712 2.712 0.000 ( +0.0% ) 8.14 8.62 -5.5% 1.065 1.064
2500.244 485.976 485.976 0.000 ( +0.0% ) 0.55 0.57 -3.1% 1.599 1.601
2500.245 823.224 823.224 0.000 ( +0.0% ) 0.71 0.76 -6.5% 1.581 1.581
2500.901 1.749 1.749 0.000 ( +0.0% ) 21.22 21.40 -0.9% 1.834 1.794
2500.902 1.598 1.598 0.000 ( +0.0% ) 21.37 22.25 -3.9% 1.767 1.756
2500.911 13.931 13.931 0.000 ( +0.0% ) 2.87 3.23 -11.1% 1.083 1.082
2500.912 0.171 0.150 0.020 ( +13.6% ) 1.35 1.39 -3.1% 0.966 0.969
2500.913 0.110 0.110 0.000 ( +0.0% ) 1.20 1.21 -0.5% 0.971 0.975

@hqucms
Copy link
Contributor

hqucms commented Sep 9, 2024

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 9, 2024

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

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 27d96c7 into cms-sw:master Sep 9, 2024
13 checks passed
@mbluj mbluj deleted the CMSSW_14_1_X_TauSpinnerTable branch November 12, 2024 13:15
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.

4 participants