Hello, You check if the PhysicsList is of correct type the following way: if( static_cast<const G4ErrorPhysicsList*>(G4RunManager::GetRunManager()->GetUserPhysicsList()) != 0 ) { G4cerr << " WARNING G4ErrorRunManagerHelper::InitializePhysics() physics list is not G4ErrorPhysicsList. Are you sure? " << G4endl; } which is obviously wrong - the check has to be "==0". To convice yourself that it is a bug, just put the following code into your program: const G4ErrorPhysicsList * testPhysicsList = new G4ErrorPhysicsList; if( static_cast<const G4ErrorPhysicsList*>(testPhysicsList) != 0 ) G4cerr << "TEST WARNING G4ErrorRunManagerHelper::InitializePhysics() physics list is not G4ErrorPhysicsList. Are you sure? " << G4endl; and you will get the error message!!! Thank you.
Corrected, thanks for realizing the bug.