33 #ifndef G4DNASMOLUCHOWSKIDIFFUSION_HH_
34 #define G4DNASMOLUCHOWSKIDIFFUSION_HH_
61 return root_random.Rndm();
64 #define G4cout std::cout
65 #define G4endl std::endl
78 double sTransform = r / (2. * std::sqrt(D * t));
84 return sTransform * 2. * std::sqrt(D * t);
89 return std::pow(r / sTransform, 2.) / (4. *
D);
125 static double constant = -4./std::sqrt(3.141592653589793);
126 return sTransform*sTransform*
G4Exp(-sTransform*sTransform)*constant;
131 static double my_pi = 3.141592653589793;
132 static double constant = 4.*my_pi/std::pow(4.*my_pi, 1.5);
133 return r*r/std::pow(D * _time,1.5)*
G4Exp(-r*r/(4. * D * _time))*constant;
183 double proposedProba,
185 double& returnedValue)
195 bool returnFlag =
false;
203 if(proposedXValue >
fXmin)
204 fXmin = proposedXValue;
208 if(proposedXValue <
fXmax)
209 fXmax = proposedXValue;
222 if(proposedXValue <
fXmax)
223 fXmax = proposedXValue;
227 if(proposedXValue >
fXmin)
229 fXmin = proposedXValue;
240 fSum = proposedProba;
246 fXmax = proposedXValue;
250 fXmin = proposedXValue;
280 if(boundingBox.
Propose(x, newProba, nextProba, proposedX))
306 static double constant = 2./std::sqrt(3.141592653589793);
307 return erfc(sTransform) + constant*sTransform*
G4Exp(-sTransform*sTransform);
312 size_t index_low = (size_t) trunc(proba/
fEpsilon);
322 double tangente = (low_y-up_y)/(low_x - up_x);
324 return low_y + tangente*(proba-low_x);
327 size_t index_up = index_low+1;
341 double tangente = (low_y-up_y)/(low_x - up_x);
343 return low_y + tangente*(proba-low_x);