I would like to switch hadronic physics before RunManager::Initialize().
I’ve tried to use
void G4VModularPhysicsList::ReplacePhysics(G4VPhysicsConstructor* fPhysics).
It works for electromagnetic physics, but it doesn’t work for hadronic physics.
The reason it that any
pType isn’t set for Hadronic physics, (i.e. G4HadronPhysicsQGSP_BERT_HP, etc.). I think that
bHadronInelastic (= 6) should be set as their type.
In the current implementation, the
ReplacePhysics doesn’t replace, just register the compatible physics again because if the
pType is 0, the function just add them without considering consistency. That situation may be confusing and make unclear bugs.
pType hasn’t been set for these physicses?
thank you for this observation. Can you, please, make Bugzilla bug report?