Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Attributes
G4DNAWaterDissociationDisplacer Class Reference

#include <G4DNAWaterDissociationDisplacer.hh>

Inheritance diagram for G4DNAWaterDissociationDisplacer:
G4VMolecularDecayDisplacer

Public Member Functions

 G4DNAWaterDissociationDisplacer ()
 
virtual ~G4DNAWaterDissociationDisplacer ()
 
virtual std::vector
< G4ThreeVector
GetProductsDisplacement (const G4MolecularDecayChannel *) const
 
virtual G4ThreeVector GetMotherMoleculeDisplacement (const G4MolecularDecayChannel *) const
 
G4ThreeVector radialDistributionOfElectron () const
 
- Public Member Functions inherited from G4VMolecularDecayDisplacer
void SetVerbose (G4int)
 
virtual ~G4VMolecularDecayDisplacer ()
 

Static Public Attributes

static G4DLLIMPORT const
DisplacementType 
Ionisation_DissociationDecay = G4VMolecularDecayDisplacer::AddDisplacement()
 
static G4DLLIMPORT const
DisplacementType 
A1B1_DissociationDecay = G4VMolecularDecayDisplacer::AddDisplacement()
 
static G4DLLIMPORT const
DisplacementType 
B1A1_DissociationDecay = G4VMolecularDecayDisplacer::AddDisplacement()
 
static G4DLLIMPORT const
DisplacementType 
AutoIonisation = G4VMolecularDecayDisplacer::AddDisplacement()
 
static G4DLLEXPORT const
DisplacementType 
DissociativeAttachment = G4VMolecularDecayDisplacer::AddDisplacement()
 
- Static Public Attributes inherited from G4VMolecularDecayDisplacer
static G4DLLIMPORT const
DisplacementType 
NoDisplacement = G4VMolecularDecayDisplacer::AddDisplacement()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VMolecularDecayDisplacer
 G4VMolecularDecayDisplacer ()
 
- Static Protected Member Functions inherited from G4VMolecularDecayDisplacer
static DisplacementType AddDisplacement ()
 
- Protected Attributes inherited from G4VMolecularDecayDisplacer
G4int fVerbose
 
- Static Protected Attributes inherited from G4VMolecularDecayDisplacer
static DisplacementTypeLast = 0
 

Detailed Description

Definition at line 45 of file G4DNAWaterDissociationDisplacer.hh.

Constructor & Destructor Documentation

G4DNAWaterDissociationDisplacer::G4DNAWaterDissociationDisplacer ( )
G4DNAWaterDissociationDisplacer::~G4DNAWaterDissociationDisplacer ( )
virtual

Definition at line 64 of file G4DNAWaterDissociationDisplacer.cc.

65 {;}

Member Function Documentation

G4ThreeVector G4DNAWaterDissociationDisplacer::GetMotherMoleculeDisplacement ( const G4MolecularDecayChannel theDecayChannel) const
virtual

Implements G4VMolecularDecayDisplacer.

Definition at line 67 of file G4DNAWaterDissociationDisplacer.cc.

References A1B1_DissociationDecay, AutoIonisation, B1A1_DissociationDecay, DissociativeAttachment, Ionisation_DissociationDecay, and python.hepunit::nanometer.

