Problem 2183

Summary: Some physics constructors set incorrect physics types.
Product: Geant4 Reporter: Simon Platt <s.p.platt1>
Component: physics_listsAssignee: Gunter.Folger
Status: RESOLVED FIXED    
Severity: minor CC: Alberto.Ribon, Vladimir.Ivantchenko
Priority: P4    
Version: 10.5   
Hardware: All   
OS: All   

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.