cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.09k stars 4.33k forks source link

Protect TauSpinnerTable producer against crash with samples with HTT mixed with other processes #46679

Closed mbluj closed 1 week ago

mbluj commented 1 week ago

PR description:

This PR fixes TauSpinnerTableProducer (introduced in #45828) against an issue caused by samples with events containing the H->tau,tau (HTT) decay mixed with events without this decay. Examples of such samples were discussed in https://cms-talk.web.cern.ch/t/higgs-in-wz-amcatnlofxfx-samples/55138.

The nanoAOD production crashes in such samples as the TauSpinnerTableProducer produces a non-empty table for events with the HTT decay while empty one for events without it which leads to an inconsistent output across different events which then confuses the output module.

The fix consists of producing tables with default weights for events without HTT ensuring consistency, but for price of producing not needed numbers. To be noted that similar strategy is employed in case of HTXS tables. Overhead due to this should be limited as tables with constant values are efficiently compressed.

PR validation:

Validated by processing samples with events containing the HTT decay, without the HTT decay and mixed with and without.

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:

No backport expected.

cmsbuild commented 1 week ago

cms-bot internal usage

cmsbuild commented 1 week ago

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46679/42606

cmsbuild commented 1 week ago

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

It involves the following packages:

@cmsbuild, @ftorrresd, @hqucms 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 commented 1 week ago

enable nano

hqucms commented 1 week ago

please test

cmsbuild commented 1 week ago

+1

Size: This PR adds an extra 12KB to repository Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8948f5/42772/summary.html COMMIT: 76197dbbfb0948eae3bab52b4fa2916fd6db432a CMSSW: CMSSW_14_2_X_2024-11-12-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/46679/42772/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

There are some workflows for which there are errors in the baseline: 2024.101001 step 1 2024.202001 step 1 2024.303001 step 1 The results for the comparisons for these workflows could be incomplete This means most likely that the IB is having errors in the relvals.The error does NOT come from this pull request

Summary:

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 3.053 3.052 0.001 ( +0.0% ) 2.71 2.71 +0.1% 2.520 2.523
2500.002 3.165 3.164 0.001 ( +0.0% ) 2.43 2.45 -0.8% 2.943 2.953
2500.003 3.107 3.105 0.002 ( +0.1% ) 2.54 2.56 -0.9% 2.931 2.933
2500.011 1.621 1.621 0.000 ( +0.0% ) 4.14 4.22 -1.9% 2.609 2.611
2500.012 2.153 2.153 0.000 ( +0.0% ) 2.53 2.55 -0.6% 2.800 2.800
2500.013 1.975 1.975 0.000 ( +0.0% ) 3.46 3.55 -2.5% 2.708 2.718
2500.021 0.022 0.022 0.000 ( +0.0% ) 0.86 0.86 -0.4% 2.560 2.555
2500.022 0.022 0.022 0.000 ( +0.0% ) 0.81 0.83 -3.0% 2.557 2.564
2500.023 0.022 0.022 0.000 ( +0.0% ) 0.81 0.83 -1.5% 2.411 2.421
2500.024 0.022 0.022 0.000 ( +0.0% ) 0.63 0.63 -1.0% 2.652 2.637
2500.031 0.035 0.035 0.000 ( +0.0% ) 0.75 0.75 +0.5% 2.627 2.633
2500.032 0.036 0.036 0.000 ( +0.0% ) 0.75 0.76 -1.6% 2.590 2.583
2500.033 0.037 0.037 0.000 ( +0.0% ) 0.69 0.71 -2.9% 2.661 2.673
2500.034 0.036 0.036 0.000 ( +0.0% ) 0.70 0.70 -0.4% 2.656 2.651
2500.101 2.791 2.788 0.004 ( +0.1% ) 6.52 6.71 -2.9% 2.614 2.616
2500.111 1.447 1.447 0.000 ( +0.0% ) 13.03 13.27 -1.8% 2.323 2.320
2500.112 1.867 1.867 0.000 ( +0.0% ) 11.09 11.08 +0.1% 2.397 2.395
2500.131 0.747 0.747 0.000 ( +0.0% ) 17.08 17.44 -2.1% 1.514 1.520
2500.201 2.618 2.617 0.001 ( +0.0% ) 5.54 5.57 -0.5% 2.171 2.171
2500.211 1.786 1.786 0.000 ( +0.0% ) 11.30 11.43 -1.1% 2.384 2.389
2500.212 2.182 2.182 0.000 ( +0.0% ) 9.58 9.97 -3.9% 2.473 2.473
2500.221 2.030 2.028 0.002 ( +0.1% ) 5.86 5.93 -1.1% 2.099 2.095
2500.222 3.417 3.415 0.002 ( +0.1% ) 5.48 5.53 -1.0% 2.194 2.188
2500.223 9.382 9.380 0.002 ( +0.0% ) 1.69 1.70 -0.7% 2.266 2.263
2500.224 6.066 6.063 0.002 ( +0.0% ) 0.57 0.57 -0.8% 2.206 2.206
2500.225 6.113 6.111 0.002 ( +0.0% ) 0.53 0.54 -0.6% 2.424 2.424
2500.226 3.111 3.109 0.002 ( +0.1% ) 5.61 5.75 -2.6% 2.188 2.183
2500.227 1.437 1.437 0.000 ( +0.0% ) 11.09 11.22 -1.1% 1.431 1.433
2500.231 1.449 1.449 0.000 ( +0.0% ) 9.36 9.58 -2.3% 2.278 2.285
2500.232 2.441 2.441 0.000 ( +0.0% ) 8.88 9.17 -3.2% 2.382 2.384
2500.233 4.933 4.933 0.000 ( +0.0% ) 2.51 2.52 -0.5% 2.452 2.445
2500.234 3.700 3.700 0.000 ( +0.0% ) 0.72 0.73 -1.0% 2.174 2.174
2500.235 3.730 3.730 0.000 ( +0.0% ) 0.69 0.70 -1.3% 2.374 2.368
2500.236 2.232 2.232 0.000 ( +0.0% ) 9.48 9.51 -0.3% 2.385 2.381
2500.237 1.016 1.016 0.000 ( +0.0% ) 16.26 16.31 -0.3% 1.461 1.440
2500.241 9.404 9.404 0.000 ( +0.0% ) 3.43 3.42 +0.0% 1.926 1.914
2500.242 10.331 10.331 0.000 ( +0.0% ) 0.83 0.82 +0.9% 1.711 1.274
2500.243 2.712 2.712 0.000 ( +0.0% ) 7.67 7.19 +6.6% 1.083 1.077
2500.244 485.976 485.976 0.000 ( +0.0% ) 0.53 0.53 -1.0% 1.681 1.677
2500.245 823.202 823.202 0.000 ( +0.0% ) 0.69 0.71 -2.1% 1.663 1.686
2500.901 1.777 1.777 0.000 ( +0.0% ) 19.58 19.57 +0.0% 1.419 1.418
2500.902 1.626 1.626 0.000 ( +0.0% ) 19.40 20.41 -4.9% 1.325 1.323
2500.911 13.995 13.995 0.000 ( +0.0% ) 1.98 3.30 -40.0% 1.091 1.083
2500.912 0.199 0.199 0.000 ( +0.0% ) 1.18 1.31 -9.9% 0.972 0.978
2500.913 0.110 0.110 0.000 ( +0.0% ) 1.13 1.10 +3.3% 0.980 0.977
hqucms commented 1 week ago

+1

cmsbuild commented 1 week ago

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

mandrenguyen commented 1 week ago

+1