# Help Understanding FLUKA Simulation Results for Compton Scattering: Scoring or Physics at Fault?

Background:
I am trying to simulate compton scattering of ~0.004 GeV photons through a thin Silicon Nitride target in a vacuum. Eventually, I want to simulate detector via scintillation at some arbitrary position from the source but am trying to get a good grip on the physics and use of Fluka first.

Approach:
I defined two regions an ‘upstream’ and ‘downstream’. I set the downstream region to be a distance of 1 cm away from the Silicon nitride target. I made small cylindrical hole in the downstream region that is aligned with the beamaxis to avoid scoring particles that are not scattered.I use the USERDUMP routine to write out the boundary crossing for each photon/electron into the downstream region. I am dumping:

      ! Count photons JTRACK=7 only if they cross between the two specified regions
if (MREG == region_number_out .and. NEWREG == region_number_in .and. JTRACK == 7) then
WRITE(98,*) ETRACK, ATRACK, XSCO, YSCO, ZSCO
end if
! Now select only electrons - should have a TJrack =3
if (MREG == region_number_out .and. NEWREG == region_number_in .and. JTRACK == 3) then
WRITE(99,*) ETRACK, ATRACK, XSCO, YSCO, ZSCO,
end if
if (MREG == region_number_out .and. NEWREG == region_number_in) then
photon_counter = photon_counter + 1
WRITE(97,*) photon_counter, JTRACK
end if


Given the process of compton scattering is inelastic, and I know the input beam energy, I should be able to calculate the position of an electron or photon give then known position of the scattered photon or electron:
i.e. knowing the scattered photons position and initial energy photon (Ei) makes it possible to calculate the electron position and vice versa. When I do some math I derive the following equation for the electron position (xe, ye) at the detector plane (a distance L away from the interaction point):

and

Problem:
I found that I cannot reproduce the position of the photon or the electrons that are written by the mgdraw routine. Below is an example of he recorded positions of a selection of electrons crossing into the downstream region. I also plot the expected position of electrons calculated from a the photon positions. But they do not overlap!

I observe the same problem for the calculated photon positions.

My problem is that calculated positions are often in the same/similar direction to as the scattered direction particle but I can not predict the position of an electron with a known photon position or vica versa.

Questions:
Overall I am unsure if my mis-understanding of Fluka or the underlying physics is at fault here:

1. Is my the mgdraw routing correctly writing the boundary crossing location? and is there a way to filter for electrons/photons that have undergone inelastic scattering / write a flag for particles that have undergone this in the Silicon nitride so I can confirm?
2. Why do my predicted positions and recorded for the electron and photon scattering not overlap? I understand that scattering can often be more complex that purely inelastic interactions however, my intuition is that further scattering of the electrons/photons should essentially randomize the position which is not what I observe.

Attachements:
flair input: second_compt.flair (3.9 KB)
mgdraw: comp_mgdraw.f (4.8 KB)
matlab code to reproduce plot: demo_code.txt (4.8 KB)

Hello James,

It looks like in your BXDRAW you are:

• writing in unit 98 all photon hits across your scoring boundary.
• writing in unit 99 all electron hits across your scoring boundary.

I unfortunately do not do Matlab so i could not follow much in your post-processing, but let me ask a simple question.

In your post-processing, are you assuming that every hit in the fort.98 file goes hand in hand with a hit in the fort.99 file? I.e. that you can pick the n-th line of each file and that should correspond to an e- and a photon coming from the same event?

Cheers,

Cesc

Hi Cesc,

Thanks for your response - I rewrote the plotting code in python and attached it here along with the .99 98 files.

I am not assuming that any hit matches any other yet. I am just using the position of each ‘detected’ photon to predict where the electron should be. To get the sign of the coordinates I am assuming that, for each photon the electron will be detected in the opposite quadrant of the detector - i.e.: A photon with coordinates (+x, +y) will give an an electron with some coordinate (-xe,-ye).

Best,
James
python_demo_code.txt (5.2 KB)
second_compt001_fort.99.dat (310 Bytes)
second_compt001_fort.98.dat (620 Bytes)

# Looking back

…then you compare your predicted electron position with what you get from the electron-scoring file, implicitly expecting that they should correlate.

Your approach is undermined/flawed by the fact that on its way out of the target, the electron produced in a Compton interaction still undergoes Coulomb scattering, gradually changing its direction. Thus, the electron direction (or position) you intercept at scoring level is no longer the original electron direction from the original Compton interaction - so you should not expect that these correlate. Instead, the e- direction at the exit of the slab is convoluted/smeared by the effect of several deflections on the electrostatic potential of the screened target atoms that the Compton e- encounters on its way out of the (even if thin) layer.

Another major aspect that eluded me on Friday:

I am trying to simulate compton scattering of ~0.004 GeV photons

Lovely. But why does your BEAM card have an energy of 400 keV? You’ll then be in an energy domain where photoelectric effect will still happen at a certain rate (still not dominating but certainly more frequent that at the intended 4 MeV). This leads to an additional flaw in the approach: the electrons you score are not exclusively from Compton interactions!

