cmssw icon indicating copy to clipboard operation
cmssw copied to clipboard

EXOnanoAODv1 producers and setup

Open kerstinlovisa opened this issue 5 months ago • 38 comments

PR description:

This PR includes producers and setup for a first version of EXO PAG customizations of nanoAOD, with customization combined from multiple analysis teams working with long-lived particles, including:

  • Displaced muons
  • Displaced electrons
  • Displaced jets (with leptons)
  • Muon detector showers
  • Displaced taus

Previously discussed at the nanoAOD deep dive, within XPOG April 2 2025 and July 9 2025, and within EXO at the EXO workshop and general meeting.

The PR depends on https://github.com/cms-data/RecoTauTag-TrainingFiles/pull/15 PR with training data for the displaced tau tag.

PR validation:

Collections with number of variables and sizes for different datasets has been evaluated: exonanoaodv1_size_table

Timing study done for running AOD -> EXOnanoAODv1 in one step tested on one file from TTto4Q MC dataset, accounting for differences on different machines. The study shows the relative time difference between producing standard nanoAOD and EXOnanoAODv1 as a function of number of events, with less than a factor 2 relative time increase. Screenshot 2025-07-09 at 09 21 29

The test script PhysicsTools/NanoAOD/test/test-exoNano.sh runs CMS driver command for AOD->EXOnanoAODv1 in one step (with --step PAT,NANO:(at)EXO) and works for this setup.

@enibigir @jniedzie

kerstinlovisa avatar Jul 08 '25 15:07 kerstinlovisa

cms-bot internal usage

cmsbuild avatar Jul 08 '25 15:07 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45439

  • There are other open Pull requests which might conflict with changes you have proposed:
    • File Configuration/PyReleaseValidation/python/relval_nano.py modified in PR(s): #48163
    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #48163

cmsbuild avatar Jul 08 '25 15:07 cmsbuild

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45445

  • There are other open Pull requests which might conflict with changes you have proposed:
    • File Configuration/PyReleaseValidation/python/relval_nano.py modified in PR(s): #48163
    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #48163

Code check has found code style and quality issues which could be resolved by applying following patch(s)

  • code-format: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45445/code-format.patch e.g. curl -k https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45445/code-format.patch | patch -p1 You can also run scram build code-format to apply code format directly

cmsbuild avatar Jul 09 '25 08:07 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45446

  • There are other open Pull requests which might conflict with changes you have proposed:
    • File Configuration/PyReleaseValidation/python/relval_nano.py modified in PR(s): #48163
    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #48163

cmsbuild avatar Jul 09 '25 08:07 cmsbuild

Pull request #48502 was updated.

cmsbuild avatar Jul 09 '25 08:07 cmsbuild

enable nano

ftorrresd avatar Jul 09 '25 11:07 ftorrresd

please test

ftorrresd avatar Jul 09 '25 11:07 ftorrresd

-1

Failed Tests: Build ClangBuild Size: This PR adds an extra 80KB to repository Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f12b81/47149/summary.html COMMIT: 7a9ef1ffba7e1a790d62e00c34ef485a679ec824 CMSSW: CMSSW_15_1_X_2025-07-09-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/48502/47149/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation warning when building: See details on the summary page.

Clang Build

I found compilation warning while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' /usr/bin/time -v scram build -k -j 32 COMPILER='llvm compile'

See details on the summary page.

cmsbuild avatar Jul 09 '25 12:07 cmsbuild

While you are working on fixing the compilation problems reported by the automated test, my general suggestion is to control the floating point precision. This could have a potential impact on the event size.

You can do it by providing a precision parameter to Var or providing a 4th argument to addColumn. Examples and references below.

https://github.com/cms-sw/cmssw/blob/86b5751f3018840efdc7ca4e6cf37e00f0a05f22/PhysicsTools/NanoAOD/python/common_cff.py#L17 https://github.com/cms-sw/cmssw/blob/86b5751f3018840efdc7ca4e6cf37e00f0a05f22/DataFormats/NanoAOD/interface/FlatTable.h#L125 https://github.com/cms-sw/cmssw/blob/86b5751f3018840efdc7ca4e6cf37e00f0a05f22/HLTrigger/NGTScouting/plugins/HLTTauTableProducer.cc#L122 https://github.com/cms-sw/cmssw/blob/86b5751f3018840efdc7ca4e6cf37e00f0a05f22/PhysicsTools/NanoAOD/python/met_cff.py#L18

ftorrresd avatar Jul 09 '25 23:07 ftorrresd

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45474

  • There are other open Pull requests which might conflict with changes you have proposed:
    • File Configuration/PyReleaseValidation/python/relval_nano.py modified in PR(s): #48163
    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #48163

Code check has found code style and quality issues which could be resolved by applying following patch(s)

  • code-format: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45474/code-format.patch e.g. curl -k https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45474/code-format.patch | patch -p1 You can also run scram build code-format to apply code format directly

cmsbuild avatar Jul 10 '25 12:07 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45476

  • There are other open Pull requests which might conflict with changes you have proposed:
    • File Configuration/PyReleaseValidation/python/relval_nano.py modified in PR(s): #48163
    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #48163

cmsbuild avatar Jul 10 '25 13:07 cmsbuild

Pull request #48502 was updated.

cmsbuild avatar Jul 10 '25 13:07 cmsbuild

please test

ftorrresd avatar Jul 10 '25 13:07 ftorrresd

-1

