Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4DNAChemistryManager.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 // $Id: G4DNAChemistryManager.hh 103042 2017-03-10 11:50:07Z gcosmo $
27 //
28 
29 // Author: Mathieu Karamitros
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 #ifndef G4DNACHEMISTRYMANAGER_HH
49 #define G4DNACHEMISTRYMANAGER_HH
50 
51 #include "globals.hh"
52 #include "G4ThreeVector.hh"
53 #include <fstream>
54 #include <memory>
55 #include "G4UImessenger.hh"
56 #include "G4VStateDependent.hh"
57 
58 class G4Track;
61 class G4Molecule;
63 class G4UIcmdWithABool;
66 class G4ITGun;
67 class G4VPhysChemIO;
68 
70 {
74 };
75 
90  public G4VStateDependent
91 {
92 protected:
93  virtual ~G4DNAChemistryManager();
94 
95 public:
96  //============================================================================
97  // STATIC METHODS
98  //============================================================================
101 
105  static void DeleteInstance();
108  static G4bool IsActivated();
109  static void Activated(G4bool flag = true);
110 
111  //============================================================================
112  // VIRTUAL METHODS
113  //============================================================================
114  virtual G4bool Notify(G4ApplicationState requestedState);
115  virtual void SetNewValue(G4UIcommand*, G4String);
116  virtual G4String GetCurrentValue(G4UIcommand * command);
117 
118  //============================================================================
119  // INITIALIZATION AND FINALIZATION METHODS
120  //============================================================================
121  void Initialize();
123  inline void Deregister(G4VUserChemistryList*);
124  void SetGlobalTemperature(G4double temp_K);
125 
126  inline void ForceMasterReinitialization();
127  inline void TagThreadForReinitialization();
128 
129  void Run();
130  void Clear();
131  void Gun(G4ITGun*, bool physicsTableToBuild = true);
132  inline void ForceThreadReinitialization();
133  inline void ForceRebuildingPhysicsTable();
134 
135  //============================================================================
136  // FILE OPERATIONS
137  //============================================================================
143  void WriteInto(const G4String&, std::ios_base::openmode mode =
144  std::ios_base::out);
146 
150  void CloseFile();
151 
152  //============================================================================
153  // PUSH MOLECULES
154  //============================================================================
163  G4int /*electronicLevel*/,
164  const G4Track* /*theIncomingTrack*/);
165 
171  void CreateSolvatedElectron(const G4Track* /*theIncomingTrack*/,
172  G4ThreeVector* finalPosition = 0);
173 
183  void PushMolecule(G4Molecule*& molecule,
184  G4double time,
185  const G4ThreeVector& position,
186  G4int parentID);
187 
197  const G4Track* /*theIncomingTrack*/);
198 
199 
200  inline void SetVerbose(G4int verbose)
201  {
202  fVerbose = verbose;
203  }
204 
205  inline void SetBuildPhysicsTable(G4bool flag)
206  {fBuildPhysicsTable = flag;}
207 
209  {
211  }
212 
213  void ResetCounterWhenRunEnds(G4bool resetCounterWhenRunEnds)
214  {
215  fResetCounterWhenRunEnds = resetCounterWhenRunEnds;
216  }
217 
218  void SetPhysChemIO(G4VPhysChemIO* physChemIO);
219 
220 protected:
223  void InitializeFile();
224  void InitializeMaster();
225  void InitializeThread();
226 
228 
229 private:
234  //G4UIcmdWithADoubleAndUnit* fpGridSize; // not used in release
237 
240 
242  ThreadLocalData();
246  };
247 
249 
252 
255 
260 
262 
265 };
266 
267 //------------------------------------------------------------------------------
268 
270 {
271  fPhysicsTableBuilt = false;
272 }
273 
275 {
276  fpUserChemistryList = chemistryList;
277  Activated();
278 }
279 
281 {
282  if (fpUserChemistryList == chemistryList) fpUserChemistryList = 0;
283 }
284 
286 {
287  fMasterInitialized = false;
289 }
290 
292 {
294 }
295 
297 {
299 }
300 
301 #endif // G4DNACHEMISTRYMANAGER_HH
ElectronicModification
void Gun(G4ITGun *, bool physicsTableToBuild=true)
G4UIcmdWithoutParameter * fpSkipReactionsFromChemList
virtual G4bool Notify(G4ApplicationState requestedState)
G4DNAWaterExcitationStructure * GetExcitationLevel()
static G4DNAChemistryManager * GetInstanceIfExists()
void SetGlobalTemperature(G4double temp_K)
void WriteInto(const G4String &, std::ios_base::openmode mode=std::ios_base::out)
void SetBuildPhysicsTable(G4bool flag)
G4UIdirectory * fpChemDNADirectory
#define G4ThreadLocal
Definition: tls.hh:69
G4UIcmdWithoutParameter * fpInitChem
G4DNAWaterIonisationStructure * GetIonisationLevel()
virtual G4String GetCurrentValue(G4UIcommand *command)
void CreateSolvatedElectron(const G4Track *, G4ThreeVector *finalPosition=0)
void PushMoleculeAtParentTimeAndPlace(G4Molecule *&molecule, const G4Track *)
static G4DNAChemistryManager * fgInstance
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
void SetChemistryList(G4VUserChemistryList *)
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
static void Activated(G4bool flag=true)
G4bool IsCounterResetWhenRunEnds() const
G4VUserChemistryList * fpUserChemistryList
void SetVerbose(G4int verbose)
G4UIcmdWithABool * fpActivateChem
int G4int
Definition: G4Types.hh:78
G4UIcmdWithoutParameter * fpRunChem
G4ApplicationState
void ResetCounterWhenRunEnds(G4bool resetCounterWhenRunEnds)
G4UIcmdWithADoubleAndUnit * fpScaleForNewTemperature
virtual void SetNewValue(G4UIcommand *, G4String)
void Deregister(G4VUserChemistryList *)
G4DNAWaterExcitationStructure * fpExcitationLevel
static G4DNAChemistryManager * Instance()
G4DNAWaterIonisationStructure * fpIonisationLevel
static G4ThreadLocal ThreadLocalData * fpThreadData
void SetPhysChemIO(G4VPhysChemIO *physChemIO)
void PushMolecule(G4Molecule *&molecule, G4double time, const G4ThreeVector &position, G4int parentID)