68 {
69  G4int decayType = theDecayChannel -> GetDisplacementType();
70 
71  G4double RMSMotherMoleculeDisplacement=0;
72 
73  if(decayType == Ionisation_DissociationDecay)
74  {
75  RMSMotherMoleculeDisplacement = 2.0 * nanometer ;
76  }
77  else if(decayType == A1B1_DissociationDecay)
78  {
79  RMSMotherMoleculeDisplacement = 0. * nanometer ;
80  }
81  else if(decayType == B1A1_DissociationDecay)
82  {
83  RMSMotherMoleculeDisplacement = 0. * nanometer ;
84  }
85  else if(decayType == AutoIonisation)
86  {
87  RMSMotherMoleculeDisplacement = 2.0 * nanometer ;
88  }
89  else if(decayType == DissociativeAttachment)
90  {
91  RMSMotherMoleculeDisplacement = 0. * nanometer ;
92  }
93 
94  if(RMSMotherMoleculeDisplacement==0)
95  {
96  return G4ThreeVector(0,0,0);
97  }
98  G4ThreeVector RandDirection = radialDistributionOfProducts(RMSMotherMoleculeDisplacement);
99 
100  return RandDirection;
101 }
static G4DLLIMPORT const DisplacementType AutoIonisation
static G4DLLIMPORT const DisplacementType B1A1_DissociationDecay
static G4DLLIMPORT const DisplacementType A1B1_DissociationDecay
CLHEP::Hep3Vector G4ThreeVector
static G4DLLIMPORT const DisplacementType Ionisation_DissociationDecay
int G4int
Definition: G4Types.hh:78
int nanometer
Definition: hepunit.py:35
static G4DLLEXPORT const DisplacementType DissociativeAttachment
double G4double
Definition: G4Types.hh:76
vector< G4ThreeVector > G4DNAWaterDissociationDisplacer::GetProductsDisplacement ( const G4MolecularDecayChannel theDecayChannel) const
virtual

Implements G4VMolecularDecayDisplacer.

Definition at line 105 of file G4DNAWaterDissociationDisplacer.cc.

References A1B1_DissociationDecay, AutoIonisation, B1A1_DissociationDecay, G4H3O::Definition(), G4Electron_aq::Definition(), G4OH::Definition(), G4Hydrogen::Definition(), G4H2::Definition(), DissociativeAttachment, G4VMolecularDecayDisplacer::fVerbose, G4cout, G4endl, G4UniformRand, G4Molecule::GetDefinition(), G4MolecularDecayChannel::GetProduct(), Ionisation_DissociationDecay, python.hepunit::nanometer, and radialDistributionOfElectron().

