97 G4cout <<
"The user track information is a molecule" <<
G4endl;
106 fpMolecularConfiguration = right.fpMolecularConfiguration;
113 if (&right ==
this)
return *
this;
114 fpMolecularConfiguration = right.fpMolecularConfiguration;
122 return fpMolecularConfiguration == right.fpMolecularConfiguration;
129 return !(*
this == right);
140 return fpMolecularConfiguration < right.fpMolecularConfiguration;
148 fpMolecularConfiguration =
nullptr;
160 RemoveAMoleculeAtTime(fpMolecularConfiguration,
166 fpMolecularConfiguration =
nullptr;
199 G4ElectronOccupancy dynElectronOccupancy(*pMoleculeDefinition->GetGroundStateElectronOccupancy());
201 if (OrbitalToFill != 0)
203 dynElectronOccupancy.RemoveElectron(OrbitalToFree - 1, 1);
204 dynElectronOccupancy.AddElectron(OrbitalToFill - 1, 1);
208 if (OrbitalToFill == 0)
210 dynElectronOccupancy.RemoveElectron(OrbitalToFree - 1, 1);
214 fpMolecularConfiguration =
216 pMoleculeDefinition, dynElectronOccupancy);
220 fpMolecularConfiguration =
nullptr;
222 "G4Molecule::G4Molecule(G4MoleculeDefinition* pMoleculeDefinition, "
223 "G4int OrbitalToFree, G4int OrbitalToFill)",
224 "G4Molecule_wrong_usage_of_constructor",
226 "If you want to use this constructor, the molecule definition has to be "
227 "first defined with electron occupancies");
243 G4ElectronOccupancy dynElectronOccupancy(*pMoleculeDefinition->GetGroundStateElectronOccupancy());
247 dynElectronOccupancy.RemoveElectron(level, 1);
248 dynElectronOccupancy.AddElectron(5, 1);
253 dynElectronOccupancy.RemoveElectron(level, 1);
258 dynElectronOccupancy);
262 fpMolecularConfiguration =
nullptr;
264 "G4Molecule::G4Molecule(G4MoleculeDefinition* pMoleculeDefinition, "
265 "G4int OrbitalToFree, G4int OrbitalToFill)",
266 "G4Molecule_wrong_usage_of_constructor",
268 "If you want to use this constructor, the molecule definition has to be "
269 "first defined with electron occupancies");
277 fpMolecularConfiguration = pMolecularConfiguration;
284 fpMolecularConfiguration =
293 fpMolecularConfiguration = fpMolecularConfiguration->ExciteMolecule(excitationLevel);
300 fpMolecularConfiguration = fpMolecularConfiguration->IonizeMolecule(ionizationLevel);
307 fpMolecularConfiguration = fpMolecularConfiguration->AddElectron(orbit, number);
314 fpMolecularConfiguration =
315 fpMolecularConfiguration->RemoveElectron(orbit, number);
322 fpMolecularConfiguration =
323 fpMolecularConfiguration->MoveOneElectron(orbitToFree, orbitToFill);
330 return fpMolecularConfiguration->GetName();
337 return fpMolecularConfiguration->GetFormatedName();
344 return fpMolecularConfiguration->GetAtomsNumber();
351 return fpMolecularConfiguration->GetNbElectrons();
358 fpMolecularConfiguration->PrintState();
369 "A track was already assigned to this molecule");
378 G4double xMomentum = cos(phi) * sin(theta);
379 G4double yMomentum = sin(theta) * sin(phi);
382 G4ThreeVector MomentumDirection(xMomentum, yMomentum, zMomentum);
386 fpMolecularConfiguration->GetDefinition(), MomentumDirection,
392 AddAMoleculeAtTime(fpMolecularConfiguration,
399 fpTrack->SetUserInformation(
this);
411 double E = (fpMolecularConfiguration->GetMass() / (c_squared)) * (v * v) / 2.;
420 double moleculeMass = fpMolecularConfiguration->GetMass() / (c_squared);
430 return sqrt(3 * k_Boltzmann *
442const vector<const G4MolecularDissociationChannel*>*
445 return fpMolecularConfiguration->GetDissociationChannels();
452 return fpMolecularConfiguration->GetFakeParticleID();
459 return fpMolecularConfiguration->GetMoleculeID();
466 return fpMolecularConfiguration->GetDecayTime();
473 return fpMolecularConfiguration->GetVanDerVaalsRadius();
480 return fpMolecularConfiguration->GetCharge();
487 return fpMolecularConfiguration->GetMass();
494 return fpMolecularConfiguration->GetElectronOccupancy();
501 return fpMolecularConfiguration->GetDefinition();
508 return fpMolecularConfiguration->GetDiffusionCoefficient();
514 double temperature)
const
516 return fpMolecularConfiguration->GetDiffusionCoefficient(pMaterial,
524 return fpMolecularConfiguration;
531 return fpMolecularConfiguration->GetLabel();
542 fpMolecularConfiguration->GetDefinition(), label);
544 assert(fpMolecularConfiguration !=
nullptr);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4IT * GetIT(const G4Track *track)
G4Molecule * GetMolecule(const G4Track &track)
G4Allocator< G4Molecule > *& aMoleculeAllocator()
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
void Print() const override
static G4MolecularConfiguration * GetOrCreateMolecularConfiguration(const G4MoleculeDefinition *)
static G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *, const G4String &label)
static G4double GetGlobalTemperature()
const G4ElectronOccupancy * GetGroundStateElectronOccupancy() const
void IonizeMolecule(G4int)
void RemoveElectron(G4int, G4int number=1)
void AddElectron(G4int orbit, G4int n=1)
static G4Molecule * GetMolecule(const G4Track *)
G4bool operator<(const G4Molecule &right) const
G4double GetVanDerVaalsRadius() const
const G4MolecularConfiguration * GetMolecularConfiguration() const
void SetElectronOccupancy(const G4ElectronOccupancy *)
void MoveOneElectron(G4int, G4int)
const G4String & GetName() const override
const G4String & GetLabel() const
void ChangeConfigurationToLabel(const G4String &label)
G4int GetMoleculeID() const
G4double GetKineticEnergy() const
G4Molecule(const G4Molecule &)
const G4String & GetFormatedName() const
G4int GetAtomsNumber() const
G4bool operator==(const G4Molecule &right) const
G4int GetFakeParticleID() const
G4double GetDiffusionVelocity() const
G4Track * BuildTrack(G4double globalTime, const G4ThreeVector &Position)
void ExciteMolecule(G4int)
G4bool operator!=(const G4Molecule &right) const
const G4ElectronOccupancy * GetElectronOccupancy() const
G4Molecule & operator=(const G4Molecule &right)
const G4MoleculeDefinition * GetDefinition() const
G4double GetDiffusionCoefficient() const
G4double GetDecayTime() const
const std::vector< const G4MolecularDissociationChannel * > * GetDissociationChannels() const
G4double GetNbElectrons() const
static G4VMoleculeCounter * Instance()
#define G4ThreadLocalStatic