Geant4  10.02.p03
G4DNAMolecularReactionTable Class Reference

#include <G4DNAMolecularReactionTable.hh>

Inheritance diagram for G4DNAMolecularReactionTable:
Collaboration diagram for G4DNAMolecularReactionTable:

Public Member Functions

virtual ~G4DNAMolecularReactionTable ()
 
void SetReaction (G4double observedReactionRate, G4MolecularConfiguration *reactive1, G4MolecularConfiguration *reactive2)
 
void SetReaction (G4DNAMolecularReactionData *)
 
const G4DNAMolecularReactionDataGetReactionData (G4MolecularConfiguration *, G4MolecularConfiguration *) const
 
const G4DNAMolecularReactionDataGetReactionData (const G4String &, const G4String &) const
 
const G4DNAMolecularReactionDataGetReaction (int reactionID) const
 
size_t GetNReactions () const
 
const std::vector< G4MolecularConfiguration * > * CanReactWith (G4MolecularConfiguration *) const
 
const std::map< G4MolecularConfiguration *, const G4DNAMolecularReactionData * > * GetReativesNData (G4MolecularConfiguration *) const
 
const std::vector< const G4DNAMolecularReactionData * > * GetReactionData (G4MolecularConfiguration *) const
 
const std::map< G4MolecularConfiguration *, std::map< G4MolecularConfiguration *, const G4DNAMolecularReactionData * > > & GetAllReactionData ()
 
const std::vector< const G4DNAMolecularReactionData * > & GetVectorOfReactionData ()
 
void ScaleReactionRateForNewTemperature (double temp_K)
 
void PrintTable (G4VDNAReactionModel *=0)
 
- Public Member Functions inherited from G4ITReactionTable
 G4ITReactionTable ()
 
virtual ~G4ITReactionTable ()
 
 G4ITReactionTable (const G4ITReactionTable &)
 
G4ITReactionTableoperator= (const G4ITReactionTable &)
 

Static Public Member Functions

static G4DNAMolecularReactionTableGetReactionTable ()
 
static G4DNAMolecularReactionTableInstance ()
 
static void DeleteInstance ()
 

Protected Types

typedef std::map< G4MolecularConfiguration *, std::map< G4MolecularConfiguration *, const G4DNAMolecularReactionData * > > ReactionDataMap
 
typedef std::map< G4MolecularConfiguration *, std::vector< G4MolecularConfiguration * > > ReactivesMV
 
typedef std::map< G4MolecularConfiguration *, std::vector< const G4DNAMolecularReactionData * > > ReactionDataMV
 

Protected Member Functions

 G4DNAMolecularReactionTable ()
 

Protected Attributes

G4bool fVerbose
 
ReactionDataMap fReactionData
 
ReactivesMV fReactantsMV
 
ReactionDataMV fReactionDataMV
 
std::vector< const G4DNAMolecularReactionData * > fVectorOfReactionData
 
G4ReactionTableMessengerfpMessenger
 

Static Protected Attributes

static G4DNAMolecularReactionTablefInstance
 

Detailed Description

G4DNAMolecularReactionTable sorts out the G4DNAMolecularReactionData for bimolecular reaction

Definition at line 199 of file G4DNAMolecularReactionTable.hh.

Member Typedef Documentation

◆ ReactionDataMap

◆ ReactionDataMV

Definition at line 279 of file G4DNAMolecularReactionTable.hh.

◆ ReactivesMV

Constructor & Destructor Documentation

◆ G4DNAMolecularReactionTable()

G4DNAMolecularReactionTable::G4DNAMolecularReactionTable ( )
protected

Definition at line 243 of file G4DNAMolecularReactionTable.cc.

243  :
245 // , fMoleculeHandleManager(G4MoleculeHandleManager::Instance())
246 {
247 // G4cout << "G4DNAMolecularReactionTable::G4DNAMolecularReactionTable()" << G4endl;
248  fVerbose = false;
250  return;
251 }
G4ReactionTableMessenger * fpMessenger

