49 using namespace CLHEP;
55 using namespace G4MemStat;
60 trackA(tA), moleculeB(mB)
80 if (
this == &rhs)
return *
this;
94 fMolecularReactionTable(
109 #if defined (DEBUG_MEM)
110 MemStat mem_first, mem_second, mem_diff;
113 #if defined (DEBUG_MEM)
118 #if defined (DEBUG_MEM)
120 mem_diff = mem_second-mem_first;
121 G4cout <<
"\t || MEM || G4DNAMoleculeEncounterStepper::Prepare || "
122 "After computing G4ITManager<G4Molecule>::Instance()->"
123 "UpdatePositionMap, diff is : " << mem_diff <<
G4endl;
138 return std::numeric_limits<T>::has_infinity
139 && value == std::numeric_limits<T>::infinity();
158 <<
"_______________________________________________________________________"
160 G4cout <<
"G4DNAMoleculeEncounterStepper::CalculateStep" <<
G4endl;
161 G4cout <<
"Check done for molecule : " << moleculeA->
GetName()
174 if (!reactivesVector)
182 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will return infinity "
183 "for the reaction because the molecule "
185 <<
" does not have any reactants given in the reaction table."
193 G4int nbReactives = reactivesVector->size();
195 if (nbReactives == 0)
204 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will return infinity "
205 "for the reaction because the molecule "
207 <<
" does not have any reactants given in the reaction table."
208 <<
"This message can also result from a wrong implementation of the reaction table."
231 for (
G4int i = 0; i < nbReactives; i++)
247 if (resultsNearest == 0)
continue;
249 G4double r2 = resultsNearest->GetDistanceSqr();
250 Utils utils(trackA, moleculeB);
303 FindNearestInRange(moleculeA,
352 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will finally return :"
357 G4cout <<
"Selected reactants for trackA: " << moleculeA->
GetName()
360 vector<G4Track*>::iterator it;
394 for (results->Rewind(); !results->End(); results->Next())
397 G4IT* reactiveB = results->GetItem<
G4IT>();
412 <<
"The reactant B found using the MoleculeFinder does not have a valid "
413 "track attached to it. If this is done on purpose, please do "
414 "not record this molecule in the MoleculeFinder."
416 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
418 exceptionDescription);
442 if (trackB == &utils.
trackA)
447 <<
"A track is reacting with itself (which is impossible) ie trackA == trackB"
449 exceptionDescription <<
"Molecule A (and B) is of type : "
453 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
455 exceptionDescription);
465 <<
"The interacting tracks are not synchronized in time" <<
G4endl;
467 <<
"trackB->GetGlobalTime() != trackA.GetGlobalTime()" <<
G4endl;
471 <<
"\t trackA->GetGlobalTime() = "
474 exceptionDescription <<
"trackB : trackID : " << trackB->
GetTrackID()
476 <<
"\t trackB->GetGlobalTime() = "
479 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
481 exceptionDescription);
487 G4double r2 = results->GetDistanceSqr();
488 G4cout <<
"\t ************************************************** " <<
G4endl;
489 G4cout <<
"\t Reaction between "
492 <<
"Interaction Range = "
494 G4cout <<
"\t Real distance between reactants = "
496 G4cout <<
"\t Distance between reactants calculated by nearest neighbor algorithm = "
virtual void Initialise(G4MolecularConfiguration *, const G4Track &)
std::ostringstream G4ExceptionDescription
void InitializeForNewTrack()
G4bool fHasAlreadyReachedNullTime
G4double GetDiffusionCoefficient() const
const G4String & GetName() const
const G4Molecule * moleculeA
ReturnType & reference_cast(OriginalType &source)
static G4ITFinder * Instance()
G4MolecularConfiguration * moleculeB
virtual void UpdatePositionMap()
G4VDNAReactionModel * fReactionModel
const G4DNAMolecularReactionTable *& fMolecularReactionTable
static G4ThreadLocal G4double fUserMinTimeStep
Utils(const G4Track &tA, G4MolecularConfiguration *mB)
G4double fSampledMinTimeStep
const XML_Char int const XML_Char * value
const G4ParticleDefinition const G4Material *G4double range
G4double GetGlobalTime() const
const G4ThreeVector & GetPosition() const
const G4ITReactionTable * fpReactionTable
virtual G4double CalculateStep(const G4Track &, const G4double &)
void CheckAndRecordResults(const Utils &, G4KDTreeResultHandle &)
const G4ThreeVector const G4double const
G4Molecule * GetMolecule(const G4Track &track)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4DNAMoleculeEncounterStepper()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double GetDiffusionCoefficient() const
virtual ~G4DNAMoleculeEncounterStepper()
G4GLOB_DLL std::ostream G4cout
const std::vector< G4MolecularConfiguration * > * CanReactWith(G4MolecularConfiguration *) const
G4TrackVectorHandle fReactants
G4int GetMoleculeID() const
G4DNAMoleculeEncounterStepper & operator=(const G4DNAMoleculeEncounterStepper &)
G4TrackStatus GetTrackStatus() const
const G4String & GetName() const
G4MolecularConfiguration * GetMolecularConfiguration() const
virtual G4double GetReactionRadius(G4MolecularConfiguration *, G4MolecularConfiguration *)=0