Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4DNAMolecularDecayDisplacer Class Reference

#include <G4DNAMolecularDecayDisplacer.hh>

+ Inheritance diagram for G4DNAMolecularDecayDisplacer:

Public Member Functions

 G4DNAMolecularDecayDisplacer ()
 
virtual ~G4DNAMolecularDecayDisplacer ()
 
virtual std::vector< G4ThreeVectorGetProductsDisplacement (const G4MolecularDecayChannel *) const
 
virtual G4ThreeVector GetMotherMoleculeDisplacement (const G4MolecularDecayChannel *) const
 
G4ThreeVector radialDistributionOfElectron () const
 
- Public Member Functions inherited from G4VMolecularDecayDisplacer
virtual std::vector< G4ThreeVectorGetProductsDisplacement (const G4MolecularDecayChannel *) const =0
 
virtual G4ThreeVector GetMotherMoleculeDisplacement (const G4MolecularDecayChannel *) const =0
 
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 DisplacementType Last = 0
 

Detailed Description

Definition at line 45 of file G4DNAMolecularDecayDisplacer.hh.

Constructor & Destructor Documentation

◆ G4DNAMolecularDecayDisplacer()

G4DNAMolecularDecayDisplacer::G4DNAMolecularDecayDisplacer ( )

◆ ~G4DNAMolecularDecayDisplacer()

G4DNAMolecularDecayDisplacer::~G4DNAMolecularDecayDisplacer ( )
virtual

Definition at line 64 of file G4DNAMolecularDecayDisplacer.cc.

65{;}

Member Function Documentation

◆ GetMotherMoleculeDisplacement()

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

Implements G4VMolecularDecayDisplacer.

Definition at line 67 of file G4DNAMolecularDecayDisplacer.cc.

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}
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
static G4DLLEXPORT const DisplacementType DissociativeAttachment
static G4DLLIMPORT const DisplacementType A1B1_DissociationDecay
static G4DLLIMPORT const DisplacementType Ionisation_DissociationDecay
static G4DLLIMPORT const DisplacementType B1A1_DissociationDecay
static G4DLLIMPORT const DisplacementType AutoIonisation

◆ GetProductsDisplacement()

vector< G4ThreeVector > G4DNAMolecularDecayDisplacer::GetProductsDisplacement ( const G4MolecularDecayChannel theDecayChannel) const
virtual

Implements G4VMolecularDecayDisplacer.

Definition at line 105 of file G4DNAMolecularDecayDisplacer.cc.

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}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
#define G4UniformRand()
Definition: Randomize.hh:53
G4ThreeVector radialDistributionOfElectron() const
static G4Electron_aq * Definition()
static G4H2 * Definition()
Definition: G4H2.cc:46
static G4H3O * Definition()
Definition: G4H3O.cc:47
static G4Hydrogen * Definition()
Definition: G4Hydrogen.cc:46
const G4Molecule * GetProduct(int) const
const G4MoleculeDefinition * GetDefinition() const
Definition: G4Molecule.cc:395
static G4OH * Definition()
Definition: G4OH.cc:46

◆ radialDistributionOfElectron()

G4ThreeVector G4DNAMolecularDecayDisplacer::radialDistributionOfElectron ( ) const

Definition at line 345 of file G4DNAMolecularDecayDisplacer.cc.

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
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}
G4int sign(T t)
const G4double pi

Referenced by GetProductsDisplacement().

Member Data Documentation

◆ A1B1_DissociationDecay

◆ AutoIonisation

◆ B1A1_DissociationDecay

◆ DissociativeAttachment

const DisplacementType G4DNAMolecularDecayDisplacer::DissociativeAttachment = G4VMolecularDecayDisplacer::AddDisplacement()
static

◆ Ionisation_DissociationDecay


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