Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VUserChemistryList Class Referenceabstract

#include <G4VUserChemistryList.hh>

+ Inheritance diagram for G4VUserChemistryList:

Public Member Functions

 G4VUserChemistryList (bool flag=true)
 
virtual ~G4VUserChemistryList ()
 
bool IsPhysicsConstructor ()
 
void ThisIsAPhysicsConstructor (bool flag=true)
 
virtual void ConstructMolecule ()
 
virtual void ConstructProcess ()
 
virtual void ConstructDissociationChannels ()
 
virtual void ConstructReactionTable (G4DNAMolecularReactionTable *reactionTable)=0
 
virtual void ConstructTimeStepModel (G4DNAMolecularReactionTable *reactionTable)=0
 
void BuildPhysicsTable ()
 

Protected Member Functions

void RegisterTimeStepModel (G4VITStepModel *timeStepModel, double startingTime=0)
 
void BuildPhysicsTable (G4MoleculeDefinition *)
 

Protected Attributes

int verboseLevel
 
bool fIsPhysicsConstructor
 

Detailed Description

Definition at line 53 of file G4VUserChemistryList.hh.

Constructor & Destructor Documentation

◆ G4VUserChemistryList()

G4VUserChemistryList::G4VUserChemistryList ( bool  flag = true)

Definition at line 41 of file G4VUserChemistryList.cc.

◆ ~G4VUserChemistryList()

G4VUserChemistryList::~G4VUserChemistryList ( )
virtual

Definition at line 47 of file G4VUserChemistryList.cc.

48{
50 if (chemMan)
51 {
52 chemMan->Deregister(*this);
53 }
54}
static G4DNAChemistryManager * GetInstanceIfExists()
void Deregister(G4VUserChemistryList &)

Member Function Documentation

◆ BuildPhysicsTable() [1/2]

void G4VUserChemistryList::BuildPhysicsTable ( )

Definition at line 62 of file G4VUserChemistryList.cc.

63{
64 G4MoleculeTable* theMoleculeTable = G4MoleculeTable::Instance();
65
67 theMoleculeTable->GetDefintionIterator();
68
69 iterator.reset();
70 while (iterator())
71 {
72 G4MoleculeDefinition* moleculeDef = iterator.value();
73 BuildPhysicsTable(moleculeDef);
74 }
75}
G4MoleculeDefinitionIterator GetDefintionIterator()
static G4MoleculeTable * Instance()

Referenced by BuildPhysicsTable().

◆ BuildPhysicsTable() [2/2]

void G4VUserChemistryList::BuildPhysicsTable ( G4MoleculeDefinition moleculeDef)
protected

Definition at line 77 of file G4VUserChemistryList.cc.

