48 using namespace CLHEP;
54 using namespace G4MemStat;
60 , fpMoleculeB(pMoleculeB)
83 #if defined (DEBUG_MEM)
84 MemStat mem_first, mem_second, mem_diff;
87 #if defined (DEBUG_MEM)
92 #if defined (DEBUG_MEM)
94 mem_diff = mem_second - mem_first;
95 G4cout <<
"\t || MEM || G4DNAMoleculeEncounterStepper::Prepare || "
96 "After computing G4ITManager<G4Molecule>::Instance()->"
97 "UpdatePositionMap, diff is : " << mem_diff <<
G4endl;
114 return std::numeric_limits<T>::has_infinity
115 && value == std::numeric_limits<T>::infinity();
130 <<
"_______________________________________________________________________"
132 G4cout <<
"G4DNAMoleculeEncounterStepper::CalculateStep" <<
G4endl;
133 G4cout <<
"Check done for molecule : " << pMoleculeA->GetName()
141 auto pMolConfA = pMoleculeA->GetMolecularConfiguration();
153 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will return infinity "
154 "for the reaction because the molecule "
155 << pMoleculeA->GetName()
156 <<
" does not have any reactants given in the reaction table."
164 G4int nbReactives = pReactantList->size();
166 if (nbReactives == 0)
175 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will return infinity "
176 "for the reaction because the molecule "
177 << pMoleculeA->GetName()
178 <<
" does not have any reactants given in the reaction table."
179 <<
"This message can also result from a wrong implementation of the reaction table."
192 for (
G4int i = 0; i < nbReactives; i++)
194 auto pMoleculeB = (*pReactantList)[i];
204 pMoleculeB->GetMoleculeID()));
206 if (resultsNearest == 0)
continue;
208 G4double r2 = resultsNearest->GetDistanceSqr();
209 Utils utils(trackA, pMoleculeB);
227 pMoleculeB->GetMoleculeID(),
257 FindNearestInRange(pMoleculeA,
258 pMoleculeB->GetMoleculeID(),
289 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will finally return :"
294 G4cout <<
"Selected reactants for trackA: " << pMoleculeA->GetName()
297 vector<G4Track*>::iterator
it;
330 for (results->Rewind(); !results->End(); results->Next())
332 G4IT* reactiveB = results->GetItem<
G4IT>();
345 <<
"The reactant B found using the MoleculeFinder does not have a valid "
346 "track attached to it. If this is done on purpose, please do "
347 "not record this molecule in the MoleculeFinder."
349 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
351 exceptionDescription);
364 <<
"A track is reacting with itself (which is impossible) ie fpTrackA == trackB"
366 exceptionDescription <<
"Molecule A (and B) is of type : "
370 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
372 exceptionDescription);
382 <<
"The interacting tracks are not synchronized in time" <<
G4endl;
384 <<
"trackB->GetGlobalTime() != fpTrackA.GetGlobalTime()" <<
G4endl;
388 <<
"\t fpTrackA->GetGlobalTime() = "
391 exceptionDescription <<
"trackB : trackID : " << trackB->
GetTrackID()
393 <<
"\t trackB->GetGlobalTime() = "
396 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
398 exceptionDescription);
405 G4cout <<
"\t ************************************************** " <<
G4endl;
406 G4cout <<
"\t Reaction between "
409 <<
"Interaction Range = "
411 G4cout <<
"\t Real distance between reactants = "
413 G4cout <<
"\t Distance between reactants calculated by nearest neighbor algorithm = "