Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4DNAMolecularReactionTable.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: G4DNAMolecularReactionTable.hh 100802 2016-11-02 14:55:27Z gcosmo $
27 //
28 // Author: Mathieu Karamitros
29 
30 // The code is developed in the framework of the ESA AO7146
31 //
32 // We would be very happy hearing from you, send us your feedback! :)
33 //
34 // In order for Geant4-DNA to be maintained and still open-source,
35 // article citations are crucial.
36 // If you use Geant4-DNA chemistry and you publish papers about your software,
37 // in addition to the general paper on Geant4-DNA:
38 //
39 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
40 //
41 // we would be very happy if you could please also cite the following
42 // reference papers on chemistry:
43 //
44 // J. Comput. Phys. 274 (2014) 841-882
45 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508
46 
47 
48 #ifndef G4MolecularReactionTable_h
49 #define G4MolecularReactionTable_h 1
50 
51 #include "G4ITReactionTable.hh"
53 #include <vector>
54 #include <map>
55 #include <functional>
56 #include "G4ReferenceCast.hh"
57 
58 class G4VDNAReactionModel ;
61 
68 {
69  public :
70  //----------------------------------------------------------------------------
71 
73  G4MolecularConfiguration* reactive1,
74  G4MolecularConfiguration* reactive2);
75 
77  const G4String& reactive1,
78  const G4String& reactive2);
80 
81 
82  //----------------------------------------------------------------------------
83  inline int GetReactionID() const { return fReactionID; }
84  inline void SetReactionID(int ID) { fReactionID = ID; }
85 
86  //----------------------------------------------------------------------------
87  inline std::pair<G4MolecularConfiguration*, G4MolecularConfiguration*>
89  {
90  return std::make_pair(fReactant1, fReactant2);
91  }
92 
94  {
95  return fReactant1;
96  }
98  {
99  return fReactant2;
100  }
101 
103  {
104  fObservedReactionRate = rate;
105  }
106 
108  {
109  return fObservedReactionRate;
110  }
111 
113  {
115  }
116 
118  {
120  }
121 
122  //_____________________________________________________
123 
124  void SetReactant1(G4MolecularConfiguration* reactive) ;
125  void SetReactant2(G4MolecularConfiguration* reactive) ;
126 
127  void SetReactants(G4MolecularConfiguration* reactive1,
128  G4MolecularConfiguration* reactive2);
129 
130  void AddProduct(G4MolecularConfiguration* molecule);
131 
132  void SetReactant1(const G4String& reactive) ;
133  void SetReactant2(const G4String& reactive) ;
134  void SetReactants(const G4String& reactive1, const G4String& reactive2);
135  void AddProduct(const G4String& molecule);
136 
137  inline G4int GetNbProducts() const
138  {
139  if(fProducts) return fProducts->size();
140  return 0;
141  }
142 
144  {
145  if(fProducts) return (*fProducts)[i];
146  return 0;
147  }
148 
149  inline const std::vector<G4MolecularConfiguration*>* GetProducts() const
150  {
151  return fProducts;
152  }
153 
154  inline void RemoveProducts()
155  {
156  if(fProducts)
157  {
158  fProducts->clear();
159  delete fProducts;
160  }
161  }
162 
163  //----------------------------------------------------------------------------
164  // Temperature scaling
165  typedef std::function<double(double)> RateParam;
166 
167  static double PolynomialParam(double temp_K, std::vector<double> P);
168  static double ArrehniusParam(double temp_K, std::vector<double> P);
169  static double ScaledParameterization(double temp_K,
170  double temp_init,
171  double rateCste_init);
172 
173  void SetPolynomialParameterization(const std::vector<double>& P);
174 
175  void SetArrehniusParameterization(double A0, double E_R);
176  void SetScaledParameterization(double temperature_K,
177  double rateCste);
178 
179  void ScaleForNewTemperature(double temp_K);
180 
181  protected :
187 
188  std::vector<G4MolecularConfiguration*>* fProducts;
189  // G4DNAReactionType fReactionType;
192 };
193 
200 {
201 protected:
204 
205  public :
208  static void DeleteInstance();
210 
220  void SetReaction(G4double observedReactionRate,
221  G4MolecularConfiguration* reactive1,
222  G4MolecularConfiguration* reactive2);
223 
225 
227  G4MolecularConfiguration*) const;
228 
230  const G4String&) const;
231 
232  const G4DNAMolecularReactionData* GetReaction(int reactionID) const;
233 
234  size_t GetNReactions() const
235  { return fVectorOfReactionData.size(); }
236 
237  //_________________________________________________________________
241  const std::vector<G4MolecularConfiguration*>*
243 
244  const std::map<G4MolecularConfiguration*, const G4DNAMolecularReactionData*>*
246 
247  const std::vector<const G4DNAMolecularReactionData*>*
249 
250  inline const std::map<G4MolecularConfiguration*,
251  std::map<G4MolecularConfiguration*,
252  const G4DNAMolecularReactionData*> >&
254  {
255  return fReactionData;
256  }
257 
258  inline const std::vector<const G4DNAMolecularReactionData*>&
260  {
261  return fVectorOfReactionData;
262  }
263 
264  void ScaleReactionRateForNewTemperature(double temp_K);
265 
266  //_________________________________________________________________
267  void PrintTable(G4VDNAReactionModel* = 0);
268 
269  protected :
271 
272  //_________________________________________________
273  typedef std::map<G4MolecularConfiguration*,
274  std::map<G4MolecularConfiguration*,
276  typedef std::map<G4MolecularConfiguration*,
277  std::vector<G4MolecularConfiguration*> > ReactivesMV;
278  typedef std::map<G4MolecularConfiguration*,
279  std::vector<const G4DNAMolecularReactionData*> > ReactionDataMV;
280 
284  std::vector<const G4DNAMolecularReactionData*> fVectorOfReactionData;
286 };
287 #endif /*G4MolecularReactionTable_HH*/
288 
const G4DNAMolecularReactionData * GetReaction(int reactionID) const
void ScaleReactionRateForNewTemperature(double temp_K)
static G4DNAMolecularReactionTable * Instance()
G4MolecularConfiguration * GetReactant1() const
void AddProduct(G4MolecularConfiguration *molecule)
void PrintTable(G4VDNAReactionModel *=0)
void SetScaledParameterization(double temperature_K, double rateCste)
std::function< double(double)> RateParam
void SetObservedReactionRateConstant(G4double rate)
std::map< G4MolecularConfiguration *, std::vector< const G4DNAMolecularReactionData * > > ReactionDataMV
std::map< G4MolecularConfiguration *, std::vector< G4MolecularConfiguration * > > ReactivesMV
std::pair< G4MolecularConfiguration *, G4MolecularConfiguration * > GetReactants()
static double ArrehniusParam(double temp_K, std::vector< double > P)
G4MolecularConfiguration * GetProduct(G4int i) const
void SetReactants(G4MolecularConfiguration *reactive1, G4MolecularConfiguration *reactive2)
const std::map< G4MolecularConfiguration *, const G4DNAMolecularReactionData * > * GetReativesNData(G4MolecularConfiguration *) const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4MolecularConfiguration * fReactant1
void SetPolynomialParameterization(const std::vector< double > &P)
std::vector< G4MolecularConfiguration * > * fProducts
G4MolecularConfiguration * GetReactant2() const
std::vector< const G4DNAMolecularReactionData * > fVectorOfReactionData
Double_t radius
void SetEffectiveReactionRadius(G4double radius)
static double PolynomialParam(double temp_K, std::vector< double > P)
std::map< G4MolecularConfiguration *, std::map< G4MolecularConfiguration *, const G4DNAMolecularReactionData * > > ReactionDataMap
const G4DNAMolecularReactionData * GetReactionData(G4MolecularConfiguration *, G4MolecularConfiguration *) const
const std::vector< const G4DNAMolecularReactionData * > & GetVectorOfReactionData()
static double P[]
int G4int
Definition: G4Types.hh:78
static double ScaledParameterization(double temp_K, double temp_init, double rateCste_init)
G4MolecularConfiguration * fReactant2
const std::vector< G4MolecularConfiguration * > * CanReactWith(G4MolecularConfiguration *) const
void SetArrehniusParameterization(double A0, double E_R)
void SetReaction(G4double observedReactionRate, G4MolecularConfiguration *reactive1, G4MolecularConfiguration *reactive2)
G4ReactionTableMessenger * fpMessenger
void SetReactant1(G4MolecularConfiguration *reactive)
const std::vector< G4MolecularConfiguration * > * GetProducts() const
static G4DNAMolecularReactionTable * GetReactionTable()
const std::map< G4MolecularConfiguration *, std::map< G4MolecularConfiguration *, const G4DNAMolecularReactionData * > > & GetAllReactionData()
static G4DNAMolecularReactionTable * fInstance
void SetReactant2(G4MolecularConfiguration *reactive)