53 fReactive1(),fReactive2(),
54 fReactionRate(0.),fReducedReactionRadius(0.),
68 if(*reactive1 == *reactive2)
149 for(it2 = it1->second.begin();it2 != it1->second.end();it2++)
151 const G4DNAMolecularReactionData* reactionData = it2->second;
154 const G4Molecule* reactive1 = reactionData->
GetReactive1();
155 const G4Molecule* reactive2 = reactionData->
GetReactive2();
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])
242 moleculeB->GetName();
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);
385 const 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);
427 const 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);
471 const 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);