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

Forward port of Geant4 SIMP custom physics model to master branch #28763

Merged
merged 1 commit into from Jan 24, 2020

Conversation

fabiocos
Copy link
Contributor

@fabiocos fabiocos commented Jan 20, 2020

PR description:

Port of #26094 (targeting 7_1_X) to master, based on the original proposal by @lowette .
The code has been adapted to the new 11_1_X branch trying to mimic as closely as possible the original proposal. The G4GlauberGribovCrossSection class, no more present in Geant4, has been replaced by the available G4ComponentGGHadronNucleusXsc. Include files have been moved to interface, the G4 names have been turned into CMS as done for many other models, and include guards have been updated according to the standard we adopt.

PR validation:

Code compiles and passes scram b code-checks, but no dedicated test workflow is provided to probe the real code behaviour in the original proposal. @civanch should confirm the correctness of the adopted approach, and possible tests to be performed.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28763/13412

  • This PR adds an extra 40KB to repository

  • Found files with invalid states:

    • SimG4Core/CustomPhysics/src/G4QGSPSIMPBuilder.hh:
    • SimG4Core/CustomPhysics/src/G4SIMP.hh:
    • SimG4Core/CustomPhysics/src/G4SIMPInelasticXS.hh:
    • SimG4Core/CustomPhysics/src/G4SIMPInelasticXS.cc:
    • SimG4Core/CustomPhysics/src/G4SIMP.cc:
    • SimG4Core/CustomPhysics/src/G4SIMPInelasticProcess.cc:
    • SimG4Core/CustomPhysics/src/G4SIMPInelasticProcess.hh:
    • SimG4Core/CustomPhysics/src/G4AntiSIMP.cc:
    • SimG4Core/CustomPhysics/src/G4QGSPSIMPBuilder.cc:
    • SimG4Core/CustomPhysics/src/G4AntiSIMP.hh:

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fabiocos (Fabio Cossutti) for master.

It involves the following packages:

SimG4Core/CustomPhysics

@cmsbuild, @civanch, @mdhildreth can you please review it and eventually sign? Thanks.
@makortel this is something you requested to watch as well.
@davidlange6, @silviodonato, @fabiocos you are the release manager for this.

cms-bot commands are listed here

update files modified in lowette:simps_to_customphysics_7_1,
adapt SIMP model code to master, move to more standard file location
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28763/13413

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

Pull request #28763 was updated. @cmsbuild, @civanch, @mdhildreth can you please check and sign again.

@fabiocos
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 20, 2020

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/4291/console Started: 2020/01/20 16:49

@cmsbuild
Copy link
Contributor

+1
Tested at: 70a1949
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-308f52/4291/summary.html
CMSSW: CMSSW_11_1_X_2020-01-20-1100
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-308f52/4291/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2697090
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2696743
  • DQMHistoTests: Total skipped: 346
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

theStringModel->SetFragmentationModel(theStringDecay);

theCascade = new G4GeneratorPrecompoundInterface;
thePreEquilib = new G4PreCompoundModel(new G4ExcitationHandler);
Copy link
Contributor

Choose a reason for hiding this comment

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

@fabiocos , lines 22-23 should be removed.

CMSQGSPSIMPBuilder::~CMSQGSPSIMPBuilder() {
delete theStringDecay;
delete theStringModel;
delete thePreEquilib;
Copy link
Contributor

Choose a reason for hiding this comment

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

@fabiocos , lines 38-39 should be removed (delete thePreEquilib; delete theCascade)


class G4ParticleDefinition;

class CMSSIMPInelasticProcess : public G4HadronicProcess {
Copy link
Contributor

Choose a reason for hiding this comment

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

@fabiocos , most of virtual methods must be removed - they are implemented inside G4HadronicProcess. In different Geant4 releases they may be different.

Copy link
Contributor

Choose a reason for hiding this comment

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

@fabiocos , The code was working in 10.0 where we run in single threading mode, in 10.6 many things were changed except interfaces, so the code is well compiling but there may be problems, which I cannot catch promptly.

@civanch
Copy link
Contributor

civanch commented Jan 21, 2020

@fabiocos , would you agree if we merge this PR and after I will try to shape these classes to recent Geant4? I foresee in this 7_1 implementation some thread unsafe things not seen in an easy way. Suspect, that it would be ineffective if will put too many comments.

@civanch
Copy link
Contributor

civanch commented Jan 22, 2020

+1
@fabiocos , @silviodonato, I would think, that if we do forward port we should not change code a lot. So, let us merge this but add modifications on top in the next PR.

@cmsbuild
Copy link
Contributor

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

@fabiocos
Copy link
Contributor Author

@civanch thanks for your comment, as said mine was a basic attempt to do the porting with the minimal needed code change. I might easily implement the first comments of yours, but if more is needed, may be it is better to follow your suggestion, let @silviodonato integrate this (it will not break anyway anything as far as I can see) and let you clean the code in a second step. Just to be sure, do we have some test workflow using CustomPhysics, just to have a small cross check?

@silviodonato
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 881be59 into cms-sw:master Jan 24, 2020
@fabiocos fabiocos deleted the fc-simps-111X branch January 24, 2020 15:39
@smuzaffar
Copy link
Contributor

@civanch
Copy link
Contributor

civanch commented Jan 27, 2020

@smuzaffar , thanks!

I expect problems for GEANT4 IB but they happens on dramatically high level. Will try to make next PR asap. The reason of the problem: author of this code rewrite all Geant4 base class virtual methods for physics and x-sections with old variants of 6 years ago. Because he is using inheritance, he should rewrite instead only few methods, which really required his modifications.

@fabiocos
Copy link
Contributor Author

@civanch @smuzaffar as far as I can see, the issue to be solved in the code cleaning is the redefinition of the particle performed in https://github.com/cms-sw/cmssw/blob/master/SimG4Core/CustomPhysics/src/CMSSIMPInelasticProcess.cc#L145
If that could be moved inside the particle definition it would be straightforward to clean the CMSSIMPInelasticProcess class.

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.

None yet

5 participants