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

Fix condition to add anti-particle to G4ParticleTable #42957

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

sarafiorendi
Copy link
Contributor

@sarafiorendi sarafiorendi commented Oct 5, 2023

PR description:

This PR is to fix the behaviour of the CustomParticleFactory class in order to correctly include the corresponding anti-particle each time a new particle is added to the list.
The correct behaviour was somehow broken with this commit which reverted the condition necessary to call the addCustomParticle() function (which should add the anti-particle to the particle table).
So in the current releases the function will be called only if the anti-particle is already there.
As an example, in my case I needed to add the stau and anti-stau particles, but only the stau was added, while the anti-stau was not, with a series of consequences in the following steps (e.g., charge was set to 0, anti-stau track non added to the SIM track collection, etc...)

FYI @civanch

PR validation:

Testing locally. For example, I was previously getting this printout when checking particle info here

==== PDGcode -1000015  Particle name  is not defined in G4.
 Assigned charge : 0
     Momentum ( -208.984[GeV/c], 278.581[GeV/c], -974.195[GeV/c] )
     kinetic Energy : 1.03457e+06 [GeV]
     Mass is not assigned
     Weight : 1

and with the fix I get the expected behaviour

==== PDGcode -1000015  Particle name anti_~tau_1
 Assigned charge : 1
     Momentum ( -208.984[GeV/c], 278.58[GeV/c], -974.194[GeV/c] )
     kinetic Energy : 939392 [GeV]
     Mass : 100 [GeV]
     Weight : 1

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:

I think we need to backport this change also to other release cycles, for sure to 12_4_X used for Run3Summer22(EE) MC production.
The behaviour is correct in the 10_6_X cycle used for UL MC production (see here).

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 5, 2023

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42957/37106

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 5, 2023

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

It involves the following packages:

  • SimG4Core/CustomPhysics (simulation)

@mdhildreth, @cmsbuild, @civanch can you please review it and eventually sign? Thanks.
@makortel, @rovere, @slomeo, @fabiocos, @bsunanda this is something you requested to watch as well.
@rappoccio, @antoniovilela, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@civanch
Copy link
Contributor

civanch commented Oct 5, 2023

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 5, 2023

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4fc8bf/35067/summary.html
COMMIT: 9835277
CMSSW: CMSSW_13_3_X_2023-10-05-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/42957/35067/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 8 lines to the logs
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3356920
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3356898
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 214 log files, 167 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@civanch
Copy link
Contributor

civanch commented Oct 6, 2023

type bug

@civanch
Copy link
Contributor

civanch commented Oct 6, 2023

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 6, 2023

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

@rappoccio
Copy link
Contributor

+1

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