60 G4MolecularConfigurationManager::MolecularConfigurationTable::iterator it1;
61 std::map<G4ElectronOccupancy, G4MolecularConfiguration*, comparator>::iterator it2;
63 for(it1 = fTable.begin() ; it1 != fTable.end() ; it1++)
65 for(it2=it1->second.begin(); it2!=it1->second.end(); it2++)
80 if(GetManager()->fTable[molDef][elecOcc])
82 return GetManager()->fTable[molDef][elecOcc];
94 if(GetManager()->fTable[molDef][elecOcc])
96 return GetManager()->fTable[molDef][elecOcc];
107 if(fgManager)
delete fgManager;
116 fMoleculeDefinition = moleculeDef ;
117 fgManager->fTable[fMoleculeDefinition][elecOcc] =
this;
118 std::map<G4ElectronOccupancy, G4MolecularConfiguration*, comparator>::iterator it ;
119 it = fgManager->fTable[moleculeDef].find(elecOcc);
120 fElectronOccupancy = &(it->first);
122 fDynCharge = fMoleculeDefinition->
GetNbElectrons()-fElectronOccupancy->GetTotalOccupancy();
123 fDynMass = fMoleculeDefinition->GetMass() ;
125 fDynDiffusionCoefficient = fMoleculeDefinition->GetDiffusionCoefficient() ;
126 fDynVanDerVaalsRadius = fMoleculeDefinition->GetVanDerVaalsRadius() ;
127 fDynDecayTime = fMoleculeDefinition->GetDecayTime() ;
132 if(fElectronOccupancy)
134 delete fElectronOccupancy;
135 fElectronOccupancy = 0;
151 if (&right==
this)
return *
this;
165 return ChangeConfiguration(newElectronOccupancy);
174 if(newElectronOccupancy.
GetOccupancy(IonizedLevel) != 0)
181 " you want to free. The molecule's name you want to ionized is "+ GetName();
188 return ChangeConfiguration(newElectronOccupancy);
195 return ChangeConfiguration(newElectronOccupancy);
209 " you want to free. The molecule's name is "+ GetName();
214 return ChangeConfiguration(newElectronOccupancy);
221 if(newElectronOccupancy . GetOccupancy(orbitToFree)>=1)
223 newElectronOccupancy . RemoveElectron(orbitToFree,1);
224 newElectronOccupancy . AddElectron(orbitToFill,1);
229 " you want to free. The molecule's name is "+ GetName();
234 return ChangeConfiguration(newElectronOccupancy);
241 fName = fMoleculeDefinition->GetName();
252 return fMoleculeDefinition->GetAtomsNumber();
257 return fElectronOccupancy->GetTotalOccupancy();
262 G4cout<<
"--------------Print electronic state of "<<GetName()<<
"---------------"<<
G4endl;
263 fElectronOccupancy->DumpInfo();
264 if(fElectronOccupancy==fMoleculeDefinition->GetGroundStateElectronOccupancy())
270 if(fMoleculeDefinition->GetDecayTable())
271 G4cout<<
"Transition :"<<(fMoleculeDefinition->GetDecayTable())->GetExcitedState(fElectronOccupancy)<<
G4endl;
278 return fMoleculeDefinition-> GetDecayChannels(fElectronOccupancy);
283 if(fMoleculeDefinition)
284 return fMoleculeDefinition->GetPDGEncoding();
The pointer G4MolecularConfiguration will be shared by all the molecules having the same molecule def...
void PrintState() const
Display the electronic state of the molecule.
const G4String & GetName() const
Returns the name of the molecule.
~G4MolecularConfiguration()
G4MolecularConfiguration * ChangeConfiguration(const G4ElectronOccupancy &newElectronOccupancy)
static G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &electronOccupancy)
static G4String ConvertToString(G4bool boolVal)
G4double GetNbElectrons() const
Returns the number of electron.
const std::vector< const G4MolecularDecayChannel * > * GetDecayChannel() const
G4GLOB_DLL std::ostream G4cout
G4int GetOccupancy(G4int orbit) const
G4MolecularConfiguration * IonizeMolecule(G4int)
Method used in Geant4-DNA to ionize water molecules.
G4MolecularConfiguration * AddElectron(G4int orbit, G4int n=1)
Add n electrons to a given orbit.
G4MolecularConfiguration::G4MolecularConfigurationManager MolecularConfigurationManager
G4int AddElectron(G4int orbit, G4int number=1)
static void DeleteManager()
G4MolecularConfiguration * MoveOneElectron(G4int, G4int)
Move one electron from an orbit to another.
G4MolecularConfiguration & operator=(G4MolecularConfiguration &right)
~G4MolecularConfigurationManager()
G4int GetNbElectrons() const
static G4MolecularConfigurationManager * GetManager()
G4int GetMoleculeID() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4ThreadLocal G4MolecularConfigurationManager * fgManager
G4int GetAtomsNumber() const
Returns the nomber of atoms compouning the molecule.
G4MolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &)
const G4ElectronOccupancy * GetGroundStateElectronOccupancy() const
G4MolecularConfiguration * RemoveElectron(G4int, G4int number=1)
Remove n electrons to a given orbit.
G4MolecularConfiguration * ExciteMolecule(G4int)
Method used in Geant4-DNA to excite water molecules.
G4int RemoveElectron(G4int orbit, G4int number=1)