465 reachedUserTimeLimit);
471 std::vector<G4ITReactionChange*>::iterator reactionInfo_i = reactionInfo_v
474 for(; reactionInfo_i != reactionInfo_v->end(); ++reactionInfo_i)
477 G4Track* trackA =
const_cast<G4Track*
>(changes->
GetTrackA());
478 G4Track* trackB =
const_cast<G4Track*
>(changes->
GetTrackB());
480 if(trackA == 0 || trackB == 0 || trackA->GetTrackStatus() == fStopAndKill
481 || trackB->GetTrackStatus() == fStopAndKill)
continue;
484 const vector<G4Track*>* productsVector = changes->
GetfSecondary();
486 if(fpUserTimeStepAction)
498 << trackA->GetTrackID() <<
") + " <<
GetIT(trackB)->
GetName() <<
" (" 499 << trackB->GetTrackID() <<
") -> ";
503 if(nbSecondaries > 0)
505 for(
int i = 0; i < nbSecondaries; ++i)
508 if(fVerbose && i != 0)
G4cout <<
" + ";
511 G4Track* secondary = (*productsVector)[i];
514 trackB->GetTrackID());
516 if(secondary->GetGlobalTime() - fGlobalTime > fTimeTolerance)
519 exceptionDescription <<
"The time of the secondary should not be bigger than the" 520 " current global time." 521 <<
" This may cause synchronization problem. If the process you" 522 " are using required " 523 <<
"such feature please contact the developpers." <<
G4endl<<
"The global time in the step manager : " 526 <<
"The global time of the track : " 527 <<
G4BestUnit(secondary->GetGlobalTime(),
"Time")
530 G4Exception(
"G4Scheduler::ComputeInteractionBetweenTracks",
533 exceptionDescription);
539 << secondary->GetTrackID() <<
")";
546 if(fVerbose)
G4cout <<
"No product";
552 if(trackA->GetTrackID() == 0 || trackB->GetTrackID() == 0)
555 if(trackA->GetTrackID() == 0) track = trackA;
560 <<
"The problem was found for the reaction between tracks :" 561 << trackA->GetParticleDefinition()->GetParticleName() <<
" (" 562 << trackA->GetTrackID() <<
") & " 563 << trackB->GetParticleDefinition()->GetParticleName() <<
" (" 564 << trackB->GetTrackID() <<
"). \n";
566 if(track->GetStep() == 0)
568 exceptionDescription <<
"Also no step was found" 569 <<
" ie track->GetStep() == 0 \n";
572 exceptionDescription <<
"Parent ID of trackA : " 573 << trackA->GetParentID() <<
"\n";
574 exceptionDescription <<
"Parent ID of trackB : " 575 << trackB->GetParentID() <<
"\n";
578 <<
"The ID of one of the reaction track was not setup.";
579 G4Exception(
"G4Scheduler::ComputeInteractionBetweenTracks",
582 exceptionDescription);
594 trackA->SetTrackStatus(fStopAndKill);
595 trackB->SetTrackStatus(fStopAndKill);
606 reactionInfo_v->clear();
G4ITTrackingManager * fpTrackingManager
void MergeSecondariesWithMainList()
const G4Track * GetTrackA()
std::ostringstream G4ExceptionDescription
void SetParentID(int, int)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
virtual const G4String & GetName() const =0
G4int GetNumberOfSecondaries() const
void EndTracking(G4Track *)
void FindReaction(G4ITReactionSet *reactionSet, const double currentStepTime, const double previousStepTime, const bool reachedUserStepTimeLimit)
G4IT * GetIT(const G4Track *track)
G4ITReactionSet * fReactionSet
G4GLOB_DLL std::ostream G4cout
void _PushTrack(G4Track *track)
G4bool WereParentsKilled() const
virtual void UserReactionAction(const G4Track &, const G4Track &, const std::vector< G4Track *> *)
const G4Track * GetTrackB()
std::vector< G4ITReactionChange * > * GetReactionInfo()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::vector< G4Track * > * GetfSecondary()
G4ITTrackHolder * fpTrackContainer