Geant4  10.02.p03
G4DNAWaterDissociationDisplacer Class Reference

#include <G4DNAWaterDissociationDisplacer.hh>

Inheritance diagram for G4DNAWaterDissociationDisplacer:
Collaboration diagram for G4DNAWaterDissociationDisplacer:

Public Member Functions

 G4DNAWaterDissociationDisplacer ()
 
virtual ~G4DNAWaterDissociationDisplacer ()
 
virtual std::vector< G4ThreeVectorGetProductsDisplacement (const G4MolecularDissociationChannel *) const
 
virtual G4ThreeVector GetMotherMoleculeDisplacement (const G4MolecularDissociationChannel *) const
 
G4ThreeVector radialDistributionOfElectron () const
 
G4ThreeVector radialDistributionOfProducts (G4double r_rms) const
 
- Public Member Functions inherited from G4VMolecularDecayDisplacer
void SetVerbose (G4int)
 
virtual ~G4VMolecularDecayDisplacer ()
 

Static Public Member Functions

static G4double ElectronProbaDistribution (G4double r)
 

Static Public Attributes

static G4DLLIMPORT const DisplacementType Ionisation_DissociationDecay
 
static G4DLLIMPORT const DisplacementType A1B1_DissociationDecay
 
static G4DLLIMPORT const DisplacementType B1A1_DissociationDecay
 
static G4DLLIMPORT const DisplacementType AutoIonisation
 
static G4DLLIMPORT const DisplacementType DissociativeAttachment
 
- Static Public Attributes inherited from G4VMolecularDecayDisplacer
static G4DLLIMPORT const DisplacementType NoDisplacement
 

Private Attributes

std::function< G4double(G4double)> fProba1DFunction
 
std::vector< G4doublefElectronThermalization
 
G4DNARevertProbability fFastElectronDistrib
 

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 54 of file G4DNAWaterDissociationDisplacer.hh.

Constructor & Destructor Documentation

◆ G4DNAWaterDissociationDisplacer()

G4DNAWaterDissociationDisplacer::G4DNAWaterDissociationDisplacer ( )

Definition at line 76 of file G4DNAWaterDissociationDisplacer.cc.

76  :
78  fFastElectronDistrib(0, 10, 0.001)
79 {
81  std::bind((G4double(*)(G4double))
83  std::placeholders::_1);
84 
85  size_t nBins = 100;
86 
87  fElectronThermalization.reserve(nBins);
88 
89  double eps = 1./((int)nBins);
90 
91  // G4cout << "eps = " << eps << G4endl;
92 
93  double proba = eps;
94 
95  fElectronThermalization.push_back(0.);
96 
97  for(size_t i = 1 ; i < nBins ; ++i)
98  {
100  fElectronThermalization.push_back(r);
101  proba+=eps;
102  }
103 }
std::function< G4double(G4double)> fProba1DFunction
static const G4double eps
static G4double ElectronProbaDistribution(G4double r)
double Revert(double probaForSearchedTime, std::function< double(double)> &funct)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ ~G4DNAWaterDissociationDisplacer()

G4DNAWaterDissociationDisplacer::~G4DNAWaterDissociationDisplacer ( )
virtual

Definition at line 107 of file G4DNAWaterDissociationDisplacer.cc.

108 {
109  ;
110 }
Here is the call graph for this function:

Member Function Documentation

◆ ElectronProbaDistribution()

G4double G4DNAWaterDissociationDisplacer::ElectronProbaDistribution ( G4double  r)
static

Definition at line 69 of file G4DNAWaterDissociationDisplacer.cc.

70 {
71  return (2*r+1)*exp(-2*r);
72 }
Here is the caller graph for this function:

◆ GetMotherMoleculeDisplacement()

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

Implements G4VMolecularDecayDisplacer.

Definition at line 116 of file G4DNAWaterDissociationDisplacer.cc.