◆ ~G4DNAMolecularReactionTable()

G4DNAMolecularReactionTable::~G4DNAMolecularReactionTable ( )
virtual

Definition at line 255 of file G4DNAMolecularReactionTable.cc.

256 {
257  // DEBUG
258 // G4cout << "G4MolecularReactionTable::~G4MolecularReactionTable" << G4endl;
259 
260  if(fpMessenger) delete fpMessenger;
261 
262  ReactionDataMap::iterator it1 = fReactionData.begin();
263  std::map<G4MolecularConfiguration*,
264  const G4DNAMolecularReactionData*>::iterator it2;
265 
266  for(; it1 != fReactionData.end(); it1++)
267  {
268  for(it2 = it1->second.begin(); it2 != it1->second.end(); it2++)
269  {
270  const G4DNAMolecularReactionData* reactionData = it2->second;
271  if(reactionData)
272  {
273  G4MolecularConfiguration* reactant1 =
274  reactionData->GetReactant1();
275  G4MolecularConfiguration* reactant2 =
276  reactionData->GetReactant2();
277 
278  fReactionData[reactant1][reactant2] = 0;
279  fReactionData[reactant2][reactant1] = 0;
280 
281  delete reactionData;
282  }
283  }
284  }
285 
286  fReactionDataMV.clear();
287  fReactionData.clear();
288  fReactantsMV.clear();
289 }
G4ReactionTableMessenger * fpMessenger
G4MolecularConfiguration * GetReactant2() const
G4MolecularConfiguration * GetReactant1() const
Here is the call graph for this function:

Member Function Documentation

◆ CanReactWith()

const std::vector< G4MolecularConfiguration * > * G4DNAMolecularReactionTable::CanReactWith ( G4MolecularConfiguration aMolecule) const

Given a molecule's type, it returns with which a reaction is allowed

Definition at line 544 of file G4DNAMolecularReactionTable.cc.

545 {
546  if (fReactantsMV.empty())
547  {
548  G4String errMsg = "No reaction table was implemented";
549  G4Exception("G4MolecularInteractionTable::CanReactWith", "",
550  FatalErrorInArgument, errMsg);
551  return 0;
552  }
553 
554  ReactivesMV::const_iterator itReactivesMap = fReactantsMV.find(aMolecule);
555 
556  if (itReactivesMap == fReactantsMV.end())
557  {
558 #ifdef G4VERBOSE
559  if (fVerbose)
560  {
561  G4String errMsg = "No reaction table was implemented for this molecule : "
562  + aMolecule->GetName();
563 // G4Exception("G4MolecularInteractionTable::CanReactWith","",FatalErrorInArgument, errMsg);
564  G4cout << "--- G4MolecularInteractionTable::GetReactionData ---" << G4endl;
565  G4cout << errMsg << G4endl;
566  }
567 #endif
568  return 0;
569  }
570  else
571  {
572  if(fVerbose)
573  {
574  G4cout<< " G4MolecularInteractionTable::CanReactWith :"<<G4endl;
575  G4cout<<"You are checking reactants for : " << aMolecule->GetName()<<G4endl;
576  G4cout<<" the number of reactants is : " << itReactivesMap->second.size()<<G4endl;
577 
578  std::vector<G4MolecularConfiguration*>::const_iterator itProductsVector =
579  itReactivesMap->second.begin();
580 
581  for(; itProductsVector != itReactivesMap->second.end(); itProductsVector++)
582  {
583  G4cout<<(*itProductsVector)->GetName()<<G4endl;
584  }
585  }
586  return &(itReactivesMap->second);
587  }
588  return 0;
589 }
const G4String & GetName() const
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeleteInstance()

void G4DNAMolecularReactionTable::DeleteInstance ( )
static

Definition at line 233 of file G4DNAMolecularReactionTable.cc.