Failed Tests: RelVals-INPUT RelVals-NANO Size: This PR adds an extra 32KB to repository Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f12b81/47176/summary.html COMMIT: 03cda4c41e5cfe13e6cb3998787eb15cc318515e CMSSW: CMSSW_15_1_X_2025-07-10-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/48502/47176/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

  • 2500.3212500.321_EXONANOmc150X/step2_EXONANOmc150X.log
  • 2500.3312500.331_EXONANOdata150Xrun3/step2_EXONANOdata150Xrun3.log

RelVals-NANO

  • 2500.3212500.321_EXONANOmc150X/step2_EXONANOmc150X.log
  • 2500.3312500.331_EXONANOdata150Xrun3/step2_EXONANOdata150Xrun3.log

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 4067201
  • DQMHistoTests: Total failures: 81
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4067100
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 215 log files, 184 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

cmsbuild avatar Jul 10 '25 15:07 cmsbuild

Milestone for this pull request has been moved to CMSSW_16_0_X. Please open a backport if it should also go in to CMSSW_15_1_X.

cmsbuild avatar Sep 10 '25 06:09 cmsbuild

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47033

ERROR: Build errors found during clang-tidy run.

src/PhysicsTools/NanoAOD/plugins/DisTauTag.cc:105:12: error: redefinition of '~DisTauTag' [clang-diagnostic-error]
  105 | DisTauTag::~DisTauTag() { cleanupTensorFlow(); }
      |            ^
src/PhysicsTools/NanoAOD/plugins/DisTauTag.cc:61:3: note: previous definition is here
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

cmsbuild avatar Dec 02 '25 08:12 cmsbuild

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47034

  • There are other open Pull requests which might conflict with changes you have proposed:
    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #49477

Code check has found code style and quality issues which could be resolved by applying following patch(s)

  • code-format: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47034/code-format.patch e.g. curl -k https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47034/code-format.patch | patch -p1 You can also run scram build code-format to apply code format directly

cmsbuild avatar Dec 02 '25 08:12 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47035

  • There are other open Pull requests which might conflict with changes you have proposed:
    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #49477

cmsbuild avatar Dec 02 '25 08:12 cmsbuild

Pull request #48502 was updated.

cmsbuild avatar Dec 02 '25 08:12 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47036

  • Found files with invalid states:

    • PhysicsTools/NanoAOD/plugins/GenParticlesExtendedProducer.cc:
      • Added: e48b9c0ef72cd47ceb6877ba11429b8474818464
      • Modified: 5038202be7c227e74c7ad29c7aa7e156c0970b52
      • Deleted: ee45afdffa9b417a932015f3a16518145674eaba
  • There are other open Pull requests which might conflict with changes you have proposed:

    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #49477

cmsbuild avatar Dec 02 '25 08:12 cmsbuild

Pull request #48502 was updated.

cmsbuild avatar Dec 02 '25 08:12 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47046

  • Found files with invalid states:

    • PhysicsTools/NanoAOD/plugins/GenParticlesExtendedProducer.cc:
      • Added: e48b9c0ef72cd47ceb6877ba11429b8474818464
      • Modified: 5038202be7c227e74c7ad29c7aa7e156c0970b52
      • Deleted: ee45afdffa9b417a932015f3a16518145674eaba
  • There are other open Pull requests which might conflict with changes you have proposed:

    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #49477

cmsbuild avatar Dec 03 '25 09:12 cmsbuild

Pull request #48502 was updated.

cmsbuild avatar Dec 03 '25 09:12 cmsbuild

Displaced tau tags are now included in this PR which needs training files in PR cms-data/RecoTauTag-TrainingFiles#15

kerstinlovisa avatar Dec 03 '25 10:12 kerstinlovisa

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47081

  • Found files with invalid states:

    • PhysicsTools/NanoAOD/plugins/GenParticlesExtendedProducer.cc:
      • Added: e48b9c0ef72cd47ceb6877ba11429b8474818464
      • Modified: 5038202be7c227e74c7ad29c7aa7e156c0970b52
      • Deleted: ee45afdffa9b417a932015f3a16518145674eaba
  • There are other open Pull requests which might conflict with changes you have proposed:

    • File PhysicsTools/NanoAOD/plugins/BuildFile.xml modified in PR(s): #49551
    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #49477

cmsbuild avatar Dec 05 '25 14:12 cmsbuild

Pull request #48502 was updated.

cmsbuild avatar Dec 05 '25 14:12 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47095

  • Found files with invalid states:

    • PhysicsTools/NanoAOD/plugins/GenParticlesExtendedProducer.cc:
      • Added: e48b9c0ef72cd47ceb6877ba11429b8474818464
      • Modified: 5038202be7c227e74c7ad29c7aa7e156c0970b52
      • Deleted: ee45afdffa9b417a932015f3a16518145674eaba
  • There are other open Pull requests which might conflict with changes you have proposed:

    • File PhysicsTools/NanoAOD/plugins/BuildFile.xml modified in PR(s): #49551
    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #49477

cmsbuild avatar Dec 08 '25 08:12 cmsbuild

Pull request #48502 was updated.

cmsbuild avatar Dec 08 '25 08:12 cmsbuild

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47097

  • There are other open Pull requests which might conflict with changes you have proposed:
    • File PhysicsTools/NanoAOD/plugins/BuildFile.xml modified in PR(s): #49551
    • File PhysicsTools/NanoAOD/python/autoNANO.py modified in PR(s): #49477

cmsbuild avatar Dec 08 '25 13:12 cmsbuild

Pull request #48502 was updated.

cmsbuild avatar Dec 08 '25 13:12 cmsbuild