00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef G4Molecule_h
00055 #define G4Molecule_h 1
00056
00057 #include "G4IT.hh"
00058 #include "G4Allocator.hh"
00059 #include "G4MoleculeDefinition.hh"
00060
00061 class G4Molecule;
00062 class G4MolecularConfiguration;
00063 class G4MoleculeDefinition;
00064 class G4MolecularDecayChannel;
00065 class G4DynamicParticle;
00066
00067 G4Molecule* GetMolecule(const G4Track& track) ;
00068 G4Molecule* GetMolecule(const G4Track* track) ;
00069
00076 class G4Molecule : public G4IT
00077 {
00078
00079 public:
00080
00081 ITDef(G4Molecule)
00082
00083
00084 void Print() const;
00085
00086
00087 inline void *operator new(size_t);
00088 #ifdef __IBMCPP__
00089 inline void *operator new(size_t sz, void* p) { return p; }
00090 #endif
00091 inline void operator delete(void *aVUserTrackInformation);
00092
00093 G4Molecule(const G4Molecule&);
00094 G4Molecule & operator=(const G4Molecule &right);
00095 G4bool operator==(const G4Molecule &right) const;
00096 G4bool operator!=(const G4Molecule &right) const;
00097 G4bool operator<(const G4Molecule &right) const;
00098
00099 private :
00100 bool CompareElectronOccupancy (const G4ElectronOccupancy* ,
00101 const G4int& , const G4int& ) const;
00102
00103 public:
00104
00108 G4Molecule(G4MoleculeDefinition * molecule);
00109
00113 G4Molecule(G4MoleculeDefinition * molecule, G4int, G4int);
00114
00119 G4Molecule(G4MoleculeDefinition * molecule, G4int, G4bool);
00120
00121 virtual ~G4Molecule();
00122
00123
00124
00127 const G4String& GetName() const;
00128
00131 G4int GetAtomsNumber() const;
00132
00136 void SetElectronOccupancy(const G4ElectronOccupancy*);
00137
00140 void ExciteMolecule(G4int);
00141
00144 void IonizeMolecule(G4int);
00145
00150 void AddElectron(G4int orbit, G4int n =1);
00151
00154 void RemoveElectron(G4int,G4int number=1);
00155
00158 void MoveOneElectron(G4int ,G4int );
00159
00162 G4double GetNbElectrons() const;
00163
00166 void PrintState() const;
00167
00168 G4Track * BuildTrack(G4double globalTime, const G4ThreeVector& Position);
00169
00170 G4double GetKineticEnergy() const;
00171
00172 G4double GetDiffusionVelocity() const;
00173
00174 const std::vector <const G4MolecularDecayChannel*>* GetDecayChannel() const;
00175
00176 G4int GetMoleculeID() const;
00177
00178
00182 const G4MoleculeDefinition* GetDefinition() const;
00183
00184
00185
00187
00192 void SetDiffusionCoefficient(G4double);
00193
00196 G4double GetDiffusionCoefficient() const;
00197
00200 void SetDecayTime(G4double);
00201
00204 G4double GetDecayTime() const;
00205
00208 void SetVanDerVaalsRadius(G4double);
00209 G4double GetVanDerVaalsRadius() const ;
00210
00214 const G4ElectronOccupancy* GetElectronOccupancy() const;
00215
00218 G4int GetCharge() const;
00219
00222 void SetMass(G4double);
00223
00226 G4double GetMass() const;
00228
00229 inline G4MolecularConfiguration* GetMolecularConfiguration() ;
00230
00231 inline static void SetGlobalTemperature(double);
00232 inline static double GetGlobalTemperature();
00233
00234 private:
00237 G4Molecule();
00238
00239 void Init();
00240 G4DynamicParticle* fDynamicParticle;
00241
00242 G4MolecularConfiguration* fMolecularConfiguration;
00243
00244 static double fgTemperature;
00245 };
00246
00247
00248 #if defined G4EM_ALLOC_EXPORT
00249 extern G4DLLEXPORT G4Allocator<G4Molecule> aMoleculeAllocator;
00250 #else
00251 extern G4DLLIMPORT G4Allocator<G4Molecule> aMoleculeAllocator;
00252 #endif
00253
00254
00256 inline void * G4Molecule::operator new(size_t)
00258 {
00259 void * aMolecule;
00260 aMolecule = (void *) aMoleculeAllocator.MallocSingle();
00261 return aMolecule;
00262 }
00263
00265 inline void G4Molecule::operator delete(void * aMolecule)
00267 {
00268
00269
00270 aMoleculeAllocator.FreeSingle((G4Molecule *) aMolecule);
00271 }
00272
00273 inline G4MolecularConfiguration* G4Molecule::GetMolecularConfiguration()
00274 {
00275 return fMolecularConfiguration ;
00276 }
00277
00278 inline void G4Molecule::SetGlobalTemperature(double temperature)
00279 {
00280 fgTemperature = temperature;
00281 }
00282
00283 inline double G4Molecule::GetGlobalTemperature()
00284 {
00285 return fgTemperature;
00286 }
00287
00288 #endif