If you increase the incoming photon energy to 4 MeV, pair production may start to dominate, so a considerable fraction of e- you intercept at your boundary crossing will be from pair production rather than from Compton interactions…

As further higher-order effects (impacting possibly less than 1% of interacting primary photon histories but still noteworthy as possible pitfalls), to name but a few:

• the photons you score are not necessarily the Compton photons. Once in a while there will be Bremsstrahlung photons. Or Rayleigh interactions which deflect the photon direction.
• depending on how you set the delta ray production thresholds, you may even intercept secondary electrons knocked out as delta rays by the Compton electron (or an electron from an occasional photoelectric effect event) on its way out.

# Moving forward

You should instead intercept the Compton electron and photon directions at the individual interaction level, by way of the USDRAW entry in mgdraw.f. With this you are sure you intercept the actual events you care about and that you are free from inadvertently flawed assumptions, further interactions convoluting/smearing the information you want, etc.

I did not attempt to derive your expressions. Triple check they’re alright (i was a bit surprised by the lack of the ratio of outgoing and incoming photon energies that appears all the time when one does Compton scattering kinematics, but maybe they’re alright).

For good measure, I made sure the kinematics checks out at interaction level. Let \textbf{p}_\gamma, \textbf{p}'_\gamma, and \textbf{p}'_e be the incoming photon, Compton photon, and Compton electron linear momentum, respectively. Assuming that the target electron is free (unbound) and at rest, a trivial request of momentum conservation,

\textbf{p}'_e= \textbf{p}_\gamma -\textbf{p}'_\gamma

leads (taking the dot product left and right with \textbf{p}_\gamma and applying minimal manipulation) to

\cos\theta'_e = \frac {E_\gamma-E'_\gamma\cos\theta'_\gamma} {\sqrt{E_\gamma^2+(E'_\gamma)^2-2E_\gamma E'_\gamma \cos\theta'_\gamma}},

or, dividing numerator and denominator in the right-hand side by E_\gamma,

\cos\theta'_e = \frac {1-\tau\cos\theta'_\gamma} {\sqrt{1+\tau^2-2\tau \cos\theta'_\gamma}}, \qquad \tau=\frac{E'_\gamma}{E_\gamma}

thus relating \theta'_\gamma and \theta'_e, i.e. the polar angle (with respect to the incoming photon direction) of the Compton photon and electron, respectively, employing a common notation in terms of \tau. NB: E_\gamma and E'_\gamma are the initial and Compton photon energies, respectively.

Here goes an mgdraw.f that intercepts Compton events and writes out Compton photon and Compton electron angles (and a cross check with the kinematics check above). Triple check and adapt it as needed, it’s up to you:

mgdraw.f (11.6 KB)

You’ll notice:

• I am not even assuming that the incoming photon goes along z (just in case there’s a prior photon interaction, unlikely as it may be in a thin layer, but see below…)
• It measures \theta'_\gamma from the final state of the Compton interaction
• It measures \theta'_e from the final state of the Compton interaction
• It evaluates \theta'_e as per the naive expression above (assuming the target e- is free and at rest).
• It writes everything out to unit 70, including the generation of the interacting photon (LTRACK).
• In addition, it writes out to unit 80 a log of all interactions that are not Compton interactions.

Here goes a plot of \theta'_e as a function of \theta'_\gamma, exctracting the former from FLUKA (red) vs from the simplistic kinematics expectation above (blue) for 4 MeV (actual 4 MeV, not 400 keV!) photons in Si:

Pretty much spot on, except for occasional mild outliers. These are due to the fact that, as opposed to our simple kinematics exercise above where the target e- is assumed free (unbound) and at rest, in reality e- are bound to some atomic shell (so the binding energy should be discounted from the available energy in the kinematics) and they are far from at rest: every atomic orbital \Psi_{n \ell j} has a well defined momentum distribution. FLUKA takes both effects into account.

Certainly at 4 MeV these effects have modest consequences (typical atomic binding energies are in the order of say 10-100 keV), so picturing the target e- free and at rest is a pretty decent Ansatz. If you reduce the energy to, say, 400 keV, the discrepancies with respect to the simple kinematics expectation become more drastic, since at this photon energy one can no longer expect that the simple picture of the target e- being free and at rest is reasonable:

This may also contribute to explain why in your case (inadvertently at 400 keV) you got considerable mismatches, in addition to the points raised at the beginning of this reply.

Finally, just as a curiosity (to stress that photons will not only do Compton scattering in the slab), in the 70 (Compton log) file, you’ll occasionally see Compton-interacting photons with generation number 2 (at least for the 400 keV case). These are then not beam photons (!). I did not run after them, but if i had to take a guess i’d initially think they are Rayleigh scattered or Bremsstrahlung photons. In addition, as expected, in the 80 file (logging all non-Compton interactions) you’ll see a healthy number of pair production events for the 4 MeV primary energy case, and a number of Rayleigh and photoelectric interactions for the 400 keV case.

Hope this helps.

Cesc

4 Likes