Problem 2183 - Some physics constructors set incorrect physics types.
Summary: Some physics constructors set incorrect physics types.
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: physics_lists (show other problems)
Version: 10.5
Hardware: All All
: P4 minor
Assignee: Gunter.Folger
URL:
Depends on:
Blocks:
 
Reported: 2019-08-02 19:11 CEST by Simon Platt
Modified: 2021-01-26 18:45 CET (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Simon Platt 2019-08-02 19:11:14 CEST
Some physics constructors set incorrect physics types. Examples include G4DecayPhysics, G4HadronElasticPhysicsHP, G4HadronPhysicsFTFP_BERT_HP, G4StoppingPhysics, which each set their member typePhysics to 0 (G4BuilderType enumerator bUnknown), instead of bDecay, bHadronElastic, bHadronInelastic, bStopping, respectively. This is because the wrong instance of G4VPhysicsConstructor::G4VPhysicsConstructor is called. Consequently, G4VModularPhysicsList::ReplacePhysics fails correctly to remove these physics constructors.

For example, this is wrong:

G4DecayPhysics::G4DecayPhysics(G4int ver):
    G4VPhysicsConstructor("Decay"),
    verbose(ver)
{}

It should be like this:

G4DecayPhysics::G4DecayPhysics(G4int ver):
    G4VPhysicsConstructor("Decay",bDecay),
    verbose(ver)
{}
Comment 1 Vladimir.Ivantchenko 2020-12-17 10:29:06 CET
Hello,

Thank you for this observation. Constructors were reviewed and fixed. Some fixes are already in Geant4 10.7 (decal, stopping). Recently hadronic elastic and inelastic were also fixed and will be available with the 1st patch to Geant4 10.7.

VI
Comment 2 Vladimir.Ivantchenko 2020-12-17 10:30:23 CET
Hi Gunter,

you may close this problem report as fixed.

Vladimir
Comment 3 Simon Platt 2020-12-18 14:53:30 CET
Thank you.