66{
68 {
69
71 }
72
74 {
75 std::istringstream iss(newValue);
76
78 iss >> species1;
79
81 iss >> species2;
82
83 double reactionRate;
84 iss >> reactionRate;
85
86
87
88
89 double dimensionedReactionRate = reactionRate * (1e-3 * m3 / (mole * s));
90
91
92
93 auto reactionData =
95 species1,
96 species2);
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117 while(!iss.eof())
118 {
120 iss >> product;
121
122 if(!product.empty())
123 {
124 reactionData->AddProduct(product);
125 }
126 else
127 {
128 break;
129 }
130 };
131
133 }
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
249 {
251 }
253 {
254 std::istringstream iss(newValue);
255
256
257
258
260 iss >> species1;
261
263 iss >> marker;
264
266
267 if(marker == "+")
268 {
269 iss >> species2;
270 iss >> marker;
271 }
272
273
274
275 auto reactionData =
277 species1,
278 species2);
279
280
281
282
283 if(marker == "->")
284 {
285 iss >> marker;
286
287 while(marker!="|"
288
289 && !iss.eof()
290 )
291 {
292
293 if(marker == "+")
294 {
295 iss >> marker;
296 continue;
297 }
298 if(marker != "H2O")
299 {
300 reactionData->AddProduct(marker);
301 }
302
303 iss >> marker;
304 };
305 }
306
307
308
309
310
312 iss >> rateconst_method;
313 if(rateconst_method == "Fix")
314 {
315 iss >> marker;
316 double reactionRate;
317 iss >> reactionRate;
318
319 double dimensionedReactionRate = reactionRate * (1e-3 * m3 / (mole * s));
320 reactionData->SetObservedReactionRateConstant(dimensionedReactionRate);
321 reactionData->ComputeEffectiveRadius();
323 iss >> markerType;
324 if(markerType == "|")
325 {
327 iss >> reactionType;
328 if(reactionType == 1)
329 {
330 reactionData->SetReactionType(reactionType);
331 }
332 }
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354 }
355 else if(rateconst_method == "Arr")
356 {
357 iss >> marker;
358 double A0 = 0;
359 double E_R = 0;
360
361 iss >> A0;
362 iss >> E_R;
363 reactionData->SetArrehniusParameterization(A0, E_R);
364 }
365 else if(rateconst_method == "Pol")
366 {
367 iss >> marker;
368 std::vector<double> P = {0, 0, 0, 0, 0};
369
370 size_t i = 0;
371 while(i < 4)
372 {
373 double tmp;
374 iss >> tmp;
375 P[i] = tmp;
376
377
378
379 ++i;
380 };
381 reactionData->SetPolynomialParameterization(P);
382 }
383 else if(rateconst_method == "Scale")
384 {
385 iss >> marker;
386 double temp_K;
387 iss >> temp_K;
388 double reactionRateCste;
389 iss >> reactionRateCste;
390 double dimensionedReactionRate = reactionRateCste * (1e-3 * m3 / (mole * s));
391 reactionData->SetObservedReactionRateConstant(dimensionedReactionRate);
392 reactionData->SetScaledParameterization(temp_K, dimensionedReactionRate);
393 }
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
415
416 }
417}
void SetReaction(G4double observedReactionRate, Reactant *reactive1, Reactant *reactive2)
void PrintTable(G4VDNAReactionModel *=nullptr)