69 fPoint->SetNode(
nullptr);
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;
145G4Molecule::G4Molecule()
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 =
322 fpMolecularConfiguration =
330 return fpMolecularConfiguration->
GetName();
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,
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*>*
480 return fpMolecularConfiguration->
GetCharge();
487 return fpMolecularConfiguration->
GetMass();
514 double temperature)
const
524 return fpMolecularConfiguration;
531 return fpMolecularConfiguration->
GetLabel();
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()
G4GLOB_DLL std::ostream G4cout
void Print() const override
const G4String & GetName() const
G4MolecularConfiguration * IonizeMolecule(G4int) const
const G4String & GetLabel() const
G4MolecularConfiguration * RemoveElectron(G4int, G4int number=1) const
const G4MoleculeDefinition * GetDefinition() const
G4int GetFakeParticleID() const
G4MolecularConfiguration * MoveOneElectron(G4int, G4int) const
G4double GetDecayTime() const
G4int GetMoleculeID() const
static G4MolecularConfiguration * GetOrCreateMolecularConfiguration(const G4MoleculeDefinition *)
const G4ElectronOccupancy * GetElectronOccupancy() const
const std::vector< const G4MolecularDissociationChannel * > * GetDissociationChannels() const
const G4String & GetFormatedName() const
G4double GetNbElectrons() const
static G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *, const G4String &label)
G4MolecularConfiguration * ExciteMolecule(G4int) const
G4double GetVanDerVaalsRadius() const
G4MolecularConfiguration * AddElectron(G4int orbit, G4int n=1) const
G4double GetDiffusionCoefficient() const
static G4double GetGlobalTemperature()
G4int GetAtomsNumber() const
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
const G4ThreeVector & GetPosition() const
G4double GetGlobalTime() const
void SetUserInformation(G4VUserTrackInformation *aValue) const
static G4VMoleculeCounter * Instance()
#define G4ThreadLocalStatic