234 {
235  // DEBUG
236 // G4cout << "G4MolecularReactionTable::DeleteInstance" << G4endl;
237  if (fInstance) delete fInstance;
238  fInstance = 0;
239 }
static G4DNAMolecularReactionTable * fInstance
Here is the caller graph for this function:

◆ GetAllReactionData()

const std::map<G4MolecularConfiguration*, std::map<G4MolecularConfiguration*, const G4DNAMolecularReactionData*> >& G4DNAMolecularReactionTable::GetAllReactionData ( )
inline

Definition at line 253 of file G4DNAMolecularReactionTable.hh.

254  {
255  return fReactionData;
256  }

◆ GetNReactions()

size_t G4DNAMolecularReactionTable::GetNReactions ( ) const
inline

Definition at line 234 of file G4DNAMolecularReactionTable.hh.

235  { return fVectorOfReactionData.size(); }
std::vector< const G4DNAMolecularReactionData * > fVectorOfReactionData

◆ GetReaction()

const G4DNAMolecularReactionData * G4DNAMolecularReactionTable::GetReaction ( int  reactionID) const

Definition at line 744 of file G4DNAMolecularReactionTable.cc.

745 {
746  for(size_t i = 0 ; i < fVectorOfReactionData.size() ; ++i)
747  {
748  if(fVectorOfReactionData[i]->GetReactionID() == reactionID)
749  return fVectorOfReactionData[i];
750  }
751  return nullptr;
752 }
std::vector< const G4DNAMolecularReactionData * > fVectorOfReactionData

◆ GetReactionData() [1/3]

const G4DNAMolecularReactionData * G4DNAMolecularReactionTable::GetReactionData ( G4MolecularConfiguration reactant1,
G4MolecularConfiguration reactant2 
) const

Definition at line 501 of file G4DNAMolecularReactionTable.cc.

503 {
504  if (fReactionData.empty())
505  {
506  G4String errMsg = "No reaction table was implemented";
507  G4Exception("G4MolecularInteractionTable::GetReactionData", "",
508  FatalErrorInArgument, errMsg);
509  return 0;
510  }
511 
512  ReactionDataMap::const_iterator it1 = fReactionData.find(reactant1);
513 
514  if (it1 == fReactionData.end())
515  {
516  G4String errMsg =
517  "No reaction table was implemented for this molecule Definition : " + reactant1
518  ->GetName();
519 // G4cout << "--- G4MolecularInteractionTable::GetReactionData ---" << G4endl;
520 // G4cout << errMsg << G4endl;
521  G4Exception("G4MolecularInteractionTable::GetReactionData", "",
522  FatalErrorInArgument, errMsg);
523 // return 0;
524  }
525 
526  std::map<G4MolecularConfiguration*,
527  const G4DNAMolecularReactionData*>::const_iterator it2 =
528  it1->second.find(reactant2);
529 
530  if (it2 == it1->second.end())
531  {
532  G4cout << "Name : " << reactant2->GetName() << G4endl;
533  G4String errMsg = "No reaction table was implemented for this molecule : "
534  + reactant2 -> GetName();
535  G4Exception("G4MolecularInteractionTable::GetReactionData","",FatalErrorInArgument, errMsg);
536  }
537 
538  return (it2->second);
539 }
const G4String & GetName() const
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetReactionData() [2/3]

const G4DNAMolecularReactionData * G4DNAMolecularReactionTable::GetReactionData ( const G4String mol1,
const G4String mol2 
) const

Definition at line 666 of file G4DNAMolecularReactionTable.cc.

668 {
670  ->GetConfiguration(mol1);
672  ->GetConfiguration(mol2);
673 
674  return GetReactionData(conf1, conf2);
675 }
const G4DNAMolecularReactionData * GetReactionData(G4MolecularConfiguration *, G4MolecularConfiguration *) const
static G4MoleculeTable * GetMoleculeTable()
G4MolecularConfiguration * GetConfiguration(const G4String &, bool mustExist=true)
Here is the call graph for this function:

