File indexing completed on 2025-01-18 09:58:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057 #ifndef G4MoleculeDefinition_h
0058 #define G4MoleculeDefinition_h 1
0059
0060 #include "globals.hh"
0061 #include "G4ParticleDefinition.hh"
0062 #include "G4ios.hh"
0063 #include "G4ElectronOccupancy.hh"
0064 #include "G4MolecularDissociationTable.hh"
0065 #include "G4MolecularDissociationChannel.hh"
0066 #include "G4FakeParticleID.hh"
0067
0068 class G4MolecularDissociationChannel;
0069 class G4MolecularDissociationTable;
0070 class G4MolecularConfiguration;
0071
0072
0073
0074
0075
0076 class G4MoleculeDefinition: public G4ParticleDefinition
0077 {
0078 public:
0079 G4MoleculeDefinition(const G4String& name,
0080 G4double mass,
0081 G4double diffCoeff,
0082 G4int charge = 0,
0083 G4int electronicLevels = 0,
0084 G4double radius = -1,
0085 G4int atomsNumber = -1,
0086 G4double lifetime = -1,
0087 G4String aType = "",
0088 G4FakeParticleID ID = G4FakeParticleID::Create());
0089
0090 ~G4MoleculeDefinition() override;
0091
0092 G4MoleculeDefinition(const G4MoleculeDefinition&) = delete;
0093 G4MoleculeDefinition& operator=(const G4MoleculeDefinition&) = delete;
0094
0095
0096 void SetLevelOccupation(G4int,
0097 G4int eNb = 2);
0098
0099
0100
0101
0102 inline void SetDiffusionCoefficient(G4double);
0103 inline G4double GetDiffusionCoefficient() const;
0104
0105 inline void SetAtomsNumber(G4int);
0106 inline G4int GetAtomsNumber() const;
0107
0108 inline void SetVanDerVaalsRadius(G4double);
0109 inline G4double GetVanDerVaalsRadius() const;
0110
0111
0112
0113
0114
0115
0116
0117 G4MolecularConfiguration*
0118 NewConfiguration(const G4String& excitedStateLabel);
0119
0120 G4MolecularConfiguration*
0121 NewConfigurationWithElectronOccupancy(const G4String& excitedStateLabel,
0122 const G4ElectronOccupancy&,
0123 double decayTime = 0.);
0124
0125 G4MolecularConfiguration*
0126 GetConfigurationWithLabel(const G4String& molecularConfLabel);
0127
0128
0129
0130
0131
0132 void AddDecayChannel(const G4MolecularConfiguration* molConf,
0133 const G4MolecularDissociationChannel* channel);
0134
0135
0136
0137 void AddDecayChannel(const G4String& molecularConfLabel,
0138 const G4MolecularDissociationChannel* channel);
0139
0140
0141
0142
0143 const std::vector<const G4MolecularDissociationChannel*>*
0144 GetDecayChannels(const G4MolecularConfiguration*) const;
0145 const std::vector<const G4MolecularDissociationChannel*>*
0146 GetDecayChannels(const G4String&) const;
0147
0148 inline const G4MolecularDissociationTable* GetDecayTable() const;
0149 inline G4MolecularDissociationTable* GetDecayTable();
0150 inline G4double GetDecayTime() const;
0151
0152
0153
0154 inline const G4ElectronOccupancy* GetGroundStateElectronOccupancy() const;
0155 inline G4int GetCharge() const;
0156 inline const G4String& GetName() const;
0157 inline G4double GetMass() const;
0158 inline const G4String& GetType() const;
0159 inline G4int GetNbElectrons() const;
0160 inline G4int GetNbMolecularShells() const;
0161
0162 inline const G4String& GetFormatedName() const
0163 {
0164 return fFormatedName;
0165 }
0166
0167
0168 inline void SetFormatedName(const G4String& name)
0169 {
0170 fFormatedName = name;
0171 }
0172
0173 void Finalize();
0174
0175 static G4MoleculeDefinition* Load(std::istream&);
0176 void Serialize(std::ostream&);
0177
0178 protected:
0179 G4MoleculeDefinition();
0180
0181 private:
0182 G4int fCharge;
0183
0184
0185
0186
0187
0188
0189 G4double fDiffusionCoefficient;
0190
0191 G4int fAtomsNb;
0192 G4double fVanDerVaalsRadius;
0193
0194 G4String fFormatedName;
0195
0196 G4ElectronOccupancy* fElectronOccupancy;
0197 G4MolecularDissociationTable* fDecayTable;
0198 };
0199
0200 inline void G4MoleculeDefinition::SetDiffusionCoefficient(G4double value)
0201 {
0202 fDiffusionCoefficient = value;
0203 }
0204
0205 inline G4double G4MoleculeDefinition::GetDiffusionCoefficient() const
0206 {
0207 return fDiffusionCoefficient;
0208 }
0209
0210 inline G4int G4MoleculeDefinition::GetCharge() const
0211 {
0212 return fCharge;
0213 }
0214
0215 inline G4double G4MoleculeDefinition::GetDecayTime() const
0216 {
0217 return GetPDGLifeTime();
0218 }
0219
0220 inline void G4MoleculeDefinition::SetAtomsNumber(G4int val)
0221 {
0222 fAtomsNb = val;
0223 }
0224
0225 inline G4int G4MoleculeDefinition::GetAtomsNumber() const
0226 {
0227 return fAtomsNb;
0228 }
0229
0230 inline void G4MoleculeDefinition::SetVanDerVaalsRadius(G4double val)
0231 {
0232 fVanDerVaalsRadius = val;
0233 }
0234
0235 inline G4double G4MoleculeDefinition::GetVanDerVaalsRadius() const
0236 {
0237 return fVanDerVaalsRadius;
0238 }
0239
0240 inline const G4ElectronOccupancy* G4MoleculeDefinition::GetGroundStateElectronOccupancy() const
0241 {
0242 return fElectronOccupancy;
0243 }
0244
0245 inline const G4String& G4MoleculeDefinition::GetName() const
0246 {
0247
0248 return GetParticleName();
0249 }
0250
0251 inline G4double G4MoleculeDefinition::GetMass() const
0252 {
0253 return GetPDGMass();
0254 }
0255
0256 inline const G4String& G4MoleculeDefinition::GetType() const
0257 {
0258 return GetParticleSubType();
0259 }
0260
0261 inline G4int G4MoleculeDefinition::GetNbElectrons() const
0262 {
0263 if (fElectronOccupancy != nullptr)
0264 {
0265 return fElectronOccupancy->GetTotalOccupancy();
0266 }
0267
0268 return 0;
0269
0270 }
0271
0272 inline G4int G4MoleculeDefinition::GetNbMolecularShells() const
0273 {
0274 if (fElectronOccupancy != nullptr)
0275 {
0276 return fElectronOccupancy->GetSizeOfOrbit();
0277 }
0278
0279 return 0;
0280 }
0281
0282 inline const G4MolecularDissociationTable* G4MoleculeDefinition::GetDecayTable() const
0283 {
0284 return fDecayTable;
0285 }
0286
0287 inline G4MolecularDissociationTable* G4MoleculeDefinition::GetDecayTable()
0288 {
0289 return fDecayTable;
0290 }
0291 #endif
0292