78{
79 //Get processes from master thread;
80 G4ProcessManager* pManager = moleculeDef->GetProcessManager();
81
82 if (!pManager)
83 {
84#ifdef G4VERBOSE
85 if (verboseLevel > 0)
86 {
87 G4cout << "G4VUserPhysicsList::BuildPhysicsTable "
88 << " : No Process Manager for " << moleculeDef->GetParticleName()
89 << G4endl;
90 G4cout << moleculeDef->GetParticleName()
91 << " should be created in your PhysicsList" <<G4endl;
92 }
93#endif
94 G4Exception("G4VUserChemistryList::BuildPhysicsTable",
95 "Run0271", FatalException,
96 "No process manager");
97 return;
98 }
99
100 G4ProcessManager* pManagerShadow = moleculeDef->GetMasterProcessManager();
101 G4ProcessVector* pVector = pManager->GetProcessList();
102 if (!pVector)
103 {
104#ifdef G4VERBOSE
105 if (verboseLevel > 0)
106 {
107 G4cout << "G4VUserChemistryList::BuildPhysicsTable "
108 << " : No Process Vector for " << moleculeDef->GetParticleName()
109 << G4endl;
110 }
111#endif
112 G4Exception("G4VUserChemistryList::BuildPhysicsTable",
113 "Run0272", FatalException,
114 "No process Vector");
115 return;
116 }
117#ifdef G4VERBOSE
118 if (verboseLevel > 2)
119 {
120 G4cout << "G4VUserChemistryList::BuildPhysicsTable %%%%%% "
121 << moleculeDef->GetParticleName() << G4endl;
122 G4cout << " ProcessManager : " << pManager
123 << " ProcessManagerShadow : " << pManagerShadow << G4endl;
124 for(std::size_t iv1=0;iv1<pVector->size();++iv1)
125 {
126 G4cout << " " << iv1 << " - " << (*pVector)[iv1]->GetProcessName()
127 << G4endl;
128 }
129 G4cout << "--------------------------------------------------------------"
130 << G4endl;
131 G4ProcessVector* pVectorShadow = pManagerShadow->GetProcessList();
132
133 for(std::size_t iv2=0;iv2<pVectorShadow->size();++iv2)
134 {
135 G4cout << " " << iv2 << " - " << (*pVectorShadow)[iv2]->GetProcessName()
136 << G4endl;
137 }
138 }
139#endif
140 for (std::size_t j = 0; j < pVector->size(); ++j)
141 {
142 //Andrea July 16th 2013 : migration to new interface...
143 //Infer if we are in a worker thread or master thread
144 //Master thread is the one in which the process manager
145 // and process manager shadow pointers are the same
146 if (pManagerShadow == pManager)
147 {
148 (*pVector)[j]->BuildPhysicsTable(*moleculeDef);
149 }
150 else
151 {
152 (*pVector)[j]->BuildWorkerPhysicsTable(*moleculeDef);
153 }
154
155 }
156}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetProcessManager() const
G4ProcessManager * GetMasterProcessManager() const
const G4String & GetParticleName() const
G4ProcessVector * GetProcessList() const
std::size_t size() const

◆ ConstructDissociationChannels()

virtual void G4VUserChemistryList::ConstructDissociationChannels ( )
inlinevirtual

◆ ConstructMolecule()

virtual void G4VUserChemistryList::ConstructMolecule ( )
inlinevirtual

Reimplemented in G4EmDNAChemistry, G4EmDNAChemistry_option1, G4EmDNAChemistry_option3, and G4EmDNAChemistry_option2.

Definition at line 74 of file G4VUserChemistryList.hh.

75 {
76 ;
77 } // PhysicsList::ConstructParticle

◆ ConstructProcess()

virtual void G4VUserChemistryList::ConstructProcess ( )
inlinevirtual

Reimplemented in G4EmDNAChemistry, G4EmDNAChemistry_option1, G4EmDNAChemistry_option3, and G4EmDNAChemistry_option2.

Definition at line 78 of file G4VUserChemistryList.hh.

79 {
80 ;
81 } // PhysicsList::ConstructProcess

◆ ConstructReactionTable()

virtual void G4VUserChemistryList::ConstructReactionTable ( G4DNAMolecularReactionTable reactionTable)
pure virtual

◆ ConstructTimeStepModel()

virtual void G4VUserChemistryList::ConstructTimeStepModel ( G4DNAMolecularReactionTable reactionTable)
pure virtual

◆ IsPhysicsConstructor()

bool G4VUserChemistryList::IsPhysicsConstructor ( )
inline

Definition at line 61 of file G4VUserChemistryList.hh.

62 {
64 }

◆ RegisterTimeStepModel()

void G4VUserChemistryList::RegisterTimeStepModel ( G4VITStepModel timeStepModel,
double  startingTime = 0 
)
protected

◆ ThisIsAPhysicsConstructor()

void G4VUserChemistryList::ThisIsAPhysicsConstructor ( bool  flag = true)
inline

Definition at line 66 of file G4VUserChemistryList.hh.

67 {
69 }

Member Data Documentation

◆ fIsPhysicsConstructor

bool G4VUserChemistryList::fIsPhysicsConstructor
protected

Definition at line 100 of file G4VUserChemistryList.hh.

Referenced by IsPhysicsConstructor(), and ThisIsAPhysicsConstructor().

◆ verboseLevel

int G4VUserChemistryList::verboseLevel
protected

Definition at line 99 of file G4VUserChemistryList.hh.

Referenced by BuildPhysicsTable(), and G4VUserChemistryList().


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