71 fPoint->SetNode(
nullptr);
99 G4cout <<
"The user track information is a molecule" <<
G4endl;
107 fpMolecularConfiguration = right.fpMolecularConfiguration;
114 if (&right ==
this)
return *
this;
115 fpMolecularConfiguration = right.fpMolecularConfiguration;
123 if (fpMolecularConfiguration == right.fpMolecularConfiguration)
134 return !(*
this == right);
145 return fpMolecularConfiguration < right.fpMolecularConfiguration;
151 G4Molecule::G4Molecule() :
155 fpMolecularConfiguration = 0;
167 RemoveAMoleculeAtTime(fpMolecularConfiguration,
173 fpMolecularConfiguration =
nullptr;
185 fpMolecularConfiguration =
194 fpMolecularConfiguration =
208 G4int OrbitalToFill) :
217 if (OrbitalToFill != 0)
220 dynElectronOccupancy.AddElectron(OrbitalToFill - 1, 1);
224 if (OrbitalToFill == 0)
226 dynElectronOccupancy.RemoveElectron(OrbitalToFree - 1, 1);
230 fpMolecularConfiguration =
232 moleculeDefinition, dynElectronOccupancy);
236 fpMolecularConfiguration = 0;
238 "G4Molecule::G4Molecule(G4MoleculeDefinition * moleculeDefinition, "
239 "G4int OrbitalToFree, G4int OrbitalToFill)",
240 "G4Molecule_wrong_usage_of_constructor",
242 "If you want to use this constructor, the molecule definition has to be "
243 "first defined with electron occupancies");
263 if (Excitation ==
true)
266 dynElectronOccupancy.AddElectron(5, 1);
270 if (Excitation ==
false)
272 dynElectronOccupancy.RemoveElectron(Level, 1);
276 fpMolecularConfiguration =
278 moleculeDefinition, dynElectronOccupancy);
282 fpMolecularConfiguration = 0;
284 "G4Molecule::G4Molecule(G4MoleculeDefinition * moleculeDefinition, "
285 "G4int OrbitalToFree, G4int OrbitalToFill)",
286 "G4Molecule_wrong_usage_of_constructor",
288 "If you want to use this constructor, the molecule definition has to be "
289 "first defined with electron occupancies");
298 fpMolecularConfiguration = molConf;
305 fpMolecularConfiguration =
316 fpMolecularConfiguration = fpMolecularConfiguration->
ExciteMolecule(
326 fpMolecularConfiguration = fpMolecularConfiguration->
IonizeMolecule(
334 fpMolecularConfiguration = fpMolecularConfiguration->
AddElectron(orbit,
342 fpMolecularConfiguration = fpMolecularConfiguration->
RemoveElectron(orbit,
351 orbitToFree, orbitToFill);
358 return fpMolecularConfiguration->
GetName();
396 "A track was already assigned to this molecule");
405 G4double xMomentum = cos(phi) * sin(theta);
406 G4double yMomentum = sin(theta) * sin(phi);
409 G4ThreeVector MomentumDirection(xMomentum, yMomentum, zMomentum);
413 fpMolecularConfiguration->
GetDefinition(), MomentumDirection,
418 AddAMoleculeAtTime(fpMolecularConfiguration,
437 double E = (fpMolecularConfiguration->
GetMass() / (
c_squared)) * (v * v) / 2.;
468 const vector<const G4MolecularDissociationChannel*>*
520 return fpMolecularConfiguration->
GetCharge();
527 fpMolecularConfiguration->
SetMass(aMass);
534 return fpMolecularConfiguration->
GetMass();
568 double temperature)
const
578 return fpMolecularConfiguration;
599 return fpMolecularConfiguration->
GetLabel();
606 fpMolecularConfiguration->
SetLabel(label);
616 fpMolecularConfiguration =
620 assert(fpMolecularConfiguration!=0);
G4double GetDiffusionCoefficient() const
void SetLabel(const G4String &)
static constexpr double k_Boltzmann
const G4String & GetName() const
void SetDiffusionCoefficient(G4double)
const std::vector< const G4MolecularDissociationChannel * > * GetDecayChannel() const
G4bool operator!=(const G4Molecule &right) const
G4bool operator<(const G4Molecule &right) const
static G4Molecule * GetMolecule(const G4Track *)
const G4ThreeVector & GetPosition() const
void SetLabel(const G4String &label)
static G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *, const G4String &label)
G4double GetDiffusionCoefficient() const
G4double GetNbElectrons() const
G4double GetNbElectrons() const
const std::vector< const G4MolecularDissociationChannel * > * GetDecayChannel() const
G4MolecularConfiguration * GetMolecularConfiguration() const
const G4ElectronOccupancy * GetElectronOccupancy() const
G4int GetFakeParticleID() const
static G4double GetGlobalTemperature()
void ChangeConfigurationToLabel(const G4String &label)
G4Molecule(const G4Molecule &)
const G4String & GetName() const
G4IT * GetIT(const G4Track *track)
void MoveOneElectron(G4int, G4int)
const G4String & GetLabel() const
G4GLOB_DLL std::ostream G4cout
G4MolecularConfiguration * IonizeMolecule(G4int)
void SetElectronOccupancy(const G4ElectronOccupancy *)
G4int GetAtomsNumber() const
G4MolecularConfiguration * AddElectron(G4int orbit, G4int n=1)
G4int GetFakeParticleID() const
void SetVanDerVaalsRadius(G4double)
G4MolecularConfiguration * MoveOneElectron(G4int, G4int)
void SetDiffusionCoefficient(G4double)
G4Molecule & operator=(const G4Molecule &right)
G4double GetGlobalTime() const
G4Molecule * GetMolecule(const G4Track &track)
static G4VMoleculeCounter * Instance()
G4int GetMoleculeID() const
void IonizeMolecule(G4int)
static G4MolecularConfiguration * GetOrCreateMolecularConfiguration(const G4MoleculeDefinition *)
const G4MoleculeDefinition * GetDefinition() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static constexpr double c_squared
void SetUserInformation(G4VUserTrackInformation *aValue) const
G4Track * BuildTrack(G4double globalTime, const G4ThreeVector &Position)
const G4String & GetFormatedName() const
const G4String & GetFormatedName() const
G4double GetKineticEnergy() const
void RemoveElectron(G4int, G4int number=1)
void SetDecayTime(G4double)
void SetVanDerVaalsRadius(G4double)
G4int GetAtomsNumber() const
G4DLLIMPORT G4ThreadLocal G4Allocator< G4Molecule > * aMoleculeAllocator
G4ThreadLocal/G4double G4Molecule::fgTemperature = 310; // 310*kelvin;
const G4MoleculeDefinition * GetDefinition() const
const G4String & GetLabel() const
static constexpr double pi
G4double GetDiffusionVelocity() const
G4double GetDecayTime() const
const G4ElectronOccupancy * GetGroundStateElectronOccupancy() const
const G4ElectronOccupancy * GetElectronOccupancy() const
G4MolecularConfiguration * RemoveElectron(G4int, G4int number=1)
G4double GetVanDerVaalsRadius() const
G4double GetDecayTime() const
G4MolecularConfiguration * ExciteMolecule(G4int)
void AddElectron(G4int orbit, G4int n=1)
G4bool operator==(const G4Molecule &right) const
void SetDecayTime(G4double)
G4int RemoveElectron(G4int orbit, G4int number=1)
G4double GetVanDerVaalsRadius() const
void ExciteMolecule(G4int)
G4int GetMoleculeID() const