106 {
107  G4int nbProducts = theDecayChannel -> GetNbProducts();
108  vector<G4ThreeVector> theProductDisplacementVector (nbProducts);
109 
110  typedef map<const G4MoleculeDefinition*,G4double> RMSmap ;
111  RMSmap theRMSmap;
112 
113  G4int decayType = theDecayChannel -> GetDisplacementType();
114 
115  if(decayType == Ionisation_DissociationDecay)
116  {
117  if(fVerbose)
118  G4cout<<"Ionisation_DissociationDecay"<<G4endl;
119  G4double RdmValue = G4UniformRand();
120 
121  if(RdmValue< 0.5)
122  {
123  // H3O
124  theRMSmap[G4H3O::Definition()] = 0.* nanometer;
125  // OH
126  theRMSmap[G4OH::Definition()] = 0.8* nanometer;
127  }
128  else
129  {
130  // H3O
131  theRMSmap[G4H3O::Definition()] = 0.8* nanometer;
132  // OH
133  theRMSmap[G4OH::Definition()] = 0.* nanometer;
134  }
135 
136  for(int i = 0; i < nbProducts ; i++)
137  {
138  G4double theRMSDisplacement;
139  const G4Molecule* product = theDecayChannel->GetProduct(i);
140  theRMSDisplacement = theRMSmap[product->GetDefinition()];
141 
142  if(theRMSDisplacement==0)
143  {
144  theProductDisplacementVector[i] = G4ThreeVector();
145  }
146  else
147  {
148  G4ThreeVector RandDirection = radialDistributionOfProducts(theRMSDisplacement);
149  theProductDisplacementVector[i] = RandDirection;
150  }
151  }
152  }
153  else if(decayType == A1B1_DissociationDecay)
154  {
155  if(fVerbose)
156  G4cout<<"A1B1_DissociationDecay"<<G4endl;
157  G4double theRMSDisplacement = 2.4 * nanometer;
158  G4ThreeVector RandDirection = radialDistributionOfProducts(theRMSDisplacement);
159 
160  for(G4int i =0 ; i < nbProducts ; i++)
161  {
162  const G4Molecule* product = theDecayChannel->GetProduct(i);
163  if(product->GetDefinition()== G4OH::Definition())
164  {
165  theProductDisplacementVector[i] = -1./18.*RandDirection;
166  }
167  else if(product->GetDefinition() == G4Hydrogen::Definition())
168  {
169  theProductDisplacementVector[i] = +17./18.*RandDirection;
170  }
171  }
172  }
173  else if(decayType == B1A1_DissociationDecay)
174  {
175  if(fVerbose)
176  G4cout<<"B1A1_DissociationDecay"<<G4endl;
177  G4double theRMSDisplacement = 0.8 * nanometer;
178  G4ThreeVector RandDirection = radialDistributionOfProducts(theRMSDisplacement);
179 
180  G4int NbOfOH = 0;
181  for(G4int i =0 ; i < nbProducts ; i++)
182  {
183  const G4Molecule* product = theDecayChannel->GetProduct(i);
184  if(product->GetDefinition() == G4H2::Definition())
185  {
186  theProductDisplacementVector[i] = -2./18.*RandDirection;
187  }
188  else if(product->GetDefinition() == G4OH::Definition())
189  {
190  G4ThreeVector OxygenDisplacement = +16./18.*RandDirection;
191  G4double OHRMSDisplacement = 1.1 * nanometer;
192 
193  G4ThreeVector OHDisplacement = radialDistributionOfProducts(OHRMSDisplacement) ;
194 
195  if(NbOfOH==0)
196  {
197  OHDisplacement = 1./2.*OHDisplacement;
198  }
199  else
200  {
201  OHDisplacement = -1./2.*OHDisplacement;
202  }
203 
204  theProductDisplacementVector[i] = OHDisplacement + OxygenDisplacement;
205 
206  NbOfOH ++;
207  }
208  }
209  }
210  else if(decayType == AutoIonisation)
211  {
212  if(fVerbose)
213  G4cout<<"AutoIonisation"<<G4endl;
214  G4double RdmValue = G4UniformRand();
215 
216  if(RdmValue< 0.5)
217  {
218  // H3O
219  theRMSmap[G4H3O::Definition()] = 0.* nanometer;
220  // OH
221  theRMSmap[G4OH::Definition()] = 0.8* nanometer;
222  }
223  else
224  {
225  // H3O
226  theRMSmap[G4H3O::Definition()] = 0.8* nanometer;
227  // OH
228  theRMSmap[G4OH::Definition()] = 0.* nanometer;
229  }
230 
231  for(G4int i =0 ; i < nbProducts ; i++)
232  {
233  G4double theRMSDisplacement;
234  const G4Molecule* product = theDecayChannel->GetProduct(i);
235  theRMSDisplacement = theRMSmap[product->GetDefinition()];
236 
237  if(theRMSDisplacement==0)
238  {
239  theProductDisplacementVector[i] = G4ThreeVector();
240  }
241  else
242  {
243  G4ThreeVector RandDirection = radialDistributionOfProducts(theRMSDisplacement);
244  theProductDisplacementVector[i] = RandDirection;
245  }
246  if(product->GetDefinition() == G4Electron_aq::Definition())
247  {
248  theProductDisplacementVector[i]=radialDistributionOfElectron();
249  }
250  }
251  }
252  else if(decayType == DissociativeAttachment)
253  {
254  if(fVerbose)
255  G4cout<<"DissociativeAttachment"<<G4endl;
256  G4double theRMSDisplacement = 0.8 * nanometer;
257  G4ThreeVector RandDirection = radialDistributionOfProducts(theRMSDisplacement);
258 
259  G4int NbOfOH = 0;
260  for(G4int i =0 ; i < nbProducts ; i++)
261  {
262  const G4Molecule* product = theDecayChannel->GetProduct(i);
263  if(product->GetDefinition() == G4H2::Definition())
264  {
265  theProductDisplacementVector[i] = -2./18.*RandDirection;
266  }
267  else if(product->GetDefinition() == G4OH::Definition())
268  {
269  G4ThreeVector OxygenDisplacement = +16./18.*RandDirection;
270  G4double OHRMSDisplacement = 1.1 * nanometer;
271 
272  G4ThreeVector OHDisplacement = radialDistributionOfProducts(OHRMSDisplacement) ;
273 
274  if(NbOfOH==0)
275  {
276  OHDisplacement = 1./2.*OHDisplacement;
277  }
278  else
279  {
280  OHDisplacement = -1./2.*OHDisplacement;
281  }
282 
283  theProductDisplacementVector[i] = OHDisplacement + OxygenDisplacement;
284 
285  NbOfOH ++;
286  }
287  }
288  }
289 
290  return theProductDisplacementVector;
291 }
static G4DLLIMPORT const DisplacementType AutoIonisation
static G4DLLIMPORT const DisplacementType B1A1_DissociationDecay
static G4Electron_aq * Definition()
static G4DLLIMPORT const DisplacementType A1B1_DissociationDecay
CLHEP::Hep3Vector G4ThreeVector
static G4DLLIMPORT const DisplacementType Ionisation_DissociationDecay
int G4int
Definition: G4Types.hh:78
int nanometer
Definition: hepunit.py:35
static G4DLLEXPORT const DisplacementType DissociativeAttachment
#define G4UniformRand()
Definition: Randomize.hh:87
G4GLOB_DLL std::ostream G4cout
static G4H3O * Definition()
Definition: G4H3O.cc:47
const G4MoleculeDefinition * GetDefinition() const
Definition: G4Molecule.cc:379
#define G4endl
Definition: G4ios.hh:61
static G4OH * Definition()
Definition: G4OH.cc:46
double G4double
Definition: G4Types.hh:76
static G4H2 * Definition()
Definition: G4H2.cc:46
const G4Molecule * GetProduct(int) const
static G4Hydrogen * Definition()
Definition: G4Hydrogen.cc:46
G4ThreeVector G4DNAWaterDissociationDisplacer::radialDistributionOfElectron ( ) const