◆ GetReactionData() [3/3]

const std::vector< const G4DNAMolecularReactionData * > * G4DNAMolecularReactionTable::GetReactionData ( G4MolecularConfiguration molecule) const

Definition at line 640 of file G4DNAMolecularReactionTable.cc.

641 {
642  if (fReactionDataMV.empty())
643  {
644  G4String errMsg = "No reaction table was implemented";
645  G4Exception("G4MolecularInteractionTable::CanInteractWith", "",
646  FatalErrorInArgument, errMsg);
647  return 0;
648  }
649  ReactionDataMV::const_iterator it = fReactionDataMV.find(molecule);
650 
651  if (it == fReactionDataMV.end())
652  {
653  G4cout << "Nom : " << molecule->GetName() << G4endl;
654  G4String errMsg = "No reaction table was implemented for this molecule Definition : "
655  + molecule -> GetName();
656  G4Exception("G4MolecularInteractionTable::GetReactionData","",FatalErrorInArgument, errMsg);
657  return 0; // coverity
658  }
659 
660  return &(it->second);
661 }
const G4String & GetName() const
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:

◆ GetReactionTable()

G4DNAMolecularReactionTable * G4DNAMolecularReactionTable::GetReactionTable ( )
static

Definition at line 211 of file G4DNAMolecularReactionTable.cc.

212 {
213  if (!fInstance)
214  {
216  }
217  return fInstance;
218 }
static G4DNAMolecularReactionTable * fInstance
Here is the caller graph for this function:

◆ GetReativesNData()

const std::map< G4MolecularConfiguration *, const G4DNAMolecularReactionData * > * G4DNAMolecularReactionTable::GetReativesNData ( G4MolecularConfiguration molecule) const

Definition at line 594 of file G4DNAMolecularReactionTable.cc.

595 {
596  if (fReactionData.empty())
597  {
598  G4String errMsg = "No reaction table was implemented";
599  G4Exception("G4MolecularInteractionTable::CanInteractWith", "",
600  FatalErrorInArgument, errMsg);
601  return 0;
602  }
603 
604  ReactionDataMap::const_iterator itReactivesMap = fReactionData.find(molecule);
605 
606  if (itReactivesMap == fReactionData.end())
607  {
608  return 0;
609 // G4cout << "Nom : " << molecule->GetName() << G4endl;
610 // G4String errMsg = "No reaction table was implemented for this molecule Definition : "
611 // + molecule -> GetName();
612 // G4Exception("G4MolecularInteractionTable::CanReactWith","",FatalErrorInArgument, errMsg);
613  }
614  else
615  {
616  if(fVerbose)
617  {
618  G4cout<< " G4MolecularInteractionTable::CanReactWith :"<<G4endl;
619  G4cout<<"You are checking reactants for : " << molecule->GetName()<<G4endl;
620  G4cout<<" the number of reactants is : " << itReactivesMap->second.size()<<G4endl;
621 
622  std::map<G4MolecularConfiguration*,
623  const G4DNAMolecularReactionData*>::const_iterator itProductsVector =
624  itReactivesMap->second.begin();
625 
626  for(; itProductsVector != itReactivesMap->second.end(); itProductsVector++)
627  {
628  G4cout<<itProductsVector->first->GetName()<<G4endl;
629  }
630  }
631  return &(itReactivesMap->second);
632  }
633 
634  return 0;
635 }
const G4String & GetName() const
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:

◆ GetVectorOfReactionData()

const std::vector<const G4DNAMolecularReactionData*>& G4DNAMolecularReactionTable::GetVectorOfReactionData ( )
inline

Definition at line 259 of file G4DNAMolecularReactionTable.hh.

260  {
261  return fVectorOfReactionData;
262  }
std::vector< const G4DNAMolecularReactionData * > fVectorOfReactionData

◆ Instance()

G4DNAMolecularReactionTable * G4DNAMolecularReactionTable::Instance ( void  )
static

