Geant4-11
G4DNAWaterDissociationDisplacer.cc
Go to the documentation of this file.
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//
27// Author: Mathieu Karamitros
28//
29// WARNING : This class is released as a prototype.
30// It might strongly evolve or even disapear in the next releases.
31//
32// History:
33// -----------
34// 10 Oct 2011 M.Karamitros created
35//
36// -------------------------------------------------------------------
37
40#include "G4SystemOfUnits.hh"
41#include "G4H2O.hh"
42#include "G4H2.hh"
43#include "G4Hydrogen.hh"
44#include "G4Oxygen.hh"
45#include "G4OH.hh"
46#include "G4H3O.hh"
47#include "G4Electron_aq.hh"
48#include "G4H2O2.hh"
49#include "Randomize.hh"
50#include "G4Molecule.hh"
52#include "G4RandomDirection.hh"
53#include "G4Exp.hh"
54#include "G4UnitsTable.hh"
55#include "G4EmParameters.hh"
57
58using namespace std;
59
60//------------------------------------------------------------------------------
61
63 Ionisation_DissociationDecay)
64
66 A1B1_DissociationDecay)
67
69 B1A1_DissociationDecay)
70
72 B1A1_DissociationDecay2)
73
75 AutoIonisation)
76
78 DissociativeAttachment)
79/*
80//------------------------------------------------------------------------------
81#ifdef _WATER_DISPLACER_USE_KREIPL_
82// This function is used to generate the following density distribution:
83// f(r) := 4*r * exp(-2*r)
84// reference:
85// Kreipl, M. S., Friedland, W. & Paretzke, H. G.
86// Time- and space-resolved Monte Carlo study of water radiolysis for photon,
87// electron and ion irradiation.
88// Radiat. Environ. Biophys. 48, 11–20 (2009).
89G4double G4DNAWaterDissociationDisplacer::ElectronProbaDistribution(G4double r)
90{
91 return (2.*r+1.)*G4Exp(-2.*r);
92}
93#endif
94
95//------------------------------------------------------------------------------
96#ifdef _WATER_DISPLACER_USE_TERRISOL_
97// This function is used to generate the following density distribution:
98// f(r) := 4*x^2/(sqrt(%pi)*(b)^3)*exp(-x^2/(b)^2)
99// with b=27.22 for 7 eV
100// reference
101// Terrissol M, Beaudre A (1990) Simulation of space and time evolution
102// of radiolytic species induced by electrons in water.
103// Radiat Prot Dosimetry 31:171–175
104
105G4double G4DNAWaterDissociationDisplacer::ElectronProbaDistribution(G4double r)
106{
107#define b 27.22 // nanometer
108 static constexpr double sqrt_pi = 1.77245; // sqrt(CLHEP::pi);
109 static constexpr double b_to3 = 20168.1; // pow(b,3.);
110 static constexpr double b_to2 = 740.928; // pow(b,2.);
111 static constexpr double inverse_b_to2 = 1. / b_to2;
112
113 static constexpr double main_factor = 4. / (sqrt_pi * b_to3);
114 static constexpr double factorA = sqrt_pi * b_to3 / 4.;
115 static constexpr double factorB = b_to2 / 2.;
116
117 return (main_factor *
118 (factorA * erf(r / b)
119 - factorB * r * G4Exp(-pow(r, 2.) * inverse_b_to2)));
120}
121
122#endif
123//------------------------------------------------------------------------------
124*/
126 :
128 ke(1.7*eV)
129/*#ifdef _WATER_DISPLACER_USE_KREIPL_
130 fFastElectronDistrib(0., 5., 0.001)
131#elif defined _WATER_DISPLACER_USE_TERRISOL_
132 fFastElectronDistrib(0., 100., 0.001)
133#endif*/
134{/*
135 fProba1DFunction =
136 std::bind((G4double(*)(G4double))
137 &G4DNAWaterDissociationDisplacer::ElectronProbaDistribution,
138 std::placeholders::_1);
139
140 size_t nBins = 500;
141 fElectronThermalization.reserve(nBins);
142 double eps = 1. / ((int) nBins);
143 double proba = eps;
144
145 fElectronThermalization.push_back(0.);
146
147 for (size_t i = 1; i < nBins; ++i)
148 {
149 double r = fFastElectronDistrib.Revert(proba, fProba1DFunction);
150 fElectronThermalization.push_back(r * nanometer);
151 proba += eps;
152// G4cout << G4BestUnit(r*nanometer, "Length") << G4endl;
153 }*/
155// SetVerbose(1);
156}
157
158//------------------------------------------------------------------------------
159
161{
162 ;
163}
164
165//------------------------------------------------------------------------------
166
170theDecayChannel) const
171{
172 G4int decayType = theDecayChannel->GetDisplacementType();
173 G4double RMSMotherMoleculeDisplacement(0.);
174
175 switch (decayType)
176 {
177 case Ionisation_DissociationDecay:
178 RMSMotherMoleculeDisplacement = 2.0 * nanometer;
179 break;
180 case A1B1_DissociationDecay:
181 RMSMotherMoleculeDisplacement = 0. * nanometer;
182 break;
183 case B1A1_DissociationDecay:
184 RMSMotherMoleculeDisplacement = 0. * nanometer;
185 break;
186 case B1A1_DissociationDecay2:
187 RMSMotherMoleculeDisplacement = 0. * nanometer;
188 break;
189 case AutoIonisation:
190 RMSMotherMoleculeDisplacement = 2.0 * nanometer;
191 break;
192 case DissociativeAttachment:
193 RMSMotherMoleculeDisplacement = 0. * nanometer;
194 break;
195 }
196
197 if (RMSMotherMoleculeDisplacement == 0)
198 {
199 return G4ThreeVector(0, 0, 0);
200 }
201 auto RandDirection =
202 radialDistributionOfProducts(RMSMotherMoleculeDisplacement);
203
204 return RandDirection;
205}
206
207//------------------------------------------------------------------------------
208
209vector<G4ThreeVector>
212{
213 G4int nbProducts = pDecayChannel->GetNbProducts();
214 vector<G4ThreeVector> theProductDisplacementVector(nbProducts);
215
216 typedef map<const G4MoleculeDefinition*, G4double> RMSmap;
217 RMSmap theRMSmap;
218
219 G4int decayType = pDecayChannel->GetDisplacementType();
220
221 switch (decayType)
222 {
223 case Ionisation_DissociationDecay:
224 {
225 if (fVerbose)
226 {
227 G4cout << "Ionisation_DissociationDecay" << G4endl;
228 G4cout << "Channel's name: " << pDecayChannel->GetName() << G4endl;
229 }
230 G4double RdmValue = G4UniformRand();
231
232 if (RdmValue < 0.5)
233 {
234 // H3O
235 theRMSmap[G4H3O::Definition()] = 0. * nanometer;
236 // OH
237 theRMSmap[G4OH::Definition()] = 0.8 * nanometer;
238 }
239 else
240 {
241 // H3O
242 theRMSmap[G4H3O::Definition()] = 0.8 * nanometer;
243 // OH
244 theRMSmap[G4OH::Definition()] = 0. * nanometer;
245 }
246
247 for (int i = 0; i < nbProducts; i++)
248 {
249 auto pProduct = pDecayChannel->GetProduct(i);
250 G4double theRMSDisplacement = theRMSmap[pProduct->GetDefinition()];
251
252 if (theRMSDisplacement == 0.)
253 {
254 theProductDisplacementVector[i] = G4ThreeVector();
255 }
256 else
257 {
258 auto RandDirection = radialDistributionOfProducts(theRMSDisplacement);
259 theProductDisplacementVector[i] = RandDirection;
260 }
261 }
262 break;
263 }
264 case A1B1_DissociationDecay:
265 {
266 if (fVerbose)
267 {
268 G4cout << "A1B1_DissociationDecay" << G4endl;
269 G4cout << "Channel's name: " << pDecayChannel->GetName() << G4endl;
270 }
271 G4double theRMSDisplacement = 2.4 * nanometer;
272 auto RandDirection =
273 radialDistributionOfProducts(theRMSDisplacement);
274
275 for (G4int i = 0; i < nbProducts; i++)
276 {
277 auto pProduct = pDecayChannel->GetProduct(i);
278
279 if (pProduct->GetDefinition() == G4OH::Definition())
280 {
281 theProductDisplacementVector[i] = -1. / 18. * RandDirection;
282 }
283 else if (pProduct->GetDefinition() == G4Hydrogen::Definition())
284 {
285 theProductDisplacementVector[i] = +17. / 18. * RandDirection;
286 }
287 }
288 break;
289 }
290 case B1A1_DissociationDecay:
291 {
292 if (fVerbose)
293 {
294 G4cout << "B1A1_DissociationDecay" << G4endl;
295 G4cout << "Channel's name: " << pDecayChannel->GetName() << G4endl;
296 }
297
298 G4double theRMSDisplacement = 0.8 * nanometer;
299 auto RandDirection =
300 radialDistributionOfProducts(theRMSDisplacement);
301
302 G4int NbOfOH = 0;
303 for (G4int i = 0; i < nbProducts; ++i)
304 {
305 auto pProduct = pDecayChannel->GetProduct(i);
306 if (pProduct->GetDefinition() == G4H2::Definition())
307 {
308 // In the paper of Kreipl (2009)
309 // theProductDisplacementVector[i] = -2. / 18. * RandDirection;
310
311 // Based on momentum conservation
312 theProductDisplacementVector[i] = -16. / 18. * RandDirection;
313 }
314 else if (pProduct->GetDefinition() == G4OH::Definition())
315 {
316 // In the paper of Kreipl (2009)
317 // G4ThreeVector OxygenDisplacement = +16. / 18. * RandDirection;
318
319 // Based on momentum conservation
320 G4ThreeVector OxygenDisplacement = +2. / 18. * RandDirection;
321 G4double OHRMSDisplacement = 1.1 * nanometer;
322
323 auto OHDisplacement =
324 radialDistributionOfProducts(OHRMSDisplacement);
325
326 if (NbOfOH == 0)
327 {
328 OHDisplacement = 0.5 * OHDisplacement;
329 }
330 else
331 {
332 OHDisplacement = -0.5 * OHDisplacement;
333 }
334
335 theProductDisplacementVector[i] =
336 OHDisplacement + OxygenDisplacement;
337
338 ++NbOfOH;
339 }
340 }
341 break;
342 }
343 case B1A1_DissociationDecay2:
344 {
345 if(fVerbose){
346 G4cout<<"B1A1_DissociationDecay2"<<G4endl;
347 G4cout<<"Channel's name: "<<pDecayChannel->GetName()<<G4endl;
348 }
349
350 G4int NbOfH = 0;
351 for(G4int i =0; i < nbProducts; ++i)
352 {
353 auto pProduct = pDecayChannel->GetProduct(i);
354 if(pProduct->GetDefinition() == G4Oxygen::Definition()){
355 // O(3p)
356 theProductDisplacementVector[i] = G4ThreeVector(0,0,0);
357 }
358 else if(pProduct->GetDefinition() == G4Hydrogen::Definition()){
359 // H
360 G4double HRMSDisplacement = 1.6 * nanometer;
361
362 auto HDisplacement =
363 radialDistributionOfProducts(HRMSDisplacement);
364
365 if(NbOfH==0) HDisplacement = 0.5*HDisplacement;
366 else HDisplacement = -0.5*HDisplacement;
367 theProductDisplacementVector[i] = HDisplacement;
368
369 ++NbOfH;
370 }
371 }
372 break;
373 }
374 case AutoIonisation:
375 {
376 if (fVerbose)
377 {
378 G4cout << "AutoIonisation" << G4endl;
379 G4cout << "Channel's name: " << pDecayChannel->GetName() << G4endl;
380 }
381
382 G4double RdmValue = G4UniformRand();
383
384 if (RdmValue < 0.5)
385 {
386 // H3O
387 theRMSmap[G4H3O::Definition()] = 0. * nanometer;
388 // OH
389 theRMSmap[G4OH::Definition()] = 0.8 * nanometer;
390 }
391 else
392 {
393 // H3O
394 theRMSmap[G4H3O::Definition()] = 0.8 * nanometer;
395 // OH
396 theRMSmap[G4OH::Definition()] = 0. * nanometer;
397 }
398
399 for (G4int i = 0; i < nbProducts; i++)
400 {
401 auto pProduct = pDecayChannel->GetProduct(i);
402 auto theRMSDisplacement = theRMSmap[pProduct->GetDefinition()];
403
404 if (theRMSDisplacement == 0)
405 {
406 theProductDisplacementVector[i] = G4ThreeVector();
407 }
408 else
409 {
410 auto RandDirection =
411 radialDistributionOfProducts(theRMSDisplacement);
412 theProductDisplacementVector[i] = RandDirection;
413 }
414 if (pProduct->GetDefinition() == G4Electron_aq::Definition())
415 {
416 theProductDisplacementVector[i] = radialDistributionOfElectron();
417 }
418 }
419 break;
420 }
421 case DissociativeAttachment:
422 {
423 if (fVerbose)
424 {
425 G4cout << "DissociativeAttachment" << G4endl;
426 G4cout << "Channel's name: " << pDecayChannel->GetName() << G4endl;
427 }
428 G4double theRMSDisplacement = 0.8 * nanometer;
429 auto RandDirection =
430 radialDistributionOfProducts(theRMSDisplacement);
431
432 G4int NbOfOH = 0;
433 for (G4int i = 0; i < nbProducts; ++i)
434 {
435 auto pProduct = pDecayChannel->GetProduct(i);
436 if (pProduct->GetDefinition() == G4H2::Definition())
437 {
438 // In the paper of Kreipl (2009)
439 // theProductDisplacementVector[i] = -2. / 18. * RandDirection;
440
441 // Based on momentum conservation
442 theProductDisplacementVector[i] = -16. / 18. * RandDirection;
443 }
444 else if (pProduct->GetDefinition() == G4OH::Definition())
445 {
446 // In the paper of Kreipl (2009)
447 // G4ThreeVector OxygenDisplacement = +16. / 18. * RandDirection;
448
449 // Based on momentum conservation
450 G4ThreeVector OxygenDisplacement = +2. / 18. * RandDirection;
451 G4double OHRMSDisplacement = 1.1 * nanometer;
452
453 auto OHDisplacement =
454 radialDistributionOfProducts(OHRMSDisplacement);
455
456 if (NbOfOH == 0)
457 {
458 OHDisplacement = 0.5 * OHDisplacement;
459 }
460 else
461 {
462 OHDisplacement = -0.5 * OHDisplacement;
463 }
464 theProductDisplacementVector[i] = OHDisplacement +
465 OxygenDisplacement;
466 ++NbOfOH;
467 }
468 }
469 break;
470 }
471 }
472 return theProductDisplacementVector;
473}
474
475//------------------------------------------------------------------------------
476
480{
481 static const double inverse_sqrt_3 = 1. / sqrt(3.);
482 double sigma = Rrms * inverse_sqrt_3;
483 double x = G4RandGauss::shoot(0., sigma);
484 double y = G4RandGauss::shoot(0., sigma);
485 double z = G4RandGauss::shoot(0., sigma);
486 return G4ThreeVector(x, y, z);
487}
488
489//------------------------------------------------------------------------------
490
493{/*
494 G4double rand_value = G4UniformRand();
495 size_t nBins = fElectronThermalization.size();
496 size_t bin = size_t(floor(rand_value * nBins));
497 size_t bin_p1 = min(bin + 1, nBins - 1);
498
499 return (fElectronThermalization[bin] * (1. - rand_value)
500 + fElectronThermalization[bin_p1] * rand_value) *
501 G4RandomDirection();*/
502
503 G4ThreeVector pdf = G4ThreeVector(0,0,0);
504
510
511 return pdf;
512}
@ fKreipl2009eSolvation
@ fMeesungnoensolid2002eSolvation
@ fRitchie1994eSolvation
@ fTerrisol1990eSolvation
G4CT_COUNT_IMPL(G4DNAWaterDissociationDisplacer, Ionisation_DissociationDecay) G4CT_COUNT_IMPL(G4DNAWaterDissociationDisplacer
static constexpr double eV
Definition: G4SIunits.hh:201
static constexpr double nanometer
Definition: G4SIunits.hh:81
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
#define G4UniformRand()
Definition: Randomize.hh:52
G4ThreeVector GetMotherMoleculeDisplacement(const G4MolecularDissociationChannel *) const override
std::vector< G4ThreeVector > GetProductsDisplacement(const G4MolecularDissociationChannel *) const override
G4ThreeVector radialDistributionOfProducts(G4double r_rms) const
static G4Electron_aq * Definition()
static G4EmParameters * Instance()
G4DNAModelSubType DNAeSolvationSubType() const
static G4H2 * Definition()
Definition: G4H2.cc:45
static G4H3O * Definition()
Definition: G4H3O.cc:46
static G4Hydrogen * Definition()
Definition: G4Hydrogen.cc:45
static G4OH * Definition()
Definition: G4OH.cc:45
static G4Oxygen * Definition()
Definition: G4Oxygen.cc:44
ThreeVector shoot(const G4int Ap, const G4int Af)
static void GetPenetration(G4double energy, G4ThreeVector &displacement)
static void GetPenetration(G4double energy, G4ThreeVector &displacement)
static void GetPenetration(G4double energy, G4ThreeVector &displacement)
static void GetPenetration(G4double energy, G4ThreeVector &displacement)
static void GetPenetration(G4double energy, G4ThreeVector &displacement)