| Message: Re: Deposited energy greater than kinetic energy for electrons? | Not Logged In (login) |
|
Hi Kareem,
When you request the QGSP_BIC_HP prepackaged physics list, you are in effect requesting: G4EmStandardPhysics G4EmExtraPhysics G4DecayPhysics G4HadronElasticPhysics HadronPhysicsQGSP_BIC_HP G4QStoppingPhysics G4IonBinaryCascadePhysics (http://www-geant4.kek.jp/lxr/source/physics_lists/lists/include/QGSP_BIC_HP.icc#L79) everything is done for you, except for G4RadioactiveDecayPhysics and LUXSimPhysicsOpticalPhysics. When you then add: physicsVector->push_back( new PhysListEmLivermore() ); things are going to go seriously wrong. To understand why exactly one would have to trace the code carefully. Suffice to say, DO NOT push_back two different EM physics lists, ever! As you found out, you won't be able to predict exactly which process is actually attached to your particles. If you are not happy with the list of processes in QGSP_BIC_HP you cannot take advantage of it and you will have to add the physics yourself one by one. In the next version of Geant4 I will have updated the field04 example with a method RemoveFromPhysicsList. You can use this to selectively remove some of the already added 'physics' from the list. The code is:
void F04PhysicsList::RemoveFromPhysicsList(const G4String& name)
{
G4bool success = false;
for (G4PhysConstVector::iterator p = physicsVector->begin();
p != physicsVector->end(); ++p) {
G4VPhysicsConstructor* e = (*p);
if (e->GetPhysicsName() == name) {
physicsVector->erase(p);
success = true;
break;
}
}
if (!success) {
std::ostringstream message;
message << "PhysicsList::RemoveFromEMPhysicsList "<< name << "not found";
G4Exception(message.str().c_str());
}
}
Only when you have done that for G4EmStandardPhysics can you push_back PhysListEmLivermore Cheers, Peter
|
|
to: |