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

G4TransportationWithMsc: Always update momentum direction #76

Merged
merged 1 commit into from
Oct 27, 2023
Merged

G4TransportationWithMsc: Always update momentum direction #76

merged 1 commit into from
Oct 27, 2023

Conversation

hahnjo
Copy link

@hahnjo hahnjo commented Oct 25, 2023

This fixes a very rare bug when G4Transportation runs without field, G4TransportationWithMsc is allowed to make multiple internal steps, and the last internal step does not sample scattering (because the track is either ranging out, or the step is very small). In this case G4Transportation will reset fMomentumChanged = false because linear propagation does not change the momentum direction, when in fact earlier internal steps updated the direction due to scattering.

Instead always update the momentum direction because the above is rare. Numerical differences are observed in the simulation histories, but not statistically significant.

This fixes a very rare bug when G4Transportation runs without field,
G4TransportationWithMsc is allowed to make multiple internal steps,
and the last internal step does *not* sample scattering (because the
track is either ranging out, or the step is very small). In this case
G4Transportation will reset fMomentumChanged = false because linear
propagation does not change the momentum direction, when in fact
earlier internal steps updated the direction due to scattering.

Instead always update the momentum direction because the above is
rare. Numerical differences are observed in the simulation histories,
but not statistically significant.
@cmsbuild
Copy link

A new Pull Request was created by @hahnjo (Jonas Hahnfeld) for branch cms/v11.1.2.

@smuzaffar, @iarspider, @aandvalenzuela, @cmsbuild can you please review it and eventually sign? Thanks.
@sextonkennedy, @rappoccio, @antoniovilela you are the release manager for this.
cms-bot commands are listed here

@smuzaffar
Copy link
Contributor

please test

@cmsbuild
Copy link

-1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bbaa5c/35405/summary.html
COMMIT: 24bfcac
CMSSW: CMSSW_13_3_X_2023-10-24-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-externals/geant4/76/35405/install.sh to create a dev area with all the needed externals and cmssw changes.

@cmsbuild
Copy link

-1

Failed Tests: UnitTests
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bbaa5c/35414/summary.html
COMMIT: 24bfcac
CMSSW: CMSSW_13_3_X_2023-10-24-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-externals/geant4/76/35414/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bbaa5c/35414/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-bbaa5c/35414/git-merge-result

Unit Tests

I found 1 errors in the following unit tests:

---> test testTauEmbeddingProducers had ERRORS

Comparison Summary

Summary:

  • You potentially added 73 lines to the logs
  • Reco comparison results: 7 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3351458
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3351427
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 213 log files, 166 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@civanch
Copy link
Contributor

civanch commented Oct 27, 2023

This PR has nothing to do with the failed unit test. Regression for standard tests is seen as expected. Should tests be resubmitted?

@smuzaffar
Copy link
Contributor

@civanch , are you happy with this change?

@smuzaffar
Copy link
Contributor

+externals

lets get this in and update cmsdist/geant4.spec

@smuzaffar smuzaffar merged commit 2d59923 into cms-externals:cms/v11.1.2 Oct 27, 2023
@cmsbuild
Copy link

This pull request is fully signed and it will be integrated in one of the next cms/v11.1.2 IBs (but tests are reportedly failing). This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @rappoccio, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2)

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