Import Geant4 9.1.0 source tree
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -195,14 +195,18 @@
|
||||
|
||||
result=theModel.Propagate(initalState, fancyNucleus);
|
||||
debug.push_back("################# Result size");
|
||||
debug.push_back(result->size());
|
||||
if (result) {
|
||||
debug.push_back(result->size());
|
||||
} else {
|
||||
debug.push_back(" -none-");
|
||||
}
|
||||
debug.dump();
|
||||
std::for_each(initalState->begin(), initalState->end(), Delete<G4KineticTrack>());
|
||||
delete initalState;
|
||||
// std::for_each(initalState->begin(), initalState->end(), Delete<G4KineticTrack>());
|
||||
// delete initalState;
|
||||
|
||||
if(result->size()==0)
|
||||
if(! result || result->size()==0)
|
||||
{
|
||||
delete result; result=0;
|
||||
if (result) {delete result; result=0;}
|
||||
delete fancyNucleus;
|
||||
delete projectile;
|
||||
if (++tryCount > 200)
|
||||
|
||||
@@ -287,11 +287,12 @@ void G4RKPropagation::Transport(G4KineticTrackVector & active,
|
||||
#endif
|
||||
|
||||
// if the particle is already outside nucleus go to next @@GF should never happen? check!
|
||||
if(t_leave < 0)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4RKPropagation:: Attempt to track particle past a nucleus");
|
||||
continue;
|
||||
}
|
||||
// does happen for particles added as late....
|
||||
// if(t_leave < 0 )
|
||||
// {
|
||||
// throw G4HadronicException(__FILE__, __LINE__, "G4RKPropagation:: Attempt to track particle past a nucleus");
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// Apply a straight line propagation for particle types
|
||||
// not included in the model
|
||||
@@ -334,6 +335,10 @@ void G4RKPropagation::Transport(G4KineticTrackVector & active,
|
||||
// for the moment take it past the nucleus, so we'll not worry next time..
|
||||
FreeTransport(kt, 1.1*t_leave); // take past nucleus
|
||||
kt->SetState(G4KineticTrack::miss_nucleus);
|
||||
// G4cout << "G4RKPropagation: Warning particle cannot enter Nucleus :" << G4endl;
|
||||
// G4cout << " enter nucleus, E out/in: " << kt->GetTrackingMomentum().e() << " / " << newE <<G4endl;
|
||||
// G4cout << " the Field "<< currentField->GetField(kt->GetPosition()) << " "<< kt->GetPosition()<<G4endl;
|
||||
// G4cout << " the particle "<<kt->GetDefinition()->GetParticleName()<<G4endl;
|
||||
continue;
|
||||
}
|
||||
//
|
||||
@@ -380,8 +385,8 @@ void G4RKPropagation::Transport(G4KineticTrackVector & active,
|
||||
G4ThreeVector posold=kt->GetPosition();
|
||||
|
||||
// if (currentField->GetField(kt->GetPosition()) > kt->GetProjectilePotential() ||
|
||||
if ( currTimeStep > 0 &&
|
||||
! FieldTransport(kt, currTimeStep)) {
|
||||
if (currTimeStep > 0 &&
|
||||
! FieldTransport(kt, currTimeStep)) {
|
||||
FreeTransport(kt,currTimeStep);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user