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

#include <G4MoleculeTable.hh>

Public Member Functions

virtual ~G4MoleculeTable ()
 
G4MoleculeDefinitionCreateMoleculeDefinition (const G4String &userIdentifier, double diffusion_coefficient)
 
G4MolecularConfigurationCreateConfiguration (const G4String &userIdentifier, const G4MoleculeDefinition *molDef, const G4String &configurationLabel, const G4ElectronOccupancy &eOcc)
 
G4MolecularConfigurationCreateConfiguration (const G4String &userIdentifier, G4MoleculeDefinition *, int charge, double diffusion_coefficient=-1)
 
G4MolecularConfigurationCreateConfiguration (const G4String &userIdentifier, G4MoleculeDefinition *)
 
G4MolecularConfigurationCreateConfiguration (const G4String &userIdentifier, G4MoleculeDefinition *, const G4String &configurationLabel, int charge=0)
 
G4MoleculeDefinitionGetMoleculeDefinition (const G4String &, bool mustExist=true)
 
G4MolecularConfigurationGetConfiguration (const G4String &, bool mustExist=true)
 
G4MolecularConfigurationGetConfiguration (G4int id)
 
void Insert (G4MoleculeDefinition *)
 
void Finalize (G4MoleculeDefinition *)
 
void Finalize ()
 
G4MoleculeDefinitionIterator GetDefintionIterator ()
 
G4ConfigurationIterator GetConfigurationIterator ()
 
void PrepareMolecularConfiguration ()
 
int GetNumberOfDefinedSpecies ()
 

Static Public Member Functions

static G4MoleculeTableInstance ()
 
static G4MoleculeTableGetMoleculeTable ()
 

Protected Types

typedef std::map< G4String, G4MoleculeDefinition * > MoleculeDefTable
 

Protected Member Functions

 G4MoleculeTable ()
 

Protected Attributes

MoleculeDefTable fMoleculeDefTable
 

Static Protected Attributes

static G4MoleculeTablefpgMoleculeTable
 

Detailed Description

Definition at line 58 of file G4MoleculeTable.hh.

Member Typedef Documentation

◆ MoleculeDefTable

Definition at line 131 of file G4MoleculeTable.hh.

Constructor & Destructor Documentation

◆ ~G4MoleculeTable()

G4MoleculeTable::~G4MoleculeTable ( )
virtual

Definition at line 47 of file G4MoleculeTable.cc.

48{
49}

◆ G4MoleculeTable()

G4MoleculeTable::G4MoleculeTable ( )
protected

Definition at line 41 of file G4MoleculeTable.cc.

42{
43}

Referenced by Instance().

Member Function Documentation

◆ CreateConfiguration() [1/4]

G4MolecularConfiguration * G4MoleculeTable::CreateConfiguration ( const G4String userIdentifier,
const G4MoleculeDefinition molDef,
const G4String configurationLabel,
const G4ElectronOccupancy eOcc 
)

Definition at line 233 of file G4MoleculeTable.cc.

237{
238 bool alreadyCreated(false);
239
240 G4MolecularConfiguration* molConf =
242 molDef,
243 configurationLabel,
244 eOcc,
245 alreadyCreated);
246
247 return molConf;
248}
static G4MolecularConfiguration * CreateMolecularConfiguration(const G4String &userIdentifier, const G4MoleculeDefinition *, bool &wasAlreadyCreated)

Referenced by G4EmDNAChemistry::ConstructMolecule(), G4EmDNAChemistry_option1::ConstructMolecule(), and G4EmDNAChemistry_option3::ConstructMolecule().

◆ CreateConfiguration() [2/4]

G4MolecularConfiguration * G4MoleculeTable::CreateConfiguration ( const G4String userIdentifier,
G4MoleculeDefinition molDef 
)

Definition at line 173 of file G4MoleculeTable.cc.

175{
176 bool alreadyCreated(false);
177
178 G4MolecularConfiguration* molConf =
180 molDef,
181 alreadyCreated);
182
183 return molConf;
184}

◆ CreateConfiguration() [3/4]

G4MolecularConfiguration * G4MoleculeTable::CreateConfiguration ( const G4String userIdentifier,
G4MoleculeDefinition molDef,
const G4String configurationLabel,
int  charge = 0 
)

Definition at line 189 of file G4MoleculeTable.cc.

193{
194 bool alreadyCreated(false);
195
196 G4MolecularConfiguration* molConf =
198 molDef,
199 charge,
200 configurationLabel,
201 alreadyCreated);
202
203 return molConf;
204}

◆ CreateConfiguration() [4/4]