Definition at line 345 of file G4DNAWaterDissociationDisplacer.cc.

References G4UniformRand, python.hepunit::nanometer, python.hepunit::pi, and G4INCL::Math::sign().

Referenced by GetProductsDisplacement().

346 {
347 
348  G4double sigma = 1./2.;
349  G4double expectationValue = 1. ;
350 
351  G4double XValueForfMax = 1./2.;
352  G4double fMaxValue = 4. * XValueForfMax *
353  exp(-2. * XValueForfMax);
354 
355  G4double R(-1.);
356 
357  do
358  {
359  G4double aRandomfValue = fMaxValue*G4UniformRand();
360 
361  G4double sign;
362  if(G4UniformRand() > 0.5)
363  {
364  sign = +1;
365  }
366  else
367  {
368  sign = -1;
369  }
370 
371  R = (expectationValue * G4UniformRand() )+ sign*3*sigma* G4UniformRand();
372  G4double f = 4* R * exp(- 2. * R);
373 
374  if(aRandomfValue < f)
375  {
376  break;
377  }
378  }
379  while(1);
380 
381  G4double Rnano = R *10* nanometer;
382 
383  G4double costheta = (2*G4UniformRand()-1);
384  G4double theta = acos (costheta);
385  G4double phi = 2*pi*G4UniformRand();
386 
387  G4double xDirection = Rnano*cos(phi)* sin(theta);
388  G4double yDirection = Rnano*sin(theta)*sin(phi);
389  G4double zDirection = Rnano*costheta;
390  G4ThreeVector RandDirection(xDirection, yDirection, zDirection);
391 
392  return RandDirection;
393 }
int nanometer
Definition: hepunit.py:35
#define G4UniformRand()
Definition: Randomize.hh:87
double G4double
Definition: G4Types.hh:76
G4int sign(const T t)

Field Documentation

const DisplacementType G4DNAWaterDissociationDisplacer::A1B1_DissociationDecay = G4VMolecularDecayDisplacer::AddDisplacement()
static
const DisplacementType G4DNAWaterDissociationDisplacer::AutoIonisation = G4VMolecularDecayDisplacer::AddDisplacement()
static
const DisplacementType G4DNAWaterDissociationDisplacer::B1A1_DissociationDecay = G4VMolecularDecayDisplacer::AddDisplacement()
static
const DisplacementType G4DNAWaterDissociationDisplacer::DissociativeAttachment = G4VMolecularDecayDisplacer::AddDisplacement()
static
const DisplacementType G4DNAWaterDissociationDisplacer::Ionisation_DissociationDecay = G4VMolecularDecayDisplacer::AddDisplacement()
static

The documentation for this class was generated from the following files: