Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4Molecule.hh
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // Contact: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
27 //
28 // WARNING : This class is released as a prototype.
29 // It might strongly evolve or even disapear in the next releases.
30 //
31 // The code is developed in the framework of the ESA AO7146
32 //
33 // We would be very happy hearing from you, send us your feedback! :)
34 //
35 // In order for Geant4-DNA to be maintained and still open-source,
36 // article citations are crucial.
37 // If you use Geant4-DNA chemistry and you publish papers about your software,
38 // in addition to the general paper on Geant4-DNA:
39 //
40 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
41 //
42 // we would be very happy if you could please also cite the following
43 // reference papers on chemistry:
44 //
45 // J. Comput. Phys. 274 (2014) 841-882
46 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508
47 //
48 // ---------------------------------------------------------------------
49 // GEANT 4 class header file
50 //
51 // History: first implementation, based on G4DynamicParticle
52 // New dependency : G4VUserTrackInformation
53 //
54 // ---------------- G4Molecule ----------------
55 // first design&implementation by Alfonso Mantero, 7 Apr 2009
56 // New developments Alfonso Mantero & Mathieu Karamitros
57 // Oct/Nov 2009 Class Name changed to G4Molecule
58 // Removed dependency from G4DynamicParticle
59 // New constructors :
60 // copy constructor
61 // direct ionized/excited molecule
62 // New methods :
63 // Get : name,atoms' number,nb electrons,decayChannel
64 // PrintState //To get the electronic level and the
65 // corresponding name of the excitation
66 // Kinematic :
67 // BuildTrack,GetKineticEnergy,GetDiffusionVelocity
68 // Change the way dynCharge and eNb is calculated
69 // ---------------------------------------------------------------------
70 
71 #ifndef G4Molecule_h
72 #define G4Molecule_h 1
73 
74 #include "G4IT.hh"
75 #include "G4Allocator.hh"
76 #include "G4MoleculeDefinition.hh"
77 
78 class G4Molecule;
79 template<>
81 
82 class G4Molecule;
86 class G4DynamicParticle;
87 class G4Material;
88 
91 
98 class G4Molecule : public G4IT
99 {
100 
101 public:
102  // With Description
103 
105 
106  //From G4VUserTrackInformation
107  void Print() const;
108 
109  // new/delete operators are overloded to use G4Allocator
110  inline void *operator new(size_t);
111 #ifdef __IBMCPP__
112  inline void *operator new(size_t sz, void* p)
113  { return p;}
114 #endif
115  inline void operator delete(void*);
116 
117  G4Molecule(const G4Molecule&);
118  G4Molecule & operator=(const G4Molecule &right);
119  G4bool operator==(const G4Molecule &right) const;
120  G4bool operator!=(const G4Molecule &right) const;
121  G4bool operator<(const G4Molecule &right) const;
122 
123  operator int() const
124  {
125  return GetMoleculeID();
126  }
127 
128  virtual G4ITType GetITSubType() const
129  {
130  return GetMoleculeID();
131  }
132 
133 public:
134  //------ Constructors --------------------------
138  G4Molecule(G4MoleculeDefinition * molecule);
139 
140  G4Molecule(G4MoleculeDefinition* molDef, int charge);
141 
146 
152 
154 
155  virtual ~G4Molecule();
156 
157  //-------- Methods -------------------------------
158  //Get from static definition
161  const G4String& GetName() const;
162 
165  const G4String& GetFormatedName() const;
166 
169  G4int GetAtomsNumber() const;
170 
175 
178  void ExciteMolecule(G4int);
179 
182  void IonizeMolecule(G4int);
183 
188  void AddElectron(G4int orbit, G4int n = 1);
189 
192  void RemoveElectron(G4int, G4int number = 1);
193 
196  void MoveOneElectron(G4int /*orbit*/, G4int /*orbit*/);
197 
200  G4double GetNbElectrons() const; //This method can be used to check if the electron s number is physical
201 
204  void PrintState() const;
205 
206  G4Track * BuildTrack(G4double globalTime, const G4ThreeVector& Position);
207 
208  G4double GetKineticEnergy() const;
209 
211 
212  const std::vector<const G4MolecularDissociationChannel*>* GetDecayChannel() const;
213 
214  G4int GetFakeParticleID() const;
215  G4int GetMoleculeID() const;
216 
217  //-------------Inline functions ---------------------
221  const G4MoleculeDefinition* GetDefinition() const;
222 
223  //methods to set/get changing parameters
224 
226 
232 
236 
240  double temperature) const;
241 
244  void SetDecayTime(G4double);
245 
248  G4double GetDecayTime() const;
249 
254 
259 
262  G4int GetCharge() const;
263 
266  void SetMass(G4double);
267 
270  G4double GetMass() const;
271 
274  const G4String& GetLabel() const;
275 
276  void SetLabel(const G4String& label);
277 
278  void ChangeConfigurationToLabel(const G4String& label);
279 
281 
283 
284 // static void SetGlobalTemperature(G4double);
285 // static G4double GetGlobalTemperature();
286 
287  static G4Molecule* GetMolecule(const G4Track*);
288 
289 private:
292  G4Molecule();
293 
295 
296 // double fCachedDiffusionCoefficient;
297 
298 // static /*G4ThreadLocal*/double fgTemperature;
299 };
300 
301 #if defined G4EM_ALLOC_EXPORT
303 #else
305 #endif
306 
308 inline void * G4Molecule::operator new(size_t)
310 {
312  return (void *) aMoleculeAllocator()->MallocSingle();
313 }
314 
316 inline void G4Molecule::operator delete(void * aMolecule)
318 {
319  aMoleculeAllocator()->FreeSingle((G4Molecule *) aMolecule);
320 }
321 
322 #endif
void RemoveElectron(G4int, G4int number=1)
Definition: G4Molecule.cc:344
void SetVanDerVaalsRadius(G4double)
Definition: G4Molecule.cc:508
void SetLabel(const G4String &label)
Definition: G4Molecule.cc:608
G4DLLIMPORT G4Allocator< G4Molecule > *& aMoleculeAllocator()
G4ThreadLocal/G4double G4Molecule::fgTemperature = 310; // 310*kelvin;
Definition: G4Molecule.cc:65
static G4Molecule * GetMolecule(const G4Track *)
Definition: G4Molecule.cc:94
const G4String & GetName() const
Definition: G4Molecule.cc:360
const char * p
Definition: xmltok.h:285
void ExciteMolecule(G4int)
Definition: G4Molecule.cc:318
void MoveOneElectron(G4int, G4int)
Definition: G4Molecule.cc:352
virtual ~G4KDNode()
virtual ~G4Molecule()
Definition: G4Molecule.cc:164
G4double GetVanDerVaalsRadius() const
Definition: G4Molecule.cc:515
G4int GetCharge() const
Definition: G4Molecule.cc:522
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4double GetDecayTime() const
Definition: G4Molecule.cc:501
G4double GetKineticEnergy() const
Definition: G4Molecule.cc:436
G4int GetFakeParticleID() const
Definition: G4Molecule.cc:480
G4int GetAtomsNumber() const
Definition: G4Molecule.cc:374
G4bool operator==(const G4Molecule &right) const
Definition: G4Molecule.cc:125
void SetDecayTime(G4double)
Definition: G4Molecule.cc:494
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
const G4MoleculeDefinition * GetDefinition() const
Definition: G4Molecule.cc:550
void AddElectron(G4int orbit, G4int n=1)
Definition: G4Molecule.cc:336
void SetDiffusionCoefficient(G4double)
Definition: G4Molecule.cc:557
G4double GetMass() const
Definition: G4Molecule.cc:536
G4Molecule * GetMolecule(const G4Track &track)
Definition: G4Molecule.cc:80
const G4String & GetLabel() const
Definition: G4Molecule.cc:601
const std::vector< const G4MolecularDissociationChannel * > * GetDecayChannel() const
Definition: G4Molecule.cc:473
void ChangeConfigurationToLabel(const G4String &label)
Definition: G4Molecule.cc:615
G4double GetDiffusionCoefficient() const
Definition: G4Molecule.cc:564
int G4int
Definition: G4Types.hh:78
G4Molecule & operator=(const G4Molecule &right)
Definition: G4Molecule.cc:116
G4bool operator!=(const G4Molecule &right) const
Definition: G4Molecule.cc:136
G4double GetNbElectrons() const
Definition: G4Molecule.cc:381
G4MolecularConfiguration * fpMolecularConfiguration
Definition: G4Molecule.hh:294
void SetElectronOccupancy(const G4ElectronOccupancy *)
Definition: G4Molecule.cc:307
void IonizeMolecule(G4int)
Definition: G4Molecule.cc:328
#define ITDef(T)
Definition: G4ITType.hh:114
G4int GetMoleculeID() const
Definition: G4Molecule.cc:487
#define G4DLLEXPORT
Definition: G4Types.hh:62
Char_t n[5]
Definition: G4IT.hh:88
void Print() const
Definition: G4Molecule.cc:101
G4bool operator<(const G4Molecule &right) const
Definition: G4Molecule.cc:147
virtual G4ITType GetITSubType() const
Definition: G4Molecule.hh:128
const G4String & GetFormatedName() const
Definition: G4Molecule.cc:367
G4Track * BuildTrack(G4double globalTime, const G4ThreeVector &Position)
Definition: G4Molecule.cc:395
void SetMass(G4double)
Definition: G4Molecule.cc:529
#define G4DLLIMPORT
Definition: G4Types.hh:63
void PrintState() const
Definition: G4Molecule.cc:388
G4double GetDiffusionVelocity() const
Definition: G4Molecule.cc:448
G4MolecularConfiguration * GetMolecularConfiguration() const
Definition: G4Molecule.cc:580
const G4ElectronOccupancy * GetElectronOccupancy() const
Definition: G4Molecule.cc:543