Definition at line 222 of file G4DNAMolecularReactionTable.cc.

223 {
224  if (!fInstance)
225  {
227  }
228  return fInstance;
229 }
static G4DNAMolecularReactionTable * fInstance
Here is the caller graph for this function:

◆ PrintTable()

void G4DNAMolecularReactionTable::PrintTable ( G4VDNAReactionModel pReactionModel = 0)

Definition at line 325 of file G4DNAMolecularReactionTable.cc.

326 {
327  // Print Reactions and Interaction radius for jump step = 3ps
328 
329  G4IosFlagsSaver iosfs(G4cout);
330 
331  if (pReactionModel)
332  {
333  if (!(pReactionModel->GetReactionTable())) pReactionModel->SetReactionTable(
334  this);
335  }
336 
337  ReactivesMV::iterator itReactives;
338 
339  map<G4MolecularConfiguration*, map<G4MolecularConfiguration*, G4bool> > alreadyPrint;
340 
341  G4cout << "Number of chemical species involved in reactions = "
342  << fReactantsMV.size() << G4endl;
343 
344  G4int nbPrintable = fReactantsMV.size() * fReactantsMV.size();
345 
346  G4String *outputReaction = new G4String[nbPrintable];
347  G4String *outputReactionRate = new G4String[nbPrintable];
348  G4String *outputRange = new G4String[nbPrintable];
349  G4int n = 0;
350 
351  for (itReactives = fReactantsMV.begin(); itReactives != fReactantsMV.end();
352  itReactives++)
353  {
354  G4MolecularConfiguration* moleculeA = (G4MolecularConfiguration*) itReactives->first;
355  const vector<G4MolecularConfiguration*>* reactivesVector = CanReactWith(moleculeA);
356 
357  if (pReactionModel) pReactionModel->InitialiseToPrint(moleculeA);
358 
359  G4int nbReactants = fReactantsMV[itReactives->first].size();
360 
361  for (G4int iReact = 0; iReact < nbReactants; iReact++)
362  {
363 
364  G4MolecularConfiguration* moleculeB = (G4MolecularConfiguration*) (*reactivesVector)[iReact];
365 
366  const G4DNAMolecularReactionData* reactionData =
367  fReactionData[moleculeA][moleculeB];
368 
369  //-----------------------------------------------------------
370  // Name of the reaction
371  if (!alreadyPrint[moleculeA][moleculeB])
372  {
373  outputReaction[n] = moleculeA->GetName() + " + " + moleculeB->GetName();
374 
375  G4int nbProducts = reactionData->GetNbProducts();
376 
377  if (nbProducts)
378  {
379  outputReaction[n] += " -> " + reactionData->GetProduct(0)->GetName();
380 
381  for (G4int j = 1; j < nbProducts; j++)
382  {
383  outputReaction[n] += " + " + reactionData->GetProduct(j)->GetName();
384  }
385  }
386  else
387  {
388  outputReaction[n] += " -> No product";
389  }
390 
391  //-----------------------------------------------------------
392  // Interaction Rate
393  outputReactionRate[n] = G4UIcommand::ConvertToString(
394  reactionData->GetObservedReactionRateConstant() / (1e-3 * m3 / (mole * s)));
395 
396  //-----------------------------------------------------------
397  // Calculation of the Interaction Range
398  G4double interactionRange = -1;
399  if (pReactionModel) interactionRange =
400  pReactionModel->GetReactionRadius(iReact);
401 
402  if (interactionRange != -1)
403  {
404  outputRange[n] = G4UIcommand::ConvertToString(
405  interactionRange / nanometer);
406  }
407  else
408  {
409  outputRange[n] = "";
410  }
411 
412  alreadyPrint[moleculeB][moleculeA] = TRUE;
413  n++;
414  }
415  }
416  }
417  // G4cout<<"Number of possible reactions: "<< n << G4endl;
418 
420  // Tableau dynamique en fonction du nombre de caractere maximal dans
421  // chaque colonne
423 
424  G4int maxlengthOutputReaction = -1;
425  G4int maxlengthOutputReactionRate = -1;
426 
427  for (G4int i = 0; i < n; i++)
428  {
429  if (maxlengthOutputReaction < (G4int) outputReaction[i].length())
430  {
431  maxlengthOutputReaction = outputReaction[i].length();
432  }
433  if (maxlengthOutputReactionRate < (G4int) outputReactionRate[i].length())
434  {
435  maxlengthOutputReactionRate = outputReactionRate[i].length();
436  }
437  }
438 
439  maxlengthOutputReaction += 2;
440  maxlengthOutputReactionRate += 2;
441 
442  if (maxlengthOutputReaction < 10) maxlengthOutputReaction = 10;
443  if (maxlengthOutputReactionRate < 30) maxlengthOutputReactionRate = 30;
444 
445  G4String* title;
446 
447  if (pReactionModel) title = new G4String[3];
448  else title = new G4String[2];
449 
450  title[0] = "Reaction";
451  title[1] = "Reaction Rate [dm3/(mol*s)]";
452 
453  if (pReactionModel) title[2] =
454  "Interaction Range for chosen reaction model [nm]";
455 
456  G4cout << setfill(' ') << setw(maxlengthOutputReaction) << left << title[0]
457  << setw(maxlengthOutputReactionRate) << left << title[1];
458 
459  if (pReactionModel) G4cout << setw(2) << left << title[2];
460 
461  G4cout << G4endl;
462 
463  G4cout.fill('-');
464  if (pReactionModel) G4cout.width(
465  maxlengthOutputReaction + 2 + maxlengthOutputReactionRate + 2
466  + (G4int) title[2].length());
467  else G4cout.width(maxlengthOutputReaction + 2 + maxlengthOutputReactionRate);
468  G4cout << "-" << G4endl;
469  G4cout.fill(' ');
470 
471  for (G4int i = 0; i < n; i++)
472  {
473  G4cout << setw(maxlengthOutputReaction) << left << outputReaction[i]
474  << setw(maxlengthOutputReactionRate) << left
475  << outputReactionRate[i];
476 
477  if (pReactionModel) G4cout << setw(2) << left << outputRange[i];
478 
479  G4cout << G4endl;
480 
481  G4cout.fill('-');
482  if (pReactionModel) G4cout.width(
483  maxlengthOutputReaction + 2 + maxlengthOutputReactionRate + 2
484  + (G4int) title[2].length());
485  else G4cout.width(
486  maxlengthOutputReaction + 2 + maxlengthOutputReactionRate);
487  G4cout << "-" << G4endl;
488  G4cout.fill(' ');
489  }
490 
491  delete[] title;
492  delete[] outputReaction;
493  delete[] outputReactionRate;
494  delete[] outputRange;
495 }
const G4String & GetName() const
static const double m3
Definition: G4SIunits.hh:130
static const double nanometer
Definition: G4SIunits.hh:100
G4MolecularConfiguration * GetProduct(G4int i) const
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
int G4int
Definition: G4Types.hh:78
static const double s
Definition: G4SIunits.hh:168
Char_t n[5]
G4GLOB_DLL std::ostream G4cout
void SetReactionTable(const G4DNAMolecularReactionTable *)
virtual G4double GetReactionRadius(G4MolecularConfiguration *, G4MolecularConfiguration *)=0
#define TRUE
Definition: globals.hh:55
static const double mole
Definition: G4SIunits.hh:283
#define G4endl
Definition: G4ios.hh:61
const G4DNAMolecularReactionTable * GetReactionTable()
double G4double
Definition: G4Types.hh:76
subroutine title
Definition: hijing1.383.f:5981
virtual void InitialiseToPrint(G4MolecularConfiguration *)=0
const std::vector< G4MolecularConfiguration * > * CanReactWith(G4MolecularConfiguration *) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScaleReactionRateForNewTemperature()

