59 , fpMoleculeB(pMoleculeB)
102 return std::numeric_limits<T>::has_infinity
103 && value == std::numeric_limits<T>::infinity();
119 <<
"_______________________________________________________________________"
121 G4cout <<
"G4DNAMoleculeEncounterStepper::CalculateStep" <<
G4endl;
122 G4cout <<
"Check done for molecule : " << pMoleculeA->GetName()
130 auto pMolConfA = pMoleculeA->GetMolecularConfiguration();
142 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will return infinity "
143 "for the reaction because the molecule "
144 << pMoleculeA->GetName()
145 <<
" does not have any reactants given in the reaction table."
153 G4int nbReactives = pReactantList->size();
155 if (nbReactives == 0)
164 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will return infinity "
165 "for the reaction because the molecule "
166 << pMoleculeA->GetName()
167 <<
" does not have any reactants given in the reaction table."
168 <<
"This message can also result from a wrong implementation of the reaction table."
181 for (
G4int i = 0; i < nbReactives; i++)
183 auto pMoleculeB = (*pReactantList)[i];
193 pMoleculeB->GetMoleculeID()));
195 if (resultsNearest == 0)
continue;
197 G4double r2 = resultsNearest->GetDistanceSqr();
198 Utils utils(trackA, pMoleculeB);
216 pMoleculeB->GetMoleculeID(),
246 FindNearestInRange(pMoleculeA,
247 pMoleculeB->GetMoleculeID(),
278 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will finally return :"
283 G4cout <<
"Selected reactants for trackA: " << pMoleculeA->GetName()
286 vector<G4Track*>::iterator it;
322 for (results->Rewind(); !results->End(); results->Next())
324 G4IT* reactiveB = results->GetItem<
G4IT>();
337 <<
"The reactant B found using the MoleculeFinder does not have a valid "
338 "track attached to it. If this is done on purpose, please do "
339 "not record this molecule in the MoleculeFinder."
341 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
343 exceptionDescription);
356 <<
"A track is reacting with itself (which is impossible) ie fpTrackA == trackB"
358 exceptionDescription <<
"Molecule A (and B) is of type : "
362 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
364 exceptionDescription);
374 <<
"The interacting tracks are not synchronized in time" <<
G4endl;
376 <<
"trackB->GetGlobalTime() != fpTrackA.GetGlobalTime()" <<
G4endl;
380 <<
"\t fpTrackA->GetGlobalTime() = "
383 exceptionDescription <<
"trackB : trackID : " << trackB->
GetTrackID()
385 <<
"\t trackB->GetGlobalTime() = "
388 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
390 exceptionDescription);
397 G4double r2 = results->GetDistanceSqr();
398 G4cout <<
"\t ************************************************** " <<
G4endl;
399 G4cout <<
"\t Reaction between "
402 <<
"Interaction Range = "
404 G4cout <<
"\t Real distance between reactants = "
406 G4cout <<
"\t Distance between reactants calculated by nearest neighbor algorithm = "
443 if (pTrack ==
nullptr)
446 exceptionDescription <<
"No track found.";
447 G4Exception(
"G4Scheduler::CalculateMinStep",
"ITScheduler006",
463 }
else if(active ==
false){
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4Molecule * GetMolecule(const G4Track &track)
ReturnType & reference_cast(OriginalType &source)
G4GLOB_DLL std::ostream G4cout
const G4Molecule * fpMoleculeA
Utils(const G4Track &tA, const G4MolecularConfiguration *mB)
const G4MolecularConfiguration * fpMoleculeB
void SetReactionModel(G4VDNAReactionModel *)
G4bool fHasAlreadyReachedNullTime
void InitializeForNewTrack()
virtual G4double CalculateMinTimeStep(G4double, G4double)
const G4DNAMolecularReactionTable *& fMolecularReactionTable
G4DNAIRTMoleculeEncounterStepper()
G4VDNAReactionModel * fReactionModel
G4ITReactionSet * fReactionSet
virtual G4double CalculateStep(const G4Track &, const G4double &)
G4VDNAReactionModel * GetReactionModel()
void CheckAndRecordResults(const Utils &, G4KDTreeResultHandle &)
virtual ~G4DNAIRTMoleculeEncounterStepper()
G4ITTrackHolder * fpTrackContainer
const ReactantList * CanReactWith(Reactant *) const
virtual void UpdatePositionMap()
static G4ITFinder * Instance()
static G4ITReactionSet * Instance()
G4ITReactionPerTime & GetReactionsPerTime()
G4TrackList * GetMainList(Key)
static G4ITTrackHolder * Instance()
const G4String & GetName() const
G4double GetDiffusionCoefficient() const
const G4String & GetName() const
G4double GetDiffusionCoefficient() const
static G4Scheduler * Instance()
G4TrackStatus GetTrackStatus() const
const G4ThreeVector & GetPosition() const
G4double GetGlobalTime() const
virtual void Initialise(const G4MolecularConfiguration *, const G4Track &)
virtual G4double GetReactionRadius(const G4MolecularConfiguration *, const G4MolecularConfiguration *)=0
G4TrackVectorHandle fReactants
const G4ITReactionTable * fpReactionTable
static G4ThreadLocal G4double fUserMinTimeStep
G4double fSampledMinTimeStep