nrc-cnrc / EGSnrc

Toolkit for Monte Carlo simulation of ionizing radiation — Trousse d'outils logiciels pour la simulation Monte Carlo du rayonnement ionisant
http://nrc-cnrc.github.io/EGSnrc
GNU Affero General Public License v3.0
220 stars 146 forks source link

EGSnrc PRESTA-I boundary crossing algorithm (BCA) #451

Open yingliang819 opened 6 years ago

yingliang819 commented 6 years ago

For the PRESTA's BCA, when the electron approaches the boundary, it is not allowed to take a step longer than t_p (the perpendicular distance to the closest boundary), unless t_p becomes smaller than t_min, a user defined minimum step-length for boundary crossing. For t_p < t_min, lateral deflections are switched off and the particle is transported, as in the case of standard EGS4, on a straight line to the boundary.

My question is, suppose an electron is transported to the boundary, and is ready to move to the next region, what algorithm will be used for the first step while entering the new region?

Literally, according to the description in the first paragraph, since the electron is sitting on the boundary, so t_p is 0 and of course satisfies t_p < t_min, so lateral deflections will be turned off and the electron may go far away from the boundary in a single step without any step corrections. I hope this understanding is not correct since this looks too simple and maybe inaccurate. I think there should be some algorithms to ensure that electrons leaving a boundary are simulated as accurately as electrons approaching a boundary.

I wrote this post since I cannot find the answer in the EGSnrc manual. Hope someone who knows the technical details would give me some hints. Thanks.

victorMalkov commented 6 years ago

Hi there, just a quick reply to this and maybe someone else will give a more detailed response, but essentially proper boundary transitions are handled by the single scattering algorithm in EGSnrc. Here electrons take linear steps on the order of the elastic scattering mean free path (which is generally very short). Once a new region is entered the code detects that the electron is close to/at a boundary and will enter this single scattering more. A howfar check in the direction of motion ensures that taking a linear step will not result in the particle ending up in another region by accident. At the end of the step the particle will have an elastic scattering event and then go on to the next step. Hopefully that answers your question. The same algorithm is used in approaching a boundary.

On Tue, Jun 5, 2018 at 11:09 PM yingliang819 notifications@github.com wrote:

For the PRESTA's BCA, when the electron approaches the boundary, it is not allowed to take a step longer than t_p (the perpendicular distance to the closest boundary), unless t_p becomes smaller than t_min, a user defined minimum step-length for boundary crossing. For t_p < t_min, lateral deflections are switched off and the particle is transported, as in the case of standard EGS4, on a straight line to the boundary.

My question is, suppose an electron is transported to the boundary, and is ready to move to the next region, what algorithm will be used for the first step while entering the new region?

Literally, according to the description in the first paragraph, since the electron is sitting on the boundary, so t_p is 0 and of course satisfies t_p < t_min, so lateral deflections will be turned off and the electron may go far away from the boundary in a single step without any step corrections. I hope this understanding is not correct since this looks too simple and maybe inaccurate. I think there should be some algorithms to ensure that electrons leaving a boundary are simulated as accurately as electrons approaching a boundary.

I wrote this post since I cannot find the answer in the EGSnrc manual. Hope someone who knows the technical details would give me some hints. Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nrc-cnrc/EGSnrc/issues/451, or mute the thread https://github.com/notifications/unsubscribe-auth/ASvkyeEp1jsq6retNJq0DsCPUkV5p5w6ks5t5vOigaJpZM4Ubj-b .

yingliang819 commented 6 years ago

Hi victorMalkov, thanks for your response. There are two options for boundary crossing in EGSnrc, exact boundary crossing and PRESTA's BCA, the former being the default. I think your description is about the exact boundary crossing option. But for PRESTA's BCA option, as I understand, simulation will not go to single scattering mode. Rather, it will use the EGS4 method and switch off lateral corrections.