void G4DNAMolecularReactionTable::ScaleReactionRateForNewTemperature ( double  temp_K)

Definition at line 712 of file G4DNAMolecularReactionTable.cc.

713 {
714  size_t end = fVectorOfReactionData.size();
715 
716  for(size_t i = 0 ; i < end ; ++i)
717  {
719  ScaleForNewTemperature(temp_K);
720  }
721 }
std::vector< const G4DNAMolecularReactionData * > fVectorOfReactionData
Here is the caller graph for this function:

◆ SetReaction() [1/2]

void G4DNAMolecularReactionTable::SetReaction ( G4double  observedReactionRate,
G4MolecularConfiguration reactive1,
G4MolecularConfiguration reactive2 
)

Define a reaction : First argument : reaction rate Second argument : reactant 1 Third argument : reactant 2 Fourth argument : a std::vector holding the molecular products if this last argument is NULL then it will be interpreted as a reaction giving no products

Definition at line 314 of file G4DNAMolecularReactionTable.cc.

317 {
319  reactionRate, reactant1, reactant2);
320  SetReaction(reactionData);
321 }
void SetReaction(G4double observedReactionRate, G4MolecularConfiguration *reactive1, G4MolecularConfiguration *reactive2)
Here is the caller graph for this function:

◆ SetReaction() [2/2]

