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

Removing clang warning in EgammaHLTPixelMatchVarProducer #46488

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Sam-Harper
Copy link
Contributor

PR description:

This PR fixes the clang warning reported in #46319

The warning was harmless but in looking at the code, figured would make it a bit more robust against bad data (and if we ever added a new pixel layer unlikely that it is)

So the code now explicitly verfies that the value is in range and throws an exception if caused. I also strongly suspect but did not prove 100% that numeric_limits::max is an invalid value for this specific quanity and put that as an exception as well. I'm running over a bunch of data to verify this (about 20k HLTPhysics events and will try to run on an EGamma file)

Finally it should be noted that this code is only run if productsToWrite = 2 which is only done for debugging when we wish to dump the values of this producer for studies. So it doesnt normally run in the HLT and I dont believe there is any workflow that runs this code.

So this should be a zero output change. As this code does not run normally and when it does run the data should always pass these checks.

PR validation:

Runs as expected on my local machine based on HLT timing data. Will run on E/gamma data later with productsToWrite=2 later.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 23, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46488/42343

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Sam-Harper for master.

It involves the following packages:

  • RecoEgamma/EgammaHLTProducers (hlt)

@Martin-Grunewald, @cmsbuild, @mmusich can you please review it and eventually sign? Thanks.
@Fedespring, @HuguesBrun, @Prasant1993, @a-kapoor, @afiqaize, @cericeci, @jainshilpi, @lgray, @missirol, @mmusich, @ram1123, @sameasy, @silviodonato, @sobhatta, @valsdav, @varuns23 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

@mmusich
Copy link
Contributor

mmusich commented Oct 23, 2024

@cmsbuild, please test

int layerBit = 0x1 << layerOffset << seed.layerOrDiskNr(hitNr);

int layerOrDiskNr = seed.layerOrDiskNr(hitNr);
if (layerOrDiskNr == 0 || layerOrDiskNr > 4) {
Copy link
Contributor

Choose a reason for hiding this comment

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

for my education what happens in the phase-2 case? You don't foresee to make use of the full FPix ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah thanks, I had understood from our brief conversation that we were still 4 layers in phase-II and of course we dont, sorry my bad.

Right now we dont take advantage of the full fpx only 1-4 and we should review this as it'll be important at high eta. But this requires a reworking of this code and more reason to have the warning in there to cause problems.

Thanks for pointing it out

Copy link
Contributor

Choose a reason for hiding this comment

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

ah thanks, I had understood from our brief conversation that we were still 4 layers in phase-II and of course we dont, sorry my bad.

In phase-2 we'll still have 4 layers in BPix, but 12 disks in the endcaps:

image

sorry it was probably me not being clear during our conversation.
So, IIUC, you don't think this 4 should be a 12 for the time being until there's more code rework, right?

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 20KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-59643c/42354/summary.html
COMMIT: 46a958f
CMSSW: CMSSW_14_2_X_2024-10-22-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46488/42354/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 2 lines to the logs
  • Reco comparison results: 12 differences found in the comparisons
  • DQMHistoTests: Total files compared: 46
  • DQMHistoTests: Total histograms compared: 3566331
  • DQMHistoTests: Total failures: 420
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3565891
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 45 files compared)
  • Checked 201 log files, 171 edm output root files, 46 DQM output files
  • TriggerResults: no differences found

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46488/42347

@cmsbuild
Copy link
Contributor

Pull request #46488 was updated. @Martin-Grunewald, @cmsbuild, @mmusich can you please check and sign again.

@Sam-Harper
Copy link
Contributor Author

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 20KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-59643c/42361/summary.html
COMMIT: f84d165
CMSSW: CMSSW_14_2_X_2024-10-23-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/46488/42361/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 3 lines to the logs
  • Reco comparison results: 12 differences found in the comparisons
  • DQMHistoTests: Total files compared: 46
  • DQMHistoTests: Total histograms compared: 3566331
  • DQMHistoTests: Total failures: 457
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3565854
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 45 files compared)
  • Checked 201 log files, 171 edm output root files, 46 DQM output files
  • TriggerResults: no differences found

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.

3 participants