53 fReactive1(),fReactive2(),
54 fReactionRate(0.),fReducedReactionRadius(0.),
68 if(*reactive1 == *reactive2)
149 for(it2 = it1->second.begin();it2 != it1->second.end();it2++)
179 if(reactive1 != reactive2)
202 pReactionModel -> SetReactionTable(
this);
205 ReactivesMV::iterator itReactives;
207 map<G4Molecule*,map<G4Molecule*, G4bool> > alreadyPrint;
221 const vector<const G4Molecule*>* reactivesVector =
CanReactWith(moleculeA);
224 pReactionModel -> InitialiseToPrint(moleculeA);
228 for(
G4int iReact = 0 ; iReact < nbReactants ; iReact++)
237 if(!alreadyPrint[moleculeA][moleculeB])
250 for(
G4int j = 1 ; j < nbProducts ; j++)
257 outputReaction[n]+=
" -> No product";
270 if(interactionRange!=-1)
279 alreadyPrint[moleculeB][moleculeA] =
TRUE;
291 G4int maxlengthOutputReaction = -1;
292 G4int maxlengthOutputReactionRate = -1;
294 for(
G4int i = 0 ; i < n ; i++)
296 if(maxlengthOutputReaction < (
G4int) outputReaction[i].length())
298 maxlengthOutputReaction = outputReaction[i].length();
300 if(maxlengthOutputReactionRate < (
G4int)outputReactionRate[i].length())
302 maxlengthOutputReactionRate = outputReactionRate[i].length();
306 maxlengthOutputReaction+=2;
307 maxlengthOutputReactionRate+=2;
309 if(maxlengthOutputReaction<10) maxlengthOutputReaction = 10;
310 if(maxlengthOutputReactionRate<30) maxlengthOutputReactionRate = 30;
314 title[0] =
"Reaction";
315 title[1] =
"Reaction Rate [dm3/(mol*s)]";
316 title[2] =
"Interaction Range for chosen reaction model";
319 << setw(maxlengthOutputReaction) << left << title[0]
320 << setw(maxlengthOutputReactionRate) << left << title[1]
321 << setw(2) << left << title[2]
325 G4cout.width(maxlengthOutputReaction+2+maxlengthOutputReactionRate+2+(
G4int)title[2].length());
329 for(
G4int i = 0 ; i < n ; i ++)
331 G4cout<< setw(maxlengthOutputReaction)<< left << outputReaction[i]
332 << setw(maxlengthOutputReactionRate) << left << outputReactionRate[i]
333 << setw(2) << left <<outputRange[i]
337 G4cout.width(maxlengthOutputReaction+2+maxlengthOutputReactionRate+2+(
G4int)title[2].length());
342 delete [] outputReaction;
343 delete [] outputReactionRate;
344 delete [] outputRange;
355 G4String errMsg =
"No reaction table was implemented";
360 ReactionDataMap::const_iterator it1 =
fReactionData.find(reactive1);
365 G4String errMsg =
"No reaction table was implemented for this molecule Definition : "
366 + reactive1 -> GetName();
372 compMoleculeP>::const_iterator it2 = it1->second.find(reactive2);
374 if(it2 == it1->second.end())
377 G4String errMsg =
"No reaction table was implemented for this molecule Definition : "
378 + reactive2 -> GetName();
382 return (it2->second);
385const std::vector<const G4Molecule*>*
390 G4String errMsg =
"No reaction table was implemented";
395 ReactivesMV::const_iterator itReactivesMap =
fReactivesMV.find(aMolecule) ;
400 G4String errMsg =
"No reaction table was implemented for this molecule Definition : "
401 + aMolecule -> GetName();
409 G4cout<<
" G4MolecularInteractionTable::CanReactWith :"<<
G4endl;
411 G4cout<<
" the number of reactants is : " << itReactivesMap->second.size()<<
G4endl;
413 std::vector<const G4Molecule*>::const_iterator itProductsVector =
414 itReactivesMap->second.begin();
416 for( ; itProductsVector != itReactivesMap->second.end(); itProductsVector++)
421 return &(itReactivesMap->second);
427const std::map<const G4Molecule*, const G4DNAMolecularReactionData*, compMoleculeP>*
433 G4String errMsg =
"No reaction table was implemented";
438 ReactionDataMap::const_iterator itReactivesMap =
fReactionData.find(molecule) ;
443 G4String errMsg =
"No reaction table was implemented for this molecule Definition : "
444 + molecule -> GetName();
451 G4cout<<
" G4MolecularInteractionTable::CanReactWith :"<<
G4endl;
453 G4cout<<
" the number of reactants is : " << itReactivesMap->second.size()<<
G4endl;
458 itReactivesMap->second.begin();
460 for( ; itProductsVector != itReactivesMap->second.end(); itProductsVector++)
465 return &(itReactivesMap->second);
471const std::vector<const G4DNAMolecularReactionData*>*
476 G4String errMsg =
"No reaction table was implemented";
485 G4String errMsg =
"No reaction table was implemented for this molecule Definition : "
486 + molecule -> GetName();
491 return &(it->second);
G4DLLIMPORT std::ostream G4cout
G4MoleculeHandle fReactive1
const G4Molecule * GetProduct(G4int i) const
G4MoleculeHandle fReactive2
void SetReactive2(const G4Molecule *reactive)
std::vector< G4MoleculeHandle > * fProducts
void AddProduct(const G4Molecule *molecule)
G4double GetReactionRate() const
const G4Molecule * GetReactive2() const
void SetReactive1(const G4Molecule *reactive)
void SetReactive(const G4Molecule *reactive1, const G4Molecule *reactive2)
const G4Molecule * GetReactive1() const
G4DNAMolecularReactionData()
G4double fReducedReactionRadius
~G4DNAMolecularReactionData()
G4int GetNbProducts() const
static G4DNAMolecularReactionTable * GetReactionTable()
void SetReaction(G4double observedReactionRate, const G4Molecule *reactive1, const G4Molecule *reactive2)
void PrintTable(G4VDNAReactionModel *=0)
static void DeleteInstance()
const std::map< const G4Molecule *, const G4DNAMolecularReactionData *, compMoleculeP > * GetReativesNData(const G4Molecule *aMolecule) const
const std::vector< const G4Molecule * > * CanReactWith(const G4Molecule *aMolecule) const
ReactionDataMap fReactionData
const G4DNAMolecularReactionData * GetReactionData(const G4Molecule *, const G4Molecule *) const
G4DNAMolecularReactionTable()
ReactionDataMV fReactionDataMV
static G4DNAMolecularReactionTable * fInstance
virtual ~G4DNAMolecularReactionTable()
G4MoleculeHandle GetMoleculeHandle(const G4Molecule *)
static G4MoleculeHandleManager * Instance()
const G4String & GetName() const
G4double GetDiffusionCoefficient() const
static G4String ConvertToString(G4bool boolVal)
const G4DNAMolecularReactionTable * GetReactionTable()
virtual G4double GetReactionRadius(const G4Molecule *, const G4Molecule *)=0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)