void G4DNAMolecularReactionTable::SetReaction ( G4DNAMolecularReactionData reactionData)

Definition at line 293 of file G4DNAMolecularReactionTable.cc.

294 {
295  G4MolecularConfiguration* reactant1 = reactionData->GetReactant1();
296  G4MolecularConfiguration* reactant2 = reactionData->GetReactant2();
297 
298  fReactionData[reactant1][reactant2] = reactionData;
299  fReactantsMV[reactant1].push_back(reactant2);
300  fReactionDataMV[reactant1].push_back(reactionData);
301 
302  if (reactant1 != reactant2)
303  {
304  fReactionData[reactant2][reactant1] = reactionData;
305  fReactantsMV[reactant2].push_back(reactant1);
306  fReactionDataMV[reactant2].push_back(reactionData);
307  }
308 
309  fVectorOfReactionData.push_back(reactionData);
310 }
G4MolecularConfiguration * GetReactant2() const
G4MolecularConfiguration * GetReactant1() const
std::vector< const G4DNAMolecularReactionData * > fVectorOfReactionData
Here is the call graph for this function:

Member Data Documentation

◆ fInstance

G4DNAMolecularReactionTable * G4DNAMolecularReactionTable::fInstance
staticprotected

Definition at line 203 of file G4DNAMolecularReactionTable.hh.

◆ fpMessenger

G4ReactionTableMessenger* G4DNAMolecularReactionTable::fpMessenger
protected

Definition at line 285 of file G4DNAMolecularReactionTable.hh.

◆ fReactantsMV

ReactivesMV G4DNAMolecularReactionTable::fReactantsMV
protected

Definition at line 282 of file G4DNAMolecularReactionTable.hh.

◆ fReactionData

ReactionDataMap G4DNAMolecularReactionTable::fReactionData
protected

Definition at line 281 of file G4DNAMolecularReactionTable.hh.

◆ fReactionDataMV

ReactionDataMV G4DNAMolecularReactionTable::fReactionDataMV
protected

Definition at line 283 of file G4DNAMolecularReactionTable.hh.

◆ fVectorOfReactionData

std::vector<const G4DNAMolecularReactionData*> G4DNAMolecularReactionTable::fVectorOfReactionData
protected

Definition at line 284 of file G4DNAMolecularReactionTable.hh.

◆ fVerbose

G4bool G4DNAMolecularReactionTable::fVerbose
protected

Definition at line 270 of file G4DNAMolecularReactionTable.hh.


The documentation for this class was generated from the following files: