Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4DNAWaterDissociationDisplacer Class Reference

#include <G4DNAWaterDissociationDisplacer.hh>

Inheritance diagram for G4DNAWaterDissociationDisplacer:
Collaboration diagram for G4DNAWaterDissociationDisplacer:

Public Member Functions

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

Static Public Member Functions

static G4double ElectronProbaDistribution (G4double r)
 

Additional Inherited Members

- Protected Member Functions inherited from G4VMolecularDecayDisplacer
 G4VMolecularDecayDisplacer ()
 
- Protected Attributes inherited from G4VMolecularDecayDisplacer
G4int fVerbose
 

Detailed Description

Definition at line 57 of file G4DNAWaterDissociationDisplacer.hh.

Constructor & Destructor Documentation

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

Definition at line 146 of file G4DNAWaterDissociationDisplacer.cc.

147 {;}

Member Function Documentation

static G4double G4DNAWaterDissociationDisplacer::ElectronProbaDistribution ( G4double  r)
static
G4ThreeVector G4DNAWaterDissociationDisplacer::GetMotherMoleculeDisplacement ( const G4MolecularDissociationChannel theDecayChannel) const
overridevirtual

Implements G4VMolecularDecayDisplacer.

Definition at line 153 of file G4DNAWaterDissociationDisplacer.cc.

155 {
156  G4int decayType = theDecayChannel->GetDisplacementType();
157  G4double RMSMotherMoleculeDisplacement(0.);
158 
159  switch(decayType){
160  case Ionisation_DissociationDecay:
161  RMSMotherMoleculeDisplacement = 2.0 * nanometer;
162  break;
163  case A1B1_DissociationDecay:
164  RMSMotherMoleculeDisplacement = 0. * nanometer;
165  break;
166  case B1A1_DissociationDecay:
167  RMSMotherMoleculeDisplacement = 0. * nanometer;
168  break;
169  case AutoIonisation:
170  RMSMotherMoleculeDisplacement = 2.0 * nanometer;
171  break;
172  case DissociativeAttachment:
173  RMSMotherMoleculeDisplacement = 0. * nanometer;
174  break;
175  }
176 
177  if(RMSMotherMoleculeDisplacement == 0){
178  return G4ThreeVector(0, 0, 0);
179  }
180  auto RandDirection =
181  radialDistributionOfProducts(RMSMotherMoleculeDisplacement);
182 
183  return RandDirection;
184 }
CLHEP::Hep3Vector G4ThreeVector
static constexpr double nanometer
Definition: G4SIunits.hh:101
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76
G4ThreeVector radialDistributionOfProducts(G4double r_rms) const

Here is the call graph for this function:

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

Implements G4VMolecularDecayDisplacer.

Definition at line 190 of file G4DNAWaterDissociationDisplacer.cc.

192 {
193  G4int nbProducts = theDecayChannel->GetNbProducts();
194  vector<G4ThreeVector> theProductDisplacementVector(nbProducts);
195 
196  typedef map<const G4MoleculeDefinition*, G4double> RMSmap;
197  RMSmap theRMSmap;
198 
199  G4int decayType = theDecayChannel->GetDisplacementType();
200 
201  switch(decayType){
202  case Ionisation_DissociationDecay:
203  {
204  if (fVerbose){
205  G4cout << "Ionisation_DissociationDecay" << G4endl;
206  G4cout << "Channel's name: " << theDecayChannel->GetName() << G4endl;
207  }
208  G4double RdmValue = G4UniformRand();
209 
210  if(RdmValue< 0.5){
211  // H3O
212  theRMSmap[G4H3O::Definition()] = 0.* nanometer;
213  // OH
214  theRMSmap[G4OH::Definition()] = 0.8* nanometer;
215  }
216  else{
217  // H3O
218  theRMSmap[G4H3O::Definition()] = 0.8* nanometer;
219  // OH
220  theRMSmap[G4OH::Definition()] = 0.* nanometer;
221  }
222 
223  for(int i = 0; i < nbProducts; i++){
224  G4MolecularConfiguration* product = theDecayChannel->GetProduct(i);
225  G4double theRMSDisplacement = theRMSmap[product->GetDefinition()];
226 
227  if(theRMSDisplacement==0.){
228  theProductDisplacementVector[i] = G4ThreeVector();
229  }
230  else{
231  auto RandDirection = radialDistributionOfProducts(theRMSDisplacement);
232  theProductDisplacementVector[i] = RandDirection;
233  }
234  }
235  break;
236  }
237  case A1B1_DissociationDecay:
238  {
239  if(fVerbose){
240  G4cout<<"A1B1_DissociationDecay"<<G4endl;
241  G4cout << "Channel's name: " << theDecayChannel->GetName() << G4endl;
242  }
243  G4double theRMSDisplacement = 2.4 * nanometer;
244  auto RandDirection =
245  radialDistributionOfProducts(theRMSDisplacement);
246 
247  for(G4int i =0; i < nbProducts; i++){
248  G4MolecularConfiguration* product = theDecayChannel->GetProduct(i);
249 
250  if(product->GetDefinition()== G4OH::Definition()){
251  // OH
252  theProductDisplacementVector[i] = -1./18.*RandDirection;
253  }
254  else if(product->GetDefinition() == G4Hydrogen::Definition()){
255  // H
256  theProductDisplacementVector[i] = +17./18.*RandDirection;
257  }
258  }
259  break;
260  }
261  case B1A1_DissociationDecay:
262  {
263  if(fVerbose){
264  G4cout<<"B1A1_DissociationDecay"<<G4endl;
265  G4cout << "Channel's name: " << theDecayChannel->GetName() << G4endl;
266  }
267 
268  G4double theRMSDisplacement = 0.8 * nanometer;
269  auto RandDirection =
270  radialDistributionOfProducts(theRMSDisplacement);
271 
272  G4int NbOfOH = 0;
273  for(G4int i =0; i < nbProducts; ++i)
274  {
275  G4MolecularConfiguration* product = theDecayChannel->GetProduct(i);
276  if(product->GetDefinition() == G4H2::Definition()){
277  // H2
278  theProductDisplacementVector[i] = -2./18.*RandDirection;
279  }
280  else if(product->GetDefinition() == G4OH::Definition()){
281  // OH
282  G4ThreeVector OxygenDisplacement = +16./18.*RandDirection;
283  G4double OHRMSDisplacement = 1.1 * nanometer;
284 
285  auto OHDisplacement =
286  radialDistributionOfProducts(OHRMSDisplacement);
287 
288  if(NbOfOH==0){
289  OHDisplacement = 0.5*OHDisplacement;
290  }
291  else{
292  OHDisplacement = -0.5*OHDisplacement;
293  }
294 
295  theProductDisplacementVector[i] =
296  OHDisplacement + OxygenDisplacement;
297 
298  ++NbOfOH;
299  }
300  }
301  break;
302  }
303  case AutoIonisation:
304  {
305  if(fVerbose){
306  G4cout<<"AutoIonisation"<<G4endl;
307  G4cout << "Channel's name: " << theDecayChannel->GetName() << G4endl;
308  }
309 
310  G4double RdmValue = G4UniformRand();
311 
312  if(RdmValue< 0.5){
313  // H3O
314  theRMSmap[G4H3O::Definition()] = 0.* nanometer;
315  // OH
316  theRMSmap[G4OH::Definition()] = 0.8* nanometer;
317  }
318  else{
319  // H3O
320  theRMSmap[G4H3O::Definition()] = 0.8* nanometer;
321  // OH
322  theRMSmap[G4OH::Definition()] = 0.* nanometer;
323  }
324 
325  for(G4int i =0; i < nbProducts; i++){
326  G4MolecularConfiguration* product = theDecayChannel->GetProduct(i);
327  auto theRMSDisplacement = theRMSmap[product->GetDefinition()];
328 
329  if(theRMSDisplacement==0){
330  theProductDisplacementVector[i] = G4ThreeVector();
331  }
332  else{
333  auto RandDirection =
334  radialDistributionOfProducts(theRMSDisplacement);
335  theProductDisplacementVector[i] = RandDirection;
336  }
337  if(product->GetDefinition() == G4Electron_aq::Definition()){
338  theProductDisplacementVector[i]=radialDistributionOfElectron();
339  }
340  }
341  break;
342  }
343  case DissociativeAttachment:
344  {
345  if(fVerbose){
346  G4cout<<"DissociativeAttachment"<<G4endl;
347  G4cout << "Channel's name: " << theDecayChannel->GetName() << G4endl;
348  }
349  G4double theRMSDisplacement = 0.8 * nanometer;
350  auto RandDirection =
351  radialDistributionOfProducts(theRMSDisplacement);
352 
353  G4int NbOfOH = 0;
354  for(G4int i =0; i < nbProducts; ++i){
355  G4MolecularConfiguration* product = theDecayChannel->GetProduct(i);
356  if(product->GetDefinition() == G4H2::Definition()){
357  theProductDisplacementVector[i] = -2./18.*RandDirection;
358  }
359  else if(product->GetDefinition() == G4OH::Definition()){
360  G4ThreeVector OxygenDisplacement = +16./18.*RandDirection;
361  G4double OHRMSDisplacement = 1.1 * nanometer;
362 
363  auto OHDisplacement =
364  radialDistributionOfProducts(OHRMSDisplacement);
365 
366  if(NbOfOH==0){
367  OHDisplacement = 0.5*OHDisplacement;
368  }
369  else{
370  OHDisplacement = -0.5*OHDisplacement;
371  }
372  theProductDisplacementVector[i] = OHDisplacement +
373  OxygenDisplacement;
374  ++NbOfOH;
375  }
376  }
377  break;
378  }
379  }
380  return theProductDisplacementVector;
381 }
static G4Electron_aq * Definition()
CLHEP::Hep3Vector G4ThreeVector
static constexpr double nanometer
Definition: G4SIunits.hh:101
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
G4MolecularConfiguration * GetProduct(int) const
static G4H3O * Definition()
Definition: G4H3O.cc:47
const G4MoleculeDefinition * GetDefinition() const
#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
G4ThreeVector radialDistributionOfProducts(G4double r_rms) const
static G4Hydrogen * Definition()
Definition: G4Hydrogen.cc:46