117 {
118  G4int decayType = theDecayChannel->GetDisplacementType();
119 
120  G4double RMSMotherMoleculeDisplacement = 0;
121 
122  if (decayType == Ionisation_DissociationDecay)
123  {
124  RMSMotherMoleculeDisplacement = 2.0 * nanometer;
125  }
126  else if (decayType == A1B1_DissociationDecay)
127  {
128  RMSMotherMoleculeDisplacement = 0. * nanometer;
129  }
130  else if (decayType == B1A1_DissociationDecay)
131  {
132  RMSMotherMoleculeDisplacement = 0. * nanometer;
133  }
134  else if (decayType == AutoIonisation)
135  {
136  RMSMotherMoleculeDisplacement = 2.0 * nanometer;
137  }
138  else if (decayType == DissociativeAttachment)
139  {
140  RMSMotherMoleculeDisplacement = 0. * nanometer;
141  }
142 
143  if (RMSMotherMoleculeDisplacement == 0)
144  {
145  return G4ThreeVector(0, 0, 0);
146  }
147  auto RandDirection = radialDistributionOfProducts(
148  RMSMotherMoleculeDisplacement);
149 
150  return RandDirection;
151 }
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
static const double nanometer
Definition: G4SIunits.hh:100
int G4int
Definition: G4Types.hh:78
static G4DLLIMPORT const DisplacementType DissociativeAttachment
double G4double
Definition: G4Types.hh:76
G4ThreeVector radialDistributionOfProducts(G4double r_rms) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetProductsDisplacement()

vector< G4ThreeVector > G4DNAWaterDissociationDisplacer::GetProductsDisplacement ( const G4MolecularDissociationChannel theDecayChannel) const
virtual

Implements G4VMolecularDecayDisplacer.

Definition at line 157 of file G4DNAWaterDissociationDisplacer.cc.

158 {
159  G4int nbProducts = theDecayChannel->GetNbProducts();
160  vector<G4ThreeVector> theProductDisplacementVector(nbProducts);
161 
162  typedef map<const G4MoleculeDefinition*, G4double> RMSmap;
163  RMSmap theRMSmap;
164 
165  G4int decayType = theDecayChannel->GetDisplacementType();
166 
167  if (decayType == Ionisation_DissociationDecay)
168  {
169  if (fVerbose) G4cout << "Ionisation_DissociationDecay" << G4endl;
170  G4double RdmValue = G4UniformRand();
171 
172  if(RdmValue< 0.5)
173  {
174  // H3O
175  theRMSmap[G4H3O::Definition()] = 0.* nanometer;
176  // OH
177  theRMSmap[G4OH::Definition()] = 0.8* nanometer;
178  }
179  else
180  {
181  // H3O
182  theRMSmap[G4H3O::Definition()] = 0.8* nanometer;
183  // OH
184  theRMSmap[G4OH::Definition()] = 0.* nanometer;
185  }
186 
187  for(int i = 0; i < nbProducts; i++)
188  {
189  G4double theRMSDisplacement;
190  G4MolecularConfiguration* product = theDecayChannel->GetProduct(i);
191  theRMSDisplacement = theRMSmap[product->GetDefinition()];
192 
193  if(theRMSDisplacement==0)
194  {
195  theProductDisplacementVector[i] = G4ThreeVector();
196  }
197  else
198  {
199  auto RandDirection = radialDistributionOfProducts(theRMSDisplacement);
200  theProductDisplacementVector[i] = RandDirection;
201  }
202  }
203  }
204  else if(decayType == A1B1_DissociationDecay)
205  {
206  if(fVerbose)
207  G4cout<<"A1B1_DissociationDecay"<<G4endl;
208  G4double theRMSDisplacement = 2.4 * nanometer;
209  auto RandDirection =
210  radialDistributionOfProducts(theRMSDisplacement);
211 
212  for(G4int i =0; i < nbProducts; i++)
213  {
214  G4MolecularConfiguration* product = theDecayChannel->GetProduct(i);
215 
216  if(product->GetDefinition()== G4OH::Definition())
217  {
218  theProductDisplacementVector[i] = -1./18.*RandDirection;
219  }
220  else if(product->GetDefinition() == G4Hydrogen::Definition())
221  {
222  theProductDisplacementVector[i] = +17./18.*RandDirection;
223  }
224  }
225  }
226  else if(decayType == B1A1_DissociationDecay)
227  {
228  if(fVerbose)
229  G4cout<<"B1A1_DissociationDecay"<<G4endl;
230  G4double theRMSDisplacement = 0.8 * nanometer;
231  auto RandDirection =
232  radialDistributionOfProducts(theRMSDisplacement);
233 
234  G4int NbOfOH = 0;
235  for(G4int i =0; i < nbProducts; i++)
236  {
237  G4MolecularConfiguration* product = theDecayChannel->GetProduct(i);
238  if(product->GetDefinition() == G4H2::Definition())
239  {
240  theProductDisplacementVector[i] = -2./18.*RandDirection;
241  }
242  else if(product->GetDefinition() == G4OH::Definition())
243  {
244  G4ThreeVector OxygenDisplacement = +16./18.*RandDirection;
245  G4double OHRMSDisplacement = 1.1 * nanometer;
246 
247  auto OHDisplacement =
248  radialDistributionOfProducts(OHRMSDisplacement);
249 
250  if(NbOfOH==0)
251  {
252  OHDisplacement = 1./2.*OHDisplacement;
253  }
254  else
255  {
256  OHDisplacement = -1./2.*OHDisplacement;
257  }
258 
259  theProductDisplacementVector[i] =
260  OHDisplacement + OxygenDisplacement;
261 
262  NbOfOH ++;
263  }
264  }
265  }
266  else if(decayType == AutoIonisation)
267  {
268  if(fVerbose)
269  G4cout<<"AutoIonisation"<<G4endl;
270  G4double RdmValue = G4UniformRand();
271 
272  if(RdmValue< 0.5)
273  {
274  // H3O
275  theRMSmap[G4H3O::Definition()] = 0.* nanometer;
276  // OH
277  theRMSmap[G4OH::Definition()] = 0.8* nanometer;
278  }
279  else
280  {
281  // H3O
282  theRMSmap[G4H3O::Definition()] = 0.8* nanometer;
283  // OH
284  theRMSmap[G4OH::Definition()] = 0.* nanometer;
285  }
286 
287  for(G4int i =0; i < nbProducts; i++)
288  {
289  G4MolecularConfiguration* product = theDecayChannel->GetProduct(i);
290  auto theRMSDisplacement = theRMSmap[product->GetDefinition()];
291 
292  if(theRMSDisplacement==0)
293  {
294  theProductDisplacementVector[i] = G4ThreeVector();
295  }
296  else
297  {
298  auto RandDirection =
299  radialDistributionOfProducts(theRMSDisplacement);
300  theProductDisplacementVector[i] = RandDirection;
301  }
302  if(product->GetDefinition() == G4Electron_aq::Definition())
303  {
304  theProductDisplacementVector[i]=radialDistributionOfElectron();
305  }
306  }
307  }
308  else if(decayType == DissociativeAttachment)
309  {
310  if(fVerbose)
311  G4cout<<"DissociativeAttachment"<<G4endl;
312  G4double theRMSDisplacement = 0.8 * nanometer;
313  auto RandDirection =
314  radialDistributionOfProducts(theRMSDisplacement);
315 
316  G4int NbOfOH = 0;
317  for(G4int i =0; i < nbProducts; i++)
318  {
319  G4MolecularConfiguration* product = theDecayChannel->GetProduct(i);
320  if(product->GetDefinition() == G4H2::Definition())
321  {
322  theProductDisplacementVector[i] = -2./18.*RandDirection;
323  }
324  else if(product->GetDefinition() == G4OH::Definition())
325  {
326  G4ThreeVector OxygenDisplacement = +16./18.*RandDirection;
327  G4double OHRMSDisplacement = 1.1 * nanometer;
328 
329  auto OHDisplacement =
330  radialDistributionOfProducts(OHRMSDisplacement);
331 
332  if(NbOfOH==0)
333  {
334  OHDisplacement = 1./2.*OHDisplacement;
335  }
336  else
337  {
338  OHDisplacement = -1./2.*OHDisplacement;
339  }
340 
341  theProductDisplacementVector[i] = OHDisplacement + OxygenDisplacement;
342 
343  NbOfOH ++;
344  }
345  }
346  }
347 
348  return theProductDisplacementVector;
349 }
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
static const double nanometer
Definition: G4SIunits.hh:100
const G4MoleculeDefinition * GetDefinition() const
int G4int
Definition: G4Types.hh:78
G4MolecularConfiguration * GetProduct(int) const
static G4DLLIMPORT const DisplacementType DissociativeAttachment
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
static G4H3O * Definition()
Definition: G4H3O.cc:47
#define G4endl
Definition: G4ios.hh:61
static G4OH * Definition()
Definition: G4OH.cc:46
double G4double
Definition: G4Types.hh:76
G4ThreeVector radialDistributionOfProducts(G4double r_rms) const
static G4H2 * Definition()
Definition: G4H2.cc:46
static G4Hydrogen * Definition()
Definition: G4Hydrogen.cc:46
Here is the call graph for this function:
Here is the caller graph for this function:

◆ radialDistributionOfElectron()

G4ThreeVector G4DNAWaterDissociationDisplacer::radialDistributionOfElectron ( ) const

Definition at line 368 of file G4DNAWaterDissociationDisplacer.cc.

369 {
370  G4double rand_value = G4UniformRand();
371  size_t nBins = fElectronThermalization.size();
372  size_t bin = size_t(rand_value*nBins);
374 }
float bin[41]
Definition: plottest35.C:14
G4ThreeVector G4RandomDirection()
#define G4UniformRand()
Definition: Randomize.hh:97
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ radialDistributionOfProducts()

G4ThreeVector G4DNAWaterDissociationDisplacer::radialDistributionOfProducts ( G4double  r_rms) const

Definition at line 355 of file G4DNAWaterDissociationDisplacer.cc.

356 {
357  static const double inverse_sqrt_3 = 1./sqrt(3.);
358  double sigma = Rrms*inverse_sqrt_3;
359  double x = G4RandGauss::shoot(0.,sigma);
360  double y = G4RandGauss::shoot(0.,sigma);
361  double z = G4RandGauss::shoot(0.,sigma);
362  return G4ThreeVector(x,y,z);
363 }
ThreeVector shoot(const G4int Ap, const G4int Af)
CLHEP::Hep3Vector G4ThreeVector
Double_t y
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ A1B1_DissociationDecay

const DisplacementType G4DNAWaterDissociationDisplacer::A1B1_DissociationDecay
static

◆ AutoIonisation

const DisplacementType G4DNAWaterDissociationDisplacer::AutoIonisation
static

◆ B1A1_DissociationDecay

const DisplacementType G4DNAWaterDissociationDisplacer::B1A1_DissociationDecay
static

◆ DissociativeAttachment

const DisplacementType G4DNAWaterDissociationDisplacer::DissociativeAttachment
static

◆ fElectronThermalization

std::vector<G4double> G4DNAWaterDissociationDisplacer::fElectronThermalization
private

Definition at line 82 of file G4DNAWaterDissociationDisplacer.hh.

◆ fFastElectronDistrib

G4DNARevertProbability G4DNAWaterDissociationDisplacer::fFastElectronDistrib
private

Definition at line 83 of file G4DNAWaterDissociationDisplacer.hh.

◆ fProba1DFunction

std::function<G4double(G4double)> G4DNAWaterDissociationDisplacer::fProba1DFunction
private

Definition at line 81 of file G4DNAWaterDissociationDisplacer.hh.

◆ Ionisation_DissociationDecay

const DisplacementType G4DNAWaterDissociationDisplacer::Ionisation_DissociationDecay
static

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