Problem 2559 - QBBC physics constructor and HadronPhysicsElasticHP
Summary: QBBC physics constructor and HadronPhysicsElasticHP
Status: ASSIGNED
Alias: None
Product: Geant4
Classification: Unclassified
Component: physics_lists (show other problems)
Version: 11.1
Hardware: All All
: P4 minor
Assignee: Vladimir.Ivantchenko
URL:
Depends on:
Blocks:
 
Reported: 2023-08-22 15:06 CEST by Michel.Maire
Modified: 2024-02-03 18:52 CET (History)
3 users (show)

See Also:


Attachments
PhysicsList.cc of Hadr06 (4.56 KB, text/plain)
2024-02-01 21:34 CET, michel.maire
Details

Note You need to log in before you can comment on or make changes to this problem.
Description Michel.Maire 2023-08-22 15:06:57 CEST
Since G4 11.1, physics constructor G4HadronInelasticQBBC is no more compatible with HadronPhysicsElasticHP: --> segmentation fault.
It is the only physics constructor which suffers this problem.

Seen in examples Hadr05, Hadr06, Hadr07, NeutronSource, Activation
Comment 1 Vladimir.Ivantchenko 2024-01-30 13:30:31 CET
Hi Michel,

the problem should be fixed in 11.2. Would it be possible to recheck?

Cheers,
Vladimir
Comment 2 michel.maire 2024-02-01 21:34:43 CET
Created attachment 854 [details]
PhysicsList.cc of Hadr06
Comment 3 michel.maire 2024-02-01 21:37:31 CET
the situation is unchanged.
I join PhysicsList.cc of Hadr06. You can run hadr06.in
Comment 4 Vladimir.Ivantchenko 2024-02-02 17:53:51 CET
Hi Michel,

in these examples hadronic physics is custom. This means, that it is needed for each new release to review custom builders and update if needed. 

Since 11.1 QBBC enables Neutron General Process by default, which is incompatible with HP and will never be compatible. In 11.2 a protection was added into G4ElasticPhysicsHP in order to exclude such situation. So, if in a custom physics G4HadronElasticPhysicsHP is use there will be no crash, no problem. I have checked this in Hadr03.

In examples with this crash there are following possibilities to fix:

   1) in README and macro put a comment that QBBC cannot be used with HP.
   2) Switch from HadronElasticPhysicsHP to G4HadronElasticPhysicsHP.
   3) Edit HadronElasticPhysicsHP adding:

      G4HadronicParameters::Instance()->SetEnableNeutronGeneralProcess(false);

I would recommend to use 2). to me other two are not good. In general, making local physics constructors is always a problem - example may start failing or getting wrong results at any moment. Very difficult to control on evolution of hadronics in all examples/tests if Physics Lists are custom.

Vladimir
Comment 5 michel.maire 2024-02-02 19:31:50 CET
OK, but HadronPhysicsElasticHP, including thermal scattering, was designed before the existence of G4HadronPhysicsElasticHP ...
Comment 6 Vladimir.Ivantchenko 2024-02-03 18:52:06 CET
Hi Michel,

it is not possible to change something in the code. It is needed to fix Hadr05, Hadr06, Hadr07, NeutronSource, Activation in one or another way.

Vladimir