Here is the call graph for this function:

G4ThreeVector G4DNAWaterDissociationDisplacer::radialDistributionOfElectron ( ) const

Definition at line 400 of file G4DNAWaterDissociationDisplacer.cc.

401 {
402  G4double rand_value = G4UniformRand();
403  size_t nBins = fElectronThermalization.size();
404  size_t bin = size_t(floor(rand_value*nBins));
405  size_t bin_p1 = min(bin+1,nBins-1);
406 
407  return (fElectronThermalization[bin]*(1.-rand_value)
408  + fElectronThermalization[bin_p1]*rand_value)*
410 // return fElectronThermalization[bin]*G4RandomDirection();
411 }
G4ThreeVector G4RandomDirection()
#define G4UniformRand()
Definition: Randomize.hh:97
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

G4ThreeVector G4DNAWaterDissociationDisplacer::radialDistributionOfProducts ( G4double  r_rms) const

Definition at line 387 of file G4DNAWaterDissociationDisplacer.cc.

388 {
389  static const double inverse_sqrt_3 = 1./sqrt(3.);
390  double sigma = Rrms*inverse_sqrt_3;
391  double x = G4RandGauss::shoot(0.,sigma);
392  double y = G4RandGauss::shoot(0.,sigma);
393  double z = G4RandGauss::shoot(0.,sigma);
394  return G4ThreeVector(x,y,z);
395 }
ThreeVector shoot(const G4int Ap, const G4int Af)
CLHEP::Hep3Vector G4ThreeVector

Here is the call graph for this function:

Here is the caller graph for this function:


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