G4MolecularConfiguration * G4MoleculeTable::CreateConfiguration ( const G4String userIdentifier,
G4MoleculeDefinition molDef,
int  charge,
double  diffusion_coefficient = -1 
)

Definition at line 209 of file G4MoleculeTable.cc.

213{
214 bool alreadyCreated(false);
215
216 G4MolecularConfiguration* molConf =
218 molDef,
219 charge,
220 userIdentifier,
221 alreadyCreated);
222
223 if(diffusion_coefficient!=-1) // TODO
224 {
225 molConf->SetDiffusionCoefficient(diffusion_coefficient);
226 }
227 return molConf;
228}

◆ CreateMoleculeDefinition()

G4MoleculeDefinition * G4MoleculeTable::CreateMoleculeDefinition ( const G4String userIdentifier,
double  diffusion_coefficient 
)

Definition at line 69 of file G4MoleculeTable.cc.

71{
72 return new G4MoleculeDefinition(name, -1 /* mass*/,
73 diffusion_coefficient);
74}

◆ Finalize() [1/2]

void G4MoleculeTable::Finalize ( )

Definition at line 252 of file G4MoleculeTable.cc.

◆ Finalize() [2/2]

void G4MoleculeTable::Finalize ( G4MoleculeDefinition )
inline

◆ GetConfiguration() [1/2]

G4MolecularConfiguration * G4MoleculeTable::GetConfiguration ( const G4String name,
bool  mustExist = true 
)

Definition at line 105 of file G4MoleculeTable.cc.

106{
107 G4MolecularConfiguration* species =
109
110 if(species == 0 && mustExist)
111 {
112 // exception
113 G4ExceptionDescription description;
114 description << "The configuration " << name
115 << " was not recorded in the table" << G4endl;
116 G4Exception("G4MoleculeTable::GetConfiguration",
117 "CONF_NOT_CREATED",
119 description);
120 }
121
122 return species;
123}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
#define G4endl
Definition: G4ios.hh:57
static G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *, const G4String &label)
const char * name(G4int ptype)

Referenced by G4MoleculeGun::BuildAndPushTrack(), G4EmDNAChemistry::ConstructDissociationChannels(), G4EmDNAChemistry_option1::ConstructDissociationChannels(), G4EmDNAChemistry_option3::ConstructDissociationChannels(), G4EmDNAChemistry_option2::ConstructDissociationChannels(), G4EmDNAChemistry_option1::ConstructMolecule(), G4EmDNAChemistry_option3::ConstructMolecule(), G4EmDNAChemistry_option2::ConstructReactionTable(), G4EmDNAChemistry::ConstructReactionTable(), G4EmDNAChemistry_option1::ConstructReactionTable(), G4EmDNAChemistry_option3::ConstructReactionTable(), G4DNAMolecularReactionTable::GetReactionData(), G4DNAMolecularMaterial::SetMolecularConfiguration(), G4DNAMolecularReactionData::SetReactant1(), G4DNAMolecularReactionData::SetReactant2(), and G4DNAMolecularReactionData::SetReactants().

◆ GetConfiguration() [2/2]

G4MolecularConfiguration * G4MoleculeTable::GetConfiguration ( G4int  id)

Definition at line 128 of file G4MoleculeTable.cc.

129{
130 G4MolecularConfiguration* species =
132
133 return species;
134}

◆ GetConfigurationIterator()

G4ConfigurationIterator G4MoleculeTable::GetConfigurationIterator ( )

Definition at line 259 of file G4MoleculeTable.cc.

260{
262}
G4MoleculeIterator< G4MolecularConfiguration > G4ConfigurationIterator
static std::map< G4String, G4MolecularConfiguration * > & GetUserIDTable()

Referenced by G4MoleculeCounter::Initialize(), and G4MolecularConfiguration::ScaleAllDiffusionCoefficientsOnWater().

◆ GetDefintionIterator()

G4MoleculeDefinitionIterator G4MoleculeTable::GetDefintionIterator ( )
inline

◆ GetMoleculeDefinition()

G4MoleculeDefinition * G4MoleculeTable::GetMoleculeDefinition ( const G4String name,
bool  mustExist = true 
)

Definition at line 79 of file G4MoleculeTable.cc.

81{
82 MoleculeDefTable::iterator it = fMoleculeDefTable.find(name);
83 G4MoleculeDefinition* definition(0);
84 if (it != fMoleculeDefTable.end())
85 {
86 definition = it->second;
87 }
88 else if(mustExist)
89 {
90 // exception
91 G4ExceptionDescription description;
92 description << "The molecule definition " << name
93 << " was NOT recorded in the table" << G4endl;
94 G4Exception("G4MoleculeTable::CreateMoleculeModel",
95 "MOLECULE_DEFINITION_NOT_CREATED",
97 description);
98 }
99 return definition;
100}

