58 if(
this == &rhs)
return *
this;
98 G4cout <<
"_______________________________________________________________________" <<
G4endl;
99 G4cout <<
"G4DNAMoleculeEncounterStepper::CalculateStep" <<
G4endl;
108 const vector<const G4Molecule*>* reactivesVector =
119 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will return infinity for the reaction because the molecule "
121 <<
" does not have any reactants given in the reaction table."
129 G4int nbReactives = reactivesVector->size();
139 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will return infinity for the reaction because the molecule "
141 <<
" does not have any reactants given in the reaction table."
142 <<
"This message can also result from a wrong implementation of the reaction table."
170 for (
G4int i=0 ; i<nbReactives ; i++)
172 const G4Molecule* moleculeB = (*reactivesVector)[i];
182 -> FindNearest(moleculeA, moleculeB));
191 G4cout <<
"G4MoleculeEncounterStepper::CalculateStep will finally return :"
198 vector<G4Track*>::iterator it;
224 <<
" found to react with "
235 for(results->Rewind();
240 G4IT* reactiveB = (
G4IT*) results->GetItemData() ;
254 exceptionDescription <<
"The reactant B found using the ITManager does not have a valid track "
255 <<
" attached to it. If this is done on purpose, please do not record this "
256 <<
" molecule in the ITManager."
258 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
"MoleculeEncounterStepper001",
266 exceptionDescription <<
"The track status of one of the nearby reactants is not fAlive" <<
G4endl;
267 exceptionDescription <<
"The incomming trackID "
268 <<
"(trackA entering in G4DNAMoleculeEncounterStepper and "
269 <<
"for which you are looking reactant for) is : "
271 exceptionDescription <<
"And the trackID of the reactant (trackB) is: "
273 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
"MoleculeEncounterStepper002",
278 if(trackB == &trackA)
282 exceptionDescription <<
"A track is reacting with itself (which is impossible) ie trackA == trackB"
284 exceptionDescription <<
"Molecule A (and B) is of type : "
286 <<
" with trackID : "
289 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
"MoleculeEncounterStepper003",
298 exceptionDescription <<
"The interacting tracks are not synchronized in time"<<
G4endl;
299 exceptionDescription<<
"trackB->GetGlobalTime() != trackA.GetGlobalTime()"
302 exceptionDescription <<
"trackA : trackID : " << trackA.
GetTrackID()
303 <<
"\t Name :" << moleculeA->
GetName()
304 <<
"\t trackA->GetGlobalTime() = "
307 exceptionDescription <<
"trackB : trackID : " << trackB->
GetTrackID()
308 <<
"\t Name :" << moleculeB->
GetName()
309 <<
"\t trackB->GetGlobalTime() = "
312 G4Exception(
"G4DNAMoleculeEncounterStepper::RetrieveResults",
"MoleculeEncounterStepper004",
316 G4double r2 = results->GetDistanceSqr() ;
320 G4cout <<
"\t ************************************************** " <<
G4endl;
321 G4cout <<
"\t Reaction between "
324 <<
"Interaction Range = "
326 G4cout <<
"\t Real distance between reactants = "
328 G4cout <<
"\t Distance between reactants calculated by nearest neighbor algorithm = "
351 -> FindNearestInRange(moleculeA, moleculeB,R));
365 /(16 * (DA + DB + 2*sqrt(DA*DB)));
Before stepping all tracks G4ITStepManager calls all the G4VITModel which may contain a G4VITTimeStep...
G4IT is a interface which allows the inheriting object :
static G4ThreadLocal G4double fUserMinTimeStep
std::ostringstream G4ExceptionDescription
G4VDNAReactionModel * fReactionModel
G4bool fHasAlreadyReachedNullTime
G4DNAMoleculeEncounterStepper & operator=(const G4DNAMoleculeEncounterStepper &)
G4DNAMoleculeEncounterStepper()
const G4ThreeVector & GetPosition() const
G4TrackStatus GetTrackStatus() const
G4DNAMolecularReactionTable sorts out the G4DNAMolecularReactionData for bimolecular reaction...
ReturnType & reference_cast(OriginalType &source)
G4double GetDiffusionCoefficient() const
Returns the diffusion coefficient D.
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4TrackVectorHandle fReactants
virtual ~G4DNAMoleculeEncounterStepper()
virtual G4double CalculateStep(const G4Track &, const G4double &)
const G4String & GetName() const
Returns the name of the molecule.
G4GLOB_DLL std::ostream G4cout
G4double GetGlobalTime() const
G4Molecule * GetMolecule(const G4Track &track)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4ITManager< T > * Instance()
const G4DNAMolecularReactionTable *& fMolecularReactionTable
Given a molecule G4DNAMoleculeEncounterStepper will calculate for its possible reactants what will be...
void RetrieveResults(const G4Track &, const G4Molecule *, const G4Molecule *, const G4double, G4KDTreeResultHandle &, G4bool iterate=true)
Class Description The dynamic molecule holds all the data that change for a molecule It has a pointer...
G4double fSampledMinTimeStep
G4ITManager is able to save into different boxes the ITs that will be used in the simulation...