Referenced by G4MolecularConfiguration::Unserialize().

◆ GetMoleculeTable()

G4MoleculeTable * G4MoleculeTable::GetMoleculeTable ( )
static

Definition at line 61 of file G4MoleculeTable.cc.

62{
63 return Instance();
64}
static G4MoleculeTable * Instance()

Referenced by G4DNAMolecularReactionTable::GetReactionData().

◆ GetNumberOfDefinedSpecies()

int G4MoleculeTable::GetNumberOfDefinedSpecies ( )

Definition at line 266 of file G4MoleculeTable.cc.

◆ Insert()

void G4MoleculeTable::Insert ( G4MoleculeDefinition moleculeDefinition)

Definition at line 138 of file G4MoleculeTable.cc.

139{
140
141 const G4String& name = moleculeDefinition->GetName();
142 MoleculeDefTable::iterator it = fMoleculeDefTable.find(name);
143 if (it == fMoleculeDefTable.end())
144 {
145 fMoleculeDefTable[name] = moleculeDefinition;
146 }
147 else
148 {
149 // exception
150 G4ExceptionDescription description;
151 description << "The molecule definition " << name
152 << " was already recorded in the table" << G4endl;
153 G4Exception("G4MoleculeTable::CreateMoleculeDefinition",
154 "DEFINITION_ALREADY_CREATED", FatalException, description);
155 }
156}
const G4String & GetName() const

Referenced by G4MoleculeDefinition::G4MoleculeDefinition().

◆ Instance()

G4MoleculeTable * G4MoleculeTable::Instance ( )
static

Definition at line 53 of file G4MoleculeTable.cc.

54{
56 return fpgMoleculeTable;
57}
static G4MoleculeTable * fpgMoleculeTable

Referenced by G4DNAMolecularReactionData::AddProduct(), G4MoleculeGun::BuildAndPushTrack(), G4VUserChemistryList::BuildPhysicsTable(), G4EmDNAChemistry::ConstructDissociationChannels(), G4EmDNAChemistry_option1::ConstructDissociationChannels(), G4EmDNAChemistry_option3::ConstructDissociationChannels(), G4EmDNAChemistry_option2::ConstructDissociationChannels(), G4EmDNAChemistry::ConstructMolecule(), G4EmDNAChemistry_option1::ConstructMolecule(), G4EmDNAChemistry_option3::ConstructMolecule(), G4EmDNAChemistry_option2::ConstructMolecule(), G4EmDNAChemistry::ConstructProcess(), G4EmDNAChemistry_option1::ConstructProcess(), G4EmDNAChemistry_option3::ConstructProcess(), G4EmDNAChemistry_option2::ConstructProcess(), G4EmDNAChemistry_option2::ConstructReactionTable(), G4EmDNAChemistry::ConstructReactionTable(), G4EmDNAChemistry_option1::ConstructReactionTable(), G4EmDNAChemistry_option3::ConstructReactionTable(), G4MoleculeDefinition::Finalize(), G4MoleculeDefinition::G4MoleculeDefinition(), GetMoleculeTable(), G4MoleculeCounter::Initialize(), G4DNAChemistryManager::InitializeThreadSharedData(), G4DNAChemistryManager::Run(), G4MolecularConfiguration::ScaleAllDiffusionCoefficientsOnWater(), G4DNAMolecularMaterial::SetMolecularConfiguration(), G4DNAMolecularReactionData::SetReactant1(), G4DNAMolecularReactionData::SetReactant2(), G4DNAMolecularReactionData::SetReactants(), and G4MolecularConfiguration::Unserialize().

◆ PrepareMolecularConfiguration()

void G4MoleculeTable::PrepareMolecularConfiguration ( )

Definition at line 160 of file G4MoleculeTable.cc.

161{
162 MoleculeDefTable::iterator it = fMoleculeDefTable.begin();
163
164 for(; it != fMoleculeDefTable.end() ; ++it)
165 {
167 }
168}
static G4MolecularConfiguration * GetOrCreateMolecularConfiguration(const G4MoleculeDefinition *)

Referenced by G4DNAChemistryManager::InitializeThreadSharedData().

Member Data Documentation

◆ fMoleculeDefTable

MoleculeDefTable G4MoleculeTable::fMoleculeDefTable
protected

◆ fpgMoleculeTable

G4MoleculeTable * G4MoleculeTable::fpgMoleculeTable
staticprotected

Definition at line 130 of file G4MoleculeTable.hh.

